This document describes an implementation of Standard ML [1] written in Poly [2]. This is a complete implementation of the language including the modules system. The original aim of the implementation was largely as an experiment in using
An Implementation of Standard ML in Poly David C.J. Matthews
1 Introduction This document describes an implementation of Standard ML 1] written in Poly 2]. This is a complete implementation of the language including the modules system. The original aim of the implementation was largely as an experiment in using Poly for implementing reasonably sized programs, and only secondarily to produce a working ML system. In fact, though, the Poly/ML compiler has been very successful and is in use for a number of serious projects. This description is mostly aimed at those interested in the details of the implementation or planning to implement their own compiler for ML or a similar language. It includes only the parts of the system speci c to ML. The low-level system is described in a separate report.
2 Overview The compiler can be divided fairly neatly into two main parts, the front-end which translates the ML source into a machine- and language-independent code-tree, and the back-end which optimises this code and translates it into machine-code. The back-end is shared between the Poly and ML compilers. The ML front-end takes three passes to get to the intermediate code. The rst pass parses the source text and generates the parse tree. It deals with in x precedences and type variables, but does no other identi er matching, in particular it does not distinguish between variables and constructors. The second pass matches up identi ers to their declarations and does the type checking. The third pass generates the intermediate code. It uses type information provided by the previous pass to resolve overloading and to do the completeness checking for patterns. The back-end consists of an optimiser which takes the code tree from the front end and generates an optimised copy for the code-generator. It recognises tailrecursion and procedures for which a full closure need not be made. The other optimisations, such as inline code expansion and handling type-vectors, are intended for code from the Poly compiler. The machine-code generator compiles the code into vectors in store. Currently there are code-generators for the Vax, for the Sun2 and Sun3 (68010 and 68020) and a version which generates an interpretable 1
between object-oriented programming and Standard ML...The encoding of F-bounded polymorp隐藏>> Object...special treatment of objects in an implementation....
Standard ML weak polymor... 暂无评价 22页 免费 ML typing, explicit poly...of reference r to the Supported in part by an NSF PYI Award, with ...
AOAC_2000[1].11_Polydextrose_in_Foods(食品中...This polydextrose method can be used as an ...(0.2 mL) of intermediate standard, g; A2 =...
1014In situ poly(urea-formaldehyde) ...At room temperature (20-24°C) 200 ml of ...The standard deviation is less than 35% of the...
Abstract. We describe the design and implementation of a Standard ML of New Jersey library for the interactive pretty-printing of possibly infinite syntax...
of standardizing sulfur dioxide standard so2 Key ...implementation of t he policy of de2 talented ,...inserting t he poly2 mer into t he crystal ...
Synthesis of poly(propylene-co-lactide carbonate...with monodispersity was used as the standard ... and 2 500 mL titanium steal autoclave equipped ...
Standard ML-NJ weak poly... 暂无评价 20页 免费 in a simple imperative...An imperative implementation of sort that places elements of the list in a...
Ring-opening copolymerization of 1,6-anhydro-3-... from 30 to 58 unit/mg (standard dextran ...of naturally occurring poly- and oligosaccharides ...
Standard Operating ProcedureStandard Operating Proce...g of total RNA (or 2 ?g poly(A+) RNA) ...5.4.6 Place column in a clean 1.5 mL ...
热门文档