Eliminate the awkward old ANF language in favor of direct translation to
Cruxes in Dyna.Analysis.ANF. Evaluation cruxes are now properly indexed
within rules using an Int, so we don't have to rely on the output variable
being unique. There are more flavors of unification cruxes, including
inequality constraints.
The terrible 'handleConflictors' has been replaced with a much more
sane function which operates on cruxes, rather than on DOpAMine, which will
be welcome when we have more interesting OPIter modes.
While here, move python scripts from bin/ to src/Dyna/Backend/Python and
adjust the world. Use this as an excuse to make ./debug invoke the dyna
compiler only once and dump everything to different files in $PROGRAM.d/
This brings the Mercury mode system all the way out through the planner,
though it does not actually really avail itself of any of the improved
functionality. It compiles and passes all selftests, but that, too, is
hardly saying anything.
The beginnings of a re-implementation of Mercury's mode system, as described
in: David Overton. Precise and Expressive Mode Systems for Typed Logic
Programming Languages. University of Melbourne, Department of Computer
Science and Software Engineering. Ph.D. thesis. December, 2003.
<http://www.mercury.csse.unimelb.edu.au/information/papers.html#dmo-thesis>
- Separate assignments and unifications in ANF. Assignments are now
exclusively for loading (or checking) literals.
- Move term base cases out from our myriad of representations into
Dyna.Term.TTerm's TBase.
- Fix comma and whenever handling in ANF (which is a temporary hack)
and while there, make "true" and "false" a little closer to correct.
- Move Analysis.Aggregation over to Main.Exception rather than Either.
- Remove some dead code from Backend.Python and ParserHS.Parser
- While here and there, squash some warnings
- Move handling of the ','/2 and whenever/2 operators into the ANF
processor, next to '*'/1, '&'/1, and is/2, rather than the parser.
- Remove the side-condition field in rule forms
- Fallout from this exposed a really, really bad initialization bug
in the rule planner, which is now hopefully corrected.
This moves us to the much more pleasant position of having one main driver
(in Dyna.Main.Driver) which runs the (common) analysis workers and then
hands off to a user-specified backend (though the interface of
Dyna.Main.BackendDefn). Along the way, we can dump (to stderr or to files)
things we might care about.
Move the python interpreter and debugging tool over to the new pipeline
driver. While doing that, add a "ghcbuild" target to the Makefile that may
behave better than the cabal-istic build mechanism for older GHCs than the
one on my machine.
Add a Python backend selftest module which compares us against "golden"
files in examples/expected/; they are named ".py.out" on the chance that we
get similar golden files for other backends eventually. Wire this in to the
main test harness on the "simple" and "papa2" examples.
While here, move the test harness out of Dyna.Test to Dyna.Main.TestsDriver,
update the README, and move it to Markdown.
While here, factor out some material to Dyna.Analysis.Base, and execute a
proof-of-concept change by adding true/0 and false/0 as constants which
evaluate to True and False in the Python backend.
Some other minor changes seem to have crept in, too.
timv [Wed, 12 Dec 2012 19:51:46 +0000 (14:51 -0500)]
added matrixops examples; demonstrates the "edge template overcounting problem" - a template which shouldnt fire more than once results in overcounting.