Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discard empty triggers and partially evaluated ones #815

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions src/main/scala/rules/Evaluator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@ object evaluator extends EvaluationRules {
* incompletenesses because the corresponding quantifiers will not be triggered.
*/

Q(s1, tTriggersSets map Trigger, v1)})
Q(s1, tTriggersSets.filter(_.nonEmpty) map Trigger, v1)})
}

/** Evaluates the given list of trigger sets `eTriggerSets` (expressions) and passes the result
Expand Down Expand Up @@ -1405,7 +1405,7 @@ object evaluator extends EvaluationRules {
for (e <- remainingTriggerExpressions)
v.reporter.report(WarningsDuringVerification(Seq(
VerifierWarning(s"Might not be able to use trigger $e, since it is not evaluated while evaluating the body of the quantifier", e.pos))))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this message still accurate? Instead of "Might not be able to use trigger $e", don't we know that they will not be used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason it says "might" is because we know it can't use the trigger on the current branch, but it might be able to on different branches. Could be more explicit about that though I guess.

Q(s, cachedTriggerTerms, v)
Q(s, Seq(), v)
}
}

Expand Down
Loading