]> hydra-www.ietfng.org Git - dyna2/log
dyna2
12 years agopretty print lists, which are still cons/nil under the hood.
Tim Vieira [Fri, 28 Jun 2013 19:38:19 +0000 (15:38 -0400)]
pretty print lists, which are still cons/nil under the hood.

Moved some library functions in into stdlib.py

Moved attempt at unifiction into it's own file... it will probably be deleted
entirely in favor of something else (it's unused at the moment).

12 years agoReorganize imports so that loader/post-processor deps only matter when you ask
Tim Vieira [Fri, 28 Jun 2013 19:05:26 +0000 (15:05 -0400)]
Reorganize imports so that loader/post-processor deps only matter when you ask
for them (e.g. matplotlib) and that ./dyna starts-up quicker.

12 years agoMerge ../working
Tim Vieira [Fri, 28 Jun 2013 14:40:18 +0000 (10:40 -0400)]
Merge ../working

12 years agoyet another fix to ./debug
Tim Vieira [Fri, 28 Jun 2013 14:39:24 +0000 (10:39 -0400)]
yet another fix to ./debug

12 years agoFix printout of primitive strings
Nathaniel Wesley Filardo [Fri, 28 Jun 2013 06:34:58 +0000 (02:34 -0400)]
Fix printout of primitive strings

We now rely on Show to do the quotation; this may not be correct for all
backends, but it is less wrong than before.

12 years agoMerge ../working
Tim Vieira [Fri, 28 Jun 2013 06:10:33 +0000 (02:10 -0400)]
Merge ../working

12 years agocleanup output formats.
Tim Vieira [Fri, 28 Jun 2013 06:10:20 +0000 (02:10 -0400)]
cleanup output formats.

12 years agoAdd ruleix=N printouts to dump headers
Nathaniel Wesley Filardo [Fri, 28 Jun 2013 05:48:56 +0000 (01:48 -0400)]
Add ruleix=N printouts to dump headers

12 years ago`draw_circuit` and `trace` work with BC computation
Tim Vieira [Fri, 28 Jun 2013 05:31:32 +0000 (01:31 -0400)]
`draw_circuit` and `trace` work with BC computation

BUGFIX: looks like my previous bugs fix broke alignment with python and dopamine
  code. I've fixed the Python code. Dopamine coming soon.

REPL `query` no longer kept up-to-date with FC because we throw away the rule
once we're done with it.

added REPL `run` command to execute dyna code from a different file (NOTE: there
is no namespacing so bad things can happen.)

BUGFIX: Fixed cyclic `Term` comparsion.

BUGFIX: Fixed dictionary changed size on iteration exception. Thanks to Jason
  for reporting.

12 years agoOn second thought...
Nathaniel Wesley Filardo [Fri, 28 Jun 2013 03:48:43 +0000 (23:48 -0400)]
On second thought...

Make [,,,] unpack to cons/2 and nil/1 as per timv's request.

12 years agoMerge branch 'master' of github.com:nwf/dyna
Nathaniel Wesley Filardo [Fri, 28 Jun 2013 02:57:10 +0000 (22:57 -0400)]
Merge branch 'master' of github.com:nwf/dyna

12 years agoTweaks to parser
Nathaniel Wesley Filardo [Fri, 28 Jun 2013 02:55:52 +0000 (22:55 -0400)]
Tweaks to parser

Introduce [,,,] syntax for anonymous tuples (an alias for "tuple(,,,)").
Modify rule span information to avoid subsequent whitespace.

12 years agoMerge ../working
Tim Vieira [Fri, 28 Jun 2013 01:11:26 +0000 (21:11 -0400)]
Merge ../working

12 years agoBackchained items are no longer displayed in solution.
Tim Vieira [Fri, 28 Jun 2013 01:09:23 +0000 (21:09 -0400)]
Backchained items are no longer displayed in solution.

Nicer error messages when post/load commands are not understood.

12 years agoMerge branch 'master' of github.com:nwf/dyna
Nathaniel Wesley Filardo [Fri, 28 Jun 2013 00:41:48 +0000 (20:41 -0400)]
Merge branch 'master' of github.com:nwf/dyna

12 years agoadded example of backchaining.
Tim Vieira [Thu, 27 Jun 2013 20:57:54 +0000 (16:57 -0400)]
added example of backchaining.

12 years agodyna doctest runnner.
Tim Vieira [Thu, 27 Jun 2013 20:57:10 +0000 (16:57 -0400)]
dyna doctest runnner.

12 years agoExperiment version of `trace` now available.
Tim Vieira [Thu, 27 Jun 2013 20:45:14 +0000 (16:45 -0400)]
Experiment version of `trace` now available.

    $ ./dyna
    :- a += 1.
    :- a += a/2.
    :- post trace()

12 years ago()
Tim Vieira [Thu, 27 Jun 2013 19:00:30 +0000 (15:00 -0400)]
()

12 years agoadded geometric series to tests
Tim Vieira [Thu, 27 Jun 2013 18:44:54 +0000 (14:44 -0400)]
added geometric series to tests

12 years agoFirst pass implementation of Jason's `trace` debugger.
Tim Vieira [Thu, 27 Jun 2013 18:39:12 +0000 (14:39 -0400)]
First pass implementation of Jason's `trace` debugger.

Fixed source line selection in ./debug

Moved a few things around.

compiler dumps anf by default (right beside the .plan.py).

12 years agoFix an infinite loop on a malformed NamedInst
Nathaniel Wesley Filardo [Thu, 27 Jun 2013 02:00:30 +0000 (22:00 -0400)]
Fix an infinite loop on a malformed NamedInst

While trying to print out a malformed inst is a good idea, it is not a good
idea to try to reduce it first, as that might trigger the malformedness
assertion.

12 years agoStrengthen static types of Inst lattice functions
Nathaniel Wesley Filardo [Thu, 27 Jun 2013 01:54:53 +0000 (21:54 -0400)]
Strengthen static types of Inst lattice functions

Use parametricity and higher-rank types to force the lop-sided callbacks to
use only non-recursive Insts.

12 years agoNew output format
Tim Vieira [Tue, 25 Jun 2013 01:53:03 +0000 (21:53 -0400)]
New output format

 - print nullary terms together at the top.

 - don't print empty charts

 - heading is "Solution" instead of "Charts"

REPL cmd 'chart' renamed to 'sol'

Added lots of help documentation for REPL

13 years agoground backward chaining!
Tim Vieira [Wed, 19 Jun 2013 04:05:35 +0000 (00:05 -0400)]
ground backward chaining!

13 years agoAdd 'fcomp' target to Makefile
Nathaniel Wesley Filardo [Wed, 19 Jun 2013 03:18:52 +0000 (23:18 -0400)]
Add 'fcomp' target to Makefile

13 years agoWhoops! Partition rules, then plan as appropriate
Nathaniel Wesley Filardo [Wed, 19 Jun 2013 03:18:12 +0000 (23:18 -0400)]
Whoops!  Partition rules, then plan as appropriate

13 years agoMerge ../working
Tim Vieira [Wed, 19 Jun 2013 03:05:25 +0000 (23:05 -0400)]
Merge ../working

13 years agotoo lazy.
Tim Vieira [Wed, 19 Jun 2013 03:05:12 +0000 (23:05 -0400)]
too lazy.

13 years agoMerge branch 'master' of ssh://github.com/nwf/dyna
Tim Vieira [Wed, 19 Jun 2013 03:04:13 +0000 (23:04 -0400)]
Merge branch 'master' of ssh://github.com/nwf/dyna

13 years agoRemove .plan file after running selftest
Nathaniel Wesley Filardo [Wed, 19 Jun 2013 02:59:30 +0000 (22:59 -0400)]
Remove .plan file after running selftest

13 years agoPreliminary changes for ground backchaining
Nathaniel Wesley Filardo [Tue, 18 Jun 2013 23:19:43 +0000 (19:19 -0400)]
Preliminary changes for ground backchaining

13 years ago()
Tim Vieira [Wed, 19 Jun 2013 00:29:36 +0000 (20:29 -0400)]
()

13 years agoTweak oneshot parser
Nathaniel Wesley Filardo [Tue, 18 Jun 2013 19:56:52 +0000 (15:56 -0400)]
Tweak oneshot parser

This should give better error reporting.

13 years agoHack in a workaround for hanging the test harness
Nathaniel Wesley Filardo [Tue, 18 Jun 2013 18:36:57 +0000 (14:36 -0400)]
Hack in a workaround for hanging the test harness

Catch the thrown ExitFailure and just return ()

13 years agotest/repl/load uses data
Tim Vieira [Tue, 18 Jun 2013 14:38:56 +0000 (10:38 -0400)]
test/repl/load uses data

13 years agoStylistic tweaks
Nathaniel Wesley Filardo [Tue, 18 Jun 2013 06:34:51 +0000 (02:34 -0400)]
Stylistic tweaks

13 years agoSmall mode-system changes
Nathaniel Wesley Filardo [Tue, 18 Jun 2013 06:10:25 +0000 (02:10 -0400)]
Small mode-system changes

Mostly cosmetic
Fixes a small potential bug (as of yet un-tickled) in Python planner hook
Imports a fix to NoBackend planner hook from 4e0fc1726ab4abf1326ea61ae5225f0bb5167707

13 years agoImprove handling of planner failures
Nathaniel Wesley Filardo [Tue, 18 Jun 2013 06:02:13 +0000 (02:02 -0400)]
Improve handling of planner failures

The planner now reports Either an exhaustive list of failed moves
  or a list of successful plans.  When we find a plan, we forget
  the failures and begin accumulating succeses.
Add --dump-failed-plans to facilitate debugging
Report a user program error if a rule fails to have an initializer,
  partially addressing github nwf/dyna#5 .

13 years agoRescue ctxFromBindings for aliased case
Nathaniel Wesley Filardo [Tue, 18 Jun 2013 02:12:19 +0000 (22:12 -0400)]
Rescue ctxFromBindings for aliased case

Use it in the test suite, just like for the unaliased machinery.
This is cherry-picked from 4e0fc1726ab4abf1326ea61ae5225f0bb5167707.

13 years agorefactor load and post-process. both are availabl and the REPL and command-line ...
Tim Vieira [Tue, 18 Jun 2013 00:40:18 +0000 (20:40 -0400)]
refactor load and post-process. both are availabl and the REPL and command-line (see test/repl/load.bash for example usage)

13 years agoadded repl data loading example.
timv [Mon, 17 Jun 2013 02:50:04 +0000 (22:50 -0400)]
added repl data loading example.

13 years ago()
timv [Mon, 17 Jun 2013 02:42:54 +0000 (22:42 -0400)]
()

13 years agoFirst pass at "bulk loader" API -- at the moment loading is only supported at
timv [Mon, 17 Jun 2013 01:42:15 +0000 (21:42 -0400)]
First pass at "bulk loader" API -- at the moment loading is only supported at
the REPL (cmd-line interface coming soon).

 - Read tsv/csv format

 - matrix-like

 - S-Expression - work in progress

Exceptions and errors handlers live in their on module.

Added `pycall` -- a more convenient way to do `eval` and `mod`

13 years agoFix bugs in parser and add tests
Nathaniel Wesley Filardo [Sat, 15 Jun 2013 02:15:11 +0000 (22:15 -0400)]
Fix bugs in parser and add tests

Notably, this fixes the parser backtracking all the way to the start when it
encounters an operator it doesn't know about.  While here, token-ize
constituent parsers and move parser export types to their own module.

13 years agoPlaceholder docs page for builtins
Nathaniel Wesley Filardo [Sat, 15 Jun 2013 00:27:15 +0000 (20:27 -0400)]
Placeholder docs page for builtins

13 years agoTake a stab at fixing up = vs ==
Nathaniel Wesley Filardo [Sat, 15 Jun 2013 00:24:06 +0000 (20:24 -0400)]
Take a stab at fixing up = vs ==

Adds examples/equalities.dyna to selftests.

13 years agomisc cleanup.
timv [Fri, 14 Jun 2013 23:38:13 +0000 (19:38 -0400)]
misc cleanup.

13 years agoCircuit visualizer is not a post-processer called draw_circuit
timv [Fri, 14 Jun 2013 23:22:14 +0000 (19:22 -0400)]
Circuit visualizer is not a post-processer called draw_circuit

clean up cmd-line args

13 years agotiny tweaks.
timv [Fri, 14 Jun 2013 22:48:40 +0000 (18:48 -0400)]
tiny tweaks.

13 years agoadded load and save scripts.
timv [Fri, 14 Jun 2013 22:42:12 +0000 (18:42 -0400)]
added load and save scripts.

13 years agoPickling Interpreter state seems to work.
timv [Fri, 14 Jun 2013 22:30:40 +0000 (18:30 -0400)]
Pickling Interpreter state seems to work.

13 years agoFixed late aggregator assignment. Added REPL test.
timv [Fri, 14 Jun 2013 21:33:07 +0000 (17:33 -0400)]
Fixed late aggregator assignment. Added REPL test.

13 years agoMinor tweaks to crash handler. Post-processor can render animates of text and
timv [Fri, 14 Jun 2013 18:37:07 +0000 (14:37 -0400)]
Minor tweaks to crash handler. Post-processor can render animates of text and
lines. Instead of hard coded nodes, edge, pos. See `example/force.dyna`

13 years agoCrash handler. All uncatch exceptions are beautifully formatted and logged.
timv [Fri, 14 Jun 2013 14:42:00 +0000 (10:42 -0400)]
Crash handler. All uncatch exceptions are beautifully formatted and logged.

13 years agoAccumulated non-code adjustments; TODO.LSA
Nathaniel Wesley Filardo [Thu, 13 Jun 2013 20:42:12 +0000 (16:42 -0400)]
Accumulated non-code adjustments; TODO.LSA

13 years agomerge
timv [Wed, 12 Jun 2013 20:09:59 +0000 (16:09 -0400)]
merge

13 years agoProgress toward pickling Interpreter state. Using import mechanism instead of
timv [Wed, 12 Jun 2013 20:06:28 +0000 (16:06 -0400)]
Progress toward pickling Interpreter state. Using import mechanism instead of
execfile to load new code.

Refactor aggregator defns.

13 years agoWorkaround in test/repl/aggregator-conflict
Nathaniel Wesley Filardo [Wed, 12 Jun 2013 19:41:19 +0000 (15:41 -0400)]
Workaround in test/repl/aggregator-conflict

13 years agoMerge branch 'master' of github.com:nwf/dyna
Nathaniel Wesley Filardo [Wed, 12 Jun 2013 17:35:30 +0000 (13:35 -0400)]
Merge branch 'master' of github.com:nwf/dyna

13 years agoWire test/repl into Backend.Python.Selftest
Nathaniel Wesley Filardo [Wed, 12 Jun 2013 17:34:21 +0000 (13:34 -0400)]
Wire test/repl into Backend.Python.Selftest

While here, some related cleanups

13 years agofixed test/repl test cases.
timv [Wed, 12 Jun 2013 17:31:03 +0000 (13:31 -0400)]
fixed test/repl test cases.

 - repl no longer overwrites `~/.dyna/tmp.dyna` and `~/.dyna/tmp.dyna.plan.py`
   Now uses a file in `~/dyna/tmp/` with file name based on sha1 hash of
   necessary code (which includes parser_state pragmas, of course)

13 years agodrop dep on numpy.
timv [Wed, 12 Jun 2013 17:06:03 +0000 (13:06 -0400)]
drop dep on numpy.

13 years agomerge
timv [Wed, 12 Jun 2013 16:50:53 +0000 (12:50 -0400)]
merge

13 years agotweaks.
timv [Wed, 12 Jun 2013 16:50:33 +0000 (12:50 -0400)]
tweaks.

13 years agoTweak aggr-mismatch error message
Nathaniel Wesley Filardo [Wed, 12 Jun 2013 16:47:49 +0000 (12:47 -0400)]
Tweak aggr-mismatch error message

13 years agoWire in :-iaggr pragmas.
Nathaniel Wesley Filardo [Wed, 12 Jun 2013 16:40:17 +0000 (12:40 -0400)]
Wire in :-iaggr pragmas.

13 years agoMerge branch 'master' of github.com:nwf/dyna
Nathaniel Wesley Filardo [Wed, 12 Jun 2013 16:30:45 +0000 (12:30 -0400)]
Merge branch 'master' of github.com:nwf/dyna

13 years agomerge
timv [Wed, 12 Jun 2013 01:51:26 +0000 (21:51 -0400)]
merge

13 years agoadded test/repl
timv [Wed, 12 Jun 2013 01:46:57 +0000 (21:46 -0400)]
added test/repl

Change codegen output slightly for easier loading.

Moved Term into it's own module. Preliminary support for unification.

added --profile flag.

changed output of rules command at the repl.

repl no longer dies if an initializer exception is thrown (initializer
exceptions throw out newly added rules).

13 years agoCleanups and preliminaries around the parser
Nathaniel Wesley Filardo [Tue, 11 Jun 2013 22:02:28 +0000 (18:02 -0400)]
Cleanups and preliminaries around the parser

While rummaging about, take the opportunity to silence several warnings.

13 years agoCleanups and preliminaries around the parser
Nathaniel Wesley Filardo [Tue, 11 Jun 2013 22:02:28 +0000 (18:02 -0400)]
Cleanups and preliminaries around the parser

While rummaging about, take the opportunity to silence several warnings.

13 years agoProgress on Penn Treebank benchmarks/experiments.
timv [Mon, 10 Jun 2013 19:21:41 +0000 (15:21 -0400)]
Progress on Penn Treebank benchmarks/experiments.

13 years agomerge
timv [Mon, 10 Jun 2013 17:50:34 +0000 (13:50 -0400)]
merge

13 years agotweaks, fixes.
timv [Mon, 10 Jun 2013 17:49:27 +0000 (13:49 -0400)]
tweaks, fixes.

13 years agoInitial example of Euclidean Dijkstra example
Nathaniel Wesley Filardo [Mon, 10 Jun 2013 05:04:57 +0000 (01:04 -0400)]
Initial example of Euclidean Dijkstra example

See nwf/dyna#16; still open to improve.

13 years agofixed some exceptions that we're properly caught.
timv [Sun, 9 Jun 2013 19:47:43 +0000 (15:47 -0400)]
fixed some exceptions that we're properly caught.

13 years agofixed a few bits that broke during refactoring.
timv [Sun, 9 Jun 2013 19:47:16 +0000 (15:47 -0400)]
fixed a few bits that broke during refactoring.

13 years agodynac utility throws an a nice DynaCompilerError on failure and uses the more
timv [Sun, 9 Jun 2013 19:45:19 +0000 (15:45 -0400)]
dynac utility throws an a nice DynaCompilerError on failure and uses the more
modern `subprocess` module for the system call.

13 years agosmall bugfixes in aggregators pertaining to when things should be null.
timv [Sun, 9 Jun 2013 19:42:56 +0000 (15:42 -0400)]
small bugfixes in aggregators pertaining to when things should be null.

13 years agoImprovements to chart
timv [Sun, 9 Jun 2013 16:40:00 +0000 (12:40 -0400)]
Improvements to chart

  * queries (= Chart.__getitem__) perform fewer set intersections (removed a
    very slow call to set.copy -- it's faster to intersect two sets and get a
    copy because the intersection is guaranteed to be smaller!)

    I'm also using a most constrained variable first heuristic for picking the
    first index to intersect.

  * fewer hash look ups with we call ``insert``.

13 years agocleanup force.dyna
timv [Sun, 9 Jun 2013 16:34:21 +0000 (12:34 -0400)]
cleanup force.dyna

13 years agoMerge branch 'master' of github.com:nwf/dyna
Nathaniel Wesley Filardo [Sat, 8 Jun 2013 22:11:48 +0000 (18:11 -0400)]
Merge branch 'master' of github.com:nwf/dyna

13 years agoFix a small bug in the test harness
Nathaniel Wesley Filardo [Sat, 8 Jun 2013 18:45:00 +0000 (14:45 -0400)]
Fix a small bug in the test harness

Thanks to Tim for the report that prop_no_unifyUnaliasedNV failed.

Rather than constrain prop_no_unifyUnaliasedNV to generate only UShared
terms, try a slightly different test in which we are unifying in a
preconstructed context.

13 years agoadded comment on running script.
timv [Fri, 7 Jun 2013 22:22:54 +0000 (18:22 -0400)]
added comment on running script.

13 years agomerge
timv [Fri, 7 Jun 2013 22:19:25 +0000 (18:19 -0400)]
merge

13 years agoadded post-processing script for animated force-directed graph layout.
timv [Fri, 7 Jun 2013 22:18:15 +0000 (18:18 -0400)]
added post-processing script for animated force-directed graph layout.

13 years agoadded force-directed layout (with a small hack for random numbers).
timv [Fri, 7 Jun 2013 22:17:44 +0000 (18:17 -0400)]
added force-directed layout (with a small hack for random numbers).

use FIFO priorities added argument for runing post-processing scripts.

13 years agofix error :: String
Nathaniel Wesley Filardo [Fri, 7 Jun 2013 16:28:20 +0000 (12:28 -0400)]
fix error :: String

Rework conjunction handling in normalizer -- it was erroneously discarding
the left hand side, rather than unifying with true.

While here, add both a test-case (examples/fib-limit.dyna) and some
documentation for users.

Closes github issue nwf/dyna#14.

13 years agomerge
timv [Fri, 7 Jun 2013 03:54:55 +0000 (23:54 -0400)]
merge

13 years agoupdated expected output for end-to-end tests.
timv [Fri, 7 Jun 2013 03:53:01 +0000 (23:53 -0400)]
updated expected output for end-to-end tests.

13 years ago()
timv [Fri, 7 Jun 2013 03:37:57 +0000 (23:37 -0400)]
()

13 years agoNew features and cleanup.
timv [Fri, 7 Jun 2013 03:37:43 +0000 (23:37 -0400)]
New features and cleanup.

New feature: support for rule retraction

  - rules are indexed by `Interpreter` and stored in a `Rule` instance.

  - REPL features to list rules, retract rule by it'd rule index.

New features: item retraction

  - this is an experimental feature, which is very inefficient.

Update python deps in readme

chart dumps and trace output use dyna-style double quoted strings and lower case
Booleans.

better output formatting for REPL/query

13 years agoInterpreter states encapulated in an `Interpreter` instance.
timv [Thu, 6 Jun 2013 22:49:43 +0000 (18:49 -0400)]
Interpreter states encapulated in an `Interpreter` instance.

  - this was a big refactoring adds a few new files (chart.py, repl.py,
    config.py)

Fix: Errors stop on first failed handler.

Adding a new rule is safe. We check that the initializers run and there are no
aggregator conflicts before added the new rules to `Interpreter` state. We stage
propagation.

I've document a few more errors (see `examples/string-quote.dyna`)

Using the ~/.dyna directory

  - adds a dependency to the `path.py` module

13 years agoWrite up new normalization details
Nathaniel Wesley Filardo [Thu, 6 Jun 2013 07:29:47 +0000 (03:29 -0400)]
Write up new normalization details

While here, permute the directory structure of docs/sphinx slightly.

13 years agoTweaks to the planner
Nathaniel Wesley Filardo [Thu, 6 Jun 2013 06:06:30 +0000 (02:06 -0400)]
Tweaks to the planner

Mostly cosmetic changes, but of note:
  The planner now uses the alias-tracking contexts for mode analysis (though
    it does not actually yet do anything with this power; this change is in
    preparation for backward-chaining)
  DOpAMine unifications are now tagged with determinisim information, again
    in preparation for future work; these are all currently set to DetNon.
  DOpAMine and Python OPEmit printout is much more vertically compact.

13 years agoRewrite ANF normalizer
Nathaniel Wesley Filardo [Thu, 6 Jun 2013 05:53:44 +0000 (01:53 -0400)]
Rewrite ANF normalizer

Now uses destination-passing style and a new theory of contexts.  It has
many more opportunities to raise warnings in bizarre cases and no longer
generates quite so much cruft as before.

13 years agoBetter error messages:
timv [Wed, 5 Jun 2013 22:14:56 +0000 (18:14 -0400)]
Better error messages:

 - handle errors in rule initializers.

 - include rule source in error message

 - no need to run delete-updates when an item "was" causing an error because
   these updates don't land on the agenda.

REPL uses correct rule indexes

 - Parser state maintained across calls.

 - colon equals is no longer buggy in the REPL.

Codegen minor aesthetics

13 years agomerge
timv [Wed, 5 Jun 2013 20:04:18 +0000 (16:04 -0400)]
merge

13 years ago()
timv [Wed, 5 Jun 2013 20:04:02 +0000 (16:04 -0400)]
()