|
|
@ -21,6 +21,8 @@ import java.io.IOException; |
|
|
|
|
|
|
|
|
|
|
|
public class Interpreter { |
|
|
|
public class Interpreter { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static long startTimeNanos = 0; |
|
|
|
|
|
|
|
|
|
|
|
static String objectName; |
|
|
|
static String objectName; |
|
|
|
|
|
|
|
|
|
|
|
// DATA STORE
|
|
|
|
// DATA STORE
|
|
|
@ -183,6 +185,7 @@ public class Interpreter { |
|
|
|
break; |
|
|
|
break; |
|
|
|
case halted: |
|
|
|
case halted: |
|
|
|
System.out.println("Program has halted normally."); |
|
|
|
System.out.println("Program has halted normally."); |
|
|
|
|
|
|
|
System.out.println("Total execution time (ns): " + (System.nanoTime() - startTimeNanos)); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case failedDataStoreFull: |
|
|
|
case failedDataStoreFull: |
|
|
|
System.out.println("Program has failed due to exhaustion of Data Store."); |
|
|
|
System.out.println("Program has failed due to exhaustion of Data Store."); |
|
|
@ -634,6 +637,7 @@ public class Interpreter { |
|
|
|
|
|
|
|
|
|
|
|
loadObjectProgram(objectName); |
|
|
|
loadObjectProgram(objectName); |
|
|
|
if (CT != CB) { |
|
|
|
if (CT != CB) { |
|
|
|
|
|
|
|
startTimeNanos = System.nanoTime(); |
|
|
|
interpretProgram(); |
|
|
|
interpretProgram(); |
|
|
|
showStatus(); |
|
|
|
showStatus(); |
|
|
|
} |
|
|
|
} |
|
|
|