]> hydra-www.ietfng.org Git - dyna2/log
dyna2
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)]
()

13 years agoMerge branch 'master' of github.com:nwf/dyna
Nathaniel Wesley Filardo [Wed, 5 Jun 2013 19:00:15 +0000 (15:00 -0400)]
Merge branch 'master' of github.com:nwf/dyna

13 years agoMore parser work
Nathaniel Wesley Filardo [Wed, 5 Jun 2013 18:55:16 +0000 (14:55 -0400)]
More parser work

Allow backends to restrict the set of acceptable aggregators.
Feed through rendered parser state.

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

13 years agoadded a few examples.
timv [Wed, 5 Jun 2013 16:25:56 +0000 (12:25 -0400)]
added a few examples.

13 years agoMinor work in Analysis.Mode.Selftest.Contexts
Nathaniel Wesley Filardo [Wed, 5 Jun 2013 07:49:35 +0000 (03:49 -0400)]
Minor work in Analysis.Mode.Selftest.Contexts

13 years agoTidy README.md a bit
Nathaniel Wesley Filardo [Wed, 5 Jun 2013 06:59:01 +0000 (02:59 -0400)]
Tidy README.md a bit

13 years agoAdd a placeholder tutorial section on errors
Nathaniel Wesley Filardo [Wed, 5 Jun 2013 06:31:04 +0000 (02:31 -0400)]
Add a placeholder tutorial section on errors

13 years agoNew documentation and cleanups
Nathaniel Wesley Filardo [Wed, 5 Jun 2013 05:06:45 +0000 (01:06 -0400)]
New documentation and cleanups

Notably, add docs/sphinx for our prose documentation and several
corresponding Makefile targets.

13 years agoSmall cleanups & update TODO
Nathaniel Wesley Filardo [Wed, 5 Jun 2013 00:30:27 +0000 (20:30 -0400)]
Small cleanups & update TODO

13 years agoMore parser work
Nathaniel Wesley Filardo [Tue, 4 Jun 2013 23:56:52 +0000 (19:56 -0400)]
More parser work

Attempts to serialize parser state as a wad of pragmas and hand
them off to the backend.  This is hardly ideal, but it's something.

13 years agoFix a failing test
Nathaniel Wesley Filardo [Tue, 4 Jun 2013 23:52:16 +0000 (19:52 -0400)]
Fix a failing test

Automata in prop_call_test_sufficient should be nonempty on all disjuncts.

Thanks to Tim for the report.

13 years agoAdd dijkstra example as python selftest
Nathaniel Wesley Filardo [Tue, 4 Jun 2013 23:50:27 +0000 (19:50 -0400)]
Add dijkstra example as python selftest

13 years agoadded matrixops to python end-to-end tests.
timv [Tue, 4 Jun 2013 23:45:23 +0000 (19:45 -0400)]
added matrixops to python end-to-end tests.

13 years agomerge
timv [Tue, 4 Jun 2013 23:38:55 +0000 (19:38 -0400)]
merge

13 years agoError handling, hypergraph recovery.
timv [Tue, 4 Jun 2013 23:38:21 +0000 (19:38 -0400)]
Error handling, hypergraph recovery.
  - code instrumentation `emit` now passed passengers.
  - see draw() method and --draw flag

13 years agominor cosmetics.
timv [Tue, 4 Jun 2013 20:12:11 +0000 (16:12 -0400)]
minor cosmetics.

13 years agoMerge branch 'master' of github.com:nwf/dyna
Nathaniel Wesley Filardo [Tue, 4 Jun 2013 20:03:01 +0000 (16:03 -0400)]
Merge branch 'master' of github.com:nwf/dyna

13 years agotweaks to style in debugger html output.
timv [Tue, 4 Jun 2013 20:02:16 +0000 (16:02 -0400)]
tweaks to style in debugger html output.

13 years agomerge
timv [Tue, 4 Jun 2013 19:43:08 +0000 (15:43 -0400)]
merge

