Burke Fetscher
4410ecceb2
Redex: fix term-let/#:lang keyword interaction
...
Account for the fact that define-language bindings may get
shadowed by term-let when using the same identifier as the language.
2013-04-04 20:38:08 -05:00
Robby Findler
06696d67b4
add a #:pre keyword to define-metafunction
...
The keyword allows the specification of contracts
that relate different arguments
closes PR 13617
2013-03-18 12:54:27 -05:00
Robby Findler
42847ea523
follow up to William J. Bowman's commit
...
- put the tests together with the other define-union-language tests
- fix the docs
- add a release note
- construct the merged language a bit more directly
- properly deal with this kind of thing:
(define-language L1 (e f ::= 1 2 3))
(define-language L2 (e g ::= 4 5 6))
(define-union-language L L1 L2)
2013-03-01 19:38:57 -06:00
William J. Bowman
b0db8798b6
Changed `define-union-language' to merge nonterminals and their
...
right-hand-sides instead of causing an error when more than one language
in the union defines the same nonterminal.
2013-03-01 19:38:57 -06:00
Asumu Takikawa
5790667054
Remove duplicate non-terminals in define-extended-language
...
Fixes a problem with `define-union-language`
2013-02-28 12:16:25 -05:00
Burke Fetscher
76421ee786
Fix expansion for relations in term positions.
...
Explicitly disables random generation for relations in term
positions, but fixes a problem with runtime functionality
for the same.
2013-02-26 21:11:06 -06:00
Burke Fetscher
7c7c1fbafc
Format relation arguments and results properly for random generation.
...
Also rempove some extraneous code in judgment-form.rkt.
2012-11-30 17:06:34 -06:00
Burke Fetscher
cf9b0f774b
Change define-relation to compile to a judgment-form, instead of a metafunction.
...
Also:
- remove the restriction on the use of unquote in define-judgment-form
- allows limited use (I modes only) of judgment-forms in terms
- allows the use of define-relation with the search/unification
based random term generation
2012-11-29 17:17:34 -06:00
Robby Findler
10a8a625fa
record the (uncompiled) domain pattern with a reduction
...
relation so that context-closure can adjust the domain
closes PR 13204
2012-10-27 20:39:04 -05:00
Robby Findler
06e5239441
add rule names to the derivation struct
...
change the intermediate data structures built up
while building the derivation to use their own
structs (instead of vectors)
2012-10-24 12:30:40 -05:00
Robby Findler
7355c59fb1
added the ability to extract a derivation
...
from a judgment-form via build-derivation
(returns derivation structs)
2012-10-21 23:19:54 -05:00
Robby Findler
40e5b63bbc
allow identifiers as names, not just strings
2012-08-09 15:28:42 -05:00
Burke Fetscher
29661cc675
add #:lang keyword to term, which checks that underscored symbols agree with patterns in the provided language...changed most internal uses of term to use this form
2012-08-08 11:09:01 -05:00
Jay McCarthy
99f1cc44df
redex-match violates its documented contract
...
This patch fixes the problem that the hole matcher may return an empty
list rather than a #f that gets sent to the caller of redex-match. I
re-ran the Redex tests and found no violations. However, I am not
confident that there isn't a more correct place to put this '() -> #f
replacement.
I will be immediately forwarding this push email to Robby to have him
check it.
2012-03-23 06:39:14 -06:00
Robby Findler
b7caf411ae
added define-extended-judgment-form to Redex
2012-03-03 16:41:53 -06:00
Robby Findler
e4e4d70b6b
added define-union-language
2012-02-10 17:10:47 -06:00
Robby Findler
6914c5667c
adjust test suite to match new lack-of-absolute-paths feature
2012-02-10 17:10:47 -06:00
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
2afda360d0
redex: adjust the test suites to clean up a few things; also make the
...
hole and the-not-hole equal? to each other (like they used to be)
2012-01-09 12:57:20 -06:00
Robby Findler
fbed2d5af7
remove (broken) attempt at optimization Jay suggested
...
also clean up some test cases that I wasn't sure about earlier
2012-01-08 12:13:37 -06:00
Robby Findler
0459e4fbcd
redex: when there are no duplicate names in a pattern, don't do the
...
same-name-same-bindings check
this seems to speed up the r6rs test suite by about 12% and the
lambdajs benchmark by about 25%
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
f725066bf9
fix bug in the handling of side-conditions
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
755dc28e55
Fixes define-relation's handling of ellipses across clauses
...
closes PR 12378
2011-11-17 17:00:11 -06:00
Robby Findler
9d371153fd
add the #:stop-when argument to apply-reduction-relation*
2011-10-23 12:10:56 -05:00
Casey Klein
6d43376f9c
Adds support for `judgment-holds' clauses in metafunctions
2011-09-08 09:11:52 -05:00
Casey Klein
145828527f
Fixes handling of pattern variables that look like metafunctions
2011-08-31 11:20:02 -05:00
Casey Klein
ecdd50da09
Tests defined-checks directly
2011-08-30 15:10:50 -05:00
Casey Klein
c25c0b2868
Deletes duplicate tests
2011-08-30 15:10:50 -05:00
Casey Klein
c0625dc30c
Adds define-term form
2011-08-30 15:10:50 -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
3dc677d270
Factors out parsing of relation contracts
2011-08-05 07:19:21 -05:00
Eli Barzilay
3157955d40
".ss" -> ".rkt" scan done.
2011-07-02 10:37:53 -04:00
Eli Barzilay
40124a0619
A long overdue scan to eliminate files without terminating newlines.
...
(DrRacket should really do that.)
2011-06-28 02:01:41 -04:00
Casey Klein
dd58b457a9
Fixes domain checking of unioned reduction relations
2011-05-08 05:04:16 -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
Casey Klein
ff7aba9750
Moves `term-let' test to proper file
2011-04-14 18:32:05 -05:00
Casey Klein
989103c3a1
Improves term-let's "too few ellipses" error
...
Fixes PR 10837
2011-04-07 13:17:15 -05:00