Results 11 
16 of
16
A Parallel Functional Language With FirstClass Continuations. Programming Style and Semantics
 Computers and Artificial Intelligence
"... We present an operational semantics for a functional language with rstclass continuations and transparent constructs for parallelism fork and pcall. The sequential semantics of programs with rstclass continuations is preserved when parallel evaluation is allowed, by verifying whether some expre ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
We present an operational semantics for a functional language with rstclass continuations and transparent constructs for parallelism fork and pcall. The sequential semantics of programs with rstclass continuations is preserved when parallel evaluation is allowed, by verifying whether some expressions have returned a value before applying a continuation. These expressions are the ones that are evaluated before this continuation is applied in a lefttoright sequential order. An implementation is proposed using a notion of higherorder continuation that we call metacontinuation. This semantics is costless when rstclass continuations are not used. Several programs also illustrate the programming style that can be adopted in such a language. Keywords: Scheme, parallelism, transparency, continuation, metacontinuation, left expression, operational semantics. 1 Introduction There are essentially two trends to extend a functional language with parallel constructs. On the one...
A Semantics of Python in Isabelle/HOL
, 2008
"... As computers are deployed in increasingly diverse, numerous, and critical roles, the need for confidence in their hardware and software becomes more acute. Often, however, computer technologies, such as programming languages, lack a sufficiently formal definition to allow rigorous mathematical analy ..."
Abstract
 Add to MetaCart
As computers are deployed in increasingly diverse, numerous, and critical roles, the need for confidence in their hardware and software becomes more acute. Often, however, computer technologies, such as programming languages, lack a sufficiently formal definition to allow rigorous mathematical analysis of their properties. Even in cases where a formal definition is available, the theorems to be proven and the definition itself tend to have many cases and many details that are easily overlooked when writing a proof by hand. This has created interest in the mechanization of the proof process through the use of automated proof assistants. In this report, we develop a formal definition for a programming language called IntegerPython, which is a subset of the Python language that supports integers, booleans, global variables, loops, modules, and nested functions. The definition takes the form of an operational semantics on a CEKS machine, which we embed in the Isabelle/HOL mechanized logic. We then prove an invariant of the CEKS machine in Isabelle/HOL. The report concludes with strategies for the efficient, executable implementation of the IntegerPython semantics and its extension into a semantics of
A Monadic Framework for Delimited Continuations
"... Delimited continuations are more expressive than traditional abortive continuations and they apparently require a framework beyond traditional continuationpassing style (CPS). We show that this is not the case: standard CPS is sufficient to explain the common control operators for delimited continu ..."
Abstract
 Add to MetaCart
Delimited continuations are more expressive than traditional abortive continuations and they apparently require a framework beyond traditional continuationpassing style (CPS). We show that this is not the case: standard CPS is sufficient to explain the common control operators for delimited continuations. We demonstrate this fact and present an implementation as a Scheme library. We then investigate a typed account of delimited continuations that makes explicit where control effects can occur. This results in a monadic framework for typed and encapsulated delimited continuations, which we design and implement as a Haskell library. 1
Design, Languages
"... It is often hard to write programs that are efficient yet reusable. For example, an efficient implementation of Gaussian elimination should be specialized to the structure and known static properties of the input matrix. The most profitable optimizations, such as choosing the best pivoting or memoiz ..."
Abstract
 Add to MetaCart
It is often hard to write programs that are efficient yet reusable. For example, an efficient implementation of Gaussian elimination should be specialized to the structure and known static properties of the input matrix. The most profitable optimizations, such as choosing the best pivoting or memoization, cannot be expected of even an advanced compiler because they are specific to the domain, but expressing these optimizations directly makes for ungainly source code. Instead, a promising and popular way to reconcile efficiency with reusability is for a domain expert to write code generators. Two pillars of this approach are types and effects. Typed multilevel languages such as MetaOCaml ensure safety: a welltyped code generator neither goes wrong nor generates code that goes wrong. Side effects such as state and control ease correctness: an effectful generator can resemble the textbook presentation of an algorithm, as is familiar to domain experts, yet insert let for memoization and if for boundschecking, as is necessary for efficiency. However, adding effects blindly renders multilevel types unsound. We introduce the first twolevel calculus with control effects and a sound type system. We give smallstep operational semantics as well as a continuationpassing style (CPS) translation. For soundness, our calculus restricts the code generatorâ€™s effects to the scope of generated binders. Even with this restriction, we can finally write efficient code generators for dynamic programming and numerical methods in direct style, like in algorithm textbooks, rather than in CPS or monadic style.
Inference, Targeting and Compatibility in a Type System for Java with SAM Typed Closures
"... Abstract. In this paper we consider the new type structure that has been proposed for Java closures, in the last Java Specification Language [BS11a]. This structure uses SAM types that are in fact, nominal types instead of the structural, functional types, used in the previous, proposals. In additio ..."
Abstract
 Add to MetaCart
Abstract. In this paper we consider the new type structure that has been proposed for Java closures, in the last Java Specification Language [BS11a]. This structure uses SAM types that are in fact, nominal types instead of the structural, functional types, used in the previous, proposals. In addition, it allows type inference for closures and for closure arguments. Through a technique, already consolidated in previous studies in Java extensions, we extend the calculus FGJ, [IPW01], with interfaces, anonymous classes, closures of the new form and SAM types. We define a type system and a reduction semantics for this calculus FGATCJ. Using the type system, we formalize the notions of closure context, target type, compatibility type and closure type as they emerge in [BS11a]. Eventually, we prove the soundness of the type system. 1