361 research outputs found
Shoggoth: A Formal Foundation for Strategic Rewriting
Rewriting is a versatile and powerful technique used in many domains. Strategic rewriting allows programmers to control the application of rewrite rules by composing individual rewrite rules into complex rewrite strategies. These strategies are semantically complex, as they may be nondeterministic, they may raise errors that trigger backtracking, and they may not terminate.Given such semantic complexity, it is necessary to establish a formal understanding of rewrite strategies and to enable reasoning about them in order to answer questions like: How do we know that a rewrite strategy terminates? How do we know that a rewrite strategy does not fail because we compose two incompatible rewrites? How do we know that a desired property holds after applying a rewrite strategy?In this paper, we introduce Shoggoth: a formal foundation for understanding, analysing and reasoning about strategic rewriting that is capable of answering these questions. We provide a denotational semantics of System S, a core language for strategic rewriting, and prove its equivalence to our big-step operational semantics, which extends existing work by explicitly accounting for divergence. We further define a location-based weakest precondition calculus to enable formal reasoning about rewriting strategies, and we prove this calculus sound with respect to the denotational semantics. We show how this calculus can be used in practice to reason about properties of rewriting strategies, including termination, that they are well-composed, and that desired postconditions hold. The semantics and calculus are formalised in Isabelle/HOL and all proofs are mechanised
Recommended from our members
Automated verification of refinement laws
Demonic refinement algebras are variants of Kleene algebras. Introduced by von Wright as a light-weight variant of the refinement calculus, their intended semantics are positively disjunctive predicate transformers, and their calculus is entirely within first-order equational logic. So, for the first time, off-the-shelf automated theorem proving (ATP) becomes available for refinement proofs. We used ATP to verify a toolkit of basic refinement laws. Based on this toolkit, we then verified two classical complex refinement laws for action systems by ATP: a data refinement law and Back's atomicity refinement law. We also present a refinement law for infinite loops that has been discovered through automated analysis. Our proof experiments not only demonstrate that refinement can effectively be automated, they also compare eleven different ATP systems and suggest that program verification with variants of Kleene algebras yields interesting theorem proving benchmarks. Finally, we apply hypothesis learning techniques that seem indispensable for automating more complex proofs
Searching for a Solution to Program Verification=Equation Solving in CCS
International audienceUnder non-exponential discounting, we develop a dynamic theory for stopping problems in continuous time. Our framework covers discount functions that induce decreasing impatience. Due to the inherent time inconsistency, we look for equilibrium stopping policies, formulated as fixed points of an operator. Under appropriate conditions, fixed-point iterations converge to equilibrium stopping policies. This iterative approach corresponds to the hierarchy of strategic reasoning in game theory and provides “agent-specific” results: it assigns one specific equilibrium stopping policy to each agent according to her initial behavior. In particular, it leads to a precise mathematical connection between the naive behavior and the sophisticated one. Our theory is illustrated in a real options model
On the Expressive Power of User-Defined Effects: Effect Handlers, Monadic Reflection, Delimited Control
We compare the expressive power of three programming abstractions for
user-defined computational effects: Bauer and Pretnar's effect handlers,
Filinski's monadic reflection, and delimited control without
answer-type-modification. This comparison allows a precise discussion about the
relative expressiveness of each programming abstraction. It also demonstrates
the sensitivity of the relative expressiveness of user-defined effects to
seemingly orthogonal language features. We present three calculi, one per
abstraction, extending Levy's call-by-push-value. For each calculus, we present
syntax, operational semantics, a natural type-and-effect system, and, for
effect handlers and monadic reflection, a set-theoretic denotational semantics.
We establish their basic meta-theoretic properties: safety, termination, and,
where applicable, soundness and adequacy. Using Felleisen's notion of a macro
translation, we show that these abstractions can macro-express each other, and
show which translations preserve typeability. We use the adequate finitary
set-theoretic denotational semantics for the monadic calculus to show that
effect handlers cannot be macro-expressed while preserving typeability either
by monadic reflection or by delimited control. We supplement our development
with a mechanised Abella formalisation
- …