Network


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

Hotspot


Dive into the research topics where John Hannan is active.

Publication


Featured researches published by John Hannan.


Mathematical Structures in Computer Science | 1992

From Operational Semantics to Abstract Machines

John Hannan; Dale Miller

We consider the problem of mechanically constructing abstract machines from operational semantics, producing intermediate-level specifications of evaluators guaranteed to be correct with respect to the operational semantics. We construct these machines by repeatedly applying correctness-preserving transformations to operational semantics until the resulting specifications have the form of abstract machines. Though not automatable in general, this approach to constructing machine implementations can be mechanized, providing machine-verified correctness proofs. As examples we present the transformation of specifications for both call-by-name and call-by-value evaluation of the untyped λ-calculus into abstract machines that implement such evaluation strategies. We also present extensions to the call-by-value machine for a language containing constructs for recursion, conditionals, concrete data types, and built-in functions. In all cases, the correctness of the derived abstract machines follows from the (generally transparent) correctness of the initial operational semantic specification and the correctness of the transformations applied.


logic in computer science | 1992

Compiler verification in LF

John Hannan; Frank Pfenning

A methodology for the verification of compiler correctness based on the LF logical framework as realized within the Elf programming language is presented. This technique is used to specify, implement, and verify a compiler from a simple functional programming language to a variant of the Categorical Abstract Machine (CAM).<<ETX>>


Journal of Functional Programming | 1993

Extended natural semantics

John Hannan

We extend the definition of natural semantics to include simply typed A-terms, instead of firstorder terms, for representing programs, and to include inference rules for the introduction and discharge of hypotheses and eigenvariables. This extension, which we call extended natural semantics, affords a higher-level notion of abstract syntax for representing programs and suitable mechanisms for manipulating this syntax. We present several examples of semantic specifications for a simple functional programming language and demonstrate how we achieve simple and elegant manipulations of bound variables in functional programs. All the examples have been implemented and tested in >iProlog, a higher-order logic programming language that supports all of the features of extended natural semantics.


symposium on principles of programming languages | 1998

Higher-order unCurrying

John Hannan; Patrick Hicks

We present a formal specification of unCurrying for a higherorder, functional language with ML-style let-polymorphism. This specification supports the general unCurrying of functions, even for functions which are passed as arguments or returned as values. The specification also supports partial unCurrying of any consecutive parameters of a function, rather than only unCurrying all of a functions parameters. We present the specification as a deductive system which axiomatizes a judgment relating a source term with an unCurried form of the term. We prove that this system relates only typable terms and that it is correct with respect to an operational semantics. We define a practical algorithm, based on algorithm W, which implements the unCurrying and prove this algorithm sound and complete with respect to the deductive system. This algorithm generates maximally unCurried forms of source terms. These results provide a declarative framework for reasoning about unCurrying and support a richer form of unCurrying than is currently found in compilers for functional languages.


international conference on functional programming | 1991

Making Abstract Machines Less Abstract

John Hannan

We consider a class of abstract machines used for specifying the evaluation of intermediate-level programming languages, and demonstrate how various abstract aspects of these machines can be made concrete, providing for their direct implementation in a low-level microcoded architecture. We introduce the concept of stored programs and data to abstract machines. We demonstrate how machines that dynamically manipulate programs with abstract operations can be translated into machines that only need to read instructions from a fixed program. We show how familiar architectural features, such as a program counter, instruction register and a display can all be introduced very naturally into an abstract machine architecture once programs are represented as objects stored in memory. This translation lowers the level of the abstract machine, making it less abstract or, equivalently, more concrete. The resulting machines bear a close resemblance to a microcoded architecture in which the abstract machine instructions are defined in terms of a small set of micro-instructions that manipulate registers and memory. This work provides a further basis for the formal construction and implementation of abstract machines used for implementing programming languages. We demonstrate our results on an abstract machine that is a slight variant of the Categorical Abstract Machine.


partial evaluation and semantic-based program manipulation | 1991

Staging transformations for abstract machines

John Hannan

We present a complete set of staging transformations for translating a class of interpreters into compilers and executors. Staging transformation is the general process of separating stages or phases of a computation based on the availability of data. While encompassing partial evaluation, staging techniques can be more general, allowing for more powerful and flexible transformation strategies. We employ a particular strategy called pass separation that takes a program p and constructs a pair of programs pl, pz such that P(Z, Y) = P2(P1 (~), v) for all


ACM Transactions on Programming Languages and Systems | 1994

Operational semantics-directed compilers and machine architectures

John Hannan

