Robby Findler
9e272a2359
fix bug in lw struct generation
...
(cherry picked from commit f1a7864c63
)
2012-01-10 13:13:34 -07:00
Robby Findler
8bba1f2455
tweak the compiled representation of lw structs so they take less space
...
this shrinks the size of redex/examples/r6rs/r6rs.rkt's .zo file by about 25%
(cherry picked from commit 4fab7f76af
)
2012-01-09 16:02:26 -07:00
Robby Findler
0b65f9989f
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)
(cherry picked from commit 2afda360d0
)
2012-01-09 16:02:19 -07: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
160fcacad6
redex: fix bug introduced in recent optimization attempts
2012-01-02 22:21:21 -06:00
Robby Findler
fe1df742b3
Tried to improve redex by detecting when a pattern does not
...
have any holes, hide-holes, or names and, in that case, just
combining booleans instead of building of mtch structs.
This does seem to work on a simple benchmark. The code below
gets about 6x faster. But on the r6rs test suite, there is
no substantial change (possibly because the caching obviates
this optimization?)
lang racket/base
(require redex/reduction-semantics)
(caching-enabled? #f)
(define-language L (e (+ e e) number))
(define t
(let loop ([n 100])
(cond
[(zero? n) 1]
[else `(+ 11 ,(loop (- n 1)))])))
(define f (redex-match L e))
(time (for ([x (in-range 1000)]) (f t)))
2012-01-02 10:08:29 -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
c91d004729
more cleanup of the rendering for the case when (format "~s" x)
...
and (format "~a" x) are different (when 'x' is a symbol)
2011-12-15 08:44:39 -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
57a8ed5c79
Fixes matching of prefab struct literals
...
Fixes PR 12298
2011-10-17 19:37:16 -05:00
Casey Klein
83451fea98
Add evaluation contexts for by-need letrec calculus as an example
2011-09-19 12:20:45 -05:00
Casey Klein
9944e6b3f6
Adds missing test image
2011-09-08 10:43:23 -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
cee4566ed4
Makes test work when compilation strips source locations
2011-08-16 19:18:18 -05:00
Casey Klein
e485e9f348
Tests define-judgment-form and metafunction renaming
...
Closes PR 11469
2011-08-16 14:32:34 -05:00
Casey Klein
9e2e11e9c4
Tests metafunction Check Syntax arrows
2011-08-16 14:32:33 -05:00
Casey Klein
efa04066c6
Tests define-judgment-form's Check Syntax interaction
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
88cd7cd303
Adds with-compound-rewriters typesetting form
2011-08-10 12:24:00 -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
c1198d0687
Makes tests executable from outside their directory
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
6ff5dc779b
Fixes keyword tests
2011-07-16 18:19:22 -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
Robby Findler
58b60a6a87
fixed lw-test.rkt test suite
2011-06-15 09:25:50 +08:00
Robby Findler
b43e956c7b
Redex: added to-lw/stx
...
plus improved the redex docs slightly and Rackety
2011-05-30 21:33:55 -05:00
Casey Klein
e8e2898359
Fixes rendering of relations with `name' patterns
2011-05-24 11:58:54 -05:00
Robby Findler
040bd371b6
adjust the lw construction in Redex so that it uses the width of the
...
"canonical" way to write symbols, instead of the way they are displayed.
This makes a difference for symbols that have spaces in them or symbols
that, when displayed, look like numbers or other non-symbol things.
2011-05-20 21:52:09 -05:00
Casey Klein
dd58b457a9
Fixes domain checking of unioned reduction relations
2011-05-08 05:04:16 -05:00
Robby Findler
507b1cd8fd
moved the docs-complete library into rackunit
...
to avoid having a separate, new manual for the
one library
2011-05-05 16:10:42 -05:00
Casey Klein
4b03ddccb1
Fixes Redex stepper's handling of symbols quoted with ||
2011-05-04 10:34:01 -05:00
Casey Klein
fd401ce98e
Adds docs test to the test script
2011-05-02 06:02:50 -05:00