Implementation of the typed call-by-value λ-calculus using a stack of regions
read more
Citations
Separation logic: a logic for shared mutable data structures
Points-to analysis in almost linear time
Enforcing high-level protocols in low-level software
Type-based race detection for Java
Flow-sensitive type qualifiers
References
A theory of type polymorphism in programming
The Definition of Standard ML
Principal type-schemes for functional programs
Compiling with continuations
Related Papers (5)
Frequently Asked Questions (11)
Q2. what is the device the authors use for grouping values according to regions?
The device the authors use for grouping values according to regions is unification of region variables, using essentially the idea of Baker[3], namely that two valueproducing expressions e1 and e2 should be given the same “at ρ” annotation, if and only if type checking, directly or indirectly, unifies the type of e1 and e2.
Q3. What does the author mean by region polymorphism?
Since memory reuse is at the heart of their translation scheme, the authors prove that their translation rules are sound with respect to a regionbased operational semantics, where regions explicitly are allocated and de-allocated.
Q4. Why is the sumit function a lambda-bound parameter?
When the authors compute the sum by folding the plus operator over the list (hsumit(100)), all the results of the plus operation are put into one region, because the operator is a lambda-bound parameter of the fold operation and hence cannot be region-polymorphic.
Q5. What is the idea that effect inference makes it possible to delimit regions of memory?
The idea that effect inference makes it possible to delimit regions of memory and delimit their lifetimes goes back to early work on effect systems[6].
Q6. what is the grammar for the target language?
The grammar for the target language is:p ::= ρ | r e ::= x | λx.e at p | e1e2| let x = e1 in e2 end | letrec f[$ρ](x) at p = e1 in e2 end | f [$p ] at p | letregion ρ in e endwhere $ρ ranges over finite sequences ρ1,···,ρk of region variables and $p ranges over finite sequences p1,···,pk of places (k ≥ 0).
Q7. what is the type-checking problem for the Milner/Mycroft?
The type-checking problem for the Milner/Mycroft is equivalent to the semi-unification problem[12,1], and semi-unification is unfortunately undecidable[17].
Q8. What is the purpose of the permission to copy?
Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery.
Q9. What is the main argument that the memory is a constant?
Novice functional programmers often report that on their machines, memory is a constant, not a variable, and that this constant has to be uncomfortably large for their programs to run well.
Q10. What does the author mean by effect masking?
Lucassen and Gifford[21] call it effect masking; they prove that effect masking is sound with respect to a store semantics where regions are not reused.
Q11. What is the important part of the report?
The experiments presented in this report suggest that the scheme in many cases leads to very economical use of memory resources, even without the use of garbage collection.