Skip to content

Add provenance info to generated SMT files#416

Open
atomb wants to merge 7 commits intomainfrom
smt-provenance
Open

Add provenance info to generated SMT files#416
atomb wants to merge 7 commits intomainfrom
smt-provenance

Conversation

@atomb
Copy link
Contributor

@atomb atomb commented Feb 12, 2026

This consists of several additional commands before every (check-sat) command.

  • (set-info :file "<path>") where <path> is the path to the original source file, extracted from metadata in the Strata artifact.
  • (set-info :start <n>) where <n> is the starting character position in the original source file.
  • (set-info :stop <n>) where <n> is the ending character position in the original source file.
  • (set-info :unsat-message "<msg>") where <msg> is a message generated by Strata to be presented if the result of the (check-sat) command is unsat.

The changes to files in StrataTest are just to fix type errors caused by the refactoring in other files and probably don't need to be closely reviewed.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Now each `(check-sat)` command is preceded by several `(set-info ...)`
commands specifying the provenance of the check being performed,
including a message to issue if the check yields `unsat`.

Along the way, refactor verification options a bit and make it possible
to specify the location where VCs are written when running StrataVerify.
@atomb atomb marked this pull request as ready for review February 13, 2026 19:02
@atomb atomb requested a review from a team as a code owner February 13, 2026 19:02
Copy link
Contributor

@andrewmwells-amazon andrewmwells-amazon left a comment

Choose a reason for hiding this comment

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

Can these changes be tested on the examples in StrataTest/Languages/Python/expected/?


failed=0

(cd ../../.. && lake exe strata --help > /dev/null)
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the purpose of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This causes strata to be built once, at which point we don't need the overhead of lake exe later.

@atomb
Copy link
Contributor Author

atomb commented Feb 13, 2026

Can these changes be tested on the examples in StrataTest/Languages/Python/expected/?

I believe they are being tested on those examples as part of normal CI?

aqjune-aws
aqjune-aws previously approved these changes Feb 13, 2026
Copy link
Contributor

@aqjune-aws aqjune-aws left a comment

Choose a reason for hiding this comment

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

The new --vc-directory and also the removal of redundant solver flags look good.

@atomb atomb dismissed stale reviews from aqjune-aws and andrewmwells-amazon via 80b81ae February 13, 2026 23:13
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