Skip to content

Conversation

@marcoeilers
Copy link
Contributor

Previously, when Silicon could not use a provided trigger (because it could not evaluate at least one of the trigger expressions),

  • it could end up emitting a trigger containing no terms at all
  • it could end up emitting a trigger that contains a subset of the terms that should have been in it

The first issue seems to lead to weird behavior where Z3 seems to interpret the empty trigger as "pick a trigger yourself", or something else happened, but the result was that adding a trigger that could not be used made programs verify.
The second issue could lead to the trigger that is actually used being either invalid or more permissive than intended (because it was missing one or more terms).

Since Silicon emits a warning when a trigger cannot be used (and thus the user knows they should change it), this PR changes the behavior s.t. empty or partially-usable triggers are discarded completely.

case _ =>
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.

Copy link
Contributor

@jcp19 jcp19 left a comment

Choose a reason for hiding this comment

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

LGTM, we can merge it when the tests go through

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants