285 research outputs found
Generic Trace Semantics via Coinduction
Trace semantics has been defined for various kinds of state-based systems,
notably with different forms of branching such as non-determinism vs.
probability. In this paper we claim to identify one underlying mathematical
structure behind these "trace semantics," namely coinduction in a Kleisli
category. This claim is based on our technical result that, under a suitably
order-enriched setting, a final coalgebra in a Kleisli category is given by an
initial algebra in the category Sets. Formerly the theory of coalgebras has
been employed mostly in Sets where coinduction yields a finer process semantics
of bisimilarity. Therefore this paper extends the application field of
coalgebras, providing a new instance of the principle "process semantics via
coinduction."Comment: To appear in Logical Methods in Computer Science. 36 page
Semantics for Noninterference with Interaction Trees
Noninterference is the strong information-security property that a program does not leak secrets through publicly-visible behavior. In the presence of effects such as nontermination, state, and exceptions, reasoning about noninterference quickly becomes subtle. We advocate using interaction trees (ITrees) to provide compositional mechanized proofs of noninterference for multi-language, effectful, nonterminating programs, while retaining executability of the semantics. We develop important foundations for security analysis with ITrees: two indistinguishability relations, leading to two standard notions of noninterference with adversaries of different strength, along with metatheory libraries for reasoning about each. We demonstrate the utility of our results using a simple imperative language with embedded assembly, along with a compiler into that assembly language
Mechanized semantics
The goal of this lecture is to show how modern theorem provers---in this
case, the Coq proof assistant---can be used to mechanize the specification of
programming languages and their semantics, and to reason over individual
programs and over generic program transformations, as typically found in
compilers. The topics covered include: operational semantics (small-step,
big-step, definitional interpreters); a simple form of denotational semantics;
axiomatic semantics and Hoare logic; generation of verification conditions,
with application to program proof; compilation to virtual machine code and its
proof of correctness; an example of an optimizing program transformation (dead
code elimination) and its proof of correctness
LF+ in Coq for fast-and-loose reasoning
We develop the metatheory and the implementation, in Coq, of the novel logical framework LF+ and discuss several of its applications. LF+ generalises research work, carried out by the authors over more than a decade, on Logical Frameworks conservatively extending LF and featuring lock-type constructors L-P(N:sigma)[center dot]. Lock-types capture monadically the concept of inhabitability up-to. They were originally introduced for factoring-out, postponing, or delegating to external tools the verification of time-consuming judgments, which are morally proof-irrelevant, thus allowing for integrating different sources of epistemic evidence in a unique Logical Framework. Besides introducing LF+ and its "shallow" implementation in Coq, the main novelty of the paper is to show that lock-types are also a very flexible tool for expressing in Type Theory several diverse cognitive attitudes and mental strategies used in ordinary reasoning, which essentially amount to reasoning up-to, as in e.g. Typical Ambiguity provisos or co-inductive Coq proofs. In particular we address the encoding of the emerging paradigm of fast-and-loose reasoning, which trades off efficiency for correctness. This paradigm, implicitly used normally in naive Set Theory, is producing considerable impact also in computer architecture and distributed systems, when branch prediction and optimistic concurrency control are implemented
Formalizing, Verifying and Applying ISA Security Guarantees as Universal Contracts
Progress has recently been made on specifying instruction set architectures
(ISAs) in executable formalisms rather than through prose. However, to date,
those formal specifications are limited to the functional aspects of the ISA
and do not cover its security guarantees. We present a novel, general method
for formally specifying an ISAs security guarantees to (1) balance the needs of
ISA implementations (hardware) and clients (software), (2) can be
semi-automatically verified to hold for the ISA operational semantics,
producing a high-assurance mechanically-verifiable proof, and (3) support
informal and formal reasoning about security-critical software in the presence
of adversarial code. Our method leverages universal contracts: software
contracts that express bounds on the authority of arbitrary untrusted code.
Universal contracts can be kept agnostic of software abstractions, and strike
the right balance between requiring sufficient detail for reasoning about
software and preserving implementation freedom of ISA designers and CPU
implementers. We semi-automatically verify universal contracts against Sail
implementations of ISA semantics using our Katamaran tool; a semi-automatic
separation logic verifier for Sail which produces machine-checked proofs for
successfully verified contracts. We demonstrate the generality of our method by
applying it to two ISAs that offer very different security primitives: (1)
MinimalCaps: a custom-built capability machine ISA and (2) a (somewhat
simplified) version of RISC-V with PMP. We verify a femtokernel using the
security guarantee we have formalized for RISC-V with PMP
Runners in action
Runners of algebraic effects, also known as comodels, provide a mathematical
model of resource management. We show that they also give rise to a programming
concept that models top-level external resources, as well as allows programmers
to modularly define their own intermediate "virtual machines". We capture the
core ideas of programming with runners in an equational calculus
, which we equip with a sound and coherent
denotational semantics that guarantees the linear use of resources and
execution of finalisation code. We accompany with
examples of runners in action, provide a prototype language implementation in
OCaml, as well as a Haskell library based on .Comment: ESOP 2020 final version + online appendi
- …