Skip to content

Add pizza puzzle example (closes #145)#159

Open
alcides wants to merge 1 commit intomasterfrom
explore-issues-107
Open

Add pizza puzzle example (closes #145)#159
alcides wants to merge 1 commit intomasterfrom
explore-issues-107

Conversation

@alcides
Copy link
Copy Markdown
Owner

@alcides alcides commented Apr 5, 2026

Summary

  • Adds the pizza puzzle (originally written in Z3) as an Aeon example, addressing issue Example: Pizza puzzle #145.
  • Two files are included:
    • examples/synthesis/pizza.ae — synthesis version with a ?hole typed with all 29 constraints (individual preferences + all-distinct), ready for a future SMT/CSP-capable backend
    • examples/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 Assignment type holds the 7 choices via uninterpreted accessor functions (emily_pizza, owen_pizza, …). The constructor assignment_mk axiomatically 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

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
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.

Example: Pizza puzzle

1 participant