My highest priority goal is to improve the speed of the solver(s).
This should help fully utilize each CPU
examples:
cargo test nano_bdd -- -- -a # show AST
cargo test nano_bdd -- -- -r # show result
cargo test nano_bdd -- -- -a -r # show both
cargo test nano_bdd -- --nocapture -- -a -r # show both, and include output logs
some combination of these ideas:
{ edge [ style=invis ];
rankdir=LR;
rank=same; }
will use for things like:
- toggle bookkeeping for benchmarks
- toggle individual optimizations
- consolidate BASE/anf normalizers
- swap out work coordination strategies (swarm/etc)
- swap out different kinds of normalizer (main vs ITE) (allow preserving the original expression)
- toggle use of constant truth tables in the nid
- configure larger constant truth tables at other levels
- even toggle caching to see what it gets us
Use the corresponding nid functions instead.
- for each benchmark:
- original AST:
- time to generate
- number of nodes (broken down by type?)
- number of cache tests/fails (not really that important, but might as well?)
- for each step:
- time to generate
- number of nodes at each step
- number of xmemo cache tests/fails (we don’t care about hilos)
- number calculations saved from short circuits
- original AST:
I do this now in seconds. Let’s switch to millis.
I can’t do this in the base itself because copies are shared and therefore immutable.
So instead, use thread-local counters:
- xmemo lookup
- xmemo fail
- hilos lookup
- hilos fail
- hilos create
Query, sum, and reset the counters after each round.
- write (step#, time, ord, lookups, hits, shorts) to csv after each step
Just take the simple tests that exist for ast
and bdd
The idea is to reify work-in-progress so that the work can be prioritized and distributed across multiple workers.
- Slow-running bases should be WIP.
- Q: type for queries
- W: type for work-in-progress nodes
- C: type for finished work cache
This is a generic type finished work.
https://github.com/chrisying/parabdd/blob/master/src/nqueens.cpp
http://vlsicad.eecs.umich.edu/BK/Slots/cache/www.itu.dk/research/buddy/
https://github.com/trolando/sylvan
https://github.com/tulip-control/dd
https://en.wikipedia.org/wiki/Conjunctive_normal_form
https://en.wikipedia.org/wiki/And-inverter_graph
- maintain top-level vec for variable permutation
- at each step:
- bring highest numbered
Vir
to the top - fetch relevant inputs to
Vir
in the AST - raise relevant inputs to 2nd and 3rd layers in BDD
- bring highest numbered