Robby Findler
b3c450ffc9
add 'side-condition' to define-judgment-form (it does not have an implicit
...
unquote like the other side-condition's do, but it is still useful
for typesetting purposes)
2012-01-14 14:52:07 -06:00
Robby Findler
93c21e34de
added a cycle check to define-language so grammars like this one:
...
(define-language L
(e e))
are rejected as syntax errors
2012-01-09 12:57:19 -06:00
Robby Findler
ddecad0575
redex: adjust the way metafunction tracing is printed so you
...
don't see (list 'lambda (list 'x) 'x) but instead (lambda (x) x)
2012-01-08 12:13:36 -06:00
Robby Findler
5b2d378a77
fixed a bug in recent Redex internal pattern rewrite
...
(discovered by the random testing done for the racket machine model)
2011-12-28 23:52:56 -06:00
Robby Findler
f1bacffbdc
Adjusted rewrite-side-condition/check-errs so that it normalizes the internal
...
redex patterns a bunch:
- repeats are turned into wrappers in sequences,
- names are all explicit,
- non-terminals are wrapped with `nt',
- cross patterns always have the hyphens in them.
- ellipses names are normalized (so there are no "hidden"
name equalities); this also means that repeat patterns
can have both a regular name and a mismatch name
Also, added a match-a-pattern helper macro that checks to make sure
that functions that process patterns don't miss any cases
2011-12-28 09:46:43 -06:00
Robby Findler
e55ed2dc25
improve syntax error reporting for judgment-holds in reduction relations (and
...
probably elsewhere)
2011-12-08 20:35:46 -06:00
Robby Findler
447bd44a0c
minor rackety
2011-12-05 01:14:54 -06:00
Robby Findler
e788c6f49e
adjust define-judgment-form so that it
...
a) avoids creating big intermediate lists of the same things over and over
(this closes PR 12380)
b) generates less code (by generating calls to local functions)
c) normalizes its output (sorts by the printed representation)
2011-11-20 22:50:07 -06:00
Robby Findler
0a75219438
added support for where & side-condition & judgment-holds to define-relation
...
closes PR 12382
2011-11-20 21:34:22 -06:00
Robby Findler
b93486ed69
compile the left-hand sides of define-judgment only once, not during each time we try to check a judgment
...
related to PR 12380
2011-11-17 20:55:05 -06:00
Robby Findler
755dc28e55
Fixes define-relation's handling of ellipses across clauses
...
closes PR 12378
2011-11-17 17:00:11 -06:00
Robby Findler
64dfdb3c7f
Change the expansion of reduction-relation so that it generates less code
...
(by expanding into a call to a 30 or so line procedure, instead of putting
that code directly into the result of the macro).
This produces about a 6x speedup on this reduction-relation
(reduction-relation L (--> 0 1) (--> 1 2) ... (--> 99 100))
where L is
(define-language L)
The time it takes to run "racket r6rs.rkt" in the shell from the
directory collects/redex/examples/r6rs speeds up by about 10% (15%
with errortrace enabled), in the case where all .zo files are built,
except the ones in the r6rs directory. (Also worth noting that "racket
-l redex" takes more than 50% of that time.) And the change has no
noticeable effect on the time it takes to run r6rs-test.rkt.
2011-10-31 08:53:09 -05:00
Robby Findler
9d371153fd
add the #:stop-when argument to apply-reduction-relation*
2011-10-23 12:10:56 -05:00
Robby Findler
9ab6a93127
fix the error check
...
closes PR 12290
2011-10-15 14:00:16 -05:00
Ryan Culpepper
7cc1476170
syntax/parse: fix bug: integrated stxclass might not bind pvar to syntax
2011-09-21 16:58:52 -06:00
Casey Klein
634f5c9e0c
Removes now outdated comment
2011-09-08 09:11:52 -05:00
Casey Klein
97e792200f
Gives a function a better name
2011-09-08 09:11:52 -05:00
Casey Klein
6d43376f9c
Adds support for `judgment-holds' clauses in metafunctions
2011-09-08 09:11:52 -05:00
Casey Klein
ac7856a377
Moves metafunction construction to later expansion step
2011-09-08 09:11:51 -05:00
Casey Klein
2b4f604776
Replaces use of `define-syntax-set'
2011-09-08 09:11:51 -05:00
Casey Klein
145828527f
Fixes handling of pattern variables that look like metafunctions
2011-08-31 11:20:02 -05:00
Casey Klein
c0625dc30c
Adds define-term form
2011-08-30 15:10:50 -05:00
Casey Klein
2eced78000
Fixes indentation
2011-08-17 11:59:43 -05:00
Casey Klein
9e2e11e9c4
Tests metafunction Check Syntax arrows
2011-08-16 14:32:33 -05:00
Casey Klein
98eaaebc65
Improves error messages for Redex definition forms
2011-08-15 12:46:14 -05:00
Casey Klein
4d1651645a
Improves error message for premise typos
2011-08-10 12:24:02 -05:00
Casey Klein
a2dc2d9540
Fixes arity checks outside define-judgment-form
2011-08-10 12:24:02 -05:00
Casey Klein
87f3541979
Adds support for ellipsis-repeated premises
2011-08-10 12:24:01 -05:00
Casey Klein
52c50dd67e
Adds an alternative syntax for define-judgment-form rules
...
The conclusion may come last instead of first when a sequence of
dashes precedes it.
2011-08-10 12:24:00 -05:00
Casey Klein
dbfbf59256
Changes syntax for define-judgment-form mode and contract specs
2011-08-10 12:23:59 -05:00
Casey Klein
d58a743b89
Fixes define-judgment-form at the top-level with errortrace enabled
2011-08-10 12:23:59 -05:00
Casey Klein
576272362b
Adds define-judgment-form form
2011-08-05 07:19:23 -05:00
Casey Klein
8887ea2ef3
Refactors meta-function implementation further
2011-08-05 07:19:22 -05:00
Casey Klein
6e38233286
Deletes dead code
2011-08-05 07:19:22 -05:00
Casey Klein
7898018cad
Factors out name-consistency check
2011-08-05 07:19:22 -05:00
Casey Klein
24dc005ff4
Removes special case for typesetting recursive calls
...
This case doesn't appear necessary, since LWs are constructed in an
expansion step that occurs after all of the meta-function names
(including the current one) are bound.
2011-08-05 07:19:21 -05:00
Casey Klein
3dc677d270
Factors out parsing of relation contracts
2011-08-05 07:19:21 -05:00
Casey Klein
c9c2bb8ad7
Refactors construction of meta-function and relation lws
2011-08-05 07:19:20 -05:00
Eli Barzilay
3157955d40
".ss" -> ".rkt" scan done.
2011-07-02 10:37:53 -04:00
Robby Findler
d74810a08b
fix broken earlier commit
2011-05-25 14:57:04 -05:00
Robby Findler
33e68022db
make the two-argument version of redex-match use the right name for the procedure it returns
2011-05-25 12:45:06 -05:00
Robby Findler
c163e75023
make the generated name used for languages (introduced by define-language
...
and define-extended-language) be based on the name of the language so the
error message is better (but not as good as it should be)
2011-05-11 18:38:10 -05:00
Casey Klein
cafcb47549
Refactored reduction-relation-procs
2011-05-08 06:19:45 -05:00
Robby Findler
33c848fcda
added current-cache-all?, a parameter that controls the caching strategy
...
that apply-reduction-relation* (and thus test-->>) uses
also make apply-reduction-relation* call remove-duplicates
on the result of apply-reduction-relation
2011-05-07 20:06:38 -05:00
Robby Findler
8fbefb0b6d
added typesetting support for relations
2011-04-28 22:20:14 -05:00
Casey Klein
1d1cdd03f5
Adds a form like term-let but using Redex patterns
2011-04-26 12:13:17 -05:00
Casey Klein
b3f45d3c84
Refactors to eliminate copied code
2011-04-26 12:13:17 -05:00
Casey Klein
50f14dea18
Adds start term to test-->>E failure message
...
Closes PR 11867
2011-04-22 09:49:41 -05:00
Casey Klein
362a6d75a5
Changes redex-match to suppress ..._x bindings
2011-04-22 04:43:11 -05:00
Casey Klein
0b9db752ca
Fixes test-->>E failure message
...
Fixes PR 11853
2011-04-15 04:52:13 -05:00