15,359 research outputs found
Initial Semantics for higher-order typed syntax in Coq
Initial Semantics aims at characterizing the syntax associated to a signature
as the initial object of some category. We present an initial semantics result
for typed higher-order syntax together with its formalization in the Coq proof
assistant. The main theorem was first proved on paper in the second author's
PhD thesis in 2010, and verified formally shortly afterwards. To a simply-typed
binding signature S over a fixed set T of object types we associate a category
called the category of representations of S. We show that this category has an
initial object Sigma(S). From its construction it will be clear that the object
Sigma(S) merits the name abstract syntax associated to S. Our theorem is
implemented and proved correct in the proof assistant Coq through heavy use of
dependent types. The approach through monads gives rise to an implementation of
syntax where both terms and variables are intrinsically typed, i.e. where the
object types are reflected in the meta-level types. This article is to be seen
as a research article rather than about the formalization of a classical
mathematical result. The nature of our theorem - involving lengthy, technical
proofs and complicated algebraic structures - makes it particularly interesting
for formal verification. Our goal is to promote the use of computer theorem
provers as research tools, and, accordingly, a new way of publishing
mathematical results: a parallel description of a theorem and its formalization
should allow the verification of correct transcription of definitions and
statements into the proof assistant, and straightforward but technical proofs
should be well-hidden in a digital library. We argue that Coq's rich type
theory, combined with its various features such as implicit arguments, allows a
particularly readable formalization and is hence well-suited for communicating
mathematics.Comment: Article as published in JFR (cf. Journal ref). Features some more
example
Initial Semantics for Reduction Rules
We give an algebraic characterization of the syntax and operational semantics
of a class of simply-typed languages, such as the language PCF: we characterize
simply-typed syntax with variable binding and equipped with reduction rules via
a universal property, namely as the initial object of some category of models.
For this purpose, we employ techniques developed in two previous works: in the
first work we model syntactic translations between languages over different
sets of types as initial morphisms in a category of models. In the second work
we characterize untyped syntax with reduction rules as initial object in a
category of models. In the present work, we combine the techniques used earlier
in order to characterize simply-typed syntax with reduction rules as initial
object in a category. The universal property yields an operator which allows to
specify translations---that are semantically faithful by construction---between
languages over possibly different sets of types.
As an example, we upgrade a translation from PCF to the untyped lambda
calculus, given in previous work, to account for reduction in the source and
target. Specifically, we specify a reduction semantics in the source and target
language through suitable rules. By equipping the untyped lambda calculus with
the structure of a model of PCF, initiality yields a translation from PCF to
the lambda calculus, that is faithful with respect to the reduction semantics
specified by the rules.
This paper is an extended version of an article published in the proceedings
of WoLLIC 2012.Comment: Extended version of arXiv:1206.4547, proves a variant of a result of
PhD thesis arXiv:1206.455
Initial Semantics for Strengthened Signatures
We give a new general definition of arity, yielding the companion notions of
signature and associated syntax. This setting is modular in the sense requested
by Ghani and Uustalu: merging two extensions of syntax corresponds to building
an amalgamated sum. These signatures are too general in the sense that we are
not able to prove the existence of an associated syntax in this general
context. So we have to select arities and signatures for which there exists the
desired initial monad. For this, we follow a track opened by Matthes and
Uustalu: we introduce a notion of strengthened arity and prove that the
corresponding signatures have initial semantics (i.e. associated syntax). Our
strengthened arities admit colimits, which allows the treatment of the
\lambda-calculus with explicit substitution.Comment: In Proceedings FICS 2012, arXiv:1202.317
Initial Algebra Semantics for Cyclic Sharing Tree Structures
Terms are a concise representation of tree structures. Since they can be
naturally defined by an inductive type, they offer data structures in
functional programming and mechanised reasoning with useful principles such as
structural induction and structural recursion. However, for graphs or
"tree-like" structures - trees involving cycles and sharing - it remains
unclear what kind of inductive structures exists and how we can faithfully
assign a term representation of them. In this paper we propose a simple term
syntax for cyclic sharing structures that admits structural induction and
recursion principles. We show that the obtained syntax is directly usable in
the functional language Haskell and the proof assistant Agda, as well as
ordinary data structures such as lists and trees. To achieve this goal, we use
a categorical approach to initial algebra semantics in a presheaf category.
That approach follows the line of Fiore, Plotkin and Turi's models of abstract
syntax with variable binding
Extended Initiality for Typed Abstract Syntax
Initial Semantics aims at interpreting the syntax associated to a signature
as the initial object of some category of 'models', yielding induction and
recursion principles for abstract syntax. Zsid\'o proves an initiality result
for simply-typed syntax: given a signature S, the abstract syntax associated to
S constitutes the initial object in a category of models of S in monads.
However, the iteration principle her theorem provides only accounts for
translations between two languages over a fixed set of object types. We
generalize Zsid\'o's notion of model such that object types may vary, yielding
a larger category, while preserving initiality of the syntax therein. Thus we
obtain an extended initiality theorem for typed abstract syntax, in which
translations between terms over different types can be specified via the
associated category-theoretic iteration operator as an initial morphism. Our
definitions ensure that translations specified via initiality are type-safe,
i.e. compatible with the typing in the source and target language in the
obvious sense. Our main example is given via the propositions-as-types
paradigm: we specify propositions and inference rules of classical and
intuitionistic propositional logics through their respective typed signatures.
Afterwards we use the category--theoretic iteration operator to specify a
double negation translation from the former to the latter. A second example is
given by the signature of PCF. For this particular case, we formalize the
theorem in the proof assistant Coq. Afterwards we specify, via the
category-theoretic iteration operator, translations from PCF to the untyped
lambda calculus
Towards a Step Semantics for Story-Driven Modelling
Graph Transformation (GraTra) provides a formal, declarative means of
specifying model transformation. In practice, GraTra rule applications are
often programmed via an additional language with which the order of rule
applications can be suitably controlled.
Story-Driven Modelling (SDM) is a dialect of programmed GraTra, originally
developed as part of the Fujaba CASE tool suite. Using an intuitive,
UML-inspired visual syntax, SDM provides usual imperative control flow
constructs such as sequences, conditionals and loops that are fairly simple,
but whose interaction with individual GraTra rules is nonetheless non-trivial.
In this paper, we present the first results of our ongoing work towards
providing a formal step semantics for SDM, which focuses on the execution of an
SDM specification.Comment: In Proceedings GaM 2016, arXiv:1612.0105
- …