7,351 research outputs found
Introducing a Calculus of Effects and Handlers for Natural Language Semantics
In compositional model-theoretic semantics, researchers assemble
truth-conditions or other kinds of denotations using the lambda calculus. It
was previously observed that the lambda terms and/or the denotations studied
tend to follow the same pattern: they are instances of a monad. In this paper,
we present an extension of the simply-typed lambda calculus that exploits this
uniformity using the recently discovered technique of effect handlers. We prove
that our calculus exhibits some of the key formal properties of the lambda
calculus and we use it to construct a modular semantics for a small fragment
that involves multiple distinct semantic phenomena
Elements of mathematics and logic for computer program analysis
1 Introduction 2 Induction and sequences 2.1 Induction on natural numbers 2.2 Words and sequences 2.3 A digression on set theory 2.4 Induction on words 2.5 Grammar rules and string rewriting 3 Terms 3.1 Definition of terms 3.2 Knaster-Tarski's fixpoint theorem (1927) 3.3 Kleene's fixpoint theorem (1952?) 3.4 Pattern matching and term rewriting 3.5 Models of a term algebra 4 Lambda-calculus 4.1 Definition of λ-calculus 4.2 Church-computable functions 4.3 Kleene-computable functions 4.4 Turing-computable functions 5 Simply-typed lambda-calculus 5.1 Curry-style simply-typed λ-calculus . 5.2 Unification 5.3 Type inference 5.4 Church-style simply-typed λ-calculus 6 First-order logic 6.1 Formulas and truth 6.2 Provability and deduction systems 6.3 Proof terms and Curry-Howard correspondence 7 To go further 8 Solutions to exercises 8.1 Section 2: Induction and sequences 8.2 Section 3: Terms 8.3 Section 4: Lambda-calculus 8.4 Section 5: Simply-typed lambda-calculus 8.5 Section 6: First-order logicMasterIn order to be able to rigorously prove the correctness of a program, one must have a formal definition of: what is a program, syntactically; how it is evaluated, that is, what is its semantics; how to formulate the properties we are interested in; and how to prove them. All this requires to understand some basic mathematical notions like induction, terms, formulas, deduction, etc. These notes are intended to give an introduction to some of these notions
Behavioural Types for Actor Systems
Recent mainstream programming languages such as Erlang or Scala have renewed
the interest on the Actor model of concurrency. However, the literature on the
static analysis of actor systems is still lacking of mature formal methods. In
this paper we present a minimal actor calculus that takes as primitive the
basic constructs of Scala's Actors API. More precisely, actors can send
asynchronous messages, process received messages according to a pattern
matching mechanism, and dynamically create new actors, whose scope can be
extruded by passing actor names as message parameters. Drawing inspiration from
the linear types and session type theories developed for process calculi, we
put forward a behavioural type system that addresses the key issues of an actor
calculus. We then study a safety property dealing with the determinism of
finite actor com- munication. More precisely, we show that well typed and
balanced actor systems are (i) deadlock-free and (ii) any message will
eventually be handled by the target actor, and dually no actor will
indefinitely wait for an expected messag
A type system for components
In modern distributed systems, dynamic reconfiguration, i.e.,
changing at runtime the communication pattern of a program, is chal-
lenging. Generally, it is difficult to guarantee that such modifications will
not disrupt ongoing computations. In a previous paper, a solution to this
problem was proposed by extending the object-oriented language ABS
with a component model allowing the programmer to: i) perform up-
dates on objects by means of communication ports and their rebinding;
and ii) precisely specify when such updates can safely occur in an object
by means of critical sections. However, improper rebind operations could
still occur and lead to runtime errors. The present paper introduces a
type system for this component model that extends the ABS type system
with the notion of ports and a precise analysis that statically enforces
that no object will attempt illegal rebinding
Consistency and Completeness of Rewriting in the Calculus of Constructions
Adding rewriting to a proof assistant based on the Curry-Howard isomorphism,
such as Coq, may greatly improve usability of the tool. Unfortunately adding an
arbitrary set of rewrite rules may render the underlying formal system
undecidable and inconsistent. While ways to ensure termination and confluence,
and hence decidability of type-checking, have already been studied to some
extent, logical consistency has got little attention so far. In this paper we
show that consistency is a consequence of canonicity, which in turn follows
from the assumption that all functions defined by rewrite rules are complete.
We provide a sound and terminating, but necessarily incomplete algorithm to
verify this property. The algorithm accepts all definitions that follow
dependent pattern matching schemes presented by Coquand and studied by McBride
in his PhD thesis. It also accepts many definitions by rewriting, containing
rules which depart from standard pattern matching.Comment: 20 page
A Type System for a Stochastic CLS
The Stochastic Calculus of Looping Sequences is suitable to describe the
evolution of microbiological systems, taking into account the speed of the
described activities. We propose a type system for this calculus that models
how the presence of positive and negative catalysers can modify these speeds.
We claim that types are the right abstraction in order to represent the
interaction between elements without specifying exactly the element positions.
Our claim is supported through an example modelling the lactose operon
- …