A Crystalline Approximation Theorem for Hypersurfaces

Separate compilation is an important tool for coping with design complexity in large software projects. When done right it can also be used to create software libraries, thus promoting code reuse. But separate compilation comes in various flavors and has many facets: namespace management, linking, optimization, dependencies. Many programming languages identify modular units with units of compilation, while only a few extend this to permit hierarchies of language-level modules within individual compilation units. When the number of compilation units is large, then it becomes increasingly important that the mechanism of separate compilation itself can be used to control namespaces. The group model implemented in SML/NJ’s compilation manager CM provides the necessary facilities to avoid unwanted interferences between unrelated parts of large programs. Compilation units are arranged into groups, and explicit export interfaces can be used to control namespaces. When there are many groups, they can be organized into supergroups, and so on, thus forming a hierarchical modular structure. CM provides automatic dependency analysis, but automatic dependency analysis is NP-hard for general SML code. We show two simple restrictions that avoid intractability. To remove the penalties for efficiency usually incurred by modularization and separate compilation, I designed an algorithm for automatic inline expansion across compilation unit boundaries that works in the presence of higher-order functions and free variables; it rearranges bindings and scopes as necessary to move non-expansive code from one module to another. I describe—and implement—the algorithm as transformations on λ-calculus. The inliner is efficient, robust, and practical enough for everyday use in the SML/NJ compiler. It preserves separate compilation and has been integrated with CM. I briefly investigate macro systems as an alternative approach—driven by programmer

[1]  K. Gödel Über formal unentscheidbare Sätze der Principia Mathematica und verwandter Systeme I , 1931 .

[2]  T. P. Wright,et al.  Factors affecting the cost of airplanes , 1936 .

[3]  A. Turing On Computable Numbers, with an Application to the Entscheidungsproblem. , 1937 .

[4]  A. Church The calculi of lambda-conversion , 1941 .

[5]  Vannevar Bush,et al.  Science, the endless frontier : A report to the President , 2011 .

[6]  Z. Griliches Hybrid Corn and the Economics of Innovation. , 1960, Science.

[7]  Jacob Schmookler,et al.  Invention and Economic Growth , 1967 .

[8]  M. Olson,et al.  The Logic of Collective Action: Public Goods and the Theory of Groups. , 1973 .

[9]  C. F. Phillips Industrial Market Structure and Economic Performance , 1971 .

[10]  C. Waddington Limits of Growth , 1972, Nature.

[11]  D. L. Parnas,et al.  On the criteria to be used in decomposing systems into modules , 1972, Software Pioneers.

[12]  W. Nicholson Microeconomic theory: basic principles and extensions , 1972 .

[13]  Frederic M. Scherer,et al.  Nordhaus' Theory of Optimal Patent Life: A Geometric Reinterpretation , 1972 .

[14]  Peter J. Brown,et al.  Macroprocessors and Techniques for Portable Software , 1974 .

[15]  Robert Scheifler,et al.  An analysis of inline substitution for a structured programming language , 1977, CACM.

[16]  Talbot Page,et al.  Discounting and intergenerational equity , 1977 .

[17]  P. Favero Soft Energy Paths: Toward a Durable Peace , 1978 .

[18]  Jr. Guy L. Steele,et al.  Rabbit: A Compiler for Scheme , 1978 .

[19]  W D Metz,et al.  Energy storage and solar power: an exaggerated problem. , 1978, Science.

[20]  Stuart I. Feldman,et al.  Make — a program for maintaining computer programs , 1979, Softw. Pract. Exp..

[21]  F. Bass The Relationship between Diffusion Rates, Experience Curves, and Demand Elasticities for Consumer Durable Technological Innovations , 1980 .

[22]  M. Spence The Learning Curve and Competition , 1981 .

[23]  E. Mansfield,et al.  Imitation Costs and Patents: An Empirical Study , 1981 .

[24]  James A. Moorer,et al.  The Lucasfilm audio signal processor , 1982, ICASSP.

[25]  Professor Dr. Niklaus Wirth,et al.  Programming in Modula-2 , 1982, Springer Berlin Heidelberg.

[26]  F. Scherer,et al.  Demand-Pull and Technological Invention: Schmookler Revisited , 1982 .

[27]  R. Langlois,et al.  Industrial Innovation Policy: Lessons from American History , 1983, Science.

[28]  S. Ravid,et al.  The Importance of Being First: Learning Price and Strategy , 1983 .

[29]  Butler W. Lampson,et al.  Practical use of a polymorphic applicative language , 1983, POPL '83.

[30]  B. Lampson,et al.  Organizing software in a distributed environment , 1983, SIGPLAN '83.

[31]  M. Lieberman The Learning Curve and Pricing in the Chemical Processing Industries , 1984 .

[32]  End Use Annual energy review , 1984 .

[33]  J. Dutton,et al.  Treating Progress Functions as a Managerial Opportunity , 1984 .

