Skip to content

Satisfy program with optional pruning #125

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

Merged
merged 1 commit into from
Apr 29, 2025

Conversation

m-kus
Copy link
Contributor

@m-kus m-kus commented Apr 29, 2025

This PR exposes an API for satisfying a program with pruning given an optional environment.
The naming might be a bit misleading (maybe satisfy_pruned would be better?), pls let me know if you want to change.

@apoelstra
Copy link
Contributor

Would be good to move away from the stringly-typed errors, but I guess that's independent of this PR.

I'm gonna go ahead and ACK this -- I agree the name is a bit weird but the whole API right now is a bit undiscoverable and I think we want to do a pass through it and see if we can't reduce the number of exposed types and clarify their relationship.

Comment on lines +143 to +146
/// ## Errors
///
/// - Witness values have a different type than declared in the Simfony program.
/// - There are missing witness values.
Copy link
Collaborator

@uncomputable uncomputable Apr 29, 2025

Choose a reason for hiding this comment

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

30f125f: nit: pruning fails if the program doesn't run successfully for the given environment and witness data. This is an additional error path, next to the existing two paths.

Copy link
Collaborator

@uncomputable uncomputable left a comment

Choose a reason for hiding this comment

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

ACK 30f125f

Copy link
Contributor

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK 30f125f; successfully ran local tests

@apoelstra apoelstra merged commit 1f279e2 into BlockstreamResearch:master Apr 29, 2025
13 checks passed
apoelstra added a commit to apoelstra/s-lang that referenced this pull request Apr 29, 2025
30f125f Satisfy program with optional pruning (Michael Zaikin)

Pull request description:

  This PR exposes an API for satisfying a program with pruning given an optional environment.
  The naming might be a bit misleading (maybe `satisfy_pruned` would be better?), pls let me know if you want to change.
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