Commit Graph

224 Commits

Author SHA1 Message Date
Robby Findler
4e6b38b956 adjust bitmap test 2012-07-24 23:27:07 -05:00
Robby Findler
752f240c6a Revert "Test results from DrDr"
This reverts commit fc8cb6e37d.

Jay changed the set of installed font packages on DrDr to match the
ones on my linux VM which brought the test results back in sync again,
so we don't need these revised bitmaps anymore.

Thanks, Jay!
2012-06-02 10:12:11 -05:00
Jay McCarthy
fc8cb6e37d Test results from DrDr 2012-06-01 17:33:13 -06:00
Robby Findler
d17f93db30 add PLTJUSTSAVEFAILURES support; makes it easier to build a good
set of bitmaps on others' machines (no clicking required)
2012-05-31 23:27:02 -05:00
Robby Findler
b7b566aefc adjust redex error message tests to match singular/plural fixes in
the error raising code, except in one place where I think the
error raising code was correct to have the plural form, so I changed
it back instead of changing the Redex test suite to match
2012-05-31 10:56:14 -05:00
Robby Findler
3aa300c2d9 update the mac os x bitmaps for the redex bitmap test suite
(just like the recent commit that updates the unix versions)
2012-05-18 10:43:52 -05:00
Robby Findler
67c48d6d78 Commit b3002cfab0 broke
the redex bitmap test cases (in a good way!). Hopefully
this fixes them and makes DrDr happy again
2012-05-18 09:01:38 -05:00
Eli Barzilay
17090fca4f A bunch of fprintf' -> eprintf' conversions (and a few related things). 2012-05-06 12:06:00 -04: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
9d43203990 adjusted the render-* functions so they produce .pdf if the given
filename ends with #rx#"[.]pdf".
2012-03-17 08:36:34 -05:00
Robby Findler
ac568d7b3f try using make-bitmap for the bitmaps under unix to see if drdr
likes that better
2012-03-05 13:48:34 -06:00
Robby Findler
519550d291 save a new set of unix bitmaps for the redex bitmap test
and (optimistically) turn the bitmap tests back in on in drdr

(also improve the GUI a little bit that shows the errors in
the test)
2012-03-05 11:44:45 -06:00
Robby Findler
3997eaefde clean up redex bitmap tests (under mac os x) 2012-03-05 08:52:17 -06:00
Robby Findler
4a304643d3 Rackety 2012-03-05 08:12:02 -06:00
Robby Findler
b7caf411ae added define-extended-judgment-form to Redex 2012-03-03 16:41:53 -06:00
Robby Findler
a0bb0430f2 separated the define-judgment-form implementation (and bind-withs)
into its own file
2012-03-03 16:41:52 -06:00
Eli Barzilay
f7c67b49a4 Big newline at EOF scan. 2012-02-29 00:28:11 -05:00
Robby Findler
e4e4d70b6b added define-union-language 2012-02-10 17:10:47 -06:00
Robby Findler
122625960d adjust runtime errortraces in redex to manipulate namespaces a little more carefully 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
55b3d99d78 adjust beaucoup places in redex where the source was being
included in the compiled files. (also, misc minor cleanups
notably a new exercise in tut.scrbl)

closes PR 12547 --- there are still a few uses left, but they do not
seem to be coming from Redex proper:

 - /Users/robby/git/plt/collects/racket/private/map.rkt still appears
   in a bunch of places (there is a separate PR for that I believe),
   and

 - /Users/robby/git/plt/collects/redex/../private/reduction-semantics.rkt
   appears in tl-test.rkt, but I do not see how it
   is coming in via Redex code, so hopefully one of the other
   PRs that Eli submitted is the real cause. If not, I'll revisit later
2012-02-08 09:59:44 -06:00
Robby Findler
794240bf67 added a amb-based redex tutorial 2012-02-05 17:24:13 -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
f1a7864c63 fix bug in lw struct generation 2012-01-09 20:38:51 -06:00
Robby Findler
4fab7f76af 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%
2012-01-09 12:57:21 -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
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
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
Robby Findler
e7d0029aea added lots of new tests that our documentation is complete 2011-04-25 13:24:43 -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
1c8c6ddbee Adds generate-term option for LHS-based generation 2011-04-22 04:43:11 -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
46b3a9d13d Fixes generation of any' within in-hole' context position 2011-04-14 18:32:06 -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
Casey Klein
143e1e66fd Improves error for references to not-yet-defined metafunctions
Fixes PR 11041
2011-04-07 13:17:15 -05:00
Casey Klein
6fc20125b0 Adds the STLC example to the test script 2011-04-06 11:11:43 -05:00
Casey Klein
1ad2b1b938 Makes cross' work better with hide-hole'
Fixes PR 11579
2011-04-06 10:17:15 -05:00
Casey Klein
e8130a2fd1 Fixes bug in `cross' pattern handling 2011-04-06 10:17:15 -05:00
Casey Klein
a4644d4d49 Disallows unquote in Redex patterns
Fixes PR 11296
2011-04-01 14:00:45 -05:00
Casey Klein
8a283650c4 Updates typesetting tests
Spacing is now different by a few pixels. The change does not seem to
be Redex specific
2011-03-30 13:59:39 -05:00
Casey Klein
6cdfa2ff73 Updates typesetting tests for new arrow drawing 2011-03-30 10:20:53 -05:00
Casey Klein
d97a2b505c Fixes matching of ..._x and ..._!_x inside ellipses 2011-03-30 10:15:17 -05:00
Casey Klein
b958e21f46 Fixes another bug in the stepper's diff highlighting 2011-03-29 13:05:03 -05:00
Casey Klein
df3bc8980b Fixes a bug in the stepper's diff highlighting 2011-03-29 13:05:02 -05:00
Robby Findler
f69ff3b6b7 added support for 'or', \vee, and \cup as builtins to the define-metafunction codomain contracts 2011-03-26 10:04:39 -05:00
Casey Klein
3214861420 Fixes rendering of (hole t ...+)
There was some old named holes code still in use.
2011-03-24 14:35:02 -05:00
Casey Klein
87934752b5 Adds a parameter that provides a default for redex-check's #:attempt argument 2011-03-22 21:20:29 -05:00
Casey Klein
f7fd6ee689 Changes the term generator to produce shorter sequences
It now uses the (local) size bound instead of the (global) attempt count.
2011-01-31 12:36:42 -06:00
Casey Klein
3250ff846c Adds a Redex version of Jay's continuation mark transformation 2011-01-29 15:26:30 -06:00
Casey Klein
b45bb829b6 Fixes a bug in metafunction traces
When the result is in the cache but the cache is not consulted because
`caching-enabled?' is false, the call should not be shown as cached.
2011-01-14 13:41:09 -06:00