Skip to content

Conversation

@sim642
Copy link
Member

@sim642 sim642 commented Sep 2, 2022

This adds the generation of non-standard flow_insensitive_invariant entries to YAML witnesses. Base privatizations are extended to emit such invariants based on their internal unprotected/weak values.

TODO

  • flow_insensitive_invariant checking validation? Too inefficient, would have to evaluate such invariant at every node in every context.
  • Invariants from earlyglobs? Works automatically, because earlyglobs delegates to base privatization.
  • Flow-insensitive invariants for singlethreaded non-earlyglobs?

@sim642 sim642 added feature sv-comp SV-COMP (analyses, results), witnesses labels Sep 2, 2022
@sim642 sim642 self-assigned this Sep 2, 2022
@sim642 sim642 marked this pull request as ready for review September 12, 2022 12:26
@michael-schwarz michael-schwarz self-requested a review September 22, 2022 11:24
@michael-schwarz
Copy link
Member

Actually, does this account for modifications to the values of globals before multi-threaded mode is entered if earlyglobs is off?

@sim642
Copy link
Member Author

sim642 commented Sep 23, 2022

No, and that's what the third task above would be about. That could be fixed by doing the earlyglobs side effects even when it's disabled, but still reading values from the local state in singlethreaded mode, such that the flow-insensitive invariant would be correct.

I don't want to introduce that extra complication right now though, because these flow-insensitive invariants aren't too useful for self-validation (we don't want to evaluate/unassume such expressions at every point, that would be hugely expensive). I'll restrict the generation of these to only when earlyglobs is enabled for now, because this PR also contains other fixes/refactorings to base's invariant generation that are still required for #833, etc.

Co-authored-by: Michael Schwarz <michael.schwarz93@gmail.com>
@sim642 sim642 force-pushed the yaml-witness-global branch from 7619258 to 77ab055 Compare September 23, 2022 07:29
@sim642 sim642 merged commit 5bfca05 into master Sep 23, 2022
@sim642 sim642 deleted the yaml-witness-global branch September 23, 2022 07:45
sim642 added a commit that referenced this pull request Sep 23, 2022
@sim642 sim642 added this to the v2.1.0 milestone Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature sv-comp SV-COMP (analyses, results), witnesses

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants