atomb / core-to-isabelle Goto Github PK
View Code? Open in Web Editor NEWTranslator from GHC Core to Isabelle/HOLCF
Translator from GHC Core to Isabelle/HOLCF
The existing translator ShallowTest is only meant as a prototype. As such it doesn't have proper handling for the following things:
In terms of generating the output filename and output theory name, it should work like gcc or ghc in that it automatically creates Foo.thy from Foo.hcr. This should be really simple using the filepath module and one of the many command line parsing libraries on hackage.
isa/Examples.thy currently requires the following hand-written boilerplate to make the parser work for case expressions:
translations
"_hcon (XCONST Nothing)" => "CONST Nothing_tag"
"CONST Nothing" <= "_htag (CONST Nothing_tag)"
"_hcon (XCONST Just)" => "CONST Just_tag"
"CONST Just" <= "_htag (CONST Just_tag)"
The halicore_data command should set up these rules automatically.
The current translator prototype, ShallowTest, doesn't support functions yet.
It would be nice to allow users to write QuickCheck properties, use them with QuickCheck at first. Then, once they pass enough random tests, users can attempt to prove that they will always succeed. This is probably the easiest way to get users to write properties to prove.
Add an isabelle command like this:
halicore_symbol "<$>" "zlzdzg"
The first parameter is the name as it appears in the Haskell program and the second parameter is the matching z encoding.
The idea is that this would allow halicore syntax snippets to support the Haskell name. The reason for the halicore_syntax command is that it needs to notify the Isabelle parser.
Add support in the translator to catch identifiers that Isabelle cannot parse and output a renaming and a comment to help the programmer see the renaming.
perhaps hcr2thy?
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.