, y. We apply this method in a restricted setting in which interpreters are described by abstract machines. For an interpreter p the pass separation constructs programs pI and P2 corresponding to a compiler and an executor. The pass separation process includes the an tomatic definition of a semantics-directed machine architecture that serves aa the target code for the compiler. This architecture resembles abstract machine code generated by hand-crafted compilers. Though our method is restricted to a limited class of abstract machines given as term rewriting systems, we argue that this class encompasses a large set of machines derived from operational semantics. We provide an example of our method by transforming an SECD-like machine for call-by-value evaluation of the A-calculus into a compiler and executor for a variant of the Categorical Abstract Machine.


international conference on functional programming | 1998

Higher-order arity raising

John Hannan; Patrick Hicks

We consider the task of automatically constructing intermediate-level machine architectures and compilers generating code for these architectures, given operational semantics for source languages. We use operational semantics in the form of abstract machines given by rewrite systems in which the rewrite rules operate on terms representing states of computations. To construct compilers and new architectures we employ a particular strategy called pass separation, a form of staging transformation, that takes a program <italic>p</italic> and constructs a pair of programs <italic>p</italic><subscrpt>1</subscrpt>, <italic>p</italic><subscrpt>2</subscrpt> such that <italic>p(x, y)</italic> = <italic>p<subscrpt>2</subscrpt>(p<subscrpt>1</subscrpt>(x), y)</italic>) for all <italic>x,y</italic>. If <italic>p</italic> represents an operational semantics for a language, with arguments <italic>x</italic> and <italic>y</italic> denoting a source program and its input data, then pass separation constructs programs <italic>p<subscrpt>1</subscrpt></italic> and <italic>p<subscrpt>2</subscrpt></italic> corresponding to a compiler and an executor. The compiler translates the source language into an intermediate-level target language, and the executor provides the definition for this language. Our use of pass separation supports the automatic definition of target languages or architectures, and the structure of these architectures is directed by the structure of the given source semantics. These architectures resemble abstract machine languages found in hand-crafted compilers. Our method is restricted to a limited class of abstract machines given as term-rewriting systems, but we argue that this class encompasses a large set of language definitions derived from more natural operational semantics. We provide two examples of our method by constructing compilers and target architectures for a simple functional language and a simple imperative language. Though we construct these architectures automatically, they bear a striking resemblance to existing architectures constructed by hand.


static analysis symposium | 1995

A Type-based Analysis for Stack Allocation in Functional Languages

John Hannan

Arity raising, also known as variable splitting or flattening, is the program optimization which transforms a function of one argument into a function of several arguments by decomposing the structure of the original one argument into individual components in that structure. This optimization eliminates the need for the structuring of the components and also allows more arguments to be passed in registers during a function call. We present a formal specification of arity raising for a higher-order functional language. This specification supports the general arity raising of functions, even for functions which are passed as arguments or returned as values. We define a practical algorithm, based on algorithm W, which implements arity raising, and we prove this algorithm sound with respect to the deductive system. These results provide a declarative framework for reasoning about arity raising and support a richer form of the transformation than is currently found in compilers for functional languages.


Journal of Functional Programming | 1998

A type-based escape analysis for functional languages

John Hannan

We consider the problem of detecting when bindings for variables in a higher-order, call-by-value functional language can be allocated on a stack. We use an annotated type system to infer information about the occurrence and extent of variables in a simple higher-order functional language and combine this system with a translation to an annotated language which explicitly indicates when stack allocation can be performed. This technique supports both stack and heap allocation of variable bindings. Only the stack allocated bindings need follow the protocol for stacks: their extent must coincide with their scope. Heap allocated bindings can have any extent and their allocation has no impact on the stack allocated ones. The type system uses a simple notion of annotated types in which types encode not only the typical simple type information, but also information about the use of variables. We demonstrate the use of our analysis by defining both an operational semantics and an abstract machine which utilize both a stack and an environment for variable allocation.

Collaboration


Dive into the John Hannan's collaboration.

Top Co-Authors

Avatar

Adam Fischbach

Pennsylvania State University

View shared research outputs
Top Co-Authors

Avatar

Patrick Hicks

Pennsylvania State University

View shared research outputs
Top Co-Authors

Avatar
Top Co-Authors

Avatar

Ali R. Hurson

Missouri University of Science and Technology

View shared research outputs
Top Co-Authors

Avatar

Jacqueline Mogle

Pennsylvania State University

View shared research outputs
Top Co-Authors

Avatar

Nikki L. Hill

Pennsylvania State University

View shared research outputs
Top Co-Authors

Avatar
Top Co-Authors

Avatar

Andre Scedrov

University of Pennsylvania

View shared research outputs
Top Co-Authors

Avatar

Bingjun Sun

Pennsylvania State University

View shared research outputs
Top Co-Authors

Avatar

Caroline McDermott

Pennsylvania State University

View shared research outputs
Researchain Logo
Decentralizing Knowledge