19 research outputs found
Categorical Semantics for Functional Reactive Programming with Temporal Recursion and Corecursion
Functional reactive programming (FRP) makes it possible to express temporal
aspects of computations in a declarative way. Recently we developed two kinds
of categorical models of FRP: abstract process categories (APCs) and concrete
process categories (CPCs). Furthermore we showed that APCs generalize CPCs. In
this paper, we extend APCs with additional structure. This structure models
recursion and corecursion operators that are related to time. We show that the
resulting categorical models generalize those CPCs that impose an additional
constraint on time scales. This constraint boils down to ruling out
-supertasks, which are closely related to Zeno's paradox of Achilles
and the tortoise.Comment: In Proceedings MSFP 2014, arXiv:1406.153
Synchronous Digital Circuits as Functional Programs
Functional programming techniques have been used to describe synchronous digital circuits since the early 1980s and have proven successful at describing certain types of designs. Here we survey the systems and formal underpinnings that constitute this tradition. We situate these techniques with respect to other formal methods for hardware design and discuss the work yet to be done
The Guarded Lambda-Calculus: Programming and Reasoning with Guarded Recursion for Coinductive Types
We present the guarded lambda-calculus, an extension of the simply typed
lambda-calculus with guarded recursive and coinductive types. The use of
guarded recursive types ensures the productivity of well-typed programs.
Guarded recursive types may be transformed into coinductive types by a
type-former inspired by modal logic and Atkey-McBride clock quantification,
allowing the typing of acausal functions. We give a call-by-name operational
semantics for the calculus, and define adequate denotational semantics in the
topos of trees. The adequacy proof entails that the evaluation of a program
always terminates. We introduce a program logic with L\"ob induction for
reasoning about the contextual equivalence of programs. We demonstrate the
expressiveness of the calculus by showing the definability of solutions to
Rutten's behavioural differential equations.Comment: Accepted to Logical Methods in Computer Science special issue on the
18th International Conference on Foundations of Software Science and
Computation Structures (FoSSaCS 2015
A Light Modality for Recursion
We investigate the interplay between a modality for controlling the behaviour
of recursive functional programs on infinite structures which are completely
silent in the syntax. The latter means that programs do not contain "marks"
showing the application of the introduction and elimination rules for the
modality. This shifts the burden of controlling recursion from the programmer
to the compiler. To do this, we introduce a typed lambda calculus a la Curry
with a silent modality and guarded recursive types. The typing discipline
guarantees normalisation and can be transformed into an algorithm which infers
the type of a program.Comment: 32 pages 1 figure in pdf forma
On Well-Founded and Recursive Coalgebras
This paper studies fundamental questions concerning category-theoretic models
of induction and recursion. We are concerned with the relationship between
well-founded and recursive coalgebras for an endofunctor. For monomorphism
preserving endofunctors on complete and well-powered categories every coalgebra
has a well-founded part, and we provide a new, shorter proof that this is the
coreflection in the category of all well-founded coalgebras. We present a new
more general proof of Taylor's General Recursion Theorem that every
well-founded coalgebra is recursive, and we study under which hypothesis the
converse holds. In addition, we present a new equivalent characterization of
well-foundedness: a coalgebra is well-founded iff it admits a
coalgebra-to-algebra morphism to the initial algebra
Components as coalgebras
In the tradition of mathematical modelling in physics and chemistry, constructive formal specification methods are based on the notion of a software model, understood as a state-based abstract machine which persists and evolves in time, according to a behavioural model capturing, for example, partiality or (different degrees of) nondeterminism. This can be identified with the more prosaic notion of a software component advocated by the software industry as ‘building block’ of large, often distributed, systems. Such a component typically encapsulates a number of services through a public interface which provides a limited access to a private state space, paying tribute to the nowadays widespread object-oriented programming principles.
The tradition of communicating systems formal design, by contrast, has developed the notion of a process as an abstraction of the behavioural patterns of a computing system, deliberately ignoring the data and state aspects of software systems.
Both processes and components are among the broad group of computing phenomena which are hardly definable (or simply not definable) algebraically, i.e., in terms of a complete set of constructors. Their semantics is essentially observational, in the sense that all that can be traced of their evolution is their interaction with the environment. Therefore, coalgebras, whose theory has recently witnessed remarkable
developments, appear as a suitable modelling tool.
The basic observation of category theory that universal constructions always come in pairs, has motivated research on the duality between algebras and coalgebras, which provides a bridge between models of static (constructive, data-oriented) and dynamical (observational, behaviour-oriented) systems. At the programming level, the intuitive symmetry between data and behaviour provides evidence of such a duality,
in its canonical initial-final specialisation.
This line of thought entails both definitional and proof principles, i.e., a basis for the development of program calculi directly based on (actually driven by) type specifications. Moreover, such properties can be expressed in terms of generic programming combinators which are used, not only to calculate programs, but also to program with.
Framed in this context, this thesis addresses the following main themes:
The investigation of a semantic model for (state-based) software components. These are regarded as concrete coalgebras for some Set endofunctors,
with specified initial conditions, and organise themselves in a bicategorical setting. The model is able to capture both behavioural issues, which
are usually left implicit in state-based specification methods, and interaction through structured data, which is usually a minor concern on process calculi. Two basic cases are considered entailing, respectively, a ‘functional’ and an ‘object-oriented’ shape for components. Both cases are parametrized by a
model of behaviour, introduced as a strong (usually commutative) monad.
The development of corresponding component calculi, also parametric on the behaviour model, which adds to the genericity of the approach.
The study of processes and the ‘reconstruction’ of classical (CCS-like) process calculi on top of their representation as inhabitants of (the carriers of) final coalgebras, in an essentially pointfree, calculational style.
An overall concern for genericity, in the sense that models and calculi for both components and processes are parametric on the behaviour model and the interaction discipline, respectively.
The animation of both processes and components in CHARITY, a functional programming language entirely based on inductive and coinductive categorical data types. In particular this leads to the development of a process calculi interpreter parametric on the interaction discipline.PRAXIS XXI - Projecto LOGCAMP; POO11/IC-PME/II/S -Projecto KARMA; Fundação para a Ciência e Tecnologia; ALGORITMI Research Center
Dual-Context Calculi for Modal Logic
We present natural deduction systems and associated modal lambda calculi for
the necessity fragments of the normal modal logics K, T, K4, GL and S4. These
systems are in the dual-context style: they feature two distinct zones of
assumptions, one of which can be thought as modal, and the other as
intuitionistic. We show that these calculi have their roots in in sequent
calculi. We then investigate their metatheory, equip them with a confluent and
strongly normalizing notion of reduction, and show that they coincide with the
usual Hilbert systems up to provability. Finally, we investigate a categorical
semantics which interprets the modality as a product-preserving functor
Executable Denotational Semantics With Interaction Trees
Interaction trees are a representation of effectful and reactive systemsdesigned to be implemented in a proof assistant such as Coq. They are equipped with a rich algebra of combinators to construct recursive and effectful computations and to reason about them equationally. Interaction trees are also an executable structure, notably via extraction, which enables testing and directly developing executable programs in Coq. To demonstrate the usefulness of interaction trees, two applications are presented. First, I develop a novel approach to verify a compiler from a simple imperative language to assembly, by proving a semantic preservation theorem which is termination-sensitive, using an equational proof. Second, I present a framework of concurrent objects, inheriting the modularity, compositionality, and executability of interaction trees. Leveraging that framework, I formally prove the correctness of a transactionally predicated map, using a novel approach to reason about objects combining the notions of linearizability and strict serializability, two well-known correctness conditions for concurrent objects