Syntax-guided synthesis, typed #
Declare the universally quantified variables (declareSygusVar) and the functions to find
(synthFun), constrain them (addSygusConstraint), then checkSynth, whose ifSolved branch can
read a solution with getSynthSolution. A Grammar σ carries its parameters, so synthFun takes
only the grammar and answers a Term σ; synthAnyFun takes the signature instead.
The outcome of a synthesis check.
Instances For
Code running where the solver last found a synthesis solution.
Equations
Instances For
Code running where the solver last found a synthesis solution.
Equations
Instances For
Code running where the solver last showed the synthesis conjecture has no solution.
Equations
Instances For
Code running where the solver last showed the synthesis conjecture has no solution.
Equations
Instances For
Code running where the solver last gave up on a synthesis conjecture.
Equations
Instances For
Code running where the solver last gave up on a synthesis conjecture.
Equations
Instances For
Declares a universally quantified variable of the sort α describes.
Takes its type explicitly, like Solver.declareConstAs.
Equations
- s.declareSygusVar α symbol = do let __do_lift ← Cvc.Srt.of α Cvc.Untyped.Solver.declareSygusVar s symbol __do_lift
Instances For
Declares a function to synthesize, unrestricted, over boundVars and with codomain α.
Equations
- s.synthAnyFun' symbol boundVars α = do let __do_lift ← Cvc.Srt.of α Cvc.Untyped.Solver.synthFun s symbol boundVars.erase __do_lift
Instances For
Declares a function to synthesize, unrestricted, over boundVars and with codomain α.
Equations
- s.synthAnyFun symbol boundVars = s.synthAnyFun' symbol boundVars α
Instances For
Adds a formula the synthesized functions must satisfy.
Equations
Instances For
Adds a formula the synthesized functions may assume.
Equations
Instances For
Constrains inv to be an inductive invariant of the transition system.
pre must imply inv, inv must be preserved by trans, and inv must imply post. inv,
pre and post are predicates over a state, trans one over two states; cvc5 checks that their
signatures agree.
Equations
- s.addSygusInvConstraint inv pre trans post = Cvc.Untyped.Solver.addSygusInvConstraint s inv pre trans post
Instances For
Tries to solve the synthesis conjecture, as a raw result.
Equations
Instances For
Tries to find another solution, as a raw result.
Equations
Instances For
Tries to solve the synthesis conjecture, and runs the branch for the answer.
ifSolved runs in s.EnvSolved, where getSynthSolution is available. An omitted branch throws if
its answer comes up.
Equations
- s.checkSynth ifSolved ifUnsolvable ifUnknown = Cvc.Untyped.Solver.checkSynth s ifSolved ifUnsolvable ifUnknown
Instances For
Tries to find another solution to the synthesis conjecture, with checkSynth's branches.
Only possible where a solution was already found.
Equations
- s.checkSynthNext ifSolved ifUnsolvable ifUnknown = Cvc.Untyped.Solver.checkSynthNext s ifSolved ifUnsolvable ifUnknown
Instances For
checkSynth, whose solved and unsolvable branches default to none.
An unknown answer still fails, as with checkSat?.
Equations
- s.checkSynth? ifSolved ifUnsolvable ifUnknown = Cvc.Untyped.Solver.checkSynth? s ifSolved ifUnsolvable ifUnknown
Instances For
The solution found for a synthesized function.
A solution has the signature of the function it solves for, so the index carries across.
Equations
Instances For
The solution found for a synthesized function.
A solution has the signature of the function it solves for, so the index carries across.
Equations
- s.getSynthSolutions fns = Cvc.Untyped.Solver.getSynthSolutions s fns
Instances For
Enumerates a term of interest, rather than solving a conjecture, none if cvc5 finds none.
The grammar says what may be enumerated, and its start sort is what comes back.
Equations
- s.findSynth target g = Cvc.Untyped.Solver.findSynth s target (some g.erase)
Instances For
findSynth, failing rather than answering none.
Equations
- s.findSynth! target g = Cvc.Untyped.Solver.findSynth! s target (some g.erase)
Instances For
Enumerates a term of interest with no grammar to restrict it, none if cvc5 finds none.
Sort-erased, nothing saying what sort the answer has; Untyped.Term.typeCheck puts an index on.
Equations
- s.findAnySynth target = Cvc.Untyped.Solver.findSynth s target
Instances For
findAnySynth, failing rather than answering none.
Equations
- s.findAnySynth! target = Cvc.Untyped.Solver.findSynth! s target
Instances For
Enumerates the next term of interest, none if cvc5 finds none.
Sort-erased, like findAnySynth.