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

Generate triggers more conservatively #708

Merged
merged 7 commits into from
Oct 27, 2021

Conversation

bobismijnnaam
Copy link
Contributor

@bobismijnnaam bobismijnnaam commented Oct 26, 2021

This PR ensures that triggers are only generated for expressions that use a subset of operators. For this subset of operators it is known for each operator if it is allowed to appear in a trigger or not. For example, + is not allowed in a trigger, but sequence size (|xs|) is. If an operator is encountered that is not included in this subset, no trigger is generated for the nearest enclosing forall.

This PR also includes a fix for including tuple notation in the syntax, which was also needed for Han's thesis.

…ate triggers if subset of operators is used where we know a trigger is valid or invalid. Do not generate triggers if operators are in neither of the valid/invalid sets.
@bobismijnnaam bobismijnnaam temporarily deployed to Default October 26, 2021 12:58 Inactive
@bobismijnnaam bobismijnnaam temporarily deployed to Default October 26, 2021 13:00 Inactive
@bobismijnnaam bobismijnnaam temporarily deployed to Default October 26, 2021 13:00 Inactive
@bobismijnnaam bobismijnnaam temporarily deployed to Default October 26, 2021 13:20 Inactive
Copy link
Member

@pieter-bos pieter-bos left a comment

Choose a reason for hiding this comment

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

If you take a look at any excessive warnings of triggers not generated this looks good!

@bobismijnnaam bobismijnnaam temporarily deployed to Default October 26, 2021 14:38 Inactive
@bobismijnnaam bobismijnnaam temporarily deployed to Default October 26, 2021 14:38 Inactive
@bobismijnnaam bobismijnnaam temporarily deployed to Default October 26, 2021 14:58 Inactive
@bobismijnnaam bobismijnnaam temporarily deployed to Default October 26, 2021 14:59 Inactive
@bobismijnnaam bobismijnnaam temporarily deployed to Default October 27, 2021 07:59 Inactive
@bobismijnnaam bobismijnnaam temporarily deployed to Default October 27, 2021 07:59 Inactive
@bobismijnnaam bobismijnnaam temporarily deployed to Default October 27, 2021 08:07 Inactive
@bobismijnnaam bobismijnnaam temporarily deployed to Default October 27, 2021 08:07 Inactive
@bobismijnnaam bobismijnnaam temporarily deployed to Default October 27, 2021 08:27 Inactive
@bobismijnnaam bobismijnnaam temporarily deployed to Default October 27, 2021 08:29 Inactive
@sonarcloud
Copy link

sonarcloud bot commented Oct 27, 2021

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

75.6% 75.6% Coverage
4.2% 4.2% Duplication

@bobismijnnaam
Copy link
Contributor Author

There are some files that still have quite a few trigger warnings (kadane.java, set comprehension code generation, KeYAbruptTerminationChallenge.java, basic-examples.c, kernel-example-v3.pvl, forkjoininforloop.pvl, and max-sort.pvl), but these can be resolved in a new PR by actually adding the proper triggers. Some other files also have trigger warnings, but in those cases a trigger is not actually possible (i.e. (\forall int tid; f(tid - 1)).

@bobismijnnaam bobismijnnaam merged commit bd7f5b9 into dev Oct 27, 2021
@bobismijnnaam bobismijnnaam deleted the no-triggers-when-unknown-ops branch October 27, 2021 08:45
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.

2 participants