Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions src/main/java/edu/uiowa/cs/clc/kind2/api/Kind2Api.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public class Kind2Api {
private LogLevel logLevel;
private String lusMain;
private String lusMainType;
private String lusMainConst;
private String fakeFilepath;

public Kind2Api() {
Expand Down Expand Up @@ -178,6 +179,7 @@ public Kind2Api() {
logLevel = null;
lusMain = null;
lusMainType = null;
lusMainConst = null;
}

DebugLogger debug = new DebugLogger();
Expand Down Expand Up @@ -418,6 +420,10 @@ public List<String> getOptions() {
options.add("--lus_main_type");
options.add(lusMainType);
}
if (lusMainConst != null) {
options.add("--lus_main_const");
options.add(lusMainConst);
}
if (smtSolver != null) {
options.add("--smt_solver");
options.add(smtSolver.toString());
Expand Down Expand Up @@ -1419,16 +1425,27 @@ public void setLusMain(String lusMain) {
}

/**
* Set the top type declaration in the Lustre input file.
* Designate a type declaration in the Lustre input file as the main
* model element for the analysis
* <p>
* Default: "--%MAIN" annotation in source if any, last node otherwise
*
* @param lusMainType the main node
* @param lusMainType the main type
*/
public void setLusMainType(String lusMainType) {
this.lusMainType = lusMainType;
}

/**
* Designate a constant declaration in the Lustre input file as the main
* model element for the analysis
* <p>
*
* @param lusMainConst the main constant
*/
public void setLusMainConst(String lusMainConst) {
this.lusMainConst = lusMainConst;
}

/**
* Set the fake filepath for error messages.
*
Expand Down
1 change: 1 addition & 0 deletions src/main/java/edu/uiowa/cs/clc/kind2/results/Result.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ public void initialize(String json) {
astInfo = new TypeDeclInfo(jsonElement);
break;
case "constDecl":
case "paramDecl":
astInfo = new ConstDeclInfo(jsonElement);
break;
case "node":
Expand Down
Loading