Skip to content

Commit cbfcc38

Browse files
authored
Add Methods to Context History (#218)
1 parent 0de6d8f commit cbfcc38

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

liquidjava-verifier/src/main/java/liquidjava/processor/context/ContextHistory.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ public class ContextHistory {
1717
private Set<GhostState> ghosts;
1818
private Set<AliasWrapper> aliases;
1919
private Set<RefinedVariable> globalVars;
20+
private Set<RefinedFunction> methods;
2021

2122
private ContextHistory() {
2223
fileScopes = new HashMap<>();
2324
localVars = new HashSet<>();
2425
globalVars = new HashSet<>();
2526
ghosts = new HashSet<>();
2627
aliases = new HashSet<>();
28+
methods = new HashSet<>();
2729
}
2830

2931
public static ContextHistory getInstance() {
@@ -38,6 +40,7 @@ public void clearHistory() {
3840
globalVars.clear();
3941
ghosts.clear();
4042
aliases.clear();
43+
methods.clear();
4144
}
4245

4346
public void saveContext(CtElement element, Context context) {
@@ -56,6 +59,7 @@ public void saveContext(CtElement element, Context context) {
5659
globalVars.addAll(context.getCtxGlobalVars());
5760
ghosts.addAll(context.getGhostStates());
5861
aliases.addAll(context.getAliases());
62+
methods.addAll(context.getCtxFunctions());
5963
}
6064

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

88+
public Set<RefinedFunction> getMethods() {
89+
return methods;
90+
}
91+
8492
public Map<String, Set<String>> getFileScopes() {
8593
return fileScopes;
8694
}

0 commit comments

Comments
 (0)