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

SyGuS, find SMT array write of a fixed size #2037

Merged
merged 33 commits into from
May 15, 2024
Merged

SyGuS, find SMT array write of a fixed size #2037

merged 33 commits into from
May 15, 2024

Conversation

RyanGlScott
Copy link
Contributor

@RyanGlScott RyanGlScott commented Mar 1, 2024

This is an amalgamation of:

This bumps:

andreistefanescu and others added 27 commits July 17, 2023 23:43
Co-authored-by: Ryan Scott <rscott@galois.com>
This bumps:

* The `crucible` submodule to bring in the changes from
  GaloisInc/crucible#1178
* The `what4` submodule to bring in the changes from
  GaloisInc/what4#256
SAW creates a variety of different ExprBuilders in the course of a typical SAW
script, but we were only applying the pushMuxOps option to some of them. This
patch makes the treatment a bit more comprehensive.

Unfortunately, doing so requires a rather uncomfortable amount of extra
plumbing in `SAWScript.Proof`, but I'm not sure how to do better without
refactoring all of `SAWScript.Proof` to use `TopLevel` instead of `IO` (and
it's unclear if that is desirable).
RyanGlScott added a commit to RyanGlScott/aws-lc-verification that referenced this pull request Apr 23, 2024
This updates the `SAW_URL` environment variables to point to a more recent
version of SAW that includes the changes from
GaloisInc/saw-script#2037, which are necessary to
support the AES-GCM proofs.
RyanGlScott added a commit to RyanGlScott/aws-lc-verification that referenced this pull request Apr 23, 2024
This updates the `SAW_URL` environment variables to point to a more recent
version of SAW that includes the changes from
GaloisInc/saw-script#2037, which are necessary to
support the AES-GCM proofs.
RyanGlScott added a commit to RyanGlScott/aws-lc-verification that referenced this pull request Apr 23, 2024
This updates the `SAW_URL` environment variables to point to a more recent
version of SAW that includes the changes from
GaloisInc/saw-script#2037, which are necessary to
support the AES-GCM proofs.
RyanGlScott added a commit to RyanGlScott/aws-lc-verification that referenced this pull request Apr 23, 2024
This updates the `SAW_URL` environment variables to point to a more recent
version of SAW that includes the changes from
GaloisInc/saw-script#2037, which are necessary to
support the AES-GCM proofs.
RyanGlScott added a commit to RyanGlScott/aws-lc-verification that referenced this pull request Apr 24, 2024
This updates the `SAW_URL` environment variables to point to a more recent
version of SAW that includes the changes from
GaloisInc/saw-script#2037, which are necessary to
support the AES-GCM proofs.
RyanGlScott added a commit to RyanGlScott/aws-lc-verification that referenced this pull request Apr 24, 2024
This proves unbounded AES-GCM functions, building on top of the cryptol-specs
work in GaloisInc/cryptol-specs#72 and the saw-script work in
GaloisInc/saw-script#2037.

This requires a newer version of SAW to work than what aws-lc-verification's CI
currently uses, so I isolated these proofs into their own SAW scripts, Cryptol
specs, shell scripts, Docker image, and CI action. Moreover, some of the
AES-GCM proofs use Z3's Constrained Horn Clause (CHC) feature, which is buggy
on Z3-4.8.8. aws-lc-verification's other CI jobs are currently using Z3-4.8.8,
so I specifically chose a newer version (Z3-4.8.14) for the new,
AES-GCM–specific CI job.

Co-authored-by: Robert Dockins <rdockins@galois.com>
Co-authored-by: Samuel Breese <samuel@chame.co>
Co-authored-by: Andrei Stefanescu <andrei@stefanescu.io>
RyanGlScott added a commit to RyanGlScott/aws-lc-verification that referenced this pull request Apr 24, 2024
This proves unbounded AES-GCM functions, building on top of the cryptol-specs
work in GaloisInc/cryptol-specs#72 and the saw-script work in
GaloisInc/saw-script#2037.

This requires a newer version of SAW to work than what aws-lc-verification's CI
currently uses, so I isolated these proofs into their own SAW scripts, Cryptol
specs, shell scripts, Docker image, and CI action. Moreover, some of the
AES-GCM proofs use Z3's Constrained Horn Clause (CHC) feature, which is buggy
on Z3-4.8.8. aws-lc-verification's other CI jobs are currently using Z3-4.8.8,
so I specifically chose a newer version (Z3-4.8.14) for the new,
AES-GCM–specific CI job.

Co-authored-by: Robert Dockins <rdockins@galois.com>
Co-authored-by: Samuel Breese <samuel@chame.co>
Co-authored-by: Andrei Stefanescu <andrei@stefanescu.io>
@RyanGlScott RyanGlScott requested a review from kquick May 14, 2024 19:49
@RyanGlScott RyanGlScott marked this pull request as ready for review May 14, 2024 19:49
IO (C.ExecutionFeature p sym ext rtp, IORef (Crucible.LLVM.FixpointCHC.ExecutionFeatureContext sym 64 ext))

setupSimpleLoopFixpointCHCFeature sym sc sawst cfg mvar func = do
let ?ptrWidth = knownNat @64
Copy link
Member

Choose a reason for hiding this comment

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

I'm not very comfortable with hard-coding this here (which could deviate from similar settings in src/SAWScript/X86Spec.hs), but there's nothing here that looks immediately available for inheriting/determining this value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed. While uncomfortable, this is an assumption which is currently baked into several parts of the code, not just SAW. See GaloisInc/crucible#1028 for where this restriction ultimately arises in crucible-llvm. It would be nice to generalize this code to work over any pointer width, but it would likely require addressing GaloisInc/crucible#1028 first.

@RyanGlScott RyanGlScott merged commit 70fe999 into master May 15, 2024
34 checks passed
@RyanGlScott RyanGlScott deleted the sygus-prep branch May 15, 2024 13:49
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.

None yet

3 participants