221 research outputs found
Synthesis of Strategies Using the Hoare Logic of Angelic and Demonic Nondeterminism
We study a propositional variant of Hoare logic that can be used for
reasoning about programs that exhibit both angelic and demonic nondeterminism.
We work in an uninterpreted setting, where the meaning of the atomic actions is
specified axiomatically using hypotheses of a certain form. Our logical
formalism is entirely compositional and it subsumes the non-compositional
formalism of safety games on finite graphs. We present sound and complete
Hoare-style calculi that are useful for establishing partial-correctness
assertions, as well as for synthesizing implementations. The computational
complexity of the Hoare theory of dual nondeterminism is investigated using
operational models, and it is shown that the theory is complete for exponential
time
Healthiness from Duality
Healthiness is a good old question in program logics that dates back to
Dijkstra. It asks for an intrinsic characterization of those predicate
transformers which arise as the (backward) interpretation of a certain class of
programs. There are several results known for healthiness conditions: for
deterministic programs, nondeterministic ones, probabilistic ones, etc.
Building upon our previous works on so-called state-and-effect triangles, we
contribute a unified categorical framework for investigating healthiness
conditions. We find the framework to be centered around a dual adjunction
induced by a dualizing object, together with our notion of relative
Eilenberg-Moore algebra playing fundamental roles too. The latter notion seems
interesting in its own right in the context of monads, Lawvere theories and
enriched categories.Comment: 13 pages, Extended version with appendices of a paper accepted to
LICS 201
Beyond Good and Evil: Formalizing the Security Guarantees of Compartmentalizing Compilation
Compartmentalization is good security-engineering practice. By breaking a
large software system into mutually distrustful components that run with
minimal privileges, restricting their interactions to conform to well-defined
interfaces, we can limit the damage caused by low-level attacks such as
control-flow hijacking. When used to defend against such attacks,
compartmentalization is often implemented cooperatively by a compiler and a
low-level compartmentalization mechanism. However, the formal guarantees
provided by such compartmentalizing compilation have seen surprisingly little
investigation.
We propose a new security property, secure compartmentalizing compilation
(SCC), that formally characterizes the guarantees provided by
compartmentalizing compilation and clarifies its attacker model. We reconstruct
our property by starting from the well-established notion of fully abstract
compilation, then identifying and lifting three important limitations that make
standard full abstraction unsuitable for compartmentalization. The connection
to full abstraction allows us to prove SCC by adapting established proof
techniques; we illustrate this with a compiler from a simple unsafe imperative
language with procedures to a compartmentalized abstract machine.Comment: Nit
RHLE: Modular Deductive Verification of Relational Properties
Relational program logics are used to prove that a desired relationship holds
between the execution of multiple programs. Existing relational program logics
have focused on verifying that all runs of a collection of programs do not fall
outside a desired set of behaviors. Several important relational properties,
including refinement and noninterference, do not fit into this category, as
they require the existence of specific desirable executions. This paper
presents RHLE, a logic for verifying a class of relational properties which we
term properties. properties assert that for
all executions of a collection of programs, there exist executions of another
set of programs exhibiting some intended behavior. Importantly, RHLE can reason
modularly about programs which make library calls, ensuring that
properties are preserved when the programs are linked with any
valid implementation of the library. To achieve this, we develop a novel form
of function specification that requires the existence of certain behaviors in
valid implementations. We have built a tool based on RHLE which we use to
verify a diverse set of relational properties drawn from the literature,
including refinement and generalized noninterference
Refinement Calculus of Reactive Systems
Refinement calculus is a powerful and expressive tool for reasoning about
sequential programs in a compositional manner. In this paper we present an
extension of refinement calculus for reactive systems. Refinement calculus is
based on monotonic predicate transformers, which transform sets of post-states
into sets of pre-states. To model reactive systems, we introduce monotonic
property transformers, which transform sets of output traces into sets of input
traces. We show how to model in this semantics refinement, sequential
composition, demonic choice, and other semantic operations on reactive systems.
We use primarily higher order logic to express our results, but we also show
how property transformers can be defined using other formalisms more amenable
to automation, such as linear temporal logic (suitable for specifications) and
symbolic transition systems (suitable for implementations). Finally, we show
how this framework generalizes previous work on relational interfaces so as to
be able to express systems with infinite behaviors and liveness properties
CLASS: A Logical Foundation for Typeful Programming with Shared State
Software construction depends on imperative state sharing and concurrency, which are
naturally present in several application domains and are also exploited to improve the
structure and efficiency of computer programs. However, reasoning about concurrency
and shared mutable state is hard, error-prone and the source of many programming bugs,
such as memory leaks, data corruption, deadlocks and non-termination.
In this thesis, we develop CLASS: a core session-based language with a lightweight
substructural type system, that results from a principled extension of the propositions-astypes
correspondence with second-order classical linear logic. More concretely, CLASS
offers support for session-based communication, mutex-protected first-class reference cells,
dynamic state sharing, generic polymorphic algorithms, data abstraction and primitive
recursion.
CLASS expresses and types significant realistic programs, that manipulate memoryefficient
linked data structures (linked lists, binary search trees) with support for updates
in-place, shareable concurrent ADTs (counters, stacks, functional and imperative queues),
resource synchronisation methods (fork-joins, barriers, dining philosophers, generic corecursive
protocols). All of these examples are guaranteed to be safe, a result that follows
by the logical approach.
The linear logical foundations guarantee that well-typed CLASS programs do not
go wrong: they never deadlock on communication or reference cell acquisition, do not
leak memory and always terminate, even if they share complex data structures protected
by synchronisation primitives. Furthermore, since we follow a propositions-as-types
approach, we can reason about the behaviour of concurrent stateful processes by algebraic
program manipulation.
The feasibility of our approach is witnessed by the implementation of a type checker
and interpreter for CLASS, which validates and guides the development of many realistic
programs. The implementation is available with an open-source license, together with
several examples.A construção de software depende de estado partilhado imperativo e concorrência, que
estão naturalmente presentes em vários domínios de aplicação e que também são explorados
para melhorar o a estrutura e o desempenho dos programas. No entanto, raciocinar
sobre concorrência e estado mutável partilhado é difícil e propenso à introdução de erros e
muitos bugs de programação, tais como fugas de memória, corrupção de dados, programas
bloqueados e programas que não terminam a sua execução.
Nesta tese, desenvolvemos CLASS: uma linguagem baseada em sessões, com um
sistema de tipos leve e subestrutural, que resulta de uma extensão metodológica da
correspondência proposições-como-tipos com a lógica linear clássica de segunda ordem.
Mais concretamente, a linguagem CLASS oferece suporte para comunicação baseada em
sessões, células de memória protegidas com mutexes de primeira classe, partilha dinâmica
de estado, algoritmos polimórficos genéricos, abstração de dados e recursão primitiva.
A linguagem CLASS expressa e tipifica programas realistas significativos, que manipulam
estruturas de dados ligadas eficientes (listas ligadas, árvores de pesquisa binária)
suportando actualização imperativa local, TDAs partilhados e concorrentes (contadores,
pilhas, filas funcionais e imperativas), métodos de sincronização e partilha de recursos
(bifurcar-juntar, barreiras, jantar de filósofos, protocolos genéricos corecursivos). Todos
estes exemplos são seguros, uma garantia que resulta da nossa abordagem lógica.
Os fundamentos, baseados na lógica linear, garantem que programas em CLASS bem
tipificados não incorrem em erros: nunca bloqueiam, quer na comunicação, quer na
aquisição de células de memória, nunca causam fugas de memória e terminam sempre,
mesmo que compartilhem estruturas de dados complexas protegidas por primitivas de
sincronização. Além disso, uma vez que seguimos uma abordagem de proposições-comotipos,
podemos raciocinar sobre o comportamento de processos concorrentes, que usam
estado, através de manipulação algébrica.
A viabilidade da nossa abordagem é evidenciada pela implementação de um verificador
de tipos e interpretador para a linguagem CLASS, que valida e orienta o desenvolvimento
de vários programs realistas. A implementação está disponível com uma licença
de acesso livre, juntamente com inúmeros exemplos
The Powerdomain of Indexed Valuations
This paper is about combining nondeterminism and probabilities. We study this phenomenon from a domain theoretic point of view. In domain theory, nondeterminism is modeled using the notion of powerdomain, while probability is modeled using the powerdomain of valuations. Those two functors do not combine well, as they are. We define the notion of powerdomain of indexed valuations, which can be combined nicely with the usual nondeterministic powerdomain. We show an equational characterization of our construction. Finally we discuss the computational meaning of indexed valuations, and we show how they can be used, by giving a denotational semantics of a simple imperative language
Relational Cost Analysis for Functional-Imperative Programs
Relational cost analysis aims at formally establishing bounds on the
difference in the evaluation costs of two programs. As a particular case, one
can also use relational cost analysis to establish bounds on the difference in
the evaluation cost of the same program on two different inputs. One way to
perform relational cost analysis is to use a relational type-and-effect system
that supports reasoning about relations between two executions of two programs.
Building on this basic idea, we present a type-and-effect system, called
ARel, for reasoning about the relative cost of array-manipulating, higher-order
functional-imperative programs. The key ingredient of our approach is a new
lightweight type refinement discipline that we use to track relations
(differences) between two arrays. This discipline combined with Hoare-style
triples built into the types allows us to express and establish precise
relative costs of several interesting programs which imperatively update their
data.Comment: 14 page
Fixpoint semantics for logic programming a survey
AbstractThe variety of semantical approaches that have been invented for logic programs is quite broad, drawing on classical and many-valued logic, lattice theory, game theory, and topology. One source of this richness is the inherent non-monotonicity of its negation, something that does not have close parallels with the machinery of other programming paradigms. Nonetheless, much of the work on logic programming semantics seems to exist side by side with similar work done for imperative and functional programming, with relatively minimal contact between communities. In this paper we summarize one variety of approaches to the semantics of logic programs: that based on fixpoint theory. We do not attempt to cover much beyond this single area, which is already remarkably fruitful. We hope readers will see parallels with, and the divergences from the better known fixpoint treatments developed for other programming methodologies
Modeling Time in Computing: A Taxonomy and a Comparative Survey
The increasing relevance of areas such as real-time and embedded systems,
pervasive computing, hybrid systems control, and biological and social systems
modeling is bringing a growing attention to the temporal aspects of computing,
not only in the computer science domain, but also in more traditional fields of
engineering.
This article surveys various approaches to the formal modeling and analysis
of the temporal features of computer-based systems, with a level of detail that
is suitable also for non-specialists. In doing so, it provides a unifying
framework, rather than just a comprehensive list of formalisms.
The paper first lays out some key dimensions along which the various
formalisms can be evaluated and compared. Then, a significant sample of
formalisms for time modeling in computing are presented and discussed according
to these dimensions. The adopted perspective is, to some extent, historical,
going from "traditional" models and formalisms to more modern ones.Comment: More typos fixe
- …