[34]  Polle Zellweger,et al.  The structure of Cedar , 1985, ACM SIGPLAN Notices.

[35]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

[36]  Walter F. Tichy,et al.  Rcs — a system for version control , 1985, Softw. Pract. Exp..

[37]  David Ross,et al.  Learning to Dominate , 1986 .

[38]  E. E. Gavett,et al.  Fuel ethanol and agriculture: an economic assessment. , 1986 .

[39]  Paul Hudak,et al.  ORBIT: an optimizing compiler for scheme , 1986, SIGPLAN '86.

[40]  E E Kohlbecker,et al.  Syntactic extensions in the programming language LISP , 1986 .

[41]  P. Dasgupta,et al.  International trade and technology policy , 1987 .

[42]  M. Lieberman The learning curve, diffusion, and competitive strategy , 1987 .

[43]  Richard Kronland-Martinet,et al.  Analysis of Sound Patterns through Wavelet transforms , 1987, Int. J. Pattern Recognit. Artif. Intell..

[44]  S. Winter,et al.  Appropriating the Returns from Industrial Research and Development , 1987 .

[45]  Simon L. Peyton Jones,et al.  The Implementation of Functional Programming Languages , 1987 .

[46]  Niklaus Wirth,et al.  The programming language oberon , 1988, Softw. Pract. Exp..

[47]  Jack W. Davidson,et al.  A study of a C function inliner , 1988, Softw. Pract. Exp..

[48]  Jonathan Rees,et al.  Syntactic closures , 1988, LISP and Functional Programming.

[49]  Brian W. Kernighan,et al.  The C Programming Language, Second Edition , 1988 .

[50]  F. W. Scheifler,et al.  X Window system: C Library and protocol reference , 1988 .

[51]  P. Dasgupta,et al.  Learning-by-doing, Market Structure and Industrial and Trade Policies , 1988 .

[52]  John M. Reilly,et al.  Ethanol: economic and policy tradeoffs , 1988 .

[53]  Niklaus Wirth,et al.  From modula to oberon , 1988, Softw. Pract. Exp..

[54]  James F. Wilson Bureaucracy: What Government Agencies Do and Why They Do It , 1990 .

[55]  Harry G. Mairson Deciding ML typability is complete for deterministic exponential time , 1989, POPL '90.

[56]  Joan M. Ogden,et al.  Solar Hydrogen: Moving Beyond Fossil Fuels , 1989 .

[57]  Robin Milner,et al.  Definition of standard ML , 1990 .

[58]  Robin Milner,et al.  Commentary on standard ML , 1990 .

[59]  Bjarne Stroustrup,et al.  The Annotated C++ Reference Manual , 1990 .

[60]  L. Argote,et al.  Learning Curves in Manufacturing , 1990, Science.

[61]  David B. MacQueen,et al.  A higher-order type system for functional programming , 1990 .

[62]  M. Bazerman Judgment in Managerial Decision Making , 1990 .

[63]  John H. Reppy,et al.  CML: A Higher-Order Concurrent Language , 1991, PLDI.

[64]  Andrew W. Appel,et al.  Standard ML of New Jersey , 1991, PLILP.

[65]  D. H. Bartley,et al.  Revised4 report on the algorithmic language scheme , 1991, LIPO.

[66]  Andrew W. Appel,et al.  Compiling with Continuations , 1991 .

[67]  Microcomputer Standards Subcommittee IEEE standard for the Scheme programming language , 1991 .

[68]  Jonathan Rees,et al.  Macros that work , 1991, POPL '91.

[69]  David Keppel,et al.  A portable interface for on-the-fly instruction space modification , 1991, ASPLOS IV.

[70]  Chris Hanson,et al.  A syntactic closures macro facility , 1991, LIPO.

[71]  Robert J. Schalkoff,et al.  Pattern recognition - statistical, structural and neural approaches , 1991 .

[72]  Keith D. Cooper,et al.  An experiment with inline substitution , 1991, Softw. Pract. Exp..

[73]  Luca Cardelli,et al.  Modula-3 Report (revised) , 1992 .

[74]  Adedeji Badiru,et al.  Computational survey of univariate and multivariate learning curve models , 1992 .

[75]  Kinsey Wilson Lights out for Shoreham , 1992 .

[76]  R. Kent Dybvig,et al.  Writing Hygienic Macros in Scheme with Syntax-Case , 1992 .

[77]  A. Purvis,et al.  The Technology Pork Barrel , 1992 .

[78]  Atsushi Ohori,et al.  A compilation method for ML-style polymorphic record calculi , 1992, POPL '92.

[79]  Robert Sims,et al.  Alpha architecture reference manual , 1992 .

[80]  Scott A. Mahlke,et al.  Profile‐guided automatic inline expansion for C programs , 1992, Softw. Pract. Exp..

[81]  D. Newbery Harmonizing Energy Taxes in the EU , 2022 .