scholarly journals Using Vampire in Soundness Proofs of Type Systems

10.29007/22x6 ◽  
2018 ◽  
Author(s):  
Sylvia Grewe ◽  
Sebastian Erdweg ◽  
Mira Mezini

Type systems for programming languages shall detect type errors in programs before runtime. To ensure that a type system meets this requirement, its soundness must be formally verified. We aim at automating soundness proofs of type systems to facilitate the development of sound type systems for domain-specific languages.Soundness proofs for type systems typically require induction. However, many of the proofs of individual induction cases only require first-order reasoning. For the development of our workbench Veritas, we build on this observation by combining automated first-order theorem provers such as Vampire with automated proof strategies specific to type systems. In this paper, we describe how we encode type soundness proofs in first-order logic using TPTP. We show how we use Vampire to prove the soundness of type systems for the simply-typed lambda calculus and for parts of a typed SQL. We report on which parts of the proofs are handled well by Vampire, and what parts work less well with our current approach.

10.29007/pmmz ◽  
2018 ◽  
Author(s):  
Sylvia Grewe ◽  
André Pacak ◽  
Mira Mezini

In our ongoing project VeriTaS, we aim at automating soundness proofs for type sys- tems of domain-specific languages. In the past, we successfully used previous Vampire versions for automatically discharging many intermediate proof obligations arising within standard soundness proofs for small type systems. With older Vampire versions, encoding the individual proof problems required manual encoding of algebraic datatypes via the theory of finite term algebras. One of the new Vampire versions now supports the direct specification of algebraic datatypes and integrates reasoning about term algebras into the internally used superposition calculus.In this work, we investigate how many proof problems that typically arise within type soundness proofs different Vampire 4.1 versions can prove. Our test set consists of proof problems from a progress proof of a type system for a subset of SQL. We compare running Vampire 4.1 with our own encodings of algebraic datatypes (in untyped as well as in typed first-order logic) to running Vampire 4.1 with support for algebraic datatypes, which uses SMTLIB as input format. We observe that with our own encodings, Vampire 4.1 still proves more of our input problems. We discuss the differences between our own encoding of algebraic datatypes and the ones used within Vampire 4.1 with support for algebraic datatypes.


2021 ◽  
Vol 5 (OOPSLA) ◽  
pp. 1-29
Author(s):  
Fabian Wolff ◽  
Aurel Bílý ◽  
Christoph Matheja ◽  
Peter Müller ◽  
Alexander J. Summers

Closures are a language feature supported by many mainstream languages, combining the ability to package up references to code blocks with the possibility of capturing state from the environment of the closure's declaration. Closures are powerful, but complicate understanding and formal reasoning, especially when closure invocations may mutate objects reachable from the captured state or from closure arguments. This paper presents a novel technique for the modular specification and verification of closure-manipulating code in Rust. Our technique combines Rust's type system guarantees and novel specification features to enable formal verification of rich functional properties. It encodes higher-order concerns into a first-order logic, which enables automation via SMT solvers. Our technique is implemented as an extension of the deductive verifier Prusti, with which we have successfully verified many common idioms of closure usage.


2004 ◽  
Vol 14 (5) ◽  
pp. 519-546 ◽  
Author(s):  
MÁRIO FLORIDO ◽  
LUÍS DAMAS

In this paper we present a notion of expansion of a term in the lambda-calculus which transforms terms into linear terms. This transformation replaces each occurrence of a variable in the original term by a fresh variable taking into account non-trivial implications in the structure of the term caused by these simple replacements. We prove that the class of terms which can be expanded is the same of terms typable in an Intersection Type System, i.e. the strongly normalizable terms. We then show that expansion is preserved by weak-head reduction, the reduction considered by functional programming languages.


2016 ◽  
Vol 5 (4) ◽  
pp. 58
Author(s):  
Luminita Pistol ◽  
Radu BUCEA-MANEA-TONIS

This paper aims to demonstrate the usefulness of formal logic and lambda calculus in database programming. After a short introduction in propositional and first order logic, we implement dynamically a small database and translate some SQL queries in filtered java 8 streams, enhanced with Tuples facilities from jOOλ library.   


2007 ◽  
Vol 17 (3) ◽  
pp. 353-386
Author(s):  
GÁBOR M. SURÁNYI

AbstractSafety has become a fundamental requirement in all aspects of computer systems. Object-oriented calculi, such as Castagna's λ&-calculus and its variants (Castagna, 1997) ensure type safety in environments based on the distinguished object-oriented paradigm. Although for safety reasons object invariance and operation specifications are getting widely employed in all stages of the engineering process, they are not supported by these calculi. In this paper, a new calculus is presented which supports term (value) constraints besides the key object-oriented mechanisms (class types, inheritance, overloading with multiple dispatch and late binding). We also show how a type with constraints may realise a role, another useful object-oriented modelling element. The soundness of the type system and the confluence of the notion of reduction of the calculus are considered. The contribution also discusses computability issues partially arising from the use of first-order logic to formalise the constraints.


Author(s):  
Carmen Chui ◽  
Michael Grüninger ◽  
Janette Wong

The near ubiquity of family relationship ontologies in the Semantic Web has brought on the question of whether any formal analysis has been done in this domain. This paper examines kinship relationships that are normally overlooked in formal analyses of domain-specific ontologies: how are such ontologies verified and validated? We draw inspiration from existing work done in anthropology, where attempts have been made to formally model kinship as atemporal algebraic models. Based on these algebraic models, we provide an ontology for kinship written in first-order logic and demonstrate how the ontology can be used to validate definitions found in Canadian legal laws and data collection documentation.


1993 ◽  
Vol 22 (462) ◽  
Author(s):  
Claudio Alberto Hermida

<p>Within the framework of categorical logic/type theory, we provide a category-theoretic account of some logical concepts, i.e. first-order logical predicates for simply typed lambda-calculus, structural induction for inductive data types, and indeterminates for polymorphic calculi.</p><p> </p><p>The main concept which underlies the issues above is that of fibration, which gives an abstract presentation of the indexing present in all cases: predicates indexed by types/contexts in first-order logic and types indexed by kinds in polymorphic calculi.</p><p>The characterisation of the logical concepts in terms of fibrations relies on a fundamental property of adjunctions between fibrations, which in particular relates some structure in the total category of a fibration with that of the fibres. Suitable instances of this property reflect the above-mentioned logical concepts in an abstract way, independently of their syntactic presentation, thereby illuminating their main features.</p>


Sign in / Sign up

Export Citation Format

Share Document