2,887 research outputs found
Dynamic IFC Theorems for Free!
We show that noninterference and transparency, the key soundness theorems for
dynamic IFC libraries, can be obtained "for free", as direct consequences of
the more general parametricity theorem of type abstraction. This allows us to
give very short soundness proofs for dynamic IFC libraries such as faceted
values and LIO. Our proofs stay short even when fully mechanized for Agda
implementations of the libraries in terms of type abstraction.Comment: CSF 2021 final versio
Modalities, Cohesion, and Information Flow
It is informally understood that the purpose of modal type constructors in
programming calculi is to control the flow of information between types. In
order to lend rigorous support to this idea, we study the category of
classified sets, a variant of a denotational semantics for information flow
proposed by Abadi et al. We use classified sets to prove multiple
noninterference theorems for modalities of a monadic and comonadic flavour. The
common machinery behind our theorems stems from the the fact that classified
sets are a (weak) model of Lawvere's theory of axiomatic cohesion. In the
process, we show how cohesion can be used for reasoning about multi-modal
settings. This leads to the conclusion that cohesion is a particularly useful
setting for the study of both information flow, but also modalities in type
theory and programming languages at large
Parametric Compositional Data Types
In previous work we have illustrated the benefits that compositional data
types (CDTs) offer for implementing languages and in general for dealing with
abstract syntax trees (ASTs). Based on Swierstra's data types \'a la carte,
CDTs are implemented as a Haskell library that enables the definition of
recursive data types and functions on them in a modular and extendable fashion.
Although CDTs provide a powerful tool for analysing and manipulating ASTs, they
lack a convenient representation of variable binders. In this paper we remedy
this deficiency by combining the framework of CDTs with Chlipala's parametric
higher-order abstract syntax (PHOAS). We show how a generalisation from
functors to difunctors enables us to capture PHOAS while still maintaining the
features of the original implementation of CDTs, in particular its modularity.
Unlike previous approaches, we avoid so-called exotic terms without resorting
to abstract types: this is crucial when we want to perform transformations on
CDTs that inspect the recursively computed CDTs, e.g. constant folding.Comment: In Proceedings MSFP 2012, arXiv:1202.240
Termination Casts: A Flexible Approach to Termination with General Recursion
This paper proposes a type-and-effect system called Teqt, which distinguishes
terminating terms and total functions from possibly diverging terms and partial
functions, for a lambda calculus with general recursion and equality types. The
central idea is to include a primitive type-form "Terminates t", expressing
that term t is terminating; and then allow terms t to be coerced from possibly
diverging to total, using a proof of Terminates t. We call such coercions
termination casts, and show how to implement terminating recursion using them.
For the meta-theory of the system, we describe a translation from Teqt to a
logical theory of termination for general recursive, simply typed functions.
Every typing judgment of Teqt is translated to a theorem expressing the
appropriate termination property of the computational part of the Teqt term.Comment: In Proceedings PAR 2010, arXiv:1012.455
Generating reversible circuits from higher-order functional programs
Boolean reversible circuits are boolean circuits made of reversible
elementary gates. Despite their constrained form, they can simulate any boolean
function. The synthesis and validation of a reversible circuit simulating a
given function is a difficult problem. In 1973, Bennett proposed to generate
reversible circuits from traces of execution of Turing machines. In this paper,
we propose a novel presentation of this approach, adapted to higher-order
programs. Starting with a PCF-like language, we use a monadic representation of
the trace of execution to turn a regular boolean program into a
circuit-generating code. We show that a circuit traced out of a program
computes the same boolean function as the original program. This technique has
been successfully applied to generate large oracles with the quantum
programming language Quipper.Comment: 21 pages. A shorter preprint has been accepted for publication in the
Proceedings of Reversible Computation 2016. The final publication is
available at http://link.springer.co
Syntax for free: representing syntax with binding using parametricity
We show that, in a parametric model of polymorphism, the type ∀ α. ((α → α) → α) → (α → α → α) → α is isomorphic to closed de Bruijn terms. That is, the type of closed higher-order abstract syntax terms is isomorphic to a concrete representation. To demonstrate the proof we have constructed a model of parametric polymorphism inside the Coq proof assistant. The proof of the theorem requires parametricity over Kripke relations. We also investigate some variants of this representation
- …