Skip to main content

2017 | OriginalPaper | Buchkapitel

Verified Characteristic Formulae for CakeML

verfasst von : Armaël Guéneau, Magnus O. Myreen, Ramana Kumar, Michael Norrish

Erschienen in: Programming Languages and Systems

Verlag: Springer Berlin Heidelberg

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

search-config
loading …

Abstract

Characteristic Formulae (CF) offer a productive, principled approach to generating verification conditions for higher-order imperative programs, but so far the soundness of CF has only been considered with respect to an informal specification of a programming language (OCaml). This leaves a gap between what is established by the verification framework and the program that actually runs. We present a fully-fledged CF framework for the formally specified CakeML programming language. Our framework extends the existing CF approach to support exceptions and I/O, thereby covering the full feature set of CakeML, and comes with a formally verified soundness theorem. Furthermore, it integrates with existing proof techniques for verifying CakeML programs. This validates the CF approach, and allows users to prove end-to-end theorems for higher-order imperative programs, from specification to language semantics, within a single theorem prover.

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
CakeML’s module system is also supported in our CF framework, but supporting modules did not require extending the original ideas of CFML.
 
2
To be precise: Myreen and Owens [18] show that the tool can also be used for production of stateful CakeML code that maintains a hard-coded invariant over a hard-coded number of references. CF allows for much more flexibility.
 
3
We have recently switched to using strings for port names, while numbers were used previously [26] for FFI port names. Johannes Åman Pohjola made this improvement.
 
4
We would have liked to use a type variable instead of https://static-content.springer.com/image/chp%3A10.1007%2F978-3-662-54434-1_22/442829_1_En_22_IEq185_HTML.gif , but a type variable would have been shared between all partitions. Such sharing would need to be done across FFI partitions which goes against the design goal of local specifications and local reasoning. This is a restriction imposed by the HOL type system, which we could have avoided by using a variant of HOL with quantifiers for type variables [13].
 
5
Our use of projection functions and updates at both a concrete and abstract view of the state bears some resemblance to lenses [21]. Note however that lenses must have get and putback functions. Our set up lacks the putback functions, i.e., we only project in one direction. Our initial formalisation had a putback function, but we decided to simplify the definitions and arrived at the current solution with only a get function, which we call https://static-content.springer.com/image/chp%3A10.1007%2F978-3-662-54434-1_22/442829_1_En_22_IEq195_HTML.gif .
 
