mincaml | A MinCaml compiler implemented in Rust | Compiler library
kandi X-RAY | mincaml Summary
kandi X-RAY | mincaml Summary
This is a compiler for the MinCaml language implemented using Rust and cranelift.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of mincaml
mincaml Key Features
mincaml Examples and Code Snippets
Community Discussions
Trending Discussions on mincaml
QUESTION
I had a course about functional programming in ocaml / mincaml and we talked about alpha-conversion. If I get it well, the goal of alpha-conversion is to syntactically make a difference between two different variables which could have been assigned the same name in different parts of the code, right?
My issue is that our teacher was going pretty fast assuming we all had a good background on this topic and especially saying "You will easily find MinCaml programs needing alpha-conversion to give correct answers."
I have been searching but I don't really see though, would you have an example in mind, or a good documentation online to help me understand better this concept with some examples where alpha-conversion is indeed needed?
Thank you very much.
N.B. If someone has a better ideas with tags, I can't add either "mincaml" or "alpha-conversion" so...
...ANSWER
Answered 2018-Dec-28 at 05:07Alpha-conversions makes implementation of some compiling processes easier and clearer.
For example, when MinCaml eliminates unnecessary definitions (elim.ml
), it searches free variables of an expression (KNormal.fv
) to check whether we can safely eliminate a definition.
If we can't assume each variables have its individual names, this process needs a further search. By doing the alpha-conversion before the eliminations, we can skip this and write the process with simple codes.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mincaml
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page