This paper presents a novel closure conversion strategy which is part of MLton, a whole-program compiler for Standard ML. Unlike other implementations, MLton performs closure-conversion at an early stage to translate programs to a simply-typed rst-order intermediate language upon which most optimizations are performed. Closure conversion is guided by a global control-ow analysis. Like previous work on defunctionalization, the translation implements closures as elements of datatypes, and uses dispatches at certain call-sites to select the appropriate function to call. However, our use of control-ow analysis leads to a signiicantly improved translation. There are two notable contributions of our work: 1. The translation uses a general ow-analysis framework which includes OCFA. The datatypes in the target language capture the results of the analysis. MLton uses the analysis to insert coercions to translate between diierent representations of a closure to preserve type correctness of the target language program. 2. The translation is practical. Experimental results over a range of benchmarks including large real-world programs such as the compiler itself and the ML-Kit TBE + 97] indicate that the compile-time cost of ow analysis and closure conversion is extremely small, and that the dispatches and coercions inserted by the algorithm are dynamically infrequent. Runtime performance is often more than a factor of two faster than Standard ML of New Jersey.
1.3 Infixed operators The grammar of MLB does not directly admit fixity directives. However, the static and dynamic semantics for MLB will import source files that must be parsed in the scope of fixity directives and that may introduce additional fixity directives into scope. Figure 1 formalizes the Definition’s notion of infix status as a fixity environment. InfixStatus = {nonfix} ∪ ⋃ d∈{0,...,9}{infix d, infixr d} FE ∈ FixEnv = VId fin −→ InfixStatus
Since the mathematical research interests of one of us (Igor Rivin) tend to hyperbolic geometry, and since we could get a much clearer impression of the utility of the tools previously available and those we had developed if we could use them in our own research, there has been a certain bias towards hyperbolic geometry and related fields in this project. An incomplete list of the various tools we developed can be found in section 2. Computationally, our system is largely centered on the Scheme programming language (see [17, 4, 3]), although many of the projects described below have been implemented using whatever seemed like the right system at the time, consistently with the “right tool for the job” philosophy underlying the project. Our Scheme experience is described in section 3.
We describe an efficient algorithm to write any element of the alternating group A_n as a product of two n-cycles (in particular, we show that any element of A_n can be so written -- a result of E. A. Bertram). An easy corollary is that every element of A_n is a commutator in the symmetric group S_n.
Using a fast tree-searching algorithm and a Pentium cluster, we enumerated all the sequences and compact conformations (structures) for a protein folding model on a cubic lattice of size 4x3x3. We used two types of amino acids-hydrophobic (H) and polar (P)-to make up the sequences, so there were 2(36)approximate to6.87x10(10) different sequences. The total number of distinct structures was 84 731 192. We made use of a simple solvation model in which the energy of a sequence folded into a structure is minus the number of hydrophobic amino acids in the "core" of the structure. For every sequence, we found its ground state or ground states, i.e., the structure or structures for which its energy is lowest. About 0.3% of the sequences have a unique ground state. The number of structures that are unique ground states of at least one sequence is 2 662 050, about 3% of the total number of structures. However, these "designable" structures differ drastically in their designability, defined as the number of sequences whose unique ground state is that structure. To understand this variation in designability, we studied the distribution of structures in a high dimensional space in which each structure is represented by a string of 1's and 0's, denoting core and surface sites, respectively. (C) 2002 American Institute of Physics.
This paper presents a new closure conversion algorithm for simply-typed languages. We have have implemented the algorithm as part of MLton, a whole-program compiler for Standard ML (SML). MLton first applies all functors and eliminates polymorphism by code duplication to produce a simply-typed program. MLton then performs closure conversion to produce a first-order, simply-typed program. In contrast to typical functional language implementations, MLton performs most optimizations on the first-order language, after closure conversion. There are two notable contributions of our work: 1. The translation uses a general flow-analysis framework which includes OCFA. The types in the target language fully capture the results of the analysis. MLton uses the analysis to insert coercions to translate between different representations of a closure to preserve type correctness of the target language program. 2. The translation is practical. Experimental results over a range of benchmarks including large real-world programs such as the compiler itself and the ML-Kit [25] indicate that the compile-time cost of flow analysis and closure conversion is extremely small, and that the dispatches and coercions inserted by the algorithm are dynamically infrequent.
The speed of I/O components is it major limitation of the speed of all other major components in today's computer systems. Motivated by this, we investigated several algorithms for efficient and intelligent organization of files on a hard disk. Total access time may be decreased if files with temporal locality also have spatial locality. Three intelligent methods based on file type, frequency, and transition probabilities information showed up to 60% savings of total I/O time over the naive placement of files. More computationally intensive hill climbing and genetic algorithms approaches did not outperform statistical methods. The experiments were run on a real and simulated hard drive in single and multiple user environments.
We describe a distributed implementation of Scheme that permits efficient transmission of higher-order objects such as closures and continuations. The integration of distributed communication facilities within a higher-order programming language engenders a number of new abstractions and paradigms for distributed computing. Among these are user-specified load-balancing and migration policies for threads, incrementally linked distributed computations, and parameterized client-server applications. To our knowledge, this is the first distributed dialect of Scheme (or a related language) that addresses lightweight communication abstractions for higher-order objects.
Matthew Fluet合作论文数Department of Computer Science
Golisano College of Computing and Information Sciences
Rochester Institute of Technology1
Allan Gottlieb合作论文数Department of Computer Science, Courant Institute, New York University1