diff --git a/examples/scholarly_paper/2021-ITP-PMTI/document/root.bib b/examples/scholarly_paper/2021-ITP-PMTI/document/root.bib index 445dbed1..3f5e5480 100644 --- a/examples/scholarly_paper/2021-ITP-PMTI/document/root.bib +++ b/examples/scholarly_paper/2021-ITP-PMTI/document/root.bib @@ -20,6 +20,7 @@ note = {Part of the Isabelle distribution.} } + @TechReport{ bsi:50128:2014, type = {Standard}, key = {BS EN 50128:2011}, @@ -55,6 +56,15 @@ the development, deployment and maintenanceactivities.} } +@inproceedings{naraschewski1998object, + title={Object-oriented verification based on record subtyping in higher-order logic}, + author={Naraschewski, Wolfgang and Wenzel, Markus}, + booktitle={International Conference on Theorem Proving in Higher Order Logics}, + pages={349--366}, + year={1998}, + organization={Springer} +} + @InCollection{ brucker.ea:isabelledof:2019, abstract = {DOF is a novel framework for defining ontologies and enforcing them during document development and evolution. A diff --git a/examples/scholarly_paper/2021-ITP-PMTI/paper.thy b/examples/scholarly_paper/2021-ITP-PMTI/paper.thy index b12c0f3f..0992ada9 100644 --- a/examples/scholarly_paper/2021-ITP-PMTI/paper.thy +++ b/examples/scholarly_paper/2021-ITP-PMTI/paper.thy @@ -378,10 +378,44 @@ text\\<^dof>'s generated antiquotations are part of a general mechanism of \ *) +(*<*) +type_synonym A = int +type_synonym B = int +record T = + x :: A + y :: B +(*>*) + +term "\x = a,y = b\" subsection\Meta-Objects as Extensible Records\ +(* too fat ? what do we need of this ? *) +text\ +Isabelle/HOL supports both fixed and schematic records at the level of terms and +types. The notation for terms and types is as follows: -text\Explain record notation.\ +\<^item> fixed record terms \<^term>\\x = a,y = b\\; fixed record types \\x::A, y::B\\. +\<^item> schematic record terms \<^term>\\x = a,y = b, \ = m::'a\\; + schematic record types: \\x::A, y::B, \ = 'a\\ which were usually abbreviated + to \<^typ>\'a T_scheme\. +\<^item> selectors are written \<^term>\x(R::'a T_scheme)\, \<^term>\y(R::'a T_scheme)\. +\<^item> updates were denoted \<^term>\r\x := a\\y := b\\ or just \<^term>\r\x:=a, y:=b\\. +\ + +text\ ... where the so-called more-field \\\ is used to 'fill-in' record-extensions. +Schematic record types allow for simulating object-oriented features such as +(single-)inheritance while maintaining a compositional style of verification +@{cite "naraschewski1998object"}: it is possible to prove a property \<^term>\P (x::'a T\ +which will remain true for all extensions (which are just instances of the +\<^typ>\'a T\-type). +\ + +text\In \<^dof>, \<^verbatim>\onto_class\es and the logically equivalent \<^verbatim>\doc_class\es were +represented by schematic record types and instances thereof by schematic terms. +Invariants of an \<^verbatim>\onto_class\ are thu predicates over schematic record +types and can therefore be inherited in a subclass. \<^dof> handles the parametric +polymorphism implicitly. +\ subsection\Code-Generation in Isabelle\