2003 · 19 citations · 8 references
ComputingComputer ScienceCompilersProgramming LanguagesSyntaxAbstract InterpretationCode GenerationCompiler ConstructionData TypesData-flow AnalysisType SystemsAbstraction MechanismsCompiler DesignCompiler SupportConstructorsPolymorphic RecursionSystem Call OverheadType ConstructorsType Declarations
Standard ML employs an opaque (or generative) semantics of datatypes, in which every datatype declaration produces a new type that is different from any other type, including other identically defined datatypes. A natural way of accounting for this is to consider datatypes to be abstract. When this interpretation is applied to type-preserving compilation, however, it has the unfortunate consequence that datatype constructors cannot be inlined, substantially increasing the run-time cost of constructor invocation compared to a traditional compiler. In this paper we examine two approaches to eliminating function call overhead from datatype constructors. First, we consider a transparent interpretation of datatypes that does away with generativity, altering the semantics of SML; and second, we propose an interpretation of datatype constructors as coercions, which have no run-time effect or cost and faithfully implement SML semantics.
8
Roberto M. Amadio, Luca Cardelli · ACM Transactions on Programming Languages and Systems · 1993 · 353 citations · Full text
David Tarditi, Greg Morrisett, Pau-Chen Cheng et al. · 1996 · 316 citations · Full text
TALx86: A Realistic Typed Assembly Language∗
Greg Morrisett, Karl Crary, Neal Glew et al. · 1999 · 184 citations
Vladimir Gapeyev, Michael Y. Levin, Benjamin C. Pierce · Journal of Functional Programming · 2002 · 91 citations · Full text