TY - GEN
T1 - The design and implementation of BER MetaOCaml
T2 - 12th International Symposium on Functional and Logic Programming, FLOPS 2014
AU - Kiselyov, Oleg
PY - 2014/1/1
Y1 - 2014/1/1
N2 - MetaOCaml is a superset of OCaml extending it with the data type for program code and operations for constructing and executing such typed code values. It has been used for compiling domain-specific languages and automating tedious and error-prone specializations of high-performance computational kernels. By statically ensuring that the generated code compiles and letting us quickly run it, MetaOCaml makes writing generators less daunting and more productive. The current BER MetaOCaml is a complete re-implementation of the original MetaOCaml by Taha, Calcagno and collaborators. Besides the new organization, new algorithms, new code, BER MetaOCaml adds a scope extrusion check superseding environment classifiers. Attempting to build code values with unbound or mistakenly bound variables (liable to occur due to mutation or other effects) is now caught early, raising an exception with good diagnostics. The guarantee that the generated code always compiles becomes unconditional, no matter what effects were used in generating the code. We describe BER MetaOCaml stressing the design decisions that made the new code modular and maintainable. We explain the implementation of the scope extrusion check.
AB - MetaOCaml is a superset of OCaml extending it with the data type for program code and operations for constructing and executing such typed code values. It has been used for compiling domain-specific languages and automating tedious and error-prone specializations of high-performance computational kernels. By statically ensuring that the generated code compiles and letting us quickly run it, MetaOCaml makes writing generators less daunting and more productive. The current BER MetaOCaml is a complete re-implementation of the original MetaOCaml by Taha, Calcagno and collaborators. Besides the new organization, new algorithms, new code, BER MetaOCaml adds a scope extrusion check superseding environment classifiers. Attempting to build code values with unbound or mistakenly bound variables (liable to occur due to mutation or other effects) is now caught early, raising an exception with good diagnostics. The guarantee that the generated code always compiles becomes unconditional, no matter what effects were used in generating the code. We describe BER MetaOCaml stressing the design decisions that made the new code modular and maintainable. We explain the implementation of the scope extrusion check.
UR - http://www.scopus.com/inward/record.url?scp=84902491650&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=84902491650&partnerID=8YFLogxK
U2 - 10.1007/978-3-319-07151-0_6
DO - 10.1007/978-3-319-07151-0_6
M3 - Conference contribution
AN - SCOPUS:84902491650
SN - 9783319071503
T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
SP - 86
EP - 102
BT - Functional and Logic Programming - 12th International Symposium, FLOPS 2014, Proceedings
PB - Springer-Verlag
Y2 - 4 June 2014 through 6 June 2014
ER -