Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Add Missing Binding
  • Loading branch information
rcosta358 committed Mar 24, 2026
commit 707afb19d35fe1ef8ca9dc05b72ddbd65d6a3123
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package testSuite;

import liquidjava.specification.Ghost;
import liquidjava.specification.Refinement;
import liquidjava.specification.RefinementPredicate;
import liquidjava.specification.StateRefinement;
import liquidjava.specification.StateSet;

@Ghost("int progress")
@StateSet({"downloading", "completed"})
public class CorrectStateAndParameterRefinementThis {

@StateRefinement(from = "downloading(this)", to = "progress(this) == percentage")
public void updateProgress(@Refinement("percentage > progress(this)") int percentage) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ private static Predicate createStatePredicate(String value, String targetClass,
CtTypeReference<?> r = tc.getFactory().Type().createReference(targetClass);
String nameOld = String.format(Formats.INSTANCE, Keys.THIS, tc.getContext().getCounter());
String name = String.format(Formats.INSTANCE, Keys.THIS, tc.getContext().getCounter());
tc.getContext().addVarToContext(Keys.THIS, r, new Predicate(), e);
tc.getContext().addVarToContext(name, r, new Predicate(), e);
tc.getContext().addVarToContext(nameOld, r, new Predicate(), e);
// TODO REVIEW!!
Expand Down Expand Up @@ -616,4 +617,4 @@ private static List<CtAnnotation<? extends Annotation>> getStateAnnotation(CtEle
.getCanonicalName().contentEquals("liquidjava.specification.StateRefinement"))
.collect(Collectors.toList());
}
}
}
Loading