public class BinarySearchOneDim extends Explorer
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.Integer> |
satPointsList
List of SAT points from the exploration
|
private java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
satPointsModelList
List of models for each SAT point
|
private boolean |
stopOnTimeout
Exploration stops on timeout if this flag is set to true
|
private java.util.List<java.lang.Integer> |
timedOutPointsList
List of TIMED OUT points from the exploration
|
private java.util.List<java.lang.Integer> |
unsatPointsList
List of UNSAT points from the exploration
|
dimensions, exploredPointsFileName, explorePointsfile, explParams, modelFile, modelFileName, outputDir, paretoPointsfile, paretoPointsFileName, perQuerytimeOutInSeconds, satPointsfile, satPointsFileName, timedOutPointsfile, timedOutPointsFileName, timeTakenForCurrentQuery, totalExplTime, totalQueryTimeOutInSeconds, unSatPointsfile, unsatPointsFileName
Constructor and Description |
---|
BinarySearchOneDim(java.lang.String outputDirectory,
int perQueryTimeOutSeconds,
int totalTimeOutInSeconds,
ExplorationParameters explorationParams)
Initialize Binary search explorer for one dimension
|
Modifier and Type | Method and Description |
---|---|
private java.util.List<java.lang.Integer> |
cloneList(java.util.List<java.lang.Integer> list)
Create a new instance of the list.
|
void |
explore()
Perform one dimension binary search exploration
|
int |
getLeastSatPoint()
Get the minimum value of SAT point that was found during exploration.
|
java.util.Map<java.lang.String,java.lang.String> |
getLeastSatPointModel()
Gets model of the minimum SAT value found during exploration.
|
java.util.List<java.lang.Integer> |
getSatPoints()
Get List of SAT points
|
java.util.List<java.lang.Integer> |
getTimedoutPoints()
Get List of TIMED OUT points
|
java.util.List<java.lang.Integer> |
getUnsatPoints()
Get List of UNSAT points
|
void |
readExploredPoints(java.lang.String resultsDirectory)
If we want to continue a previous exploration, we could just read the log file and
continue from the point where the exploration stopped.
|
private void |
readFileToArray(java.lang.String fileName,
java.lang.String[] paramStrings,
java.util.List<java.lang.Integer> listToAdd)
Read a log file of exploration to read SAT / UNSAT / TIMED OUT points.
|
private void |
readModelFile(java.lang.String fileName,
java.util.List<java.util.Map<java.lang.String,java.lang.String>> satPointsModelList)
Convert the string in the model file to List of model maps.
|
finalize, outputToFile, smtQuery
private java.util.List<java.lang.Integer> satPointsList
private java.util.List<java.lang.Integer> unsatPointsList
private java.util.List<java.lang.Integer> timedOutPointsList
private java.util.List<java.util.Map<java.lang.String,java.lang.String>> satPointsModelList
private boolean stopOnTimeout
public BinarySearchOneDim(java.lang.String outputDirectory, int perQueryTimeOutSeconds, int totalTimeOutInSeconds, ExplorationParameters explorationParams)
outputDirectory
- output directory to put log filesperQueryTimeOutSeconds
- time out for each SMT query in secondstotalTimeOutInSeconds
- global time out value in secondsexplorationParams
- exploration parameterspublic java.util.List<java.lang.Integer> getSatPoints()
public java.util.List<java.lang.Integer> getUnsatPoints()
public java.util.List<java.lang.Integer> getTimedoutPoints()
public java.util.Map<java.lang.String,java.lang.String> getLeastSatPointModel()
private void readModelFile(java.lang.String fileName, java.util.List<java.util.Map<java.lang.String,java.lang.String>> satPointsModelList)
fileName
- name of the model filesatPointsModelList
- list where SAT models will be stored.private void readFileToArray(java.lang.String fileName, java.lang.String[] paramStrings, java.util.List<java.lang.Integer> listToAdd)
fileName
- name of the file to be readparamStrings
- String in the file between the information fieldlistToAdd
- list where all the read points will be storedpublic void readExploredPoints(java.lang.String resultsDirectory)
resultsDirectory
- the directory where all the log files are stored.public int getLeastSatPoint()
private java.util.List<java.lang.Integer> cloneList(java.util.List<java.lang.Integer> list)
list
- list to be copiedpublic void explore()