13 years agocodegen: put docstrings on handlers and initializers.
timv [Tue, 4 Jun 2013 19:42:25 +0000 (15:42 -0400)]
codegen: put docstrings on handlers and initializers.

  - update ./debug to parse new format.

Updated TODO list.

parse_sexpr handles double quoted strings (at least crudely).

13 years agoSome work towards resumable parsing
Nathaniel Wesley Filardo [Tue, 4 Jun 2013 19:41:33 +0000 (15:41 -0400)]
Some work towards resumable parsing

13 years agoMerge branch 'master' of github.com:nwf/dyna
Nathaniel Wesley Filardo [Tue, 4 Jun 2013 03:39:07 +0000 (23:39 -0400)]
Merge branch 'master' of github.com:nwf/dyna

13 years agoFix some parser bugs
Nathaniel Wesley Filardo [Tue, 4 Jun 2013 03:29:27 +0000 (23:29 -0400)]
Fix some parser bugs

Aggregator parsing now much more rigorous & have more self-tests.
Facts now use "|=" aggregation as they should

13 years agoemits are buffered in case an exception is thrown.
timv [Tue, 4 Jun 2013 03:27:53 +0000 (23:27 -0400)]
emits are buffered in case an exception is thrown.

fixed typo in arity of mod.

13 years agoupdated expected output for papa2.
timv [Tue, 4 Jun 2013 03:26:09 +0000 (23:26 -0400)]
updated expected output for papa2.

13 years agousing an actual priority queue, no more ``_delete`` global variable.
timv [Mon, 3 Jun 2013 18:58:00 +0000 (14:58 -0400)]
using an actual priority queue, no more ``_delete`` global variable.

global error suppression flag

13 years agomerge
timv [Mon, 3 Jun 2013 15:47:49 +0000 (11:47 -0400)]
merge

13 years agoQueries return variable assignments
timv [Mon, 3 Jun 2013 15:45:17 +0000 (11:45 -0400)]
Queries return variable assignments

:- query rewrite(X,Y)
(1, {'Y': 'ate', 'X': 'V'})
(1, {'Y': 'caviar', 'X': 'N'})
(1, {'Y': 'spoon', 'X': 'N'})
(1, {'Y': 'the', 'X': 'Det'})
(1, {'Y': 'with', 'X': 'P'})
(1, {'Y': 'a', 'X': 'Det'})
(1, {'Y': 'Papa', 'X': 'NP'})

Added `dict=` (name might changed) and aggregator which stores user variable
assignments. [This is what is used for answering queries like the one above.qq]

13 years agoRework parser infrastructure
Nathaniel Wesley Filardo [Mon, 3 Jun 2013 07:10:32 +0000 (03:10 -0400)]
Rework parser infrastructure

Parser now really should just be the parser.
OneshotDriver consumes an entire Dyna program at once, tracking
  all the requisite state from line to line, before emitting the
  whole mass to the down-stream pipeline.

While here, push through some changes for custom operator symbols, though
this is not quite wired up yet.

13 years agoRemove stale files
Nathaniel Wesley Filardo [Mon, 3 Jun 2013 03:52:30 +0000 (23:52 -0400)]
Remove stale files

13 years ago()
timv [Mon, 3 Jun 2013 03:26:54 +0000 (23:26 -0400)]
()

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

13 years agoFix a typo in matrixops example
Nathaniel Wesley Filardo [Mon, 3 Jun 2013 02:52:19 +0000 (22:52 -0400)]
Fix a typo in matrixops example

13 years agomoved pretty into Term.__repr__
timv [Mon, 3 Jun 2013 02:51:20 +0000 (22:51 -0400)]
moved pretty into Term.__repr__

13 years agoChart does not need update method thanks to the new Term objects.
timv [Mon, 3 Jun 2013 02:23:32 +0000 (22:23 -0400)]
Chart does not need update method thanks to the new Term objects.

13 years agoLots of work in Dyna.Analysis.Mode
Nathaniel Wesley Filardo [Mon, 3 Jun 2013 02:03:23 +0000 (22:03 -0400)]
Lots of work in Dyna.Analysis.Mode

13 years agoMerge branch 'master' of github.com:nwf/dyna
Nathaniel Wesley Filardo [Mon, 3 Jun 2013 01:57:36 +0000 (21:57 -0400)]
Merge branch 'master' of github.com:nwf/dyna

13 years agoRefactored: Term's store reference to their aggregator.
timv [Mon, 3 Jun 2013 01:52:57 +0000 (21:52 -0400)]
Refactored: Term's store reference to their aggregator.

13 years agoMake BackendDefn 'constants' a function
Nathaniel Wesley Filardo [Mon, 3 Jun 2013 01:51:00 +0000 (21:51 -0400)]
Make BackendDefn 'constants' a function

Rather than a guaranteed finite map.  While here, make NoBackend agree more
with the Python backend and sort the lists of primitives.

13 years agoChart now has indexes on each argument (but not the value).
timv [Mon, 3 Jun 2013 01:12:41 +0000 (21:12 -0400)]
Chart now has indexes on each argument (but not the value).

Chart stores Term objects.

13 years agoFixed colon equals aggregator (:=).
timv [Mon, 3 Jun 2013 01:08:20 +0000 (21:08 -0400)]
Fixed colon equals aggregator (:=).

13 years agoSimplified code produced by Python codegen.
timv [Mon, 3 Jun 2013 01:07:53 +0000 (21:07 -0400)]
Simplified code produced by Python codegen.

   for (X, Z, Value) in chart[:,Y,:,:]

is now

   for (X, _, Z, Value) in chart[:,Y,:,:]

13 years agocolon equals (:=) tests.
timv [Mon, 3 Jun 2013 00:20:17 +0000 (20:20 -0400)]
colon equals (:=) tests.

13 years ago()
timv [Sun, 2 Jun 2013 17:47:58 +0000 (13:47 -0400)]
()

13 years agoMerge branch 'master' of ssh://github.com/nwf/dyna
Tim Vieira [Sun, 2 Jun 2013 17:34:12 +0000 (13:34 -0400)]
Merge branch 'master' of ssh://github.com/nwf/dyna

13 years agoNoticed some quirky behavior with global variables when REPL was in a different
Tim Vieira [Sun, 2 Jun 2013 17:29:16 +0000 (13:29 -0400)]
Noticed some quirky behavior with global variables when REPL was in a different
module from interpreter so I switched it back temporarily.

minor refactoring to Chart.update and Chart.insert

The new Term object hasn't been pushed all the way thru. The old-style (fn,idx)
tuples are what get stored in the chart.

   TODO: track down and fix this.

Ghetto way to answer queries.

  :- query phrase(X,I,K)

in(2) :- query rewrite(X,I,K)
out(2) bag= _VALUE is rewrite(X,I,K), &result(&(rewrite(X,I,K)), _VALUE).
=============
out(2) := BAggregator({result(rewrite('PP','P','NP'),1): 1,
                       result(rewrite('VP','VP','PP'),1): 1,
                       ...
                       })

13 years agoTry a new definition for := in python backend
Nathaniel Wesley Filardo [Sat, 1 Jun 2013 23:00:37 +0000 (19:00 -0400)]
Try a new definition for := in python backend

13 years agoMake emissions explicit in DOpAMine
Nathaniel Wesley Filardo [Sat, 1 Jun 2013 22:24:48 +0000 (18:24 -0400)]
Make emissions explicit in DOpAMine

Change the world so that the planner generates OPEmit verbs rather
than emissions being magical bits of the backend.  Expand the notion of an
emission to include the rule index (required for :=) and a set of variables
for hyper-edge identification.  (Currently, we emit all of them, but later
we will want to trim this down to only nondeterministic variables.)

This change is the code-generator mate of timv's changes in 6abdc37.