bex wishlist

# NAF improvements:
- use a disk-based store
- use latent nids / latent graphs
- use a cutoff variable so i only process nodes that contain the variable i want to lift
- use a unique cache for VHLs (and XOR/AND?)
- persist the work in a binary file
- make naf-worker multi-threaded
- make def-worker multi-threaded
- use latent graphs
- isolate the non-search nodes
- maybe use "normalized" functions to save space
- use a unique cache for naf
- rent a much faster machine



- allow VhlSwarm to handle multiple queries (or at least not block the web server).
  - dependency tracking is currently done only in `wip`.
  - we currently deduce that the query is a "final answer" if it has no dependencies (in wip::resolve_nid)
  - PROPOSAL:
    - associate a number/callback with each top-level request
    - model these request Ids explicitly as a new kind of dependency
    - send the request id back with the answer.

- probably the entire <Base> concept needs to be re-written to handle asynchronicity
  (but perhaps we just basically mark functions async?)

- run the bdd swarm (and others) asynchronously (inside web server)
  - in the web server itself, create a new thread that contains the vhl swarm.
  - this thread should should have another channel pair for talking to outside world
  - the thread calls swarm::run() and uses on_msg to relay requests back to the web server.
  - (the requests are sent back and forth over a pair of channels)

- benchmark adding a delay to swarm::Worker::work_loop
  - it's using try_recv so probably busy-waiting?
  - alternately, just use recv... i don't see why it needs to be non-blocking

- Extract VHLSwarm from BddSwarm
  - So separate the Q::Init, Q::Stats, and rename Q::Ite->Q::Job or Q::Task
  - probably work_step should be work_qmsg and work_item should be pushed down to VhlSwarm
  - then in VHLSwarm, add new work_job or something.
  - most of BddSwarm is probably VHLSwarm

- Implement a Swarm for NAF:
  - Q is basically the same, except we want XorAnd instead of Ite
- There should be a generic VhlCache trait we can use for all VHL-producing items.

- refactoring: XID should just be a sub-type / wrapper type for NID.
- benchmarks with https://github.com/SSoelvsten/bdd-benchmark/issues/12




- [LATER] async queries in the shell
  - the problem with a traditional shell is it's synchronous.
  - if you don't wait for the result, how do you know when things are done?
  - you basically need ui widgets
  - i could make a shell for bex from j, though, and/or move my widgets into b4



old note from bdd_swarm. still relevant now that i've factored out vhlswarm?


  // TODO: would be nice to never have an un-initialized worker.
  //       this would require dropping this Q::Init concept.
  //  (Ideally we would remove the Option<> on .state and .queue)
  // !! Since the work_loop function is now non-blocking, it will
  //    try to pop from this queue even before a Q::Init message
  //    has been sent. So we have to do these dumb existence checks.



done:
- replace BddState with plain WorkState