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

fix: correct the sr1cs constraints #65

Closed
wants to merge 56 commits into from
Closed

Conversation

sorawee
Copy link

@sorawee sorawee commented Jan 31, 2024

No description provided.

sorawee and others added 30 commits October 6, 2023 19:14
The commit adds --wtns, which indicates the output directory for the
witness files. If not given, no witness file is generated.
The witness files are called `first-witness.wtns` and
`second-witness.wtns`.
We need to set the Racket environment variable, which is cumbersome.
Having a main script would be more convenient for users.

Also adjust the README accordingly
When built locally, Picus often fails to run due to the mismatch of the
compiled files in the newer, local Racket version, and the older,
image-based Racket version. This commit fixes the issue.
CoCoA wasn't successfully compiled on arm64 for some reasons.
See
/~https://github.com/Veridise/Picus/actions/runs/6483965862/job/17606717211#step:4:15460.
So we disable arm64 target for now.
This should help making the Docker image a bit smaller.
In the weak correctness (default mode), output signals must be
different, so diffing the output signals are informative enough.

But in the strong corectness (when --strong is given), output signals
could be identical. It would be more helpful to diff the internal
signals to see what are different.

This commit adds diffing for the internal variables.
sorawee and others added 26 commits November 2, 2023 10:02
* Setup pre-release files

* Setup release files

---------

Co-authored-by: sorawee <sorawee@users.noreply.github.com>
Co-authored-by: shankarapailoor <shankarapailoor@users.noreply.github.com>
Prior this commit, yvec will reuse input variables from xvec
which is sound because we assume that they are equal anyway.
However, this reusing adds complexity to Picus.
This commit removes the reusing, simplifying the codebase.
The removal should also not affect performance,
since SMT solvers are very good at dealing with equalities.
This also allows modular verification to be programmed more
straightforwardly.
…22)

Previously, we added them during a constraint optimization pass as
a part of the AST traversal. This is not ideal for many reasons.
First, we only want to include the definitons once,
but the AST traversal opens an opportunity to accidentally include them
more than once (e.g. if we happen to have a rcmds as a subnode of another node).
Second, it meant that we needed the pdef? parameter so that
on alternative constraints, the prime definitions are omitted.
The refactoring simply put the definition inclusion at the top-level,
simplifying the optimization pass.
* chore: clean up indentation

* logging: log inferred known vars
See the changelog for details
@sorawee
Copy link
Author

sorawee commented Jan 31, 2024

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@sorawee sorawee closed this Jan 31, 2024
@sorawee sorawee deleted the 24-01-31-correct-sr1cs-cnsts branch January 31, 2024 20:01
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.

4 participants