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
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ public class ContextHistory {
private Set<GhostState> ghosts;
private Set<AliasWrapper> aliases;
private Set<RefinedVariable> globalVars;
private Set<RefinedFunction> methods;

private ContextHistory() {
fileScopes = new HashMap<>();
localVars = new HashSet<>();
globalVars = new HashSet<>();
ghosts = new HashSet<>();
aliases = new HashSet<>();
methods = new HashSet<>();
}

public static ContextHistory getInstance() {
Expand All @@ -38,6 +40,7 @@ public void clearHistory() {
globalVars.clear();
ghosts.clear();
aliases.clear();
methods.clear();
}

public void saveContext(CtElement element, Context context) {
Expand All @@ -56,6 +59,7 @@ public void saveContext(CtElement element, Context context) {
globalVars.addAll(context.getCtxGlobalVars());
ghosts.addAll(context.getGhostStates());
aliases.addAll(context.getAliases());
methods.addAll(context.getCtxFunctions());
}

private String getScopePosition(CtElement element) {
Expand All @@ -81,6 +85,10 @@ public Set<AliasWrapper> getAliases() {
return aliases;
}

public Set<RefinedFunction> getMethods() {
return methods;
}

public Map<String, Set<String>> getFileScopes() {
return fileScopes;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public void visitCtIf(CtIf ifElement) {
thenRefs = Predicate.createConjunction(expRefs, freshIsTrue);
elseRefs = Predicate.createConjunction(expRefs, freshIsFalse);
}

freshRV = context.addInstanceToContext(pathVarName, factory.Type().BOOLEAN_PRIMITIVE, thenRefs, exp);
}
vcChecker.addPathVariable(freshRV);
Expand Down
Loading