Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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 @@ -126,11 +126,11 @@ public void forallFloorIsLessThanValueTest() throws SolverException, Interrupted
public void visitFloorTest() {
requireRationals();
requireRationalFloor();
// TODO Princess will rewrite floor. Add backtranslation in the visitor
// TODO Princess will rewrite floor. Add back translation in the visitor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we do not need to add a precise backwards-mapping. The solver is allowed to rewrite the formula.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue here is that Princess uses quantifiers and we do not handle quantified formulas correctly in some cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the comment was about quantifiers and/or epsilon terms that Princess likes to introduce for operations like these

assume()
.withMessage("We don't support \"floor\" in the Princess visitor")
.that(solverToUse())
.isEqualTo(Solvers.PRINCESS);
.isNotEqualTo(Solvers.PRINCESS);

IntegerFormula f = rmgr.floor(rmgr.makeVariable("v"));
assertThat(mgr.extractVariables(f)).hasSize(1);
Expand Down