dvanhorn / pcf Goto Github PK
View Code? Open in Web Editor NEWPCF with Contracts and Symbolic Values
Home Page: http://dvanhorn.github.com/pcf/
PCF with Contracts and Symbolic Values
Home Page: http://dvanhorn.github.com/pcf/
The same treatment given to errors and contract violations to indicate source locations should also be applied to quotient
expressions, since they may lead to errors.
#lang cpcf
((((λ ([x : nat]) 1) -> (λ ([x : nat]) 0))
⚖
(λ ([x : nat]) x))
5)
produces (blame |#f:#f:#f|)
The documentation says the languages include recursion but they don't (and they should).
Add E[blame] -> blame to semantics so blame jumps to top-level.
System barfs with a z3 error on (pos? ⚖ (• nat (• (nat -> nat))))
Once #6 is complete, report contract violations and errors by calling the default-error-handler so that source locations are highlighted.
Error should be raised with the source location of the error.
#lang scpcf traces
(add1 add1)
This program type checks because the type judgment is not complete.
Now that there's μ
, the havoc metafunction should produce a diverging value at base type.
Replace */heap/syntax.rkt with a heap mixin since these are all (mostly) identical. [Mostly because some have more evaluation contexts than others because of monitors; no harm done in adding these to all languages.]
Terms evaluated at the interactions prompt are printed without being scrubbed (hiding the syntax objects).
The context-sensitive reduction relations for blame and errors is defined in terms of a helper metafunction for determining non-emptiness of evaluation contexts. Because the extension of these relations does not extend the helper functions, the extended relations are wrong.
Either eliminate the need for a helper (which requires enumerating eval contexts) or define for the largest language.
Currently there is no test case do to funny syntactic overlap in the languages.
The following does not type-check in SCPCF (in fact it causes a domain error):
((• (nat -> nat)) ⚖ 7)
This is because the typing relation on expressions is defined by mutual recursion on expressions and contracts. Due to the way redex does extension, the extension of the expression judgment will have no effect on calls to it from within the contract judgment (and vice versa).
This has been brought up on the mailing list, but there's no good solution at the moment.
http://lists.racket-lang.org/users/archive/2012-December/055486.html
It appears the best work around is to define the typing judgement for SCPCF and then use this for subsets PCF, CPCF, and SPCF. Typesetting will take some work to make it appear as it currently does.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.