Results 1 - 10
of
27
From ML to Ada: Strongly-typed Language Interoperability via Source Translation
, 1993
"... We describe a system that supports source-level integration of ML-like functional language code with ANSI C or Ada83 code. The system works by translating the functional code into type-correct, "vanilla" C or Ada; it offers simple, efficient, type-safe inter-operation between new functional code com ..."
Abstract
-
Cited by 59 (3 self)
- Add to MetaCart
We describe a system that supports source-level integration of ML-like functional language code with ANSI C or Ada83 code. The system works by translating the functional code into type-correct, "vanilla" C or Ada; it offers simple, efficient, type-safe inter-operation between new functional code components and "legacy" third-generationlanguage components. Our translator represents a novel synthesis of techniques including user-parameterized specification of primitive types and operators; removal of polymorphism by code specialization; removal of higher-order functions using closure datatypes and interpretation; and aggressive optimization of the resulting first-order code, which can be viewed as encoding the result of a closure analysis. Programs remain fully typed at every stage of the translation process, using only simple, standard type systems. Target code runs at speeds comparable to the output of current optimizing ML compilers, even though handicapped by a conservative garbage collector.
alto: A Link-Time Optimizer for the Compaq Alpha
- Software - Practice and Experience
, 1999
"... Traditional optimizing compilers are limited in the scope of their optimizations by the fact that only a single function, or possibly a single module, is available for analysis and optimization. In particular, this means that library routines cannot be optimized to specific calling contexts. Other ..."
Abstract
-
Cited by 41 (13 self)
- Add to MetaCart
Traditional optimizing compilers are limited in the scope of their optimizations by the fact that only a single function, or possibly a single module, is available for analysis and optimization. In particular, this means that library routines cannot be optimized to specific calling contexts. Other optimization opportunities, exploiting information not available before linktime such as addresses of variables and the final code layout, are often ignored because linkers are traditionally unsophisticated. A possible solution is to carry out whole-program optimization at link time. This paper describes alto, a link-time optimizer for the Compaq Alpha architecture. It is able to realize significant performance improvements even for programs compiled with a good optimizing compiler with a high level of optimization. The resulting code is considerably faster that that obtained using the OM link-time optimizer, even when the latter is used in conjunction with profile-guided and inter-fi...
Strongly Typed Flow-Directed Representation Transformations (Extended Abstract)
- In ICFP ’97 [ICFP97
, 1997
"... We present a new framework for transforming data representations in a strongly typed intermediate language. Our method allows both value producers (sources) and value consumers (sinks) to support multiple representations, automatically inserting any required code. Specialized representations can be ..."
Abstract
-
Cited by 29 (13 self)
- Add to MetaCart
We present a new framework for transforming data representations in a strongly typed intermediate language. Our method allows both value producers (sources) and value consumers (sinks) to support multiple representations, automatically inserting any required code. Specialized representations can be easily chosen for particular source/sink pairs. The framework is based on these techniques: 1. Flow annotated types encode the "flows-from" (source) and "flows-to" (sink) information of a flow graph. 2. Intersection and union types support (a) encoding precise flow information, (b) separating flow information so that transformations can be well typed, (c) automatically reorganizing flow paths to enable multiple representations. As an instance of our framework, we provide a function representation transformation that encompasses both closure conversion and inlining. Our framework is adaptable to data other than functions.
A Cost-effective Estimation of Uncaught Exceptions in Standard ML Programs
, 2000
"... We present a static analysis that detects potential runtime exceptions that are raised and never handled inside Standard ML(SML) programs. This analysis will predict abrupt termination of SML programs, which is SML's only one "safety hole." Even though SML program's control flow and exception flow a ..."
Abstract
-
Cited by 25 (6 self)
- Add to MetaCart
We present a static analysis that detects potential runtime exceptions that are raised and never handled inside Standard ML(SML) programs. This analysis will predict abrupt termination of SML programs, which is SML's only one "safety hole." Even though SML program's control flow and exception flow are in general mutually dependent, analyzing the two flows are safely decoupled. Program's control-flow is firstly estimated by simple case analysis of call expressions. Using this call-graph information, program's exception flow is derived as set-constraints, whose least model is our analysis result. Both of these two analyses are proven safe and the reasons behind each design decision are discussed. Our implementation of this analysis has been applied to realistic SML programs and shows a promising cost-accuracy performance. For the ML-Lex program, for example, the analysis takes 1.36 seconds and it reports 3 may-uncaught exceptions, which are exactly the exceptions that can really escape. ...
A Comparative Study of Static and Profile-Based Heuristics for Inlining
- In 2000 ACM SIGPLAN Workshop on Dynamic and Adaptive Compilation and Optimization (DYNAMO ’00
, 2000
"... In this paper, we present a comparative study of static and profile-based heuristics for inlining. Our motivation for this study is to use the results to design the best inlining algorithm that we can for the Jalapeño dynamic optimizing compiler for Java [6]. We use a well-known approximation algori ..."
Abstract
-
Cited by 22 (1 self)
- Add to MetaCart
In this paper, we present a comparative study of static and profile-based heuristics for inlining. Our motivation for this study is to use the results to design the best inlining algorithm that we can for the Jalapeño dynamic optimizing compiler for Java [6]. We use a well-known approximation algorithm for the knapsack problem as a common "meta-algorithm" for the inlining heuristics studied in this paper. We present performance results for an implementation of these inlining heuristics in the Jalapeño dynamic optimizing compiler. Our performance results show that the inlining heuristics studied in this paper can lead to significant speedups in execution time (up to 1.68×) even with modest limits on code size expansion (at most 10%).
A Comparative Study of Static and Dynamic Heuristics for Inlining
, 2000
"... In this paper, we present a comparative study of static and dynamic heuristics for inlining. We introduce inlining plans as a formal representation for nested inlining decisions made by an inlining heuristic. We use a well-known approximation algorithm for the knapsack problem as a common "metaalg ..."
Abstract
-
Cited by 21 (7 self)
- Add to MetaCart
In this paper, we present a comparative study of static and dynamic heuristics for inlining. We introduce inlining plans as a formal representation for nested inlining decisions made by an inlining heuristic. We use a well-known approximation algorithm for the knapsack problem as a common "metaalgorithm " for the static and dynamic inlining heuristics studied in this paper. We present performance results for an implementation of these inlining heuristics in the Jalape~no dynamic optimizing compiler for Java. Our performance results show that the inlining heuristics studied in this paper can lead to significant speedups in execution time (up to 1.68\Theta) even with modest limits on code size expansion (at most 10%). # pages excluding title page & bibliography = 15 # pages used by figures and tables = 4 # pages of text = 11 Dynamo '00 submission Page 0 Privileged material --- please do not distribute 1
Polymorphic Splitting: An Effective Polyvariant Flow Analysis
- ACM Transactions on Programming Languages and Systems
, 1998
"... values for our framework are defined as follows: a 2 Avalue = Aconst +Aclosure b 2 Aconst = ftrue; false; number; nilg hl; ae; i 2 Aclosure = Label \Theta Aenv \Theta Contour ae 2 Aenv = Var fin \Gamma! Contour 2 Contour = Label An abstract value a is a set of abstract constants and abstra ..."
Abstract
-
Cited by 21 (0 self)
- Add to MetaCart
values for our framework are defined as follows: a 2 Avalue = Aconst +Aclosure b 2 Aconst = ftrue; false; number; nilg hl; ae; i 2 Aclosure = Label \Theta Aenv \Theta Contour ae 2 Aenv = Var fin \Gamma! Contour 2 Contour = Label An abstract value a is a set of abstract constants and abstract closures. The abstract constants true and false each denote a single exact value, while the abstract constant number denotes a set of exact values. An abstract closure hl; ae; i identifies procedures created from the -expression (lambda (x 1 : : : xn) e b ) l . The contour of an abstract closure, paired with an argument x i or a label of a subexpression of e b , determines the program points for the body of the abstract closure. Thus two abstract closures that share the same label but use different contours will have different program points. The abstract environment ae of an abstract closure records the contours in which its free variables are bound. Our polymorphic splitting analy...
Lambda-Splitting: A Higher-Order Approach to Cross-Module Optimizations
- In Proc. 1997 ACM SIGPLAN International Conference on Functional Programming (ICFP’97
, 1997
"... We describe an algorithm for automatic inline expansion across module boundaries that works in the presence of higher-order functions and free variables; it rearranges bindings and scopes as necessary to move nonexpansive code from one module to another. We describe---and implement---the algorithm a ..."
Abstract
-
Cited by 20 (7 self)
- Add to MetaCart
We describe an algorithm for automatic inline expansion across module boundaries that works in the presence of higher-order functions and free variables; it rearranges bindings and scopes as necessary to move nonexpansive code from one module to another. We describe---and implement---the algorithm as transformations on #-calculus. Our inliner interacts well with separate compilation and is e#cient, robust, and practical enough for everyday use in the SML/NJ compiler. Inlining improves performance by 4--8% on existing code, and makes it possible to use much more data abstraction by consistently eliminating penalties for modularity. 1 Introduction Abstraction and modular design of software promote clarity and provide clear lines along which large projects can be subdivided. But one often pays a large performance penalty for using abstraction. Cross-module inlining can bridge the gap between abstract design and high performance by transparently moving the border between compilation unit...
The Functional Imperative: Shape!
- 7th European Symposium on Programming, ESOP'98 Held as part of the joint european conferences on theory and practice of software, ETAPS'98
, 1997
"... Introduction FiSh is a new programming language for array computation that compiles higher-order polymorphic programs into simple imperative programs expressed in a sub-language Turbot, which can then be translated into, say, C. Initial tests show that the resulting code is extremely fast: two orde ..."
Abstract
-
Cited by 20 (7 self)
- Add to MetaCart
Introduction FiSh is a new programming language for array computation that compiles higher-order polymorphic programs into simple imperative programs expressed in a sub-language Turbot, which can then be translated into, say, C. Initial tests show that the resulting code is extremely fast: two orders of magnitude faster than Haskell, and two to four times faster than Objective Caml, one of the fastest ML variants for array programming. Every functional program must ultimately be converted into imperative code, but the mechanism for this is often hidden. FiSh achieves this transparently, using the "equation" from which it is named: Functional = Imperative + Shape Shape here refers to the structure of data, e.g. the length of a vector, or the number of rows and columns of a matrix. The FiSh compiler reads the equation from left to right: it converts functions into procedures by using
The Effectiveness of Flow Analysis for Inlining
- In Proceedings of the 1997 ACM SIGPLAN International Conference on Functional Programming
, 1997
"... An interprocedural flow analysis can justify inlining in higher-order languages. In principle, more inlining can be performed as analysis accuracy improves. This paper compares four flow analyses to determine how effectively they justify inlining in practice. The paper makes two contributions. First ..."
Abstract
-
Cited by 18 (2 self)
- Add to MetaCart
An interprocedural flow analysis can justify inlining in higher-order languages. In principle, more inlining can be performed as analysis accuracy improves. This paper compares four flow analyses to determine how effectively they justify inlining in practice. The paper makes two contributions. First, the relative merits of the flow analyses are measured with all other variables held constant. The four analyses include two monovariant and two polyvariant analyses that cover a wide range of the accuracy/cost spectrum. Our measurements show that the effectiveness of the inliner improves slightly as analysis accuracy improves, but the improvement is offset by the compile-time cost of the accurate analyses. The second contribution is an improvement to the previously reported inlining algorithm used in our experiments. The improvement causes flow information provided by a polyvariant analysis to be selectively merged. By merging flow information depending on the inlining context, the algorit...

