mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-06 11:15:43 -05:00
update todo
This commit is contained in:
parent
54a6a2cc2e
commit
079144cc98
1 changed files with 50 additions and 25 deletions
75
TODO.md
75
TODO.md
|
|
@ -2,45 +2,43 @@
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
- per-theory trail, with push/pop as in the SAT solver (generic trail?)
|
- functor for mapping equiv classes to values of some monoid, code to be
|
||||||
* in CC, clear pending tasks upon backtrack
|
used in 99% of the theories
|
||||||
|
* [ ] also allow to register to "joins" between distinct classes
|
||||||
|
(useful for injectivity or array reduction or selector reduction)
|
||||||
|
→ in a way this must become a (backtracking) query API for making theories
|
||||||
|
easy to write
|
||||||
|
* [ ] use it in th-data
|
||||||
|
* [ ] use it in th-array
|
||||||
|
* [ ] use it in th-define-subsort
|
||||||
|
|
||||||
- in CC, merge classes eagerly
|
- write theory of datatypes (without acyclicity) with local case splits + injectivity + selectors
|
||||||
|
- datatype acyclicity check
|
||||||
|
|
||||||
- rethink backtracking: instead of a pure stack, consider the theory as separated from the SAT solver.
|
- provide a notion of smtlib theory, with `smtlib.ast --> Term.t option`
|
||||||
When a new term is added, unwind theory back to level 0, add term, then up
|
and typing rule (extensible parsing+typing)
|
||||||
to current trail level again.
|
* use if for th-bool
|
||||||
|
* use if for th-distinct
|
||||||
|
|
||||||
- in terms, remove `Bool` case and add `Value of value` instead
|
- cleanup of CC/optims
|
||||||
**OR**: turn every term into `apply` with a `cst` and a `args: term IArray.t`, make bool such a constant,
|
* store lits directly in (boolean) classes
|
||||||
and have `is_value` predicate in custom constants (or `as_value: self -> value option?`)
|
|
||||||
|
|
||||||
- when CC merging two classes, if one is a value then pick it as representative
|
- add terms of input goals pre-emptively to the CC/theories
|
||||||
(i.e. values are always representatives)
|
|
||||||
|
|
||||||
- fix:
|
- use funarith for basic Q arith
|
||||||
./main.exe tests/unsat/eq_diamond10.smt2
|
* as a smtlib theory, too
|
||||||
|
|
||||||
- make CC work on QF_UF
|
|
||||||
* public `add` function should push_pending then call main CC loop
|
|
||||||
(internal one is called within the loop so no need)
|
|
||||||
* internalize terms on the fly (backtrackable) OR: at the beginning, backtrack to 0 to add a new term and then add trail again
|
|
||||||
* basic notion of activity (of subterms) for `ite` (and recfuns, later)?
|
|
||||||
|
|
||||||
- add `CC.add_rw_step t u` work, where `t-->u`
|
- add `CC.add_rw_step t u` work, where `t-->u`
|
||||||
(remove `t` from sig table, should have almost 0 overhead after that)
|
(keep `t` in sig table, but flag is so it's inert and will not
|
||||||
* use it for `if a b c --> b` when `a=true`
|
be pushed into `cc.pending` ever, should have almost 0 overhead after that)
|
||||||
* use it for local simplifications
|
* use it for local simplifications
|
||||||
* use it for function evaluation (i.e. rewrite rules)
|
* use it for function evaluation (i.e. rewrite rules)
|
||||||
|
|
||||||
- write theory of datatypes (without acyclicity) with local case splits + `value` + injectivity
|
|
||||||
- design evaluation system (guards + `eval:(term -> value) option` in custom TC)
|
- design evaluation system (guards + `eval:(term -> value) option` in custom TC)
|
||||||
- compilation of rec functions to defined constants
|
- compilation of rec functions to defined constants
|
||||||
- theory of defined constants relying on congruence closure + evaluation
|
- theory of defined constants relying on congruence closure + evaluation
|
||||||
of guards of each case
|
of guards of each case
|
||||||
|
|
||||||
- datatype acyclicity check
|
|
||||||
|
|
||||||
- abstract domain propagation in CC
|
- abstract domain propagation in CC
|
||||||
- domain propagation (intervals) for ℚ arith
|
- domain propagation (intervals) for ℚ arith
|
||||||
- full ℚ theory: shostak + domains + if-sat simplex
|
- full ℚ theory: shostak + domains + if-sat simplex
|
||||||
|
|
@ -60,9 +58,36 @@
|
||||||
- max-sat/max-smt
|
- max-sat/max-smt
|
||||||
- coq proofs ?
|
- coq proofs ?
|
||||||
|
|
||||||
|
|
||||||
## Done
|
## Done
|
||||||
|
|
||||||
|
- make CC work on QF_UF
|
||||||
|
* [x] public `add` function should push_pending then call main CC loop
|
||||||
|
(internal one is called within the loop so no need)
|
||||||
|
* [x] internalize terms on the fly (backtrackable) OR: at the beginning, backtrack to 0 to add a new term and then add trail again
|
||||||
|
* ~~[ ] basic notion of activity (of subterms) for `ite` (and recfuns, later)?~~
|
||||||
|
- use `stmlib-utils`
|
||||||
|
- parser for cstors (`declare-cstor`, same as `declare-fun`)
|
||||||
|
- refactor:
|
||||||
|
1. have sidekick.env with only the signature that is instance-dependent + notion of theory (as module sig);
|
||||||
|
2. solver takes this env and SAT solver with compatible lits
|
||||||
|
3. move concrete terms, etc. into smtlib lib
|
||||||
|
4. update theories
|
||||||
|
- fix: have normal theories `on_new_term` work properly (callback in the CC?)
|
||||||
|
- proper statistics
|
||||||
|
- make the core library entirely functorized
|
||||||
|
* current term/cst/lit/… would become an implementation library to
|
||||||
|
be used in the binary
|
||||||
|
- theory for `ite`
|
||||||
|
- theory for constructors
|
||||||
|
- do a `th-distinct` package
|
||||||
|
* in CC, use payload to store set of distinct tags (if non empty)
|
||||||
|
* if `¬distinct(t1…tn)` asserted, make big disjunction of cases (split on demand)
|
||||||
|
- in CC, store literal associated with term, for bool propagation
|
||||||
|
- in CC, propagation of boolean terms
|
||||||
|
- in CC, merge classes eagerly
|
||||||
|
- when CC merging two classes, if one is a value then pick it as representative
|
||||||
|
(i.e. values are always representatives)
|
||||||
|
- large refactoring of CC
|
||||||
- simplify CC by separating cleanly public/internal API, remove excess batching
|
- simplify CC by separating cleanly public/internal API, remove excess batching
|
||||||
- notion of `value` (V_true,V_false,V_custom, + maybe undefined some day)
|
- notion of `value` (V_true,V_false,V_custom, + maybe undefined some day)
|
||||||
- checking models (for each clause, at least one true lit also evals to true in model)
|
- checking models (for each clause, at least one true lit also evals to true in model)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue