Skip to main content

2020 | OriginalPaper | Buchkapitel

Abstraction and Genericity in Why3

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

The benefits of modularity in programming—abstraction barriers, which allow hiding implementation details behind an opaque interface, and genericity, which allows specializing a single implementation to a variety of underlying data types—apply just as well to deductive program verification, with the additional advantage of helping the automated proof search procedures by reducing the size and complexity of the premises and by instantiating and reusing once-proved properties in a variety of contexts
In this paper, we demonstrate the modularity features of WhyML, the language of the program verification tool Why3. Instead of separating abstract interfaces and fully elaborated implementations, WhyML uses a single concept of module, a collection of abstract and concrete declarations, and a basic operation of cloning which instantiates a module with respect to a given partial substitution, while verifying its soundness. This mechanism brings into WhyML both abstraction and genericity, which we illustrate on a small verified Bloom filter implementation, translated into executable idiomatic C code.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Fußnoten
1
“Cabbage hash can be delicious,” said Alice, “but I would never dare to hash a king.”.
 
2
In this case, due to the specifics of state handling in WhyML, not even abstract functions are allowed to announce a potential write in the https://static-content.springer.com/image/chp%3A10.1007%2F978-3-030-61362-4_7/MediaObjects/505126_1_En_7_Figdj_HTML.gif field, which limits the usefulness of this kind of construction. This may be relaxed in the future.
 
Literatur
1.
Zurück zum Zitat Abrial, J.-R.: The B-Book, Assigning Programs to Meaning. Cambridge University Press, Cambridge (1996)CrossRef Abrial, J.-R.: The B-Book, Assigning Programs to Meaning. Cambridge University Press, Cambridge (1996)CrossRef
4.
Zurück zum Zitat Bloom, B.H.: Space/time trade-offs in hash coding with allowable errors. Commun. ACM 13(7), 422–426 (1970)CrossRef Bloom, B.H.: Space/time trade-offs in hash coding with allowable errors. Commun. ACM 13(7), 422–426 (1970)CrossRef
5.
Zurück zum Zitat Chrzaszcz, J.: Modules in Type Theoryx with Generative Definitions. Ph.D. thesis, Warsaw University, Poland and Université de Paris-Sud (January 2004) Chrzaszcz, J.: Modules in Type Theoryx with Generative Definitions. Ph.D. thesis, Warsaw University, Poland and Université de Paris-Sud (January 2004)
7.
Zurück zum Zitat Jacobs, B., Smans, J., Philippaerts, P., Vogels, F., Penninckx, W., Piessens, F.: VeriFast: a powerful, sound, predictable, fast verifier for C and Java. In: Bobaru, M., Havelund, K., Holzmann, G.J., Joshi, R. (eds.) NFM 2011. LNCS, vol. 6617, pp. 41–55. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-20398-5_4CrossRef Jacobs, B., Smans, J., Philippaerts, P., Vogels, F., Penninckx, W., Piessens, F.: VeriFast: a powerful, sound, predictable, fast verifier for C and Java. In: Bobaru, M., Havelund, K., Holzmann, G.J., Joshi, R. (eds.) NFM 2011. LNCS, vol. 6617, pp. 41–55. Springer, Heidelberg (2011). https://​doi.​org/​10.​1007/​978-3-642-20398-5_​4CrossRef
8.
Zurück zum Zitat Koenig, J., Rustan, K., Leino, M.: Programming language features for refinement. In: Derrick, J., Boiten, E.A., Reeves, S. (eds.) Proceedings of 17th International Workshop on Refinement, Refine@FM 2015. EPTCS, Oslo, Norway, 22 June 2015, vol. 209, pp. 87–106 (2015) Koenig, J., Rustan, K., Leino, M.: Programming language features for refinement. In: Derrick, J., Boiten, E.A., Reeves, S. (eds.) Proceedings of 17th International Workshop on Refinement, Refine@FM 2015. EPTCS, Oslo, Norway, 22 June 2015, vol. 209, pp. 87–106 (2015)
11.
Zurück zum Zitat Leroy, X.: A modular module system. J. Funct. Program. 10(3), 269–303 (2000)CrossRef Leroy, X.: A modular module system. J. Funct. Program. 10(3), 269–303 (2000)CrossRef
12.
Zurück zum Zitat Louridas, P.: Real-World Algorithms: A Beginner’s Guide. The MIT Press, Cambridge (2017)MATH Louridas, P.: Real-World Algorithms: A Beginner’s Guide. The MIT Press, Cambridge (2017)MATH
13.
Zurück zum Zitat Mitzenmacher, M., Upfal, E.: Probability and Computing: Randomized Algorithms and Probabilistic Analysis. Cambridge University Press, New York (2005)CrossRef Mitzenmacher, M., Upfal, E.: Probability and Computing: Randomized Algorithms and Probabilistic Analysis. Cambridge University Press, New York (2005)CrossRef
17.
Zurück zum Zitat Wadler, P., Blott. S.: How to make ad-hoc polymorphism less ad hoc. In: Proceedings of the 16th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1889, pp. 60–76. ACM, New York (1989) Wadler, P., Blott. S.: How to make ad-hoc polymorphism less ad hoc. In: Proceedings of the 16th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1889, pp. 60–76. ACM, New York (1989)
Metadaten
Titel
Abstraction and Genericity in Why3
verfasst von
Jean-Christophe Filliâtre
Andrei Paskevich
Copyright-Jahr
2020
DOI
https://doi.org/10.1007/978-3-030-61362-4_7

Premium Partner