Open
Conversation
Implements the pizza puzzle from josepablocam's Z3 gist as an Aeon example. Two files are provided: - pizza.ae: synthesis version with a ?hole and full constraint type, ready for a future SMT/CSP-capable synthesis backend - pizza_check.ae: verification version where the known solution (emily=Margherita, owen=Peppers, yasmine=Hawaiian, nathan=Pepperoni, wendy=Sausage, rachel=Cheese, kevin=BBQ) is proved correct by Aeon's liquid type system via z3 Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
examples/synthesis/pizza.ae— synthesis version with a?holetyped with all 29 constraints (individual preferences + all-distinct), ready for a future SMT/CSP-capable backendexamples/synthesis/pizza_check.ae— verification version where the known solution is asserted and proved correct by Aeon's liquid type system via z3 (type-checks with no errors)Design
Pizzas are encoded as integers 0–6 (Pepperoni=0, Margherita=1, BBQ=2, Hawaiian=3, Peppers=4, Cheese=5, Sausage=6). An opaque
Assignmenttype holds the 7 choices via uninterpreted accessor functions (emily_pizza,owen_pizza, …). The constructorassignment_mkaxiomatically links the accessors to its arguments in its return type, allowing z3 to reason about the full constraint set.Notes
The current synthesis backends (GP, enumerative, synquid) enumerate expressions sequentially and cannot jointly solve for 7 constrained integer values — this puzzle is a natural motivating example for a dedicated CSP/SMT synthesis backend.
Closes #145
Made with Cursor