Commit Graph

224 Commits

Author SHA1 Message Date
Burke Fetscher
495e5c94cf redex: bug fix for gerating terms including #f
please include in the release
2013-04-08 15:03:01 -05:00
Burke Fetscher
a97ff69cd0 test-equal->test for better drdr source loc info 2013-04-06 15:20:15 -05:00
Burke Fetscher
d00099dbdb Redex: pass language id through for term errors 2013-04-04 22:59:14 -05:00
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
5a85af78ac add contracts to the "with-" macros in redex/pict 2013-04-01 22:39:21 -05:00
Burke Fetscher
ddf4945125 Redex: corrections for disequations in generator
- handle parameters correctly when simplifying disequations
- rework term generation/disequation checking for parameters
- fix define-extended-metafunction w/r/t the above
2013-03-22 15:28:36 -05:00
Burke Fetscher
bdf1866e80 Redex: parameterized disequations
refactor the pattern unifier and tests to handle
disequations with parameters correctly
2013-03-22 15:28:35 -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
1e910fcfbc make check-metafunction and check-reduction-relation
pay attention to the contract/#:domain spec

closes PR 13616
2013-03-17 20:50:23 -05:00
Robby Findler
b63aa6bbac adjust commit 99ff0adbfd to
be more friendly to the test suites
2013-03-17 20:50:22 -05:00
Robby Findler
a50dfcc670 add a test for drdr's consumption to keep the ryr models in sync 2013-03-16 11:20:44 -05:00
Robby Findler
0c5c41fd54 add clause-name to define-metafunction, to be used with the
newly extended metafunction-cases
2013-03-15 23:00:50 -05:00
Eli Barzilay
af6be85ff5 Fix lots of indentation mistakes.
(Found by my ayatollah script...)
2013-03-14 10:55:47 -04:00
Robby Findler
eee43eb32f like d9c81a593, but this time only 4 pixels
(and this time under linux, not mac os x)
2013-03-06 16:38:59 -06:00
Robby Findler
d9c81a5931 declare failing test should not have failed
This test started failing due to the additions of the calls
to clip, introduced in commit e6dc9c28b4.  The actual
difference is only 9 pixels out of about 100,000 relevant
pixels. Even better, here's the precise rgb values for the
mis-matched pixels (the alpha values don't change):

   (224 251 255) vs (229 255 255)
   (200 242 255) vs (205 247 255)
   (205 242 255) vs (210 247 255)
   (205 242 255) vs (210 247 255)
   (205 242 255) vs (210 247 255)
   (205 242 255) vs (210 247 255)
   (200 242 255) vs (205 247 255)
   (224 251 255) vs (229 255 255)
   (242 255 255) vs (247 255 255)

It isn't clear to me why clipping like this would have this
particular change, but I think it is safe to assume that
Redex shouldn't change in response to this!
2013-03-06 16:35:37 -06:00
Burke Fetscher
1ed7e8c234 Redex: generation for judgment-form side-conditions
- enable generation for the above by compiling to
a disequation with "#f"

- wrap bare terms in relation definitons in
  side-conditions (require they not be "#f")
2013-03-06 16:00:05 -06:00
Robby Findler
2170e172a4 tidy up gui
Also improve the speed of compute-diffs by approximately 350x
(from 18+ seconds to about 50 milliseconds on the test case
that's currently failing)
2013-03-06 12:31:49 -06:00
Robby Findler
e6dc9c28b4 use clipping in the recent commit to actually test bounding boxes 2013-03-06 07:45:39 -06:00
Robby Findler
1bd11a0b77 bring mac os x bitmaps in line with recent commit made for the linux bitmaps 2013-03-05 22:47:51 -06:00
Robby Findler
4483bb9045 Bitmap test adjustments
- fill in unix bitmaps
- combine the horizontal metafunction test cases into a single bitmap
2013-03-05 22:12:46 -06:00
Burke Fetscher
edcb13e206 Fix pattern unification to deal with #f correctly 2013-03-05 21:52:56 -06:00
Matthew Flatt
18ad15c659 redex: fix `metafunction->pict' width correction for linebreaks
The revised implementation is more clearly and directly expressed
in terms of table cells that span columns.

Also, avoid `panorama' by removing a useless `inset' that seems
likely to be the reason for the `panorama'.

Unix bitmaps to go with the new tests are missing; Robby plans to
add them.
2013-03-05 11:07:20 -07: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
Robby Findler
2f50cde745 signal error when attempting to generate from a
metafunction with no cases

closes PR 13536
2013-02-19 22:08:31 -06:00
Burke Fetscher
2a9d42216e redex-generator: determine bound order automatically
also, fix a bug where continuations in thunks returned
by redex-generator weren't being shuffled
2013-01-23 13:03:07 -06:00
Burke Fetscher
92c5025ef1 add some random generation tests 2012-12-07 17:40:21 -06:00
Robby Findler
d94d479f15 added 'boolean' pattern to Redex
closes PR 13330
2012-11-30 19:17:27 -06:00
Burke Fetscher
26766e413a Handle failing case for relation generation. 2012-11-30 17:30:34 -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
Eli Barzilay
672910f27b Lots of bad TAB eliminations.
I started from tabs that are not on the beginning of lines, and in
several places I did further cleanings.

If you're worried about knowing who wrote some code, for example, if you
get to this commit in "git blame", then note that you can use the "-w"
flag in many git commands to ignore whitespaces.  For example, to see
per-line authors, use "git blame -w <file>".  Another example: to see
the (*much* smaller) non-whitespace changes in this (or any other)
commit, use "git log -p -w -1 <sha1>".
2012-11-07 11:22:20 -05:00
Robby Findler
3d5178bcb0 adjust generate-term so that it has an '=' in its concrete
syntax when generating something from a metafunction

export redex-generator (and add docs)

rename generate-types.rkt to typing-rules-no-ellipses.rkt
2012-11-01 21:13:39 -05:00
Robby Findler
478fedeeb7 fix up mac os x version of the redex bitmap tests 2012-11-01 21:13:39 -05:00
Burke Fetscher
6be405975e don't use disunify* to check disequations, since at this point they are fully instantiated 2012-11-01 11:52:19 -05:00
Burke Fetscher
e6ab32593e add redex-generator form and some tests
update examples/generate-types
2012-11-01 11:52:19 -05:00
Robby Findler
e7dc4a70ee fix redex bitmap tests under linux 2012-10-31 21:48:21 -05: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
661f702497 attempted to clean up the derivation support
so that no derivation data structure creation
happens during just a normal judgment-holds,
but this was not entirely successful, so there
still is some....

Also, improved the test-util to show stacktraces
for errors (when they exist)
2012-10-23 18:31:06 -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
Burke Fetscher
44dd4acb44 Additional random test generation capability for Redex.
This adds the option to generate random terms that satisfy
judgment-forms and metafunctions.

Currently functionality does not include:
- patterns/terms using: ellipses, in-hole/hole and relatives, side-conditions, unquotes
- define-relation
- redex-check integration
2012-10-17 16:30:51 -05:00
Robby Findler
7e7ebffdd4 Adjust linux version of Redex bitmap tests 2012-10-09 09:45:52 -05:00
Robby Findler
751dcb4bd1 adjust define-judgment-form's typesetting so that it
tracks the lines of the premises in the source when
deciding how to linebreak the premises of the typeest form
2012-10-09 09:06:09 -05:00
Robby Findler
40e5b63bbc allow identifiers as names, not just strings 2012-08-09 15:28:42 -05:00
Robby Findler
0bd661d620 fix up the bitmap tests for linux 2012-08-08 22:32:43 -05:00
Robby Findler
97e3f56bf2 adjust bitmap tests to test judgment form labels (and fix expected result under mac os x) 2012-08-08 22:05:43 -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