progress in the TopDown implementation, with substitutions,
unification, and type definitions for DB and Query