Literatur
5.
Zurück zum Zitat Charguéraud, A.: Program verification through characteristic formulae. In: Hudak, P., Weirich, S. (eds.) International Conference on Functional programming (ICFP). ACM (2010) Charguéraud, A.: Program verification through characteristic formulae. In: Hudak, P., Weirich, S. (eds.) International Conference on Functional programming (ICFP). ACM (2010)
6.
Zurück zum Zitat Charguéraud, A.: Characteristic formulae for the verification of imperative programs. In: Chakravarty, M.M.T., Hu, Z., Danvy, O. (eds.) International Conference on Functional Programming (ICFP). ACM (2011). doi:10.1145/2034773.2034828 Charguéraud, A.: Characteristic formulae for the verification of imperative programs. In: Chakravarty, M.M.T., Hu, Z., Danvy, O. (eds.) International Conference on Functional Programming (ICFP). ACM (2011). doi:10.​1145/​2034773.​2034828
7.
Zurück zum Zitat Charguéraud, A., Pottier, F.: Machine-checked verification of the correctness and amortized complexity of an efficient union-find implementation. In: Urban, C., Zhang, X. (eds.) ITP 2015. LNCS, vol. 9236, pp. 137–153. Springer, Heidelberg (2015). doi:10.1007/978-3-319-22102-1_9CrossRef Charguéraud, A., Pottier, F.: Machine-checked verification of the correctness and amortized complexity of an efficient union-find implementation. In: Urban, C., Zhang, X. (eds.) ITP 2015. LNCS, vol. 9236, pp. 137–153. Springer, Heidelberg (2015). doi:10.​1007/​978-3-319-22102-1_​9CrossRef
8.
Zurück zum Zitat Chen, H., Ziegler, D., Chajed, T., Chlipala, A., Kaashoek, M.F., Zeldovich, N.: Using crash hoare logic for certifying the FSCQ file system. In: Gulati, A., Weatherspoon, H. (eds.) USENIX Annual Technical Conference. USENIX Association (2016) Chen, H., Ziegler, D., Chajed, T., Chlipala, A., Kaashoek, M.F., Zeldovich, N.: Using crash hoare logic for certifying the FSCQ file system. In: Gulati, A., Weatherspoon, H. (eds.) USENIX Annual Technical Conference. USENIX Association (2016)
12.
Zurück zum Zitat Greenaway, D., Lim, J., Andronick, J., Klein, G.: Don’t sweat the small stuff: formal verification of C code without the pain. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, Edinburgh, UK, pp. 429–439. ACM, June 2014. doi:10.1145/2594291.2594296 Greenaway, D., Lim, J., Andronick, J., Klein, G.: Don’t sweat the small stuff: formal verification of C code without the pain. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, Edinburgh, UK, pp. 429–439. ACM, June 2014. doi:10.​1145/​2594291.​2594296
14.
Zurück zum Zitat Klein, G., Elphinstone, K., Heiser, G., Andronick, J., Cock, D., Derrin, P., Elkaduwe, D., Engelhardt, K., Kolanski, R., Norrish, M., Sewell, T., Tuch, H., Winwood, S.: seL4: formal verification of an OS kernel. In: ACM Symposium on Operating Systems Principles, Big Sky, MT, USA, pp. 207–220. ACM, October 2009 Klein, G., Elphinstone, K., Heiser, G., Andronick, J., Cock, D., Derrin, P., Elkaduwe, D., Engelhardt, K., Kolanski, R., Norrish, M., Sewell, T., Tuch, H., Winwood, S.: seL4: formal verification of an OS kernel. In: ACM Symposium on Operating Systems Principles, Big Sky, MT, USA, pp. 207–220. ACM, October 2009
15.
Zurück zum Zitat Kumar, R., Myreen, M.O., Norrish, M., Owens, S.: CakeML: a verified implementation of ML. In: Jagannathan, S., Sewell, P. (eds.) Principles of Programming Languages (POPL) (2014). doi:10.1145/2535838.2535841 Kumar, R., Myreen, M.O., Norrish, M., Owens, S.: CakeML: a verified implementation of ML. In: Jagannathan, S., Sewell, P. (eds.) Principles of Programming Languages (POPL) (2014). doi:10.​1145/​2535838.​2535841
21.
Zurück zum Zitat Pierce, B.C.: The weird world of bi-directional programming. ETAPS Invited Talk, March 2006 Pierce, B.C.: The weird world of bi-directional programming. ETAPS Invited Talk, March 2006
22.
Zurück zum Zitat Reynolds, J.C.: Separation logic: a logic for shared mutable data structures. In: Logic in Computer Science (LICS). IEEE Computer Society (2002) Reynolds, J.C.: Separation logic: a logic for shared mutable data structures. In: Logic in Computer Science (LICS). IEEE Computer Society (2002)
26.
Zurück zum Zitat Tan, Y.K., Myreen, M.O., Kumar, R., Fox, A., Owens, S., Norrish, M.: A new verified compiler backend for CakeML. In: International Conference on Functional Programming (ICFP). ACM Press (2016) Tan, Y.K., Myreen, M.O., Kumar, R., Fox, A., Owens, S., Norrish, M.: A new verified compiler backend for CakeML. In: International Conference on Functional Programming (ICFP). ACM Press (2016)
27.
Zurück zum Zitat Urban, C., Zhang, X. (eds.): ITP 2015. LNCS, vol. 9236. Springer, Heidelberg (2015) Urban, C., Zhang, X. (eds.): ITP 2015. LNCS, vol. 9236. Springer, Heidelberg (2015)
Metadaten
Titel
Verified Characteristic Formulae for CakeML
verfasst von
Armaël Guéneau
Magnus O. Myreen
Ramana Kumar
Michael Norrish
Copyright-Jahr
2017
Verlag
Springer Berlin Heidelberg
DOI
https://doi.org/10.1007/978-3-662-54434-1_22