Network


Latest external collaboration on country level. Dive into details by clicking on the dots.

Hotspot


Dive into the research topics where Jan Midtgaard is active.

Publication


Featured researches published by Jan Midtgaard.


principles and practice of declarative programming | 2003

A functional correspondence between evaluators and abstract machines

Mads Sig Ager; Dariusz Biernacki; Olivier Danvy; Jan Midtgaard

We bridge the gap between functional evaluators and abstract machines for the λ-calculus, using closure conversion, transformation into continuation-passing style, and defunctionalization.We illustrate this approach by deriving Krivines abstract machine from an ordinary call-by-name evaluator and by deriving an ordinary call-by-value evaluator from Felleisen et al.s CEK machine. The first derivation is strikingly simpler than what can be found in the literature. The second one is new. Together, they show that Krivines abstract machine and the CEK machine correspond to the call-by-name and call-by-value facets of an ordinary evaluator for the λ-calculus.We then reveal the denotational content of Hannan and Millers CLS machine and of Landins SECD machine. We formally compare the corresponding evaluators and we illustrate some degrees of freedom in the design spaces of evaluators and of abstract machines for the λ-calculus with computational effects.Finally, we consider the Categorical Abstract Machine and the extent to which it is more of a virtual machine than an abstract machine.


ACM Computing Surveys | 2012

Control-flow analysis of functional programs

Jan Midtgaard

We present a survey of control-flow analysis of functional programs, which has been the subject of extensive investigation throughout the past 30 years. Analyses of the control flow of functional programs have been formulated in multiple settings and have led to many different approximations, starting with the seminal works of Jones, Shivers, and Sestoft. In this article, we survey control-flow analysis of functional programs by structuring the multitude of formulations and approximations and comparing them.


Theoretical Computer Science | 2005

A functional correspondence between monadic evaluators and abstract machines for languages with computational effects

Mads Sig Ager; Olivier Danvy; Jan Midtgaard

We extend our correspondence between evaluators and abstract machines from the pure setting of the λ-calculus to the impure setting of the computational λ-calculus. We show how to derive new abstract machines from monadic evaluators for the computational λ-calculus. Starting from (1) a generic evaluator parameterized by a monad and (2) a monad specifying a computational effect, we inline the components of the monad in the generic evaluator to obtain an evaluator written in a style that is specific to this computational effect. We then derive the corresponding abstract machine by closure-converting, CPS-transforming, and defunctionalizing this specific evaluator. We illustrate the construction with the identity monad, obtaining the CEK machine, and with a lifted state monad, obtaining a variant of the CEK machine with error and state.In addition, we characterize the tail-recursive stack inspection presented by Clements and Felleisen as a lifted state monad. This enables us to combine this stack-inspection monad with other monads and to construct abstract machines for languages with properly tail-recursive stack inspection and other computational effects. The construction scales to other monads--including one more properly dedicated to stack inspection than the lifted state monad--and other monadic evaluators.


Proceedings of the 13th international conference on Modularity | 2014

Systematic derivation of static analyses for software product lines

Jan Midtgaard; Claus Brabrand; Andrzej Wasowski

A recent line of work lifts particular verification and analysis methods to Software Product Lines (SPL). In an effort to generalize such case-by-case approaches, we develop a systematic methodology for lifting program analyses to SPLs using abstract interpretation. Abstract interpretation is a classical framework for deriving static analyses in a compositional, step-by-step manner. We show how to take an analysis expressed as an abstract interpretation and lift each of the abstract interpretation steps to a family of programs. This includes schemes for lifting domain types, and combinators for lifting analyses and Galois connections. We prove that for analyses developed using our method, the soundness of lifting follows by construction. Finally, we discuss approximating variability in an analysis and we derive variational data-flow equations for an example analysis, a constant propagation analysis for a simple imperative language.


static analysis symposium | 2012

A structural soundness proof for shivers's escape technique: a case for galois connections

Jan Midtgaard; Michael D. Adams; Matthew Might

Shiverss escape technique enables one to analyse the control flow of higher-order program fragments. It is widely used, but its soundness has never been proven. In this paper, we present the first soundness proof for the technique. Our proof is structured as a composition of Galois connections and thus rests on the foundations of abstract interpretation.


mathematics of program construction | 2012

Calculating graph algorithms for dominance and shortest path

Ilya Sergey; Jan Midtgaard; Dave Clarke

We calculate two iterative, polynomial-time graph algorithms from the literature: a dominance algorithm and an algorithm for the single-source shortest path problem. Both algorithms are calculated directly from the definition of the properties by fixed-point fusion of (1) a least fixed point expressing all finite paths through a directed graph and (2) Galois connections that capture dominance and path length. The approach illustrates that reasoning in the style of fixed-point calculus extends gracefully to the domain of graph algorithms. We thereby bridge common practice from the school of program calculation with common practice from the school of static program analysis, and build a novel view on iterative graph algorithms as instances of abstract interpretation.


principles and practice of declarative programming | 2013

Engineering definitional interpreters

Jan Midtgaard; Norman Ramsey; Bradford Larsen

A definitional interpreter should be clear and easy to write, but it may run 4--10 times slower than a well-crafted bytecode interpreter. In a case study focused on implementation choices, we explore ways of making definitional interpreters faster without expending much programming effort. We implement, in OCaml, interpreters based on three semantics for a simple subset of Lua. We compile the OCaml to x86 native code, and we systematically investigate hundreds of combinations of algorithms and data structures. In this experimental context, our fastest interpreters are based on natural semantics; good algorithms and data structures make them 2--3 times faster than naïve interpreters. Our best interpreter, created using only modest effort, runs only 1.5 times slower than a mature bytecode interpreter implemented in C.


Information Processing Letters | 2004

A functional correspondence between call-by-need evaluators and lazy abstract machines

Mads Sig Ager; Olivier Danvy; Jan Midtgaard


BRICS Report Series | 2003

From Interpreter to Compiler and Virtual Machine: A Functional Derivation

Mads Sig Ager; Dariusz Biernacki; Olivier Danvy; Jan Midtgaard


BRICS Report Series | 2003

A Functional Correspondence between Call-by-Need Evaluators and Lazy Abstract Machines

Mads Sig Ager; Olivier Danvy; Jan Midtgaard

Collaboration


Dive into the Jan Midtgaard's collaboration.

Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar

Ilya Sergey

Katholieke Universiteit Leuven

View shared research outputs
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar

Andrzej Wasowski

IT University of Copenhagen

View shared research outputs
Top Co-Authors

Avatar

Claus Brabrand

IT University of Copenhagen

View shared research outputs
Researchain Logo
Decentralizing Knowledge