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 @@ -53,12 +53,10 @@ public static ErrorEmitter launch(String file) {
processingManager.addProcessor(processor);

try {
// To only search the last package - less time spent
CtPackage v = factory.Package().getAll().stream().reduce((first, second) -> second).orElse(null);
if (v != null)
processingManager.process(v);
// To search all previous packages
// processingManager.process(factory.Package().getRootPackage());
// analyze all packages
CtPackage root = factory.Package().getRootPackage();
if (root != null)
processingManager.process(root);
} catch (Exception e) {
e.printStackTrace();
throw e;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,15 @@ private static String addInstanceWithState(TypeChecker tc, String superName, Str
prevInstance.getRefinement(), invocation);
// vi2.setState(transitionedState);
vi2.setRefinement(transitionedState);
RefinedVariable rv = tc.getContext().getVariableByName(superName);
for (CtTypeReference<?> t : rv.getSuperTypes()) {
vi2.addSuperType(t);
RefinedVariable rv = superName != null ? tc.getContext().getVariableByName(superName) : null;
if (rv != null) {
// propagate supertypes from the refined variable
for (CtTypeReference<?> t : rv.getSuperTypes())
vi2.addSuperType(t);
} else {
// propagate supertypes from the previous instance
for (CtTypeReference<?> t : prevInstance.getSuperTypes())
vi2.addSuperType(t);
}

// if the variable is a parent (not a VariableInstance) we need to check that
Expand Down