Karoline Malmkjær
Aarhus University
Network
Latest external collaboration on country level. Dive into details by clicking on the dots.
Publication
Featured researches published by Karoline Malmkjær.
Higher-order and Symbolic Computation \/ Lisp and Symbolic Computation | 1995
Olivier Danvy; Karoline Malmkjær; Jens Palsberg
Selective eta-expansion is a powerful “binding-time improvement”,i.e., a source-program modification that makes a partial evaluator yield better results. But like most binding-time improvements, the exact problem it solves and the reason why have not been formalized and are only understood by few.In this paper, we describe the problem and the effect of eta-redexes in terms of monovariant binding-time propagation: eta-redexes preserve the static data flow of a source program by interfacingstatic higher-order values in dynamic contexts anddynamic higher-order values in static contexts. They contribute to twodistinct binding-time improvements.We present two extensions of Gomards monovariant binding-time analysis for the pure λ-calculus. Our extensions annotateand eta-expand λ-terms. The first one eta-expands static higher-order values in dynamic contexts. The second also eta-expands dynamic higher-order values in static contexts.As a significant application, we show that our first binding-time analysis suffices to reformulate the traditional formulation of a CPS transformation into a modern one-pass CPS transformer. This binding-time improvement is known, but it is still left unexplained in contemporary literature,e.g., about “cps-based” partial evaluation.We also outline the counterpart of eta-expansion for partially static data structures.
ACM Computing Surveys | 1996
Olivier Danvy; Nevin Hentze; Karoline Malmkjær
Due in large part to Neil Jones’s Mix project [Jones et al. 1989], the last ten years have seen a renaissance of partial evaluation. A partial evaluator is a tool for specializing programs and performing statically known computations. In so doing, it reduces instruction counts and this typically yields faster—sometimes substantially faster—programs. (In extreme cases, however, adverse cache effects can outweigh instructioncount gains.) Partial evaluation directly addresses the modularity-performance conflict: we can write generic maintainable procedures and use partial evaluation to regain the performance of dedicated code. Partial evaluation can also remove interpretive overheads associated with data structures. For example, consider an I/O formatting procedure such as fprintf in C, which usually is called with a constant control string. By partially evaluating fprintf with respect to this constant, we can remove the overhead of interpreting the string at run time. The costs of partial evaluation are twofold: program size often increases, particularly if many specialized program fragments are generated, and the process of partial evaluation itself is expensive, and may not terminate.
partial evaluation and semantic-based program manipulation | 1995
Karoline Malmkjær; Peter Ørbæk
We propose a simple method for polyvariant specialisation of higher-order programs in a way that preserves block structure. The method is based on identifying the log (the ‘(seenbefore” list ) as a derivative of the procedure environment. Most contemporary partial evaluators use polyvariant specialisation. Due to scoping problems with the definitions introduced by the partial evaluator, this algorithm cannot preserve blocks in the presence of higher-order values. (The problem is related to the so-called “upwards funarg” problem of Lisp.) Instead, the source program is “lambda-lifted” (transformed into recursive equations) to remove local scope before specialisation — scoping problems are evaded rather than solved. Lambda-lifting, however, destroys any locality of variables that might be used in compiling the residual program. Also, the residual program becomes unreadable to the user, complicating both binding-time improvement and binding-time debugging. This paper re-expresses the polyvariant specialisation algorithm by deriving the log from the environment of an ordinary interpreter, and solves the problem of retaining block structure based on this analogy. The resulting algorithm extends polyvariant specialisation to handle blocks and higherorder values in the natural way. We give the algorithm for an offline specialiser. We have also implemented the algorithm in the online partial evaluator POPE and the preliminary experimental results show significant speedup for many block-structured residual programs compared to their lambda-lift ed counterparts.
Lecture Notes in Computer Science | 2002
Torben Amtoft; Charles Consel; Olivier Danvy; Karoline Malmkjær
We consider a naive, quadratic string matcher testing whether a pattern occurs in a text; we equip it with a cache mediating its access to the text; and we abstract the traversal policy of the pattern, the cache, and the text. We then specialize this abstracted program with respect to a pattern, using the off-the-shelf partial evaluator Similix.Instantiating the abstracted program with a left-to-right traversal policy yields the linear-time behavior of Knuth, Morris and Pratts string matcher. Instantiating it with a right-to-left policy yields the linear-time behavior of Boyer and Moores string matcher.
ACM Transactions on Programming Languages and Systems | 1996
Olivier Danvy; Karoline Malmkjær; Jens Palsberg
BRICS Report Series | 2001
Torben Amtoft; Charles Consel; Olivier Danvy; Karoline Malmkjær
partial evaluation and semantic-based program manipulation | 1992
Karoline Malmkjær
BRICS Report Series | 1995
Olivier Danvy; Karoline Malmkjær; Jens Palsberg
BRICS Report Series | 1996
Olivier Danvy; Karoline Malmkjær; Jens Palsberg
Archive | 1994
Karoline Malmkjær; Olivier Danvy