chobbes / cofq Goto Github PK
View Code? Open in Web Editor NEWSystem F in Coq
System F in Coq
App is being treated as associative, which is not ideal.
I'm wondering if it would be a better idea to add show instances that serialize everything into a format that's just readable by Coq, it would certainly make large counterexamples easier to work with (at the expense of making them slightly less pretty).
QuickChick rarely finds a counterexample to this test case:
QuickCheck (forAll (genFType 0) (fun τ => forAllShrink (genTerm_terminating 0 [] τ) shrink_term_preserve_type
(fun e => match typeof e with
| Some τ' =>
whenFail
("Bad type: " ++ show τ')
(ftype_eq τ τ')
| _ =>
whenFail
"No type"
false
end))).
For instance, this one:
<Int->Int, forall Int, <Int->Int>, <Int->Int, <>, <Int>, <Int, Int, Int>>>
(λ <Int>-><Int->Int, forall Int, <Int->Int>, <Int->Int, <>, <Int>, <Int, Int, Int>>> <Int>. (λ Int-><Int->Int, forall Int, <Int->Int>, <Int->Int, <>, <Int>, <Int, Int, Int>>> Int. if0 v1 then <λ Int->Int Int. v3, Λ. 2, <λ Int->Int Int. v1>, <λ Int->Int Int. v3, v3, <v1>, v3>> else (λ <Int->Int, forall Int, <Int->Int>, <Int->Int, <>, <Int>, <Int, Int, Int>>>-><Int->Int, forall Int, <Int->Int>, <Int->Int, <>, <Int>, <Int, Int, Int>>> <Int->Int, forall Int, <Int->Int>, <Int->Int, <>, <Int>, <Int, Int, Int>>>. <λ Int->Int Int. v1, Λ. -1, <λ Int->Int Int. 4>, <λ Int->Int Int. v5, v1, v5, v5>>) v0 (v1 - 1)) 3) if0 -1 then <4> else <2>
No type
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.