Commit Graph

75 Commits

Author SHA1 Message Date
AlexKnauth
f5e0ceebfe add example of linear language + tests
(Based on @iitalics work in pull request 11)
2017-06-13 16:51:59 -04:00
Alex Knauth
095c47c6cb fix union collapsing (#9) 2017-04-25 13:35:47 -07:00
Alex Knauth
bbcdfaf9cf add ~typecheck and ~⊢ pattern expanders (#6)
* add ~typecheck and ~⊢ pattern expanders

So that in normal macros, syntax classes, and normal syntax-parse
expressions, you can use use the Turnstile syntax to do typechecking

* add documentation for ~typecheck and ~⊢
2017-04-17 12:41:02 -07:00
Stephen Chang
3d9ef8424c start dependent types example 2017-03-10 17:03:30 -05:00
Stephen Chang
50f08886d1 rackunit-typechecking: add more esc chars 2017-03-03 16:20:16 -05:00
Stephen Chang
772a2f1337 fix mlish chameneos test again 2017-02-17 12:09:58 -05:00
Stephen Chang
a44a94ce5c add toplvl checking form 2017-02-13 18:33:46 -05:00
Stephen Chang
115aae8e73 completely separate type and kind api, etc; generalize type environment
Previously, "type" functions were reused a lot to manipulate kinds, and other
metadata defined via `define-syntax-category`, but this meant it was impossible
to define separate behavior for some type and kind operations, e.g., type=? and
kind=?. This commit defines a separate api for each `define-syntax-category`
declaration.

Also, every `define-syntax-category` defines a new `define-NAMEd-syntax` form,
which implicitly uses the proper parameters, e.g., `define-kinded-syntax` uses
`kindcheck?`, `current-kind-eval`, and the ':: kind key by default (whereas
before, it was using typecheck?, type-eval, etc).

This commit breaks backwards compatibility. The most likely breakage results
from using a different default key for kinds. It used to be ':, the same as
types, but now the default is '::.

This commit also generalizes the contexts used with `define-NAMEd-syntax` and
`infer`.
- all contexts now accept arbitrary key-values associated with a variable
- all contexts use let* semantics, where a binding is in scope for subsequent
  bindings; this means that one environment is sufficient in most scenarioes,
  e.g., type and term vars can be mixed (if properly ordered)
- environments allow lone identifiers, which are treated as type variables by
  default
2017-02-08 13:07:24 -05:00
Stephen Chang
ba15bbd32f delete ad-hoc "run all" test scripts; use raco test instead
- add test-include-paths to run mlish test files
2017-01-25 21:22:06 -05:00
Stephen Chang
ba1c954b96 start Bens "trivial" example 2016-10-18 17:08:25 -04:00
Stephen Chang
28fa5dd033 split def-kinded-stx from def-typed-stx; split any-type? from type?
- the former prevents using current-typecheck-relation at type/kind level
- the latter differentiates "well-formed" types (star)
  from valid types (any kind)
- move define-*ed-syntax and *-eval into define-syntax-category
- turnstile must wrap define-stx-category to define new define-*ed-syntax
- add any-*? pred and any-* stx class in def-stx-category
- fixes #44
- fixes #45
2016-10-14 14:16:49 -04:00
Stephen Chang
34b149e248 rearrange test script to avoid parameter conflicts 2016-10-13 21:46:31 -04:00
Stephen Chang
98568ceb99 add define-internal-type-constructor and define-internal-binding-type
- add fomega-no-reuse example
2016-10-13 21:21:05 -04:00
Stephen Chang
1c0fa751d6 split out a define-binding-type from define-type-constructor
- document #:arg-variances and variances; #:arr
- fixes #36
- start to split type constructor macro into (not working yet)
  - ty-: expands to expanded type representation
  - ty: performs kindchecking and expands to ty-
  - this makes it easier for programmers to implement their own kind
    system, but still get some turnstile conveniences like pat expanders
2016-10-13 15:20:30 -04:00
Stephen Chang
8a7d487e14 check if valid type when instantiating a type alias; fixed #5 2016-10-12 16:13:45 -04:00
Stephen Chang
691ba9c51c Turnstile forms no longer automatically provide; add type-out
- not auto-providing more closely adheres to idiomatic Racket
- this commit changes:
  - define-typed-syntax
    - removed #:export-as option
  - define-base-type
    - removed #:no-provide option
  - define-type-constructor
    - removed #:no-provide option
- type-out helps with providing defined types
- in examples, move define and define-type-alias to ext-stlc
- fix bug in reuse where renamed id not provided
2016-10-12 10:46:05 -04:00
Stephen Chang
639a34c678 hide some test scripts from raco test
- these files should be manually run
- this hopefully prevents timeouts on the pkg server
2016-10-11 10:28:08 -04:00
Stephen Chang
83c9e7c122 remove todos in okasaki 2016-10-06 14:26:09 -04:00
Stephen Chang
7c68789628 convert mlish+adhoc define-instance to turnstile 2016-10-04 14:18:38 -04:00
Stephen Chang
362b0f310d manually merge mlish.rkt from adhoc branch to mlish+adhoc.rkt 2016-10-03 14:28:15 -04:00
AlexKnauth
a56250b26e start on tests from section 3 of the Guide 2016-08-31 18:59:54 -04:00
Stephen Chang
98c5a6c231 support multiple exprs in let body; add set! 2016-08-31 16:57:23 -04:00
Stephen Chang
3f61c468be rename rosette-guide-tests -> rosette-guide-sec2-tests 2016-08-31 16:22:55 -04:00
Stephen Chang
5436f70de3 add remaining Rosette guide, sec2 examples 2016-08-31 16:22:08 -04:00
Stephen Chang
761645833d split Bool into True and False in stlc+union; add current-bitwidth to rosett2 2016-08-31 15:42:29 -04:00
Stephen Chang
af98a9dec9 add solve 2016-08-31 15:19:12 -04:00
Stephen Chang
90e9517b3a add synthesize and lib/synthax 2016-08-31 15:02:21 -04:00
Stephen Chang
10a143a16d add verify, evaluate; and debug, render in separate libs 2016-08-30 16:58:15 -04:00
Stephen Chang
2a6167e4d0 add immutable vectors; add "of" suffix to data structure type constructors 2016-08-30 11:41:40 -04:00
Stephen Chang
54c0ee1cb6 fix inf loop in current-sub?
- add more guide tests
2016-08-29 16:57:50 -04:00
AlexKnauth
513f6dcfd4 use type-cast and assert-pred for assert-type 2016-08-29 16:13:46 -04:00
Stephen Chang
1a14c5e377 add rosette-guide-tests; add various forms
- let-symbolic
- vector
- begin
2016-08-29 15:25:26 -04:00
AlexKnauth
98e5cdc77f add more assert-type tests 2016-08-29 11:26:22 -04:00
Stephen Chang
a9cf9cb217 add tests for assert-type; use new lifted bitvector? as BVPred "pred" stx prop 2016-08-26 17:01:48 -04:00
AlexKnauth
a2d702f221 add check-type+asserts 2016-08-26 14:28:08 -04:00
Stephen Chang
34ded75744 fix bv sdsl tests 2016-08-26 12:42:06 -04:00
AlexKnauth
eb3ff40404 convert bv.rkt to extend rosette2 2016-08-26 11:56:21 -04:00
Stephen Chang
d7ab2d0f29 add some forms required by bv sdsl: Param, let, define (no tests yet) 2016-08-26 11:11:15 -04:00
AlexKnauth
5df20847cb uncomment more tests 2016-08-25 17:00:05 -04:00
Stephen Chang
c3540ed7a9 add pred stx props and assert-type 2016-08-25 16:43:07 -04:00
AlexKnauth
25fa722acf uncomment more tests 2016-08-25 15:38:30 -04:00
Stephen Chang
32c13d9ae2 fix BVPred to not use old rosette version 2016-08-25 15:27:24 -04:00
Stephen Chang
9e2b2ddd3c add if and define-symbolic 2016-08-25 14:17:46 -04:00
AlexKnauth
e07f912cf7 rosette2: support more bv operations 2016-08-25 11:59:17 -04:00
AlexKnauth
6ee48d12a5 rosette2: start on bv operations 2016-08-25 11:38:20 -04:00
AlexKnauth
f3014ef2e7 rosette2: add sub1 and + 2016-08-25 11:09:58 -04:00
AlexKnauth
cc27c76ab8 rosette2: support applying symbolic function types 2016-08-25 10:07:00 -04:00
AlexKnauth
9743656778 rosette2: support applying Ccase-> functions 2016-08-25 09:53:22 -04:00
AlexKnauth
add4a2d7d5 more work on rosette2 2016-08-24 19:42:03 -04:00
Stephen Chang
b30a1a9425 start rosette2 2016-08-24 16:54:55 -04:00