]>
hydra-www.ietfng.org Git - dyna2/log
Tim Vieira [Fri, 5 Jul 2013 18:30:34 +0000 (14:30 -0400)]
Merge ../working
Tim Vieira [Fri, 5 Jul 2013 18:30:18 +0000 (14:30 -0400)]
added dyna doctest for retracting BC rules.
Tim Vieira [Fri, 5 Jul 2013 18:29:06 +0000 (14:29 -0400)]
working on fixing BC rule retraction.
Nathaniel Wesley Filardo [Fri, 5 Jul 2013 18:12:04 +0000 (14:12 -0400)]
Generate update plans for backchained items
This is necessary to allow retraction.
While here, wire up a backchain example into the test harness.
Tim Vieira [Fri, 5 Jul 2013 17:15:26 +0000 (13:15 -0400)]
Merge ../working
Tim Vieira [Fri, 5 Jul 2013 17:14:40 +0000 (13:14 -0400)]
added dijkstra-backpointers to end-to-end tests.
Tim Vieira [Fri, 5 Jul 2013 17:06:40 +0000 (13:06 -0400)]
added `with_key` infix operator for (Issue #29 Backpointers) and argument
disposition for `$key/1`.
Removed previous version of `argmin=/argmax=`.
Tim Vieira [Fri, 5 Jul 2013 03:04:00 +0000 (23:04 -0400)]
Merge ../working
Tim Vieira [Fri, 5 Jul 2013 03:01:15 +0000 (23:01 -0400)]
implementation of @nwf's argm idea for backpointers (#29). Uses `$key` instead
of `argm`.
BUGFIX: hash and eq for list wasn't correct.
Tim Vieira [Thu, 4 Jul 2013 03:22:38 +0000 (23:22 -0400)]
Merge ../working
Tim Vieira [Thu, 4 Jul 2013 03:21:50 +0000 (23:21 -0400)]
minor fix to trace formatting
Tim Vieira [Wed, 3 Jul 2013 23:20:29 +0000 (19:20 -0400)]
Merge ../working
Tim Vieira [Wed, 3 Jul 2013 23:19:20 +0000 (19:19 -0400)]
multiline input in doctest
disable REPL run command.. it doesn't pass parser state along.
Tim Vieira [Wed, 3 Jul 2013 21:31:58 +0000 (17:31 -0400)]
Merge ../working
Tim Vieira [Wed, 3 Jul 2013 20:57:56 +0000 (16:57 -0400)]
Overhaul error message displays
- "pop-time": aggregation errors (e.g. two distinct values following into an
`=` aggregator) are group by functor/arity, then by type and only 10
instances are shown.
- "push-time": errors are grouped by rule, then error type (e.g. TypeError,
DivisionByZero), only 10 instances of the error are displayed.
- These changes help avoid an overwhelming cascade of very similar
errors. Users should be able to trace the sources of these errors using other
tools (e.g. `trace`)
Resolve issue #36
Program rules available in $rule -- doesn't do anything yet however.
Tweaks to doctest runner.
Tim Vieira [Wed, 3 Jul 2013 16:19:38 +0000 (12:19 -0400)]
Merge ../working
Tim Vieira [Wed, 3 Jul 2013 16:03:27 +0000 (12:03 -0400)]
improvements to `examples/ptb.dyna`
- (no longer a complete mess thanks to the new `load` commands)
- does binarization
- extracts and counts rules in a s-expression tree.
- parses a sentence given as a string AND extracts the optimal parse by
following backpointers.
sexpr loader uses nested lists as it's representation
'in'(+,+)+ asserts second arg is a list.
retract_rule: no longer crashes when retracting a backchained rule. There are
possible bugs because we haven't deleted the memo tables affected by that rule.
REPL: show changes after 'load' commands
String display format should no longer render special characters like '\n'
Nathaniel Wesley Filardo [Wed, 3 Jul 2013 05:00:19 +0000 (01:00 -0400)]
Merge branch 'master' of github.com:nwf/dyna
Nathaniel Wesley Filardo [Wed, 3 Jul 2013 04:59:28 +0000 (00:59 -0400)]
Stop collecting update handlers by functar
It seems much more profitable, going forward, to collect most things by
rules. If we want to get into fusion later, that's fine, but for the
moment...
Nathaniel Wesley Filardo [Wed, 3 Jul 2013 04:34:12 +0000 (00:34 -0400)]
Add PHONY label to tags targets in Makefile
Tim Vieira [Wed, 3 Jul 2013 03:16:58 +0000 (23:16 -0400)]
Error when user tries to iterate over something which is not a list (e.g. using
'in' operator).
Tim Vieira [Tue, 2 Jul 2013 22:13:36 +0000 (18:13 -0400)]
stable `set` and `bag` ordering.
Tim Vieira [Tue, 2 Jul 2013 21:48:27 +0000 (17:48 -0400)]
added example of optimal path extraction for shortest path.
Tim Vieira [Tue, 2 Jul 2013 21:46:07 +0000 (17:46 -0400)]
Proposal for definition of `argmax=/argmin=`.
Tim Vieira [Tue, 2 Jul 2013 04:14:51 +0000 (00:14 -0400)]
tweaks to trace to print lists nicely, and infix 'in'
Simplify error message pertaining to retracting a rule and when a query or trace
fails.
Tim Vieira [Mon, 1 Jul 2013 21:53:00 +0000 (17:53 -0400)]
added infix 'in' operator for "iterating" the elements of a list (i.e. `a += x
for X in [1,2,3].` with `X` free and the list bound.) and check if the item
exists in the list.
Tim Vieira [Mon, 1 Jul 2013 21:12:53 +0000 (17:12 -0400)]
added `mean=` aggregator.
`set=` and `bag=` aggregators return dyna lists. So we can use the results in
other rules.
make sure we show changes when we `retract_rule`
when we show changes we print a header
> a += 1.
Changes
=======
a = 1.
Also, pycall translates python and dyna lists.
Fixed formatting of lists, strings are double quoted.
Fixed `query [A|_] is [1,2,3]` -- we weren't substituting `A`.
Tim Vieira [Mon, 1 Jul 2013 19:47:37 +0000 (15:47 -0400)]
minor cleanup.
Tim Vieira [Mon, 1 Jul 2013 19:35:56 +0000 (15:35 -0400)]
update tests to reflect new output format.
Tim Vieira [Mon, 1 Jul 2013 19:29:15 +0000 (15:29 -0400)]
Changed output format yet again. Everything is now consistent with "term =
value."
Robustified retract_rule.
Incorporated Jason's tweaks to trace.
Tim Vieira [Mon, 1 Jul 2013 05:20:59 +0000 (01:20 -0400)]
hide ugly filenames from users.
Tim Vieira [Mon, 1 Jul 2013 05:09:29 +0000 (01:09 -0400)]
updated documentation to use new repl `>` instead of `:-`.
Tim Vieira [Mon, 1 Jul 2013 04:57:47 +0000 (00:57 -0400)]
fixed repl test
Tim Vieira [Mon, 1 Jul 2013 04:56:38 +0000 (00:56 -0400)]
merge
Tim Vieira [Mon, 1 Jul 2013 04:48:58 +0000 (00:48 -0400)]
updated repl tests.
Tim Vieira [Mon, 1 Jul 2013 04:46:35 +0000 (00:46 -0400)]
Many changes
* changed repl prompt
* commented out failed attempt at providing 'for X in [1,2,3]'
* hid developer tools from repl.
* trace:
- fixed cycle detection
- terser information printed for each edge.
item => value
| += val1
|
| instantiated rule with subexpressions and variable values shown
| inline.
|
| RECURSE on items in rule.
|
| += val2
- changed color coding.
- documentation, `> help trace`
* No more barfing on empty input to trace, query, vquery.
Tim Vieira [Mon, 1 Jul 2013 04:38:27 +0000 (00:38 -0400)]
changed repl prompt
commented out failed attempt at providing 'for X in [1,2,3]'
hid developer tools from repl.
trace:
- fixed cycle detection
- terser information printed for each edge.
item => value
| += val1
|
| instantiated rule with subexpressions and variable values shown
| inline.
|
| RECURSE on items in rule.
|
| += val2
- changed color coding.
- documentation, `> help trace`
No more barfing on empty input to trace, query, vquery.
Nathaniel Wesley Filardo [Mon, 1 Jul 2013 04:04:43 +0000 (00:04 -0400)]
Soften exception messages a bit
Some infinitessimal part of github issue #32.
Nathaniel Wesley Filardo [Mon, 1 Jul 2013 02:49:22 +0000 (22:49 -0400)]
Bump required versions of parsers and trifecta
Parsers v0.8.3 (commit
537337c9 ) undoes a performance regression
(of my creation, oops) which turns out to be important for us.
Tim Vieira [Sun, 30 Jun 2013 23:59:26 +0000 (19:59 -0400)]
Merge branch 'master' of ssh://github.com/nwf/dyna
Nathaniel Wesley Filardo [Sun, 30 Jun 2013 22:26:15 +0000 (18:26 -0400)]
Add special handling for = and ==.
Their evaluation has been inlined, increasing the number of modes supported.
Tim Vieira [Sun, 30 Jun 2013 18:09:32 +0000 (14:09 -0400)]
Changed output format for solution
Nathaniel Wesley Filardo [Sun, 30 Jun 2013 06:59:41 +0000 (02:59 -0400)]
Wire up oper pragmas.
They're a little unpleasant, but it works. While here, correct the
documentation.
Nathaniel Wesley Filardo [Sun, 30 Jun 2013 06:42:09 +0000 (02:42 -0400)]
Remove defaults from operator parser
(Some unit-tests keep them on for the moment)
Nathaniel Wesley Filardo [Sun, 30 Jun 2013 06:36:49 +0000 (02:36 -0400)]
Strictify Main.Driver configuration fields
Notably, this improves handling of some invocation errors, as it forces
things earlier.
Nathaniel Wesley Filardo [Sun, 30 Jun 2013 06:33:44 +0000 (02:33 -0400)]
Add [,,,|Rest] syntax support to parser
Tim Vieira [Sun, 30 Jun 2013 04:49:45 +0000 (00:49 -0400)]
trace available at repl supports viewing derivations each item matching query
:- a :- b.
:- b:- c.
:- c.
=============
a := true
b := true
c := true
:- trace a
a = true
|
└─ :- true
# a :- b.
# a :- b. where {}
head: &a
result: b=true
|
└─ b = true
|
└─ :- true
# b:- c.
# b:- c. where {}
head: &b
result: c=true
|
└─ c = true
|
└─ |= true
# c.
# c. where {}
head: &c
result: &true
Tim Vieira [Sun, 30 Jun 2013 02:49:42 +0000 (22:49 -0400)]
Many changes
* Support for `=` aggregator. #23
* BUGFIX: when --plan is specified (sorry :-X)
* tweak to error handling. when an item's aggregator fails we set it's value to
$error instead of it's last "ok" value.
the repl also show this item as "changed"
* tweaks to doctest runnner
* attempt at contains/2 for list membership -- will eventually change to infix
operator `in`
* cons and nil can't be assigned values.
Tim Vieira [Sat, 29 Jun 2013 05:00:59 +0000 (01:00 -0400)]
Each Interpreters now has a workspace `~/.dyna/tmp/$PID`. This directory is for
any files used by the code generator, REPL, etc.
Tim Vieira [Sat, 29 Jun 2013 04:21:50 +0000 (00:21 -0400)]
tweaks to the README, todo list, and repl formatting.
Tim Vieira [Sat, 29 Jun 2013 01:51:15 +0000 (21:51 -0400)]
Tweaks to error messages.
Improved documentation for loaders and post-processors.
Tim Vieira [Fri, 28 Jun 2013 21:16:49 +0000 (17:16 -0400)]
()
Tim Vieira [Fri, 28 Jun 2013 21:16:36 +0000 (17:16 -0400)]
added examples/lists.dyna to end-to-end tests
Tim Vieira [Fri, 28 Jun 2013 21:12:03 +0000 (17:12 -0400)]
merged
Tim Vieira [Fri, 28 Jun 2013 21:02:56 +0000 (17:02 -0400)]
Merge ../working
Tim Vieira [Fri, 28 Jun 2013 21:02:50 +0000 (17:02 -0400)]
cleanup
Tim Vieira [Fri, 28 Jun 2013 21:00:29 +0000 (17:00 -0400)]
Removed existing calls to pycall. stdlib functions must be declared manually as
a case in the `constants` function `Python/Backend.hs`. Otherwise, `pycall` is
still available.
Tim Vieira [Fri, 28 Jun 2013 20:41:39 +0000 (16:41 -0400)]
()
Tim Vieira [Fri, 28 Jun 2013 20:39:46 +0000 (16:39 -0400)]
pygments is now optional (if it's missing you are warned if you run or import
debug somewhere.)
extended dyna compiler wrapper (dynac)
Nathaniel Wesley Filardo [Fri, 28 Jun 2013 20:31:59 +0000 (16:31 -0400)]
Merge branch 'master' of github.com:nwf/dyna
Nathaniel Wesley Filardo [Fri, 28 Jun 2013 20:29:21 +0000 (16:29 -0400)]
Just changing the parser is never enough
Put nil/0 and cons/2 into disposition tables and the backends as constants.
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).
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.
Tim Vieira [Fri, 28 Jun 2013 14:40:18 +0000 (10:40 -0400)]
Merge ../working
Tim Vieira [Fri, 28 Jun 2013 14:39:24 +0000 (10:39 -0400)]
yet another fix to ./debug
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.
Tim Vieira [Fri, 28 Jun 2013 06:10:33 +0000 (02:10 -0400)]
Merge ../working
Tim Vieira [Fri, 28 Jun 2013 06:10:20 +0000 (02:10 -0400)]
cleanup output formats.
Nathaniel Wesley Filardo [Fri, 28 Jun 2013 05:48:56 +0000 (01:48 -0400)]
Add ruleix=N printouts to dump headers
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.
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.
Nathaniel Wesley Filardo [Fri, 28 Jun 2013 02:57:10 +0000 (22:57 -0400)]
Merge branch 'master' of github.com:nwf/dyna
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.
Tim Vieira [Fri, 28 Jun 2013 01:11:26 +0000 (21:11 -0400)]
Merge ../working
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.
Nathaniel Wesley Filardo [Fri, 28 Jun 2013 00:41:48 +0000 (20:41 -0400)]
Merge branch 'master' of github.com:nwf/dyna
Tim Vieira [Thu, 27 Jun 2013 20:57:54 +0000 (16:57 -0400)]
added example of backchaining.
Tim Vieira [Thu, 27 Jun 2013 20:57:10 +0000 (16:57 -0400)]
dyna doctest runnner.
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()
Tim Vieira [Thu, 27 Jun 2013 19:00:30 +0000 (15:00 -0400)]
()
Tim Vieira [Thu, 27 Jun 2013 18:44:54 +0000 (14:44 -0400)]
added geometric series to tests
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).
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.
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.
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
Tim Vieira [Wed, 19 Jun 2013 04:05:35 +0000 (00:05 -0400)]
ground backward chaining!
Nathaniel Wesley Filardo [Wed, 19 Jun 2013 03:18:52 +0000 (23:18 -0400)]
Add 'fcomp' target to Makefile
Nathaniel Wesley Filardo [Wed, 19 Jun 2013 03:18:12 +0000 (23:18 -0400)]
Whoops! Partition rules, then plan as appropriate
Tim Vieira [Wed, 19 Jun 2013 03:05:25 +0000 (23:05 -0400)]
Merge ../working
Tim Vieira [Wed, 19 Jun 2013 03:05:12 +0000 (23:05 -0400)]
too lazy.
Tim Vieira [Wed, 19 Jun 2013 03:04:13 +0000 (23:04 -0400)]
Merge branch 'master' of ssh://github.com/nwf/dyna
Nathaniel Wesley Filardo [Wed, 19 Jun 2013 02:59:30 +0000 (22:59 -0400)]
Remove .plan file after running selftest
Nathaniel Wesley Filardo [Tue, 18 Jun 2013 23:19:43 +0000 (19:19 -0400)]
Preliminary changes for ground backchaining
Tim Vieira [Wed, 19 Jun 2013 00:29:36 +0000 (20:29 -0400)]
()
Nathaniel Wesley Filardo [Tue, 18 Jun 2013 19:56:52 +0000 (15:56 -0400)]
Tweak oneshot parser
This should give better error reporting.
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 ()
Tim Vieira [Tue, 18 Jun 2013 14:38:56 +0000 (10:38 -0400)]
test/repl/load uses data
Nathaniel Wesley Filardo [Tue, 18 Jun 2013 06:34:51 +0000 (02:34 -0400)]
Stylistic tweaks
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
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 .