Abstract
We propose an automation-friendly set theory for the B method. This theory is expressed using first order logic extended to polymorphic types and rewriting. Rewriting is introduced along the lines of deduction modulo theory, where axioms are turned into rewrite rules over both propositions and terms. We also provide experimental results of several tools able to deal with polymorphism and rewriting over a benchmark of problems in pure set theory (i.e. without arithmetic).
Access provided by CONRICYT-eBooks. Download conference paper PDF
Similar content being viewed by others
Keywords
1 Introduction
In this paper, we present the set theory of the B method [1] using polymorphic types and rewriting. Expressed this way, this theory has the benefit of being quite automatable for several reasons. In particular, the use of polymorphism allows us to make the theory more synthetic by removing some typing predicates, which therefore improves proof search. As for rewriting, it is introduced along the lines of deduction modulo theory [5], where axioms are turned into rewrite rules over both propositions and terms. Deduction modulo theory has proved to be also very useful to improve proof search when integrated to usual automated proof techniques. In this paper, we also aim to advertise that more and more automated tools are able to deal with polymorphic types and rewriting, and we provide some experimental results involving the latest versions of these tools.
2 A Set Theory with Polymorphism and Rewriting for B
In the following, we consider the pure set theory part of the B method, i.e. the material introduced in Chap. 2 of the B-Book [1]. This part of the B theory is suitable as it can be easily turned into a theory that is compatible with deduction modulo theory, i.e. where a large part of axioms can be turned into rewrite rules. We therefore transform whenever possible the axioms and definitions into rewrite rules. The resulting theory is summarized in Figs. 1 and 2, where we omit the set \(\mathsf {BIG}\) and the sets defined in extension.
As can be seen, the proposed theory is typed, using first order logic extended to polymorphic types à la ML, through a type system in the spirit of [2]. This extension to polymorphic types offers more flexibility, and allows us to deal with theories that rely on elaborate type systems, like the B set theory. The complete type system used here can be found in [3]. The type constructors, i.e. \(\mathsf {tup}\) for tuples and \(\mathsf {set}\) for sets, and type schemes of the considered set constructs are provided in Fig. 3 of Appendix A, where Type is the type of types and \(o\) the type of formulas. Type arguments are subscript annotations of the construct, and to improve readability, we remove the type annotations in tuples when they are redundant with the membership construct.
3 Experimental Results
To test the previous theory, we consider 319 lemmasFootnote 1 coming from Chap. 2 of the B-Book [1]. As tools, we consider automated theorem provers able to deal with polymorphic types and rewriting natively. Our set of tools includes: Zenon Modulo (version 0.4.2), a tableau-based prover that is an extension of Zenon to deduction modulo theory; ArchSAT (development versionFootnote 2), a prover that combines a SAT solver with tableau calculus and rewriting; and Zipperposition (version 1.5), a prover based on superposition and rewriting. To show the impact of rewriting over the results, we also include the Alt-Ergo SMT solver (version 1.01), which deals with polymorphic types but not rewriting.
The experiment was run on an Intel Xeon E5-1650 v3 3.50 GHz computer, with a timeout of 90 s and a memory limit of 1 GiB. The results are summarized in Table 1. These results show the high performances, in terms of proved problems, obtained by the provers extended to rewriting, Zipperposition and ArchSAT in particular, compared to the SMT approach of Alt-Ergo. Looking at the cumulative times, Alt-Ergo is not really faster than Zipperposition and ArchSAT, which take more time to find few more difficult problems (with a timeout of 3 s, they respectively find 303 and 260 proofs in 17.61 s and 16.61 s, while Alt-Ergo finds the same number of proofs). The low results of Zenon Modulo are probably due to the fact that it uses a heuristic to transform the axioms into rewrite rules.
4 Conclusion
In light of the previous experimental results and as perspectives, we aim to apply our approach, consisting of a B set theory using polymorphic types and rewriting together with appropriate tools (Zenon Modulo, ArchSAT, and Zipperposition), to proof obligations coming from the formalization of real-world applications. In particular, we plan to use the benchmark provided by the industrial partners of the BWare project [4], which gathers about 13,000 proof obligations.
Notes
- 1.
The benchmark is available at: https://github.com/delahayd/bset.
- 2.
Git version 7720d8c, available at: https://gforge.inria.fr/projects/archsat.
References
Abrial, J.-R.: The B-Book, Assigning Programs to Meanings. Cambridge University Press, Cambridge (1996). ISBN 0521496195
Blanchette, J.C., Paskevich, A.: TFF1: the TPTP typed first-order form with rank-1 polymorphism. In: Bonacina, M.P. (ed.) CADE 2013. LNCS (LNAI), vol. 7898, pp. 414–420. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-38574-2_29
Bury, G., Delahaye, D., Doligez, D., Halmagrand, P., Hermant, O.: Automated deduction in the B set theory using typed proof search and deduction modulo. In: Fehnker, A., McIver, A., Sutcliffe, G., Voronkov, A. (eds.) Logic for Programming, Artificial Intelligence and Reasoning (LPAR) - Short Presentations, vol. 35, pp. 42–58. EasyChair, Suva (Fiji), November 2015
Delahaye, D., Dubois, C., Marché, C., Mentré, D.: The BWare project: building a proof platform for the automated verification of B proof obligations. In: Ameur, Y.A., Schewe, K.-D. (eds.) ABZ 2014. LNCS, vol. 8477, pp. 126–127. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-43652-3_26
Dowek, G., Hardin, T., Kirchner, C.: Theorem proving modulo. J. Autom. Reasoning (JAR) 31(1), 33–72 (2003)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
A Typing of the B Set Theory
A Typing of the B Set Theory
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG, part of Springer Nature
About this paper
Cite this paper
Bury, G., Cruanes, S., Delahaye, D., Euvrard, PL. (2018). An Automation-Friendly Set Theory for the B Method. In: Butler, M., Raschke, A., Hoang, T., Reichl, K. (eds) Abstract State Machines, Alloy, B, TLA, VDM, and Z. ABZ 2018. Lecture Notes in Computer Science(), vol 10817. Springer, Cham. https://doi.org/10.1007/978-3-319-91271-4_32
Download citation
DOI: https://doi.org/10.1007/978-3-319-91271-4_32
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-91270-7
Online ISBN: 978-3-319-91271-4
eBook Packages: Computer ScienceComputer Science (R0)