public class Program extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ADDITIONAL_DATA_SYMBOL |
static String |
ASSIGNMENT_PATTERN |
static String |
BASE_IRTG_SYMBOL |
static String |
COMMENT_SYMBOL |
static String |
EXPORT_CODE |
static Method |
GET_ALG_METHOD |
static String |
GET_INTERP_CODE |
static String |
GLOBAL_CODE |
static String |
INITIALIZATION_CODE |
static String |
INITIALIZE_CODE |
static String |
LEFT_INPUT_DELIMITER |
static String |
LEFT_STRING_DELIMITER |
static String |
NULL_SYMBOL |
static String |
RIGHT_INPUT_DELIMITER |
static String |
RIGHT_STRING_DELIMITER |
static String |
START_WATCH_CODE |
static String |
STOP_WATCH_CODE |
static String |
VERBOSE_ALL |
Constructor and Description |
---|
Program(InterpretedTreeAutomaton irtg,
List<String> additionalData,
List<String> unparsedProgram,
Map<String,String> varRemapper)
Creates a new program for a given task and parameter values.
|
Modifier and Type | Method and Description |
---|---|
void |
run(Corpus corpus,
ResultManager resMan,
IntConsumer onInstanceSuccess,
int maxInstances,
boolean isWarmup,
Set<String> verboseMeasurements,
int flushFrequency)
Runs the program on all instances in the corpus.
|
public static final String BASE_IRTG_SYMBOL
public static final String ADDITIONAL_DATA_SYMBOL
public static final String LEFT_INPUT_DELIMITER
public static final String RIGHT_INPUT_DELIMITER
public static final String LEFT_STRING_DELIMITER
public static final String RIGHT_STRING_DELIMITER
public static final String NULL_SYMBOL
public static final String GET_INTERP_CODE
public static final String EXPORT_CODE
public static final String GLOBAL_CODE
public static final String INITIALIZATION_CODE
public static final String INITIALIZE_CODE
public static final String START_WATCH_CODE
public static final String STOP_WATCH_CODE
public static final String ASSIGNMENT_PATTERN
public static final String COMMENT_SYMBOL
public static final Method GET_ALG_METHOD
public static final String VERBOSE_ALL
public Program(InterpretedTreeAutomaton irtg, List<String> additionalData, List<String> unparsedProgram, Map<String,String> varRemapper) throws VariableNotDefinedException
irtg
- The basic IRTG for the program (denoted with $
in the code)additionalData
- The i-th entry of this is referred to in the code with #i.unparsedProgram
- The code of the task, line by line.varRemapper
- Maps variables to the lines of code that should fill them
(see the -V option in the CommandLineInterface
).VariableNotDefinedException
public void run(Corpus corpus, ResultManager resMan, IntConsumer onInstanceSuccess, int maxInstances, boolean isWarmup, Set<String> verboseMeasurements, int flushFrequency)
corpus
- resMan
- Determines what happens with the resultsonInstanceSuccess
- What to do once an instance is done (for example
giving the user feedback).maxInstances
- Cancels the run when this number of instances is
reached. input -1 to parse the whole corpus.isWarmup
- if true, do not send results to managerverboseMeasurements
- measurements which are to be displayed locally
for each iterationflushFrequency
- only flush the ResultManager every k iterationsCopyright © 2017. All rights reserved.