Skip to content
Snippets Groups Projects
Commit 6d042348 authored by hansen's avatar hansen
Browse files

Fixed a bug in the trace file.

parent 22e3a442
Branches
Tags
No related merge requests found
......@@ -15,6 +15,7 @@ public class TLCOutputInfo {
Hashtable<String, String> namesMapping;
Hashtable<String, BType> typesTable;
Set<String> constants;
boolean constantSetup= false;
public String getBName(String tlaName){
return namesMapping.get(tlaName);
......@@ -28,12 +29,16 @@ public class TLCOutputInfo {
return typesTable;
}
public void setConstantSetup(){
this.constantSetup = true;
}
public boolean isAConstant(String tlaName){
return constants.contains(getBName(tlaName));
}
public boolean hasConstants(){
return constants.size()>0;
return constants.size()>0 || constantSetup;
}
public TLCOutputInfo(MachineContext machineContext, Renamer renamer,
......@@ -43,6 +48,10 @@ public class TLCOutputInfo {
typesTable = new Hashtable<String, BType>();
constants = machineContext.getConstants().keySet();
if(machineContext.getConstantsMachineClause() != null){
this.constantSetup = true;
}
LinkedHashMap<String, Node> identifiers = new LinkedHashMap<String, Node>();
identifiers.putAll(machineContext.getConstants());
identifiers.putAll(machineContext.getVariables());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment