diff --git a/.config b/.config index 692faa9..494272c 100755 --- a/.config +++ b/.config @@ -6,9 +6,9 @@ DOF_LATEST_DOI="10.5281/zenodo.3370483" DOF_GENERIC_DOI="10.5281/zenodo.3370482" # # Isabelle and AFP Configuration -ISABELLE_VERSION="Isabelle2020: April 2020" -ISABELLE_URL="https://isabelle.in.tum.de/website-Isabelle2020/" -AFP_DATE="afp-2020-04-20" +ISABELLE_VERSION="Isabelle2021: February 2021" +ISABELLE_URL="https://isabelle.in.tum.de/website-Isabelle2021/" +AFP_DATE="afp-2021-03-09" AFP_URL="https://www.isa-afp.org/release/"$AFP_DATE".tar.gz" # # Isabelle/DOF Repository Configuration diff --git a/README.md b/README.md index 0446833..23db051 100755 --- a/README.md +++ b/README.md @@ -20,11 +20,11 @@ foo@bar:~$ docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-u Isabelle/DOF has two major pre-requisites: -* **Isabelle:** Isabelle/DOF requires [Isabelle 2020](http://isabelle.in.tum.de/website-Isabelle2020/). - Please download the Isabelle 2020 distribution for your operating - system from the [Isabelle website](http://isabelle.in.tum.de/website-Isabelle2020/). -* **LaTeX:** Isabelle/DOF requires a modern pdfTeX-engine supporting the \expanded{}-primitive. This - is, for example, included in the [TeXLive 2019](https://www.tug.org/texlive/) (or later) +* **Isabelle:** Isabelle/DOF requires [Isabelle 2021](http://isabelle.in.tum.de/website-Isabelle2021/). + Please download the Isabelle 2021 distribution for your operating + system from the [Isabelle website](http://isabelle.in.tum.de/website-Isabelle2021/). +* **LaTeX:** Isabelle/DOF requires a modern TeX-engine supporting the \expanded{}-primitive. This + is, for example, included in the [TeXLive 2020](https://www.tug.org/texlive/) (or later) distribution. Please follow the [TeXLive installation instructions](https://www.tug.org/texlive/acquire-netinstall.html) for installing TeXLive. @@ -41,7 +41,7 @@ one), the full path to the ``isabelle`` command needs to be passed as using the ``--isabelle`` command line argument of the ``install`` script: ```console -foo@bar:~$ ./install --isabelle /usr/local/Isabelle2020/bin/isabelle +foo@bar:~$ ./install --isabelle /usr/local/Isabelle2021/bin/isabelle ``` For further command line options of the installer, please use the diff --git a/examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/preamble.tex b/examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/preamble.tex index 1cccaa2..b52751b 100755 --- a/examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/preamble.tex +++ b/examples/scholarly_paper/2018-cicm-isabelle_dof-applications/document/preamble.tex @@ -22,7 +22,6 @@ \usepackage{listings} \usepackage{lstisadof} \usepackage{xspace} -\usepackage[draft]{fixme} \lstloadlanguages{bash} \lstdefinestyle{bash}{language=bash, diff --git a/examples/technical_report/Isabelle_DOF-Manual/00_Frontmatter.thy b/examples/technical_report/Isabelle_DOF-Manual/00_Frontmatter.thy index 42848a2..c31eeea 100755 --- a/examples/technical_report/Isabelle_DOF-Manual/00_Frontmatter.thy +++ b/examples/technical_report/Isabelle_DOF-Manual/00_Frontmatter.thy @@ -1,7 +1,7 @@ (************************************************************************* * Copyright (C) - * 2019-2020 The University of Exeter - * 2018-2020 The University of Paris-Saclay + * 2019-2021 The University of Exeter + * 2018-2021 The University of Paris-Saclay * 2018 The University of Sheffield * * License: @@ -18,7 +18,7 @@ begin section\Local Document Setup.\ -text\... introducing document specific abbreviations and macros.\ +text\Introducing document specific abbreviations and macros:\ define_shortcut* dof \ \\dof\ isadof \ \\isadof\ @@ -28,7 +28,6 @@ define_shortcut* TeXLive \ \\TeXLive\ LaTeX \ \\LaTeX{}\ TeX \ \\TeX{}\ pdf \ \PDF\ - pdftex \ \\pdftex{}\ text\Note that these setups assume that the associated \<^LaTeX> macros are defined, \<^eg>, in the document prelude. \ @@ -94,9 +93,6 @@ setup\(* std_text_antiquotation \<^binding>\my_text\ # boxed_bash_antiquotation \<^binding>\boxed_bash\ \ - - - open_monitor*[this::report] (*>*) @@ -140,7 +136,8 @@ abstract*[abs, keywordlist="[\Ontology\, \Ontological Modelin the link between formal and informal content in documents in a machine checked way. These links can connect both text elements as well as formal modelling elements such as terms, definitions, code and logical formulas, - alltogether *\integrated\ in a state-of-the-art interactive theorem prover. + alltogether \<^emph>\integrated\ in a state-of-the-art interactive theorem prover. + \ (*<*) diff --git a/examples/technical_report/Isabelle_DOF-Manual/01_Introduction.thy b/examples/technical_report/Isabelle_DOF-Manual/01_Introduction.thy index 79f5a19..7acdcf5 100755 --- a/examples/technical_report/Isabelle_DOF-Manual/01_Introduction.thy +++ b/examples/technical_report/Isabelle_DOF-Manual/01_Introduction.thy @@ -91,7 +91,7 @@ text\ by simp\} \<^item> a green background for examples of generated document fragments (\<^ie>, PDF output): @{boxed_pdf [display] \The axiom refl\} - \<^item> a red background for For (S)ML-code: + \<^item> a red background for (S)ML-code: @{boxed_sml [display] \fun id x = x\} \<^item> a yellow background for \LaTeX-code: @{boxed_latex [display] \\newcommand{\refl}{$x = x$}\} diff --git a/examples/technical_report/Isabelle_DOF-Manual/02_Background.thy b/examples/technical_report/Isabelle_DOF-Manual/02_Background.thy index 9ef9592..820b971 100755 --- a/examples/technical_report/Isabelle_DOF-Manual/02_Background.thy +++ b/examples/technical_report/Isabelle_DOF-Manual/02_Background.thy @@ -47,7 +47,7 @@ The current system framework offers moreover the following features: The Isabelle system architecture shown in @{docitem \architecture\} comes with many layers, with Standard ML (SML) at the bottom layer as implementation language. The architecture actually -foresees a \<^emph>\Nano-Kernel\ (our terminology) which resides in the SML structure \inlinesml{Context}. +foresees a \<^emph>\Nano-Kernel\ (our terminology) which resides in the SML structure\<^boxed_sml>\Context\. This structure provides a kind of container called \<^emph>\context\ providing an identity, an ancestor-list as well as typed, user-defined state for components (plugins) such as \<^isadof>. On top of the latter, the LCF-Kernel, tactics, automated proof procedures as well as specific @@ -56,9 +56,9 @@ support for higher specification constructs were built.\ section*[dof::introduction]\The Document Model Required by \<^dof>\ text\ In this section, we explain the assumed document model underlying our Document Ontology Framework - (\<^dof>) in general. In particular we discuss the concepts \<^emph>\integrated document\ - \<^bindex>\integrated document\, \<^emph>\sub-document\, \<^bindex>\sub-document\, - \<^emph>\text-element\ \<^bindex>\text-element\ and \<^emph>\semantic macros\ \<^bindex>\semantic macros\ occurring + (\<^dof>) in general. In particular we discuss the concepts + \<^emph>\integrated document\\<^bindex>\integrated document\, \<^emph>\sub-document\\<^bindex>\sub-document\, + \<^emph>\text-element\\<^bindex>\text-element\, and \<^emph>\semantic macros\\<^bindex>\semantic macros\ occurring inside text-elements. Furthermore, we assume two different levels of parsers (for \<^emph>\outer\ and \<^emph>\inner syntax\) where the inner-syntax is basically a typed \\\-calculus and some Higher-order Logic (HOL)\<^bindex>\HOL\. @@ -81,14 +81,14 @@ text\ any context. The context-definition contains an \<^boxed_theory_text>\import\ and a \<^boxed_theory_text>\keyword\ section, for example: @{boxed_theory_text [display]\ - theory Example (* Name of the 'theory' *) - imports (* Declaration of 'theory' dependencies *) - Main (* Imports a library called 'Main' *) - keywords (* Registration of keywords defined locally *) - requirement (* A command for describing requirements *)\} - where \<^boxed_theory_text>\Example\ is the abstract name of the text-file, \<^boxed_theory_text>\Main\ refers to an - imported theory (recall that the import relation must be acyclic) and \<^boxed_theory_text>\keywords\ are - used to separate commands from each other. + theory Example \\Name of the 'theory'\ + imports \\Declaration of 'theory' dependencies\ + Main \\Imports a library called 'Main'\ + keywords \\Registration of keywords defined locally\ + requirement \\A command for describing requirements\ \} + where \<^boxed_theory_text>\Example\ is the abstract name of the text-file, \<^boxed_theory_text>\Main\ + refers to an imported theory (recall that the import relation must be acyclic) and + \<^boxed_theory_text>\keywords\ are used to separate commands from each other. \ text\ A text-element \<^index>\text-element\ may look like this: @@ -98,18 +98,16 @@ text\ According to the \<^emph>\reflexivity\ axiom @{thm refl we obtain in \ for @{term "fac 5"} the result @{value "fac 5"}.\\} so it is a command \<^theory_text>\text\ followed by an argument (here in \\ ... \\ paranthesis) which contains characters and and a special notation for semantic macros \<^bindex>\semantic macros\ -(here in the notation \<^theory_text>\@{term "fac 5"}).\ +(here \<^theory_text>\@{term "fac 5"}).\ \ text\ - We distinguish fundamentally two different syntactic levels: \<^item> the \<^emph>\outer-syntax\\<^bindex>\syntax!outer\\<^index>\outer syntax|see {syntax, outer}\ (\<^ie>, the syntax for commands) is processed by a lexer-library and parser combinators built on top, and \<^item> the \<^emph>\inner-syntax\\<^bindex>\syntax!inner\\<^index>\inner syntax|see {syntax, inner}\ (\<^ie>, the syntax for \\\-terms in HOL) with its own parametric polymorphism type checking. - On the semantic level, we assume a validation process for an integrated document, where the semantics of a command is a transformation \\ \ \\ for some system state \\\. This document model can be instantiated with outer-syntax commands for common @@ -142,7 +140,7 @@ for $\operatorname{fac} \text{\textrm{5}}$ the result $\text{\textrm{120}}$.\A Theory-Graph in the Document Model. \ -section*[bgrnd21::introduction]\Implementability of the Required Document Model.\ +section*[bgrnd21::introduction]\Implementability of the Required Document Model\ text\ Batch-mode checkers for \<^dof> can be implemented in all systems of the LCF-style prover family, \<^ie>, systems with a type-checked \term\, and abstract \thm\-type for theorems @@ -153,9 +151,8 @@ text\ "wenzel:system:2014" and "barras.ea:pervasive:2013" and "faithfull.ea:coqoon:2018"} which in many features over-accomplishes the required features of \<^dof>. For example, current Isabelle versions offer cascade-syntaxes (different syntaxes and even parser-technologies which can be - nested along the \\...\\ barriers, while \<^dof> actually only requires a two-level syntax model. + nested along the \\...\\ barriers), while \<^dof> actually only requires a two-level syntax model. \ -(* end experiment *) figure*["fig:dof-ide"::figure,relative_width="95",src="''figures/cicm2018-combined''"]\ The \<^isadof> IDE (left) and the corresponding PDF (right), showing the first page @@ -182,7 +179,6 @@ text\ sub-documents into sessions, \<^ie>, sub-graphs of the document-structure that can be ``pre-compiled'' and loaded instantaneously, \<^ie>, without re-processing, which is an important means to scale up. \ - (*<*) end (*>*) diff --git a/examples/technical_report/Isabelle_DOF-Manual/03_GuidedTour.thy b/examples/technical_report/Isabelle_DOF-Manual/03_GuidedTour.thy index 6805a41..90b7d37 100755 --- a/examples/technical_report/Isabelle_DOF-Manual/03_GuidedTour.thy +++ b/examples/technical_report/Isabelle_DOF-Manual/03_GuidedTour.thy @@ -1,7 +1,7 @@ (************************************************************************* * Copyright (C) - * 2019 The University of Exeter - * 2018-2019 The University of Paris-Saclay + * 2019-2021 The University of Exeter + * 2018-2021 The University of Paris-Saclay * 2018 The University of Sheffield * * License: @@ -35,89 +35,55 @@ available on \href{https://cloud.docker.com/u/logicalhacking/}{Docker Hub}. Thus \href{https://www.docker.com}{Docker} installed and your installation of Docker supports X11 application, you can start \<^isadof> as follows: -@{boxed_bash [display] -\ë\prompt{}ë docker run -ti --rm -e DISPLAY=$DISPLAY \ +@{boxed_bash [display] \ë\prompt{}ë docker run -ti --rm -e DISPLAY=$DISPLAY \ -v /tmp/.X11-unix:/tmp/.X11-unix \ logicalhacking/isabelle_dof-ë\doflatestversionë_ë\MakeLowercase{\isabellelatestversion}ë \ - isabelle jedit -\} + isabelle jedit\} \ subsection*[installation::technical]\Installation\ text\ In this section, we will show how to install \<^isadof> and its pre-requisites: Isabelle and \<^LaTeX>. We assume a basic familiarity with a Linux/Unix-like command line (i.e., a shell). + + \<^isadof> requires Isabelle\<^bindex>\Isabelle\ (\isabellefullversion) with a recent \<^LaTeX>-distribution + (e.g., TexLive 2020 or later). + \<^isadof> uses a two-part version system (e.g., 1.0.0/2020), where the first part is the version + of \<^isadof> (using semantic versioning) and the second part is the supported version of Isabelle. + Thus, the same version of \<^isadof> might be available for different versions of Isabelle. \ -subsubsection*[prerequisites::technical]\Pre-requisites\ +paragraph\Installing Isabelle.\ text\ - \<^isadof> has to major pre-requisites: - \<^item> \<^bold>\Isabelle\\<^bindex>\Isabelle\ (\isabellefullversion). - \<^isadof> uses a two-part version system (e.g., 1.0.0/2020), where the first part is the version - of \<^isadof> (using semantic versioning) and the second part is the supported version of Isabelle. - Thus, the same version of \<^isadof> might be available for different versions of Isabelle. - \<^item> \<^bold>\\<^TeXLive> 2020\\<^bindex>\TexLive@\<^TeXLive>\ (or any other modern \<^LaTeX>-distribution where - \<^pdftex> supports the \<^boxed_latex>\\expanded\ primitive). - \<^footnote>\see \<^url>\https://www.texdev.net/2018/12/06/a-new-primitive-expanded\\ -\ - -paragraph\Installing Isabelle\ -text\ -%\enlargethispage{\baselineskip} - Please download and install the Isabelle \isabelleversion distribution for your operating system - from the \href{\isabelleurl}{Isabelle website} (\url{\isabelleurl}). After the successful - installation of Isabelle, you should be able to call the \<^boxed_bash>\isabelle\ tool on the - command line: - -\begin{bash} -ë\prompt{}ë isabelle version -ë\isabellefullversionë -\end{bash} -% bu : do not know why this does not work here ... -%@ {boxed_bash [display]\ -%ë\prompt{}ë isabelle version -%ë\isabellefullversionë -%\} + Please download and install Isabelle (version: \isabelleversion) from the + \href{\isabelleurl}{Isabelle website} (\url{\isabelleurl}). After the + successful installation of Isabelle, you should be able to call the \<^boxed_bash>\isabelle\ + tool on the command line: +@{boxed_bash [display]\ë\prompt{}ë isabelle version +ë\isabellefullversionë\} Depending on your operating system and depending if you put Isabelle's \<^boxed_bash>\bin\ directory in your \<^boxed_bash>\PATH\, you will need to invoke \<^boxed_bash>\isabelle\ using its full qualified path, \<^eg>: - -\begin{bash} -ë\prompt{}ë /usr/local/Isabelleë\isabelleversion/ëbin/isabelle version -ë\isabellefullversionë -\end{bash} - -%@ {boxed_bash [display]\ -%ë\prompt{}ë /usr/local/Isabelleë\isabelleversion/ëbin/isabelle version -%ë\isabellefullversionë -%\} +@{boxed_bash [display]\ë\prompt{}ë /usr/local/Isabelleë\isabelleversionë/bin/isabelle version +ë\isabellefullversionë\} \ -paragraph\Installing \<^TeXLive>\ +paragraph\Installing \<^TeXLive>.\ text\ Modern Linux distribution will allow you to install \<^TeXLive> using their respective package managers. On a modern Debian system or a Debian derivative (\<^eg>, Ubuntu), the following command should install all required \<^LaTeX> packages: - -\begin{bash} -ë\prompt{}ë sudo aptitude install texlive-latex-extra texlive-fonts-extra -\end{bash} -%@ {boxed_bash [display]\ -%ë\prompt{}ë sudo aptitude install texlive-latex-extra texlive-fonts-extra -%\} +@{boxed_bash [display]\ë\prompt{}ë sudo aptitude install texlive-latex-extra texlive-fonts-extra\} \ subsubsection*[isadof::technical]\Installing \<^isadof>\ text\ In the following, we assume that you already downloaded the \<^isadof> distribution (\href{\isadofarchiveurl}{\isadofarchiven}) from the \<^isadof> web site. The main steps for - installing are extracting the \<^isadof> distribution and calling its \inlinebash|install| script. + installing are extracting the \<^isadof> distribution and calling its \<^boxed_bash>\install\ script. We start by extracting the \<^isadof> archive: - -\begin{bash} -ë\prompt{}ë tar xf ë\href{\isadofarchiveurl}{\isadofarchiven}ë -\end{bash} +@{boxed_bash [display]\ë\prompt{}ë tar xf ë\href{\isadofarchiveurl}{\isadofarchiven}ë\} This will create a directory \texttt{\isadofdirn} containing \<^isadof> distribution. Next, we need to invoke the \<^boxed_bash>\install\ script. If necessary, the installations automatically downloads additional dependencies from the AFP (\<^url>\https://www.isa-afp.org\), @@ -132,24 +98,23 @@ If the \<^boxed_bash>\isabelle\ tool is not in your \<^boxed_bash> path of the \<^boxed_bash>\isabelle\ tool ( \<^boxed_bash>\install --help\ gives you an overview of all available configuration options): -\begin{bash} -ë\prompt{}ë cd ë\isadofdirnë +@{boxed_bash [display]\ë\prompt{}ë cd ë\isadofdirnë ë\prompt{\isadofdirn}ë ./install --isabelle /usr/local/Isabelleë\isabelleversion/bin/isabelleë Isabelle/DOF Installer ====================== * Checking Isabelle version: Success: found supported Isabelle version ë(\isabellefullversion)ë -* Checking (La)TeX installation: - Success: pdftex supports \expanded{} primitive. * Check availability of Isabelle/DOF patch: Warning: Isabelle/DOF patch is not available or outdated. Trying to patch system .... Applied patch successfully, Isabelle/HOL will be rebuilt during the next start of Isabelle. -* Checking availability of AFP entries: - Warning: could not find AFP entry Regular-Sets. - Warning: could not find AFP entry Functional-Automata. +* Checking availability of AFP entries:\} + +@{boxed_bash [display] +\ëë Warning: could not find AFP entry Regular-Sets. + Warning: could not find AFP entry Functional-Automata. Trying to install AFP (this might take a few *minutes*) .... Registering Regular-Sets iëën /home/achim/.isabelle/Isabelleë\isabelleversion/ROOTSë @@ -170,26 +135,76 @@ Isabelle/DOF Installer /home/achim/.isabelle/Isabelleë\isabelleversion/etc/settingsë * Installation successful. Enjoy Isabelle/DOF, you can build the session Isabelle/DOF and all example documents by executing: - /usr/local/Isabelleë\isabelleversion/bin/isabelleë build -D . -\end{bash} + /usr/local/Isabelleë\isabelleversion/bin/isabelleë build -D . \} -After the successful installation, you can now explore the examples (in the sub-directory -\inlinebash|examples| or create your own project. On the first start, the session -\inlinebash|Isabelle_DOF| will be built automatically. If you want to pre-build this +After the successful installation, you can explore the examples (in the sub-directory +\<^boxed_bash>\examples\ or create your own project. On the first start, the session +\<^boxed_bash>\Isabelle_DOF\ will be built automatically. If you want to pre-build this session and all example documents, execute: - -\begin{bash} -ë\prompt{\isadofdirn}ë isabelle build -D . -\end{bash} +@{boxed_bash [display]\ë\prompt{\isadofdirn}ë isabelle build -D . \} \ subsection*[first_project::technical]\Creating an \<^isadof> Project\ text\ \<^isadof> provides its own variant of Isabelle's - \inlinebash|mkroot| tool, called \inlinebash|mkroot_DOF|:\index{mkroot\_DOF} + \<^boxed_bash>\mkroot\ tool, called \<^boxed_bash>\mkroot_DOF\\index{mkroot\_DOF}: +@{boxed_bash [display]\ë\prompt{}ë isabelle mkroot_DOF myproject -\begin{bash} -ë\prompt{}ë isabelle mkroot_DOF -h +Preparing session "myproject" iëën "myproject" + creating "myproject/ROOT" + creating "myproject/document/root.tex" + +Now use the following coëëmmand line to build the session: + isabelle build -D myproject \} + The created project uses the default configuration (the ontology for writing academic papers + (scholarly\_paper) using a report layout based on the article class (\<^boxed_latex>\scrartcl\) of + the KOMA-Script bundle~@{cite "kohm:koma-script:2019"}. The directory \<^boxed_bash>\myproject\ + contains the \<^isadof>-setup for your new document. To check the document formally, including the + generation of the document in PDF, you only need to execute + +@{boxed_bash [display]\ë\prompt{}ë isabelle build -d . myproject \} + +The dictory \<^boxed_bash>\myproject\ contains the following files and directories: +\begin{center} +\begin{minipage}{.9\textwidth} +\dirtree{% +.1 . +.2 myproject. +.3 document. +.4 build\DTcomment{Build Script}. +.4 isadof.cfg\DTcomment{\<^isadof> configuraiton}. +.4 preamble.tex\DTcomment{Manual \<^LaTeX>-configuration}. +.3 ROOT\DTcomment{Isabelle build-configuration}. +} +\end{minipage} +\end{center} +The \<^isadof> configuration (\<^boxed_bash>\isadof.cfg\) specifies the required +ontologies and the document template using a YAML syntax.\<^footnote>\Isabelle power users will recognize that +\<^isadof>'s document setup does not make use of a file \<^boxed_bash>\root.tex\: this file is +replaced by built-in document templates.\ The main two configuration files for +users are: +\<^item> The file \<^boxed_bash>\ROOT\\<^index>\ROOT\, which defines the Isabelle session. New theory files as well as new + files required by the document generation (\<^eg>, images, bibliography database using \<^BibTeX>, local + \<^LaTeX>-styles) need to be registered in this file. For details of Isabelle's build system, please + consult the Isabelle System Manual~@{cite "wenzel:system-manual:2020"}. +\<^item> The file \<^boxed_bash>\preamble.tex\\<^index>\preamble.tex\, which allows users to add additional + \<^LaTeX>-packages or to add/modify \<^LaTeX>-commands. +\ + +text\ + Creating a new document setup requires two decisions: + \<^item> which ontologies (\<^eg>, scholarly\_paper) are required and + \<^item> which document template (layout)\index{document template} should be used + (\<^eg>, scrartcl\index{scrartcl}). Some templates (\<^eg>, lncs) require that the users manually + obtains and adds the necessary \<^LaTeX> class file (\<^eg>, \<^boxed_bash>\llncs.cls\. + This is due to licensing restrictions).\ +text\ + This can be configured by using the command-line options of of \<^boxed_bash>\mkroot_DOF\. In + Particular, \<^boxed_bash>\-o\ allows selecting the ontology and \<^boxed_bash>\-t\ allows to selecting + the document template. The built-in help (using \<^boxed_bash>\-h\) shows all available options + as well as a complete list of the available document templates and ontologies: + + @{boxed_bash [display]\ë\prompt{}ë isabelle mkroot_DOF -h Usage: isabelle mkroot_DOF [OPTIONS] [DIR] @@ -209,70 +224,12 @@ Usage: isabelle mkroot_DOF [OPTIONS] [DIR] * scrreprt-modern * scrreprt - Prepare session root DIR (default: current directory). -\end{bash} + Prepare session root DIR (default: current directory). \} - Creating a new document setup requires two decisions: - \<^item> which ontologies (\<^eg>, scholarly\_paper) are required and - \<^item> which document template (layout)\index{document template} should be used - (\<^eg>, scrartcl\index{scrartcl}). Some templates (\<^eg>, lncs) require that the users manually - obtains and adds the necessary \<^LaTeX> class file (\<^eg>, \inlinebash|llncs.cls|. - This is due to licensing restrictions). -\ -text\ - If you are happy with the defaults, \ie, using the ontology for writing academic papers - (scholarly\_paper) using a report layout based on the article class (\inlineltx|scrartcl|) of - the KOMA-Script bundle~@{cite "kohm:koma-script:2019"}, you can create your first project - \inlinebash|myproject| as follows: - -\begin{bash} -ë\prompt{}ë isabelle mkroot_DOF myproject - -Preparing session "myproject" iëën "myproject" - creating "myproject/ROOT" - creating "myproject/document/root.tex" - -Now use the following coëëmmand line to build the session: - isabelle build -D myproject -\end{bash} - - This creates a directory \inlinebash|myproject| containing the \<^isadof>-setup for your - new document. To check the document formally, including the generation of the document in PDF, - you only need to execute - -\begin{bash} -ë\prompt{}ë isabelle build -d . myproject -\end{bash} - -This will create the directory \inlinebash|myproject|: -\begin{center} -\begin{minipage}{.9\textwidth} -\dirtree{% -.1 . -.2 myproject. -.3 document. -.4 build\DTcomment{Build Script}. -.4 isadof.cfg\DTcomment{\<^isadof> configuraiton}. -.4 preamble.tex\DTcomment{Manual \<^LaTeX>-configuration}. -.3 ROOT\DTcomment{Isabelle build-configuration}. -} -\end{minipage} -\end{center} -The \<^isadof> configuration (\inlinebash|isadof.cfg|) specifies the required -ontologies and the document template using a YAML syntax.\<^footnote>\Isabelle power users will recognize that -\<^isadof>'s document setup does not make use of a file \inlinebash|root.tex|: this file is -replaced by built-in document templates.\ The main two configuration files for -users are: -\<^item> The file \<^boxed_bash>\ROOT\\<^index>\ROOT\, which defines the Isabelle session. New theory files as well as new - files required by the document generation (\<^eg>, images, bibliography database using \<^BibTeX>, local - \<^LaTeX>-styles) need to be registered in this file. For details of Isabelle's build system, please - consult the Isabelle System Manual~@{cite "wenzel:system-manual:2020"}. -\<^item> The file \<^boxed_bash>\praemble.tex\\<^index>\praemble.tex\, which allows users to add additional - \<^LaTeX>-packages or to add/modify \<^LaTeX>-commands. \ section*[scholar_onto::example]\Writing Academic Publications in \<^boxed_theory_text>\scholarly_paper\\ -subsection\Papers in freeform-style\ +subsection\Writing Academic Papers\ text\ The ontology \<^boxed_theory_text>\scholarly_paper\ \<^index>\ontology!scholarly\_paper\ is an ontology modeling @@ -284,7 +241,7 @@ text\ \<^enum> The iFM 2020 paper~@{cite "taha.ea:philosophers:2020"} is a typical mathematical text, heavy in definitions with complex mathematical notation and a lot of non-trivial cross-referencing between statements, definitions and proofs which is ontologically tracked. However, wrt. - to the possible linking between the underlying formal theory and this mathematical presentation, + the possible linking between the underlying formal theory and this mathematical presentation, it follows a pragmatic path without any ``deep'' linking to types, terms and theorems, deliberately not exploiting \<^isadof> 's full potential with this regard. \<^enum> In the CICM 2018 paper~@{cite "brucker.ea:isabelle-ontologies:2018"}, we deliberately @@ -302,17 +259,13 @@ text\ \nolinkurl{examples/scholarly_paper/2018-cicm-isabelle_dof-applications/IsaDofApplications.thy}. \<^item> starting Isabelle/jedit from the command line by,\<^eg>, calling: - \begin{bash} -ë\prompt{\isadofdirn}ë - isabelle jedit -d . examples/scholarly_paper/2020-iFM-CSP/paper.thy -\end{bash} +@{boxed_bash [display]\ë\prompt{\isadofdirn}ë + isabelle jedit -d . examples/scholarly_paper/2020-iFM-CSP/paper.thy \} \ -(* We should discuss if we shouldn't put the iFM paper more in the foreground *) + text\ You can build the PDF-document at the command line by calling: - -@{boxed_bash [display] -\ë\prompt{}ë isabelle build -d . 2020-iFM-csp \} +@{boxed_bash [display] \ë\prompt{}ë isabelle build -d . 2020-iFM-csp \} \ subsection*[sss::technical]\A Bluffers Guide to the \<^verbatim>\scholarly_paper\ Ontology\ @@ -346,7 +299,7 @@ context of this document; this is a decisive feature of \<^isadof> that conventi languages lack.\ text\We continue by the introduction of a main class: the text-element \text_section\ (in contrast -to \figure\ or \table\ or similar. Note that +to \figure\ or \table\ or similar). Note that the \main_author\ is typed with the class \author\, a HOL type that is automatically derived from the document class definition \author\ shown above. It is used to express which author currently ``owns'' this \text_section\, an information that can give rise to presentational or even @@ -436,22 +389,6 @@ standard inductive \<^theory_text>\datatype\ definition mechanism i for attibute declarations. Vice-versa, document class definitions imply a corresponding HOL type definition. \ -(* For Achim zum spielen... -text\For example, this allows the following presentation in the source: -@{boxed_theory_text [display] \ -text*[X2::"definition"]\\RUN A \ \ X. \ x \ A \ X\ \<^vs>\-0.7cm\\ -text*[X3::"definition"]\\CHAOS A \ \ X. (STOP \ (\ x \ A \ X))\ \<^vs>\-0.7cm\\ -text*[X4::"definition"]\\CHAOS\<^sub>S\<^sub>K\<^sub>I\<^sub>P A \ \ X. (SKIP \ STOP \ (\ x \ A \ X))\\<^vs>\-0.7cm\\ - -text\ The \RUN\-process defined @{definition X2} represents the process that accepts all -events, but never stops nor deadlocks. The \CHAOS\-process comes in two variants shown in -@{definition X3} and @{definition X4}: the process that non-deterministically stops or -accepts any offered event, wheras \CHAOS\<^sub>S\<^sub>K\<^sub>I\<^sub>P\ can additionaly terminate.\ -\} -\ -*) - -(* alternative *) figure*[fig01::figure,spawn_columns=False,relative_width="95",src="''figures/definition-use-CSP.png''"] \ A screenshot of the integrated source with definitions ...\ text\An example for a sequence of (Isabelle-formula-) texts, their ontological declarations as @@ -460,11 +397,15 @@ later is shown in \<^figure>\fig01\ in its presentation as the inte Note that the use in the ontology-generated antiquotation \<^theory_text>\@{definition X4}\ is type-checked; referencing \<^verbatim>\X4\ as \<^theory_text>\theorem\ would be a type-error and be reported directly -by \<^isadof> in Isabelle/jEdit. Note further, that if referenced correctly wrt. to the sub-typing +by \<^isadof> in Isabelle/jEdit. Note further, that if referenced correctly wrt. the sub-typing hierarchy makes \<^verbatim>\X4\ \<^emph>\navigable\ in Isabelle/jedit; a click will cause the IDE to present the defining occurrence of this text-element in the integrated source. -Note, further, how \<^isadof>-commands like \<^theory_text>\text*\ interact with standard Isabelle document +% TODO: +% The definition \<^theory_text>\@{definition X4}\ is not present in the screenshot, +% it might be better to use \<^theory_text>\@{definition X22}\. + +Note, further, how \<^isadof>-commands like \<^theory_text>\text*\ interact with standard Isabelle document antiquotations described in the Isabelle Isar Reference Manual in Chapter 4.2 in great detail. We refrain ourselves here to briefly describe three freeform antiquotations used her in this text: @@ -477,58 +418,20 @@ We refrain ourselves here to briefly describe three freeform antiquotations used \<^item> the freeform antiquotations for verbatim, emphasized, bold, or footnote text elements. \ +figure*[fig02::figure,spawn_columns=False,relative_width="95",src="''figures/definition-use-CSP-pdf.png''"] + \ ... and the corresponding pdf-oputput.\ + text\ \<^isadof> text-elements such as \<^theory_text>\text*\ allow to have such standard term-antiquotations inside their text, permitting to give the whole text entity a formal, referentiable status with typed meta- information attached to it that may be used for presentation issues, search, or other technical -purposes. +purposes. The corresponding output of this snippet in the integrated source is shown in \<^figure>\fig02\. \ -figure*[fig02::figure,spawn_columns=False,relative_width="95",src="''figures/definition-use-CSP-pdf.png''"] - \ ... and the corresponding pdf-oputput.\ - - -text\The corresponding output of this snippet in the integrated source is shown in\<^figure>\fig02\. \ subsection*[scholar_pide::example]\More Freeform Elements, and Resulting Navigation\ -(* -figure*[fig1::figure,spawn_columns=False,relative_width="95",src="''figures/Dogfood-Intro''"] - \ Ouroboros I: This paper from inside \ldots \ - -text\ - @{docitem \fig1\} shows the corresponding view in the Isabelle/jedit of the start of an academic - paper. The text uses \<^isadof>'s own text-commands containing the meta-information provided by the - underlying ontology. We proceed by a definition of \<^boxed_theory_text>\introduction\'s, which we define - as the extension of \<^boxed_theory_text>\text_section\ which is intended to capture common infrastructure: - -@{boxed_theory_text [display]\ -doc_class introduction = text_section + - comment :: string -\} - - As a consequence of the definition as extension, the \<^boxed_theory_text>\introduction\ class - inherits the attributes \<^boxed_theory_text>\main_author\ and \<^boxed_theory_text>\todo_list\ - together with the corresponding default values. - - We proceed more or less conventionally by the subsequent sections: - -@{boxed_theory_text [display]\ -doc_class technical = text_section + - definition_list :: "string list" <= "[]" - -doc_class example = text_section + - comment :: string - -doc_class conclusion = text_section + - main_author :: "author option" <= None - -doc_class related_work = conclusion + - main_author :: "author option" <= None - -\} -*) text\ In the following, we present some other text-elements provided by the Common Ontology Library -in @{theory "Isabelle_DOF.Isa_COL"}. it provides a document class for figures: +in @{theory "Isabelle_DOF.Isa_COL"}. It provides a document class for figures: @{boxed_theory_text [display]\ datatype placement = h | t | b | ht | hb @@ -559,8 +462,12 @@ text\ where "(title ~~ \subtitle\ ~~ \author\$^+$+ ~~ abstract ~~ introduction ~~ \technical || example\$^+$ ~~ conclusion ~~ bibliography)" - \} + \}\ + (* % TODO: + % Update to the new implementation. + % where is deprecated and the new implementation uses accepts and rejects. *) +text\ In a integrated document source, the body of the content can be paranthesized into: @{boxed_theory_text [display]\ @@ -594,9 +501,8 @@ text\ meta-information. Clicking on a document class identifier permits to hyperlink into the corresponding class definition (\autoref{fig:Dogfood-IV-jumpInDocCLass}); hovering over an attribute-definition (which is qualified in order to disambiguate; - \autoref{fig:Dogfood-V-attribute}). + \autoref{fig:Dogfood-V-attribute}) shows its type. \ -(* Bu : This autoref stuff could be avoided if we would finally have monitors over figures... *) figure*[figDogfoodVIlinkappl::figure,relative_width="80",src="''figures/Dogfood-V-attribute''"] \ Exploring an attribute (hyperlinked to the class). \ @@ -621,16 +527,12 @@ text\ \nolinkurl{examples/CENELEC_50128/mini_odo/mini_odo.thy}. \<^item> starting Isabelle/jedit from the command line by calling: - \begin{bash} -ë\prompt{\isadofdirn}ë - isabelle jedit examples/CENELEC_50128/mini_odo/mini_odo.thy -\end{bash} +@{boxed_bash [display]\ë\prompt{\isadofdirn}ë + isabelle jedit examples/CENELEC_50128/mini_odo/mini_odo.thy \} \ text\\<^noindent> Finally, you \<^item> can build the PDF-document by calling: - \begin{bash} -ë\prompt{}ë isabelle build mini_odo -\end{bash} +@{boxed_bash [display]\ë\prompt{}ë isabelle build mini_odo \} \ subsection\Modeling CENELEC 50128\ @@ -646,12 +548,10 @@ text\ processes. Making the link-structure machine-checkable, be it between requirements, assumptions, their implementation and their discharge by evidence (be it tests, proofs, or authoritative arguments), has the potential in our view to decrease the cost of software developments - targeting certifications. Note that continuously checking the links between the formal and the - semi-formal parts of such documents is particularly valuable during the development, - which is usually a collaborative effort. + targeting certifications. As in many other cases, formal certification documents come with an own terminology and pragmatics - of what has to be demonstrated and where, and how the trace-ability of requirements through + of what has to be demonstrated and where, and how the traceability of requirements through design-models over code to system environment assumptions has to be assured. In the sequel, we present a simplified version of an ontological model used in a @@ -663,7 +563,11 @@ doc_class requirement = long_name :: "string option" doc_class requirement_analysis = no :: "nat" where "requirement_item +" - +(* +% TODO: +% Update to the new implementation. +% where is deprecated and the new implementation uses accepts and rejects. +*) doc_class hypothesis = requirement + hyp_type :: hyp_type <= physical (* default *) @@ -675,7 +579,7 @@ doc_class assumption = requirement + Such ontologies can be enriched by larger explanations and examples, which may help the team of engineers substantially when developing the central document for a certification, -like an explication what is precisely the difference between an \<^emph>\hypothesis\ and an +like an explication of what is precisely the difference between an \<^emph>\hypothesis\ and an \<^emph>\assumption\ in the context of the evaluation standard. Since the PIDE makes for each document class its definition available by a simple mouse-click, this kind on meta-knowledge can be made far more accessible during the document evolution. @@ -683,23 +587,23 @@ can be made far more accessible during the document evolution. For example, the term of category \<^emph>\assumption\ is used for domain-specific assumptions. It has formal, semi-formal and informal sub-categories. They have to be tracked and discharged by appropriate validation procedures within a -certification process, by it by test or proof. It is different from a hypothesis, which is +certification process, be it by test or proof. It is different from a hypothesis, which is globally assumed and accepted. In the sequel, the category \<^emph>\exported constraint\ (or \<^emph>\ec\ for short) is used for formal assumptions, that arise during the analysis, design or implementation and have to be tracked till the final evaluation target, and discharged by appropriate validation procedures -within the certification process, by it by test or proof. A particular class of interest -is the category \<^emph>\safety related application condition\ (or \<^emph>\srac\ +within the certification process, be it by test or proof. A particular class of interest +is the category \<^emph>\safety related application condition\ (or \<^emph>\SRAC\ for short) which is used for \<^emph>\ec\'s that establish safety properties -of the evaluation target. Their track-ability throughout the certification +of the evaluation target. Their traceability throughout the certification is therefore particularly critical. This is naturally modeled as follows: @{boxed_theory_text [display]\ doc_class ec = assumption + assumption_kind :: ass_kind <= (*default *) formal -doc_class srac = ec + +doc_class SRAC = ec + assumption_kind :: ass_kind <= (*default *) formal \} @@ -725,12 +629,18 @@ subsection*[ontopide::technical]\Editing Support for CENELEC 50128\ figure*[figfig3::figure,relative_width="95",src="''figures/antiquotations-PIDE''"] \ Standard antiquotations referring to theory elements.\ text\ The corresponding view in @{docitem \figfig3\} shows core part of a document -conformimg to the CENELEC 50128 ontology. The first sample shows standard Isabelle antiquotations +conforming to the CENELEC 50128 ontology. The first sample shows standard Isabelle antiquotations @{cite "wenzel:isabelle-isar:2020"} into formal entities of a theory. This way, the informal parts of a document get ``formal content'' and become more robust under change.\ figure*[figfig5::figure, relative_width="95", src="''figures/srac-definition''"] \ Defining a "SRAC" in the integrated source \ldots \ +text\ +TODO: +The screenshot (figures/srac-definition) of the figure figfig5 should be updated +to have a SRAC type in uppercase. +\ + figure*[figfig7::figure, relative_width="95", src="''figures/srac-as-es-application''"] \ Using a "SRAC" as "EC" document element. \ text\ The subsequent sample in @{figure \figfig5\} shows the definition of an @@ -742,130 +652,6 @@ safety-related condition; however, this happens in a context where general \<^em are listed. \<^isadof>'s checks establish that this is legal in the given ontology. \ -(* -section*[math_exam::example]\Writing Exams (math\_exam)\ -subsection\The Math Exam Example\ -text\ - The ontology ``math\_exam''\index{ontology!math\_exam} is an experimental ontology modeling - the process of writing exams at higher education institution in the United Kingdom, where exams - undergo both an internal and external review process. The \<^isadof> distribution contains a tiny - example using the ontology ``math\_exam'' in the directory - \nolinkurl{examples/math_exam/MathExam/}. You can inspect/edit the example - in Isabelle's IDE, by either - \<^item> starting Isabelle/jedit using your graphical user interface (\<^eg>, by clicking on the - Isabelle-Icon provided by the Isabelle installation) and loading the file - \nolinkurl{examples/math_exam/MathExam/MathExam.thy}. - \<^item> starting Isabelle/jedit from the command line by calling: - - \begin{bash} -ë\prompt{\isadofdirn}ë - isabelle jedit examples/math_exam/MathExam/MathExam.thy -\end{bash} -\ -text\ - You can build the PDF-document by calling: - - \begin{bash} -ë\prompt{}ë isabelle build MathExam -\end{bash} -\ - -subsection\Modeling Exams\ -text\ - The math-exam scenario is an application with mixed formal and semi-formal content. It addresses - applications where the author of the exam is not present during the exam and the preparation - requires a very rigorous process. - - We assume that the content has four different types of addressees, which have a different - \<^emph>\view\ on the integrated document: - \<^item> the \<^emph>\setter\, \ie, the author of the exam, - \<^item> the \<^emph>\checker\, \ie, an internal person that checks - the exam for feasibility and non-ambiguity, - \<^item> the \<^emph>\external\, \ie, an external person that checks - the exam for feasibility and non-ambiguity, and - \<^item> the \<^emph>\student\, \ie, the addressee of the exam. -\ -text\ - The latter quality assurance mechanism is used in many universities, - where for organizational reasons the execution of an exam takes place in facilities - where the author of the exam is not expected to be physically present. - Furthermore, we assume a simple grade system (thus, some calculation is required). We - can model this as follows: - -@{boxed_theory_text [display]\ -doc_class Author = ... -datatype Subject = algebra | geometry | statistical -datatype Grade = A1 | A2 | A3 -doc_class Header = examTitle :: string - examSubject :: Subject - date :: string - timeAllowed :: int -- minutes -datatype ContentClass = setter - | checker - | external_examiner - | student -doc_class Exam_item = concerns :: "ContentClass set" -doc_class Exam_item = concerns :: "ContentClass set" - -type_synonym SubQuestion = string -\} - - The heart of this ontology is an alternation of questions and answers, where the answers can - consist of simple yes-no answers or lists of formulas. Since we do not assume familiarity of - the students with Isabelle (\<^boxed_theory_text>\term\ would assume that this is a parse-able and - type-checkable entity), we basically model a derivation as a sequence of strings: - -@{boxed_theory_text [display]\ -doc_class Answer_Formal_Step = Exam_item + - justification :: string - "term" :: "string" - -doc_class Answer_YesNo = Exam_item + - step_label :: string - yes_no :: bool -- \for checkboxes\ - -datatype Question_Type = - formal | informal | mixed - -doc_class Task = Exam_item + - level :: Level - type :: Question_Type - subitems :: "(SubQuestion * - (Answer_Formal_Step list + Answer_YesNo) list) list" - concerns :: "ContentClass set" <= "UNIV" - mark :: int -doc_class Exercise = Exam_item + - type :: Question_Type - content :: "(Task) list" - concerns :: "ContentClass set" <= "UNIV" - mark :: int -\} - -In many institutions, having a rigorous process of validation for exam subjects makes sense: is -the initial question correct? Is a proof in the sense of the question possible? We model the -possibility that the @{term examiner} validates a question by a sample proof validated by Isabelle: - -@{boxed_theory_text [display]\ -doc_class Validation = - tests :: "term list" <="[]" - proofs :: "thm list" <="[]" - -doc_class Solution = Exam_item + - content :: "Exercise list" - valids :: "Validation list" - concerns :: "ContentClass set" <= "{setter,checker,external_examiner}" - -doc_class MathExam= - content :: "(Header + Author + Exercise) list" - global_grade :: Grade - where "\Author\$^+$ ~~ Header ~~ \Exercise ~~ Solution\$^+$ " -\} - -In our scenario this sample proofs are completely \<^emph>\intern\, \ie, not exposed to the -students but just additional material for the internal review process of the exam. -\ - -*) section*[tech_onto::example]\Writing Technical Reports in \<^boxed_theory_text>\technical_report\\ text\While it is perfectly possible to write documents in the @@ -882,27 +668,25 @@ underlying logical context, which turns the arguments into \<^emph>\formal source, in contrast to the free-form antiquotations which basically influence the presentation. We still mention a few of these document antiquotations here: -\<^item> \<^theory_text>\@{thm \refl\}\ ou \<^theory_text>\@{thm [display] \refl\}\ check that \<^theory_text>\refl\ is indeed a reference +\<^item> \<^theory_text>\@{thm \refl\}\ or \<^theory_text>\@{thm [display] \refl\}\ check that \<^theory_text>\refl\ is indeed a reference to a theorem; the additional "style" argument changes the presentation by printing the formula into the output instead of the reference itself, \<^item> \<^theory_text>\@{lemma \prop\ } by \method\\ allows to derive \prop\ on the fly, thus garantee that it is a corrollary of the current context, \<^item> \<^theory_text>\@{term \term\ }\ parses and type-checks \term\, \<^item> \<^theory_text>\@{value \term\ }\ performs the evaluation of \term\, -\<^item> \<^theory_text>\@{ML \ml-term\ }\ pa,rses and type-checks \ml-term\, +\<^item> \<^theory_text>\@{ML \ml-term\ }\ parses and type-checks \ml-term\, \<^item> \<^theory_text>\@{ML_file \ml-file\ }\ parses the path for \ml-file\ and - verifies its existance in the (Isabelle-virtual) file-system, -\<^item> ... - -Note that there are options to display sub-parts of formulas etc., but it is a consequence + verifies its existance in the (Isabelle-virtual) file-system. +\ +text\There are options to display sub-parts of formulas etc., but it is a consequence of tight-checking that the information must be given complete and exactly in the syntax of Isabelle. This may be over-precise and a burden to readers not familiar with Isabelle, which may motivate authors to choose the aforementioned freeform-style. \ -subsection\A \<^verbatim>\technical_report\ in tight-checking-style: \MyCommentedIsabelle\ - Programming Manual \ - -text\An example of tight checking is a small programming programming manual developed by the +subsection\A Technical Report with Tight Checking\ +text\An example of tight checking is a small programming manual developed by the second author in order to document programming trick discoveries while implementing in Isabelle. While not necessarily a meeting standards of a scientific text, it appears to us that this information is often missing in the Isabelle community. @@ -914,29 +698,13 @@ So its value is that readers can just reuse some of these snippets and adapt the purposes. \ -(* -@{boxed_theory_text [display] \ -text\Finally, a number of commonly used "squigglish" combinators is listed: - -\<^item> @{ML "op ! : 'a Unsynchronized.ref->'a"}, access operation on a program variable -\<^item> @{ML "op := : ('a Unsynchronized.ref * 'a)->unit"}, update operation on a program variable -\<^item> @{ML "op #> : ('a->'b) * ('b->'c)->'a->'c"}, a reversed function composition -\<^item> @{ML "op o : (('b->'c) * ('a->'b))->'a->'c"}, function composition -\<^item> @{ML "op || : ('a->'b) * ('a->'b) -> 'a -> 'b"}, parse alternative -\<^item> @{ML "op -- : ('a->'b*'c) * ('c->'d*'e)->'a->('b*'d)*'e"}, parse pair -\<^item> @{ML "op ? : bool * ('a->'a)->'a->'a"}, if then else -\<^item> @{ML "I : 'a -> 'a"}, the I combinator -\<^item> @{ML "K : 'a -> 'b -> 'a"}, the K combinator \ -\} -*) - figure*[strict_SS::figure, relative_width="95", src="''figures/MyCommentedIsabelle.png''"] \A table with a number of SML functions, together with their type.\ text\ -\MyCommentedIsabelle\ is written according to the @{theory "Isabelle_DOF.technical_report"} -ontology. \<^figure>\strict_SS\ shows a snippet from this integrated source gives an idea why -it tight-checking allows for keeping track of underlying Isabelle changes: +\TR_MyCommentedIsabelle\ is written according to the @{theory "Isabelle_DOF.technical_report"} +ontology. \<^figure>\strict_SS\ shows a snippet from this integrated source and gives an idea why +its tight-checking allows for keeping track of underlying Isabelle changes: Any reference to an SML operation in some library module is type-checked, and the displayed SML-type really corresponds to the type of the operations in the underlying SML environment. In the pdf output, these text-fragments were displayed verbatim. @@ -946,12 +714,12 @@ In the pdf output, these text-fragments were displayed verbatim. section\Style Guide\ text\ - The document generation process of \<^isadof> is based on Isabelle's document generation framework, + The document generation of \<^isadof> is based on Isabelle's document generation framework, using \<^LaTeX>{} as the underlying back-end. As Isabelle's document generation framework, it is possible to embed (nearly) arbitrary \<^LaTeX>-commands in text-commands, \<^eg>: @{boxed_theory_text [display]\ -text\ This is \emph{emphasized} a$$nd this is a +text\ This is \emph{emphasized} and this is a citation~\cite{brucker.ea:isabelle-ontologies:2018}\ \} @@ -959,8 +727,8 @@ text\ This is \emph{emphasized} a$$nd this is a Isabelle) provided alternatives: @{boxed_theory_text [display]\ -text\ This is *\emphasized\ a$$nd this is a - citation <@>{cite "brucker.ea:isabelle-ontologies:2018"}.\ +text\ This is *\emphasized\ and this is a + citation @{cite "brucker.ea:isabelle-ontologies:2018"}.\ \} Clearly, this is not always possible and, in fact, often \<^isadof> documents will contain @@ -976,7 +744,7 @@ document generation (\<^eg>, HTML) which, naturally, are only available to docum too complex native \<^LaTeX>-commands. Similarly, (unchecked) forward references should, if possible, be avoided, as they also might -create dangeling references during the document generation that break the document generation. +create dangling references during the document generation that break the document generation. Finally, we recommend to use the @{command "check_doc_global"} command at the end of your document to check the global reference structure. diff --git a/examples/technical_report/Isabelle_DOF-Manual/04_RefMan.thy b/examples/technical_report/Isabelle_DOF-Manual/04_RefMan.thy index c1916e6..ce3ec6f 100755 --- a/examples/technical_report/Isabelle_DOF-Manual/04_RefMan.thy +++ b/examples/technical_report/Isabelle_DOF-Manual/04_RefMan.thy @@ -1,7 +1,7 @@ (************************************************************************* * Copyright (C) - * 2019-2020 University of Exeter - * 2018-2020 University of Paris-Saclay + * 2019-2021 University of Exeter + * 2018-2021 University of Paris-Saclay * 2018 The University of Sheffield * * License: @@ -51,17 +51,17 @@ text\ \ text\ Similarly to Isabelle, which is based on a core logic \<^theory>\Pure\ and then extended by libraries - to major systems like \<^verbatim>\HOL\ or \<^verbatim>\FOL\, \<^isadof> has a generic core infrastructure \<^dof> and then + to major systems like \<^verbatim>\HOL\, \<^isadof> has a generic core infrastructure \<^dof> and then presents itself to users via major library extensions, which add domain-specific - system-extensions. Consequently, ontologies in \<^isadof> are not just a sequence of descriptions in + system-extensions. Ontologies in \<^isadof> are not just a sequence of descriptions in \<^isadof>'s Ontology Definition Language (ODL). Rather, they are themselves presented as integrated sources that provide textual decriptions, abbreviations, macro-support and even ML-code. - Conceptually, the library of \<^isadof> is currently organized as follows - \<^footnote>\Note that the \<^emph>\technical\ organisation is slightly different and shown in + Conceptually, the library of \<^isadof> is currently organized as follows\<^footnote>\Note that the \<^emph>\technical\ + organisation is slightly different and shown in @{technical (unchecked) \infrastructure\}.\: % \begin{center} -\begin{minipage}{.9\textwidth} +\begin{minipage}{.9\textwidth}\small \dirtree{% .1 COL\DTcomment{The Common Ontology Library}. .2 scholarly\_paper\DTcomment{Scientific Papers}. @@ -114,12 +114,15 @@ text\ \<^emph>\is-a\ relation between classes; \<^item> classes may refer to other classes via a regular expression in a \<^emph>\where\ clause; + % TODO: + % Update to the new implementation. + % where is deprecated and the new implementation uses accepts and rejects. \<^item> attributes may have default values in order to facilitate notation. \ text\ The \<^isadof> ontology specification language consists basically on a notation for document classes, - where the attributes were typed with HOL-types and can be instantiated by terms HOL-terms, \<^ie>, + where the attributes were typed with HOL-types and can be instantiated by HOL-terms, \<^ie>, the actual parsers and type-checkers of the Isabelle system were reused. This has the particular advantage that \<^isadof> commands can be arbitrarily mixed with Isabelle/HOL commands providing the machinery for type declarations and term specifications such @@ -146,6 +149,9 @@ text\ classes and their inheritance relation structure meta-data of text-elements in an object-oriented manner, monitor classes enforce structural organization of documents via the language specified by the regular expression enforcing a sequence of text-elements. + % TODO: + % Update to the new implementation. + % where is deprecated and the new implementation uses accepts and rejects. A major design decision of ODL is to denote attribute values by HOL-terms and HOL-types. Consequently, ODL can refer to any predefined type defined in the HOL library, \<^eg>, @@ -153,7 +159,7 @@ text\ \<^boxed_theory_text>\_ option\, \<^boxed_theory_text>\_ list\, \<^boxed_theory_text>\_ set\, or products \<^boxed_theory_text>\_ \ _\. As a consequence of the document model, ODL definitions may be arbitrarily intertwined with standard HOL type definitions. - Finally, document class definitions result in themselves in a HOL-types in order to allow \<^emph>\links\ + Finally, document class definitions result in themselves in a HOL-type in order to allow \<^emph>\links\ to and between ontological concepts. \ @@ -167,10 +173,13 @@ text\ in \<^isadof>: \<^item> \name\:\<^index>\name@\name\\ with the syntactic category of \name\'s we refer to alpha-numerical identifiers - (called \short_id\'s in @{cite "wenzel:isabelle-isar:2020"}) and identifiers + (called \short_ident\'s in @{cite "wenzel:isabelle-isar:2020"}) and identifiers in \<^boxed_theory_text>\ ... \ which might contain certain ``quasi-letters'' such as \<^boxed_theory_text>\_\, \<^boxed_theory_text>\-\, \<^boxed_theory_text>\.\ (see~@{cite "wenzel:isabelle-isar:2020"} for details). + % TODO + % This phrase should be reviewed to clarify identifiers. + % Peculiarly, "and identifiers in \<^boxed_theory_text>\ ... \". \<^item> \tyargs\:\<^index>\tyargs@\tyargs\\ \<^rail>\ typefree | ('(' (typefree * ',') ')')\ \typefree\ denotes fixed type variable(\'a\, \'b\, ...) (see~@{cite "wenzel:isabelle-isar:2020"}) @@ -230,7 +239,7 @@ A document class\<^bindex>\document class\ can be defined using the \<^item> \attribute_decl\:\<^index>\attribute\_decl@\attribute_decl\\ \<^rail>\ name '::' '"' type '"' default_clause? \ \<^item> \invariant_decl\:\<^index>\invariant\_decl@\invariant_decl\\ - An invariants can be specified as predicate over document classes represented as + Invariants can be specified as predicates over document classes represented as records in HOL. Note that sufficient type information must be provided in order to disambiguate the argument of the \\\-expression. \<^rail>\ 'inv' (name '::')? '"' term '"' \ @@ -251,10 +260,10 @@ A document class\<^bindex>\document class\ can be defined using the text\ \<^isadof> provides a default document representation (\<^ie>, content and layout of the generated PDF) that only prints the main text, omitting all attributes. \<^isadof> provides the - \inlineltx|\newisadof[]{}|\<^index>\newisadof@\inlineltx{\newisadof}\\<^index>\document class!PDF\ + \inlineltx|\newisadof[]{}|\<^index>\newisadof@\<^boxed_latex>\\newisadof\\\<^index>\document class!PDF\ command for defining a dedicated layout for a document class in \<^LaTeX>. Such a document class-specific \<^LaTeX>-definition can not only provide a specific layout (\<^eg>, a specific - highlighting, printing of certain attributes), it can also generate entries in in the table of + highlighting, printing of certain attributes), it can also generate entries in the table of contents or an index. Overall, the \inlineltx|\newisadof[]{}| command follows the structure of the \<^boxed_theory_text>\doc_class\-command: @@ -269,18 +278,20 @@ text\ The \class_id\ is the full-qualified name of the document class and the list of \attribute_decl\ needs to declare all attributes of the document class. Within the \<^LaTeX>-definition of the document - class representation, the identifier \inlineltx|#1| refers to the content of the main text of the + class representation, the identifier \<^boxed_latex>\#1\ refers to the content of the main text of the document class (written in \<^boxed_theory_text>\\ ... \\) and the attributes can be referenced by their name using the \inlineltx|\commandkey{...}|-command (see the documentation of the \<^LaTeX>-package ``keycommand''~@{cite "chervet:keycommand:2010"} for details). Usually, the representations definition needs to be wrapped in a \inlineltx|\begin{isarmarkup}...\end{isamarkup}|-environment, to ensure the correct context within Isabelle's \<^LaTeX>-setup. - +(* % TODO: + % For the "(written in \<^boxed_theory_text>\\ ... \\" part, to give some examples should be clearer. +*) Moreover, \<^isadof> also provides the following two variants of \inlineltx|\newisadof{}[]{}|: - \<^item> \inlineltx|\renewisadof{}[]{}|\<^index>\renewisadof@\inlineltx{\renewisadof}\ for re-defining + \<^item> \inlineltx|\renewisadof{}[]{}|\<^index>\renewisadof@\<^boxed_latex>\\renewisadof\\ for re-defining (over-writing) an already defined command, and - \<^item> \inlineltx|\provideisadof{}[]{}|\<^index>\provideisadof@\inlineltx{\provideisadof}\ for providing + \<^item> \inlineltx|\provideisadof{}[]{}|\<^index>\provideisadof@\<^boxed_latex>\\provideisadof\\ for providing a definition if it is not yet defined. \ text\ @@ -289,7 +300,7 @@ text\ underscore ``\_'') that do have a special meaning in \<^LaTeX>. Moreover, as usual, special care has to be taken for commands that write into aux-files that are included in a following \<^LaTeX>-run. For such complex examples, we refer the interested - reader, in general, to the style files provided in the \<^isadof> distribution. In particular + reader to the style files provided in the \<^isadof> distribution. In particular the definitions of the concepts \<^boxed_theory_text>\title*\ and \<^boxed_theory_text>\author*\ in the file \<^file>\../../../src/ontologies/scholarly_paper/DOF-scholarly_paper.sty\ show examples of protecting special characters in definitions that need to make use of a entries in an aux-file. @@ -339,7 +350,7 @@ layout (such as \<^LaTeX>); these commands have to be wrapped into \<^verbatim>\(*<*) ... (*>*)\ brackets if this is undesired. \ subsection\Ontologic Text-Elements and their Management\ -text\ \<^theory_text>\text*[oid::cid, ...] \\\ \ text \ \\\ \ is the core-command of \<^isadof>: it permits to create +text\ \<^theory_text>\text*[oid::cid, ...] \ \ text \ \ \ is the core-command of \<^isadof>: it permits to create an object of meta-data belonging to the class \<^theory_text>\cid\. This is viewed as the \<^emph>\definition\ of an instance of a document class. This instance object is attached to the text-element and makes it thus "trackable" for \<^isadof>, \<^ie>, it can be referenced via the \<^theory_text>\oid\, its attributes @@ -360,8 +371,6 @@ For a declared class \<^theory_text>\cid\, there exists a text anti The precise presentation is decided in the \<^emph>\layout definitions\, for example by suitable \<^LaTeX>-template code. Declared but not yet defined instances must be referenced with a particular pragma in order to enforce a relaxed checking \<^theory_text>\ @{cid (unchecked) \oid\} \. - -% there should also exist a *term* antiquotation ... \ (*<*) @@ -377,12 +386,12 @@ text\\<^isadof> provides a number of inspection commands. \<^item> \<^theory_text>\print_doc_items\ allows to view the status of the internal object-table of text-elements that were tracked, and \<^item> \<^theory_text>\check_doc_global\ checks if all declared object references have been - defined, and all monitors are in a final state and final invariant checks - on all objects are satisfied (cf. @{technical (unchecked) \sec:advanced\}) + defined, all monitors are in a final state, and checks the final invariant + on all objects (cf. @{technical (unchecked) \sec:advanced\}) \ subsection\Macros\ -text\There is a mechanism to define document-local short-cuts and macros which +text\There is a mechanism to define document-local macros which were PIDE-supported but lead to an expansion in the integrated source; this feature can be used to define \<^item> \<^theory_text>\shortcuts\, \<^ie>, short names that were expanded to, for example, @@ -390,7 +399,7 @@ can be used to define \<^item> \<^theory_text>\macro\'s (= parameterized short-cuts), which allow for passing an argument to the expansion mechanism. \ -text\Note that the argument can be checked by an own SML-function with respect to syntactic +text\The argument can be checked by an own SML-function with respect to syntactic as well as semantic regards; however, the latter feature is currently only accessible at the SML level and not directly in the Isar language. We would like to stress, that this feature is basically an abstract interface to existing Isabelle functionality in the document @@ -431,11 +440,10 @@ ML\writeln (DOF_core.print_doc_class_tree @{context} (fn (n,l) => String.i text\ \<^isadof> provides a Common Ontology Library (COL)\<^index>\Common Ontology Library@see COL\ \<^bindex>\COL\ \<^footnote>\contained in \<^theory>\Isabelle_DOF.Isa_COL\\ - that introduces several ontology root concepts such as common text-elements and - figures. The overall class-tree it provides looks as follows: + that introduces several ontology concepts; its overall class-tree it provides looks as follows: % \begin{center} -\begin{minipage}{.9\textwidth} +\begin{minipage}{.9\textwidth}\small \dirtree{% .0 . .1 Isa\_COL.text\_element. @@ -453,8 +461,7 @@ text\ text\ In particular it defines the super-class \<^boxed_theory_text>\text_element\: the root of all -text-elements, - +text-elements: @{boxed_theory_text [display]\ doc_class text_element = level :: "int option" <= "None" @@ -464,12 +471,12 @@ doc_class text_element = As mentioned in @{technical \sss\} (without explaining the origin of \<^typ>\text_element\) , \<^boxed_theory_text>\level\ defines the section-level (\<^eg>, using a \<^LaTeX>-inspired hierarchy: -from \<^boxed_theory_text>\Some -1\ (corresponding to \inlineltx|\part|) to -\<^boxed_theory_text>\Some 0\ (corresponding to \inlineltx|\chapter|, respectively, \<^boxed_theory_text>\chapter*\) -to \<^boxed_theory_text>\Some 3\ (corresponding to \inlineltx|\subsubsection|, respectively, +from \<^boxed_theory_text>\Some -1\ (corresponding to \<^boxed_latex>\\part\) to +\<^boxed_theory_text>\Some 0\ (corresponding to \<^boxed_latex>\\chapter\, respectively, \<^boxed_theory_text>\chapter*\) +to \<^boxed_theory_text>\Some 3\ (corresponding to \<^boxed_latex>\\subsubsection\, respectively, \<^boxed_theory_text>\subsubsection*\). Using an invariant, a derived ontology could, \<^eg>, require that any sequence of technical-elements must be introduced by a text-element with a higher level -(this would require that technical text section are introduce by a section element). +(this requires that technical text section are introduce by a section element). The attribute \<^term>\referentiable\ captures the information if a text-element can be target for a reference, which is the case for sections or subsections, for example, but not arbitrary @@ -477,11 +484,9 @@ elements such as, \<^ie>, paragraphs (this mirrors restrictions of the target \< The attribute \<^term>\variants\ refers to an Isabelle-configuration attribute that permits to steer the different versions a \<^LaTeX>-presentation of the integrated source. - For further information of the root classes such as \<^typ>\figure\'s, please consult the ontology - \<^theory>\Isabelle_DOF.Isa_COL\ directly. - -COL finally provides macros that extend the command-language of the DOF-core by the following + \<^theory>\Isabelle_DOF.Isa_COL\ directly. COL finally provides macros that extend the command-language +of the DOF-core by the following abbreviations: \<^item> \derived_text_element\ : @@ -516,7 +521,7 @@ text\ The \<^verbatim>\scholarly_paper\ ontology is oriented It extends \<^verbatim>\COL\ by the following concepts: \begin{center} -\begin{minipage}{.9\textwidth} +\begin{minipage}{.9\textwidth}\small \dirtree{% .0 . .1 scholarly\_paper.title. @@ -555,10 +560,10 @@ It extends \<^verbatim>\COL\ by the following concepts: } \end{minipage} \end{center} - -TODO: There are some slight problems in the hierarchy ... - \ +(* +TODO: There are some slight problems in the hierarchy ... +*) text\A pivotal abstract class in the hierarchy is: @{boxed_theory_text [display] @@ -692,7 +697,7 @@ high-level arranged at root-class level, % \begin{center} -\begin{minipage}{.9\textwidth} +\begin{minipage}{.9\textwidth}\small \dirtree{% .0 . .1 technical\_report.front\_matter\DTcomment{...}. @@ -726,7 +731,7 @@ appropriate for this type of long-and-tedious documents, % \begin{center} -\begin{minipage}{.9\textwidth} +\begin{minipage}{.9\textwidth}\small \dirtree{% .0 . .1 CENELEC\_50128.judgement\DTcomment{...}. @@ -790,7 +795,7 @@ doc_class EC = AC + We now define the document representations, in the file \<^file>\../../../src/ontologies/CENELEC_50128/DOF-CENELEC_50128.sty\. Let us assume that we want to -register the definition of EC's in a dedicated table of contents (\inlineltx{tos}) +register the definition of EC's in a dedicated table of contents (\<^boxed_latex>\tos\) and use an earlier defined environment \inlineltx|\begin{EC}...\end{EC}| for their graphical representation. Note that the \inlineltx|\newisadof{}[]{}|-command requires the full-qualified names, \<^eg>, \<^boxed_theory_text>\text.CENELEC_50128.EC\ for the document class and @@ -881,7 +886,7 @@ schemata: \end{ltx} After the definition of the dispatcher, one can, optionally, define a custom representation - using the \inlineltx|newisadof|-command, as introduced in the previous section: + using the \<^boxed_latex>\newisadof\-command, as introduced in the previous section: \begin{ltx} \newisadof{section}[label=,type=][1]{% @@ -1031,15 +1036,15 @@ section*[infrastructure::technical]\Technical Infrastructure\ text\ The list of fully supported (\<^ie>, supporting both interactive ontological modeling and document generation) ontologies and the list of supported document templates can be - obtained by calling \inlinebash|isabelle mkroot_DOF -h| (see \<^technical>\first_project\). - Note that the postfix \inlinebash|-UNSUPPORTED| denotes experimental ontologies or templates + obtained by calling \<^boxed_bash>\isabelle mkroot_DOF -h\ (see \<^technical>\first_project\). + Note that the postfix \<^boxed_bash>\-UNSUPPORTED\ denotes experimental ontologies or templates for which further manual setup steps might be required or that are not fully tested. Also note that the \<^LaTeX>-class files required by the templates need to be already installed on your system. This is mostly a problem for publisher specific templates (\<^eg>, Springer's \<^path>\llncs.cls\), which cannot be re-distributed due to copyright restrictions. \ -subsection\Developing Ontologies and their Represenation Mappings\ +subsection\Developing Ontologies and their Representation Mappings\ text\ The document core \<^emph>\may\, but \<^emph>\must\ not use Isabelle definitions or proofs for checking the formal content---this manual is actually an example of a document not containing any proof. @@ -1054,10 +1059,10 @@ text\ the Isabelle proof language, for example, or other more advanced concepts. Technically, ontologies\<^index>\ontology!directory structure\ are stored in a directory - \inlinebash|src/ontologies| and consist of a Isabelle theory file and a \<^LaTeX> -style file: + \<^boxed_bash>\src/ontologies\ and consist of a Isabelle theory file and a \<^LaTeX> -style file: % \begin{center} -\begin{minipage}{.9\textwidth} +\begin{minipage}{.9\textwidth}\small \dirtree{% .1 . .2 src. @@ -1078,9 +1083,9 @@ text\ \end{center} \ text\ - Developing a new ontology ``\inlinebash|foo|'' requires, from a technical perspective, the + Developing a new ontology ``\<^boxed_bash>\foo\'' requires, from a technical perspective, the following steps: - \<^item> create a new sub-directory \inlinebash|foo| in the directory \inlinebash|src/ontologies| + \<^item> create a new sub-directory \<^boxed_bash>\foo\ in the directory \<^boxed_bash>\src/ontologies\ \<^item> definition of the ontological concepts, using \<^isadof>'s Ontology Definition Language (ODL), in a new theory file \<^path>\src/ontologies/foo/foo.thy\. \<^item> definition of the document representation for the ontological concepts in a \LaTeX-style @@ -1089,11 +1094,8 @@ text\ \<^path>\src/ontologies/ontologies.thy\. \<^item> activation of the new document setup by executing the install script. You can skip the lengthy checks for the AFP entries and the installation of the Isabelle patch by using the - \inlinebash|--skip-patch-and-afp| option: - - \begin{bash} -ë\prompt{\isadofdirn}ë ./install --skip-patch-and-afp - \end{bash} + \<^boxed_bash>\--skip-patch-and-afp\ option: + @{boxed_bash [display] \ë\prompt{\isadofdirn}ë ./install --skip-patch-and-afp\} \ subsection\Document Templates\ @@ -1104,7 +1106,7 @@ text\ are stored in a directory \<^path>\src/document-templates\:\<^index>\document template!directory structure\ \begin{center} -\begin{minipage}{.9\textwidth} +\begin{minipage}{.9\textwidth}\small \dirtree{% .1 . .2 src. @@ -1119,22 +1121,18 @@ text\ \ text\ - Developing a new document template ``\inlinebash|bar|'' requires the following steps: - \<^item> develop a new \<^LaTeX>-template \inlinebash|src/document-templates/root-bar.tex| + Developing a new document template ``\<^boxed_bash>\bar\'' requires the following steps: + \<^item> develop a new \<^LaTeX>-template \<^boxed_bash>\src/document-templates/root-bar.tex\ \<^item> activation of the new document template by executing the install script. You can skip the lengthy checks for the AFP entries and the installation of the Isabelle patch by using the - \inlinebash|--skip-patch-and-afp| option: - - \begin{bash} -ë\prompt{\isadofdirn}ë ./install --skip-patch-and-afp - \end{bash} + \<^boxed_bash>\--skip-patch-and-afp\ option: + @{boxed_bash [display] \ë\prompt{\isadofdirn}ë ./install --skip-patch-and-afp\} \ text\ - As the document generation of \<^isadof> is based - on \<^LaTeX>, the \<^isadof> document templates can (and should) make use of any \<^LaTeX>-classes provided - by publishers or standardization bodies. + As the document generation of \<^isadof> is based on \<^LaTeX>, the \<^isadof> document templates can (and + should) make use of any \<^LaTeX>-classes provided by publishers or standardization bodies. \ @@ -1155,7 +1153,7 @@ text\ Moreover, you might want to add/modify the template specific configuration (\autoref{lst:config-start}-\ref{lst:config-end}). The new template should be stored in \<^path>\src/document-templates\ and its file name should start with the prefix \<^path>\root-\. After - adding a new template, call the \inlinebash{install} script (see \<^technical>\infrastructure\ + adding a new template, call the \<^boxed_bash>\install\ script (see \<^technical>\infrastructure\ The common structure of an \<^isadof> document template looks as follows: \begin{ltx}[escapechar=ë, numbers=left,numberstyle=\tiny,xleftmargin=5mm] @@ -1194,25 +1192,22 @@ text\ subsection\Tips, Tricks, and Known Limitations\ text\ - In this sectin, we sill discuss several tips and tricks for developing - new or adapting existing document templates or \<^LaTeX>-represenations of ontologies. + In this section, we will discuss several tips and tricks for developing + new or adapting existing document templates or \<^LaTeX>-representations of ontologies. \ subsubsection\Getting Started\ text\ - In general, we recommend to create a test project (\<^eg>, using \inlinebash|isabelle mkroot_DOF|) + In general, we recommend to create a test project (\<^eg>, using \<^boxed_bash>\isabelle mkroot_DOF\) to develop new document templates or ontology representations. The default setup of the \<^isadof> build system generated a \<^path>\output/document\ directory with a self-contained \<^LaTeX>-setup. In this directory, you can directly use \<^LaTeX> on the main file, called \<^path>\root.tex\: - -\begin{bash} -ë\prompt{MyProject/output/document}ë pdflatex root.tex -\end{bash} + @{boxed_bash [display] \ë\prompt{MyProject/output/document}ë lualatex root.tex\} This allows you to develop and check your \<^LaTeX>-setup without the overhead of running - \inlinebash|isabelle build| after each change of your template (or ontology-style). Note that + \<^boxed_bash>\isabelle build\ after each change of your template (or ontology-style). Note that the content of the \<^path>\output\ directory is overwritten by executing - \inlinebash|isabelle build|. + \<^boxed_bash>\isabelle build\. \ subsubsection\Truncated Warning and Error Messages\ @@ -1220,12 +1215,9 @@ text\ By default, \<^LaTeX> cuts of many warning or error messages after 79 characters. Due to the use of full-qualified names in \<^isadof>, this can often result in important information being cut off. Thus, it can be very helpful to configure \<^LaTeX> in such a way that it prints - long error or warning messages. This can easily be done on the command line for individual + long error or warning messages. This can easily be done for individual \<^LaTeX> invocations: - -\begin{bash} -ë\prompt{MyProject/output/document}ë max_print_line=200 error_line=200 half_error_line=100 pdflatex root.tex -\end{bash} + @{boxed_bash [display] \ë\prompt{MyProject/output/document}ë max_print_line=200 error_line=200 half_error_line=100 lualatex root.tex\} \ subsubsection\Deferred Declaration of Information\ @@ -1260,7 +1252,7 @@ text\ \<^file>\../../../src/ontologies/scholarly_paper/DOF-scholarly_paper.sty\ contains an example that, firstly, shows how to write the author and affiliation information into the auxiliary file for re-use in the next \<^LaTeX>-run and, secondly, shows how to collect the author and affiliation - information into an \inlineltx|\author| and a \inlineltx|\institution| statement, each of + information into an \<^boxed_latex>\\author\ and a \<^boxed_latex>\\institution\ statement, each of which containing the information for all authors. The collection of the author information is provided by the following \<^LaTeX>-code: @@ -1280,13 +1272,12 @@ text\ } \end{ltx} -The new command \inlineltx|\addauthor| and a similarly defined command \inlineltx|\addaffiliation| +The new command \<^boxed_latex>\\addauthor\ and a similarly defined command \<^boxed_latex>\\addaffiliation\ can now be used in the definition of the representation of the concept \<^boxed_theory_text>\text.scholarly_paper.author\, which writes the collected information in the job's aux-file. The intermediate step of writing this information into the job's aux-file is necessary, as the author and affiliation information is required right at the begin of the document -(\<^ie>, when \<^LaTeX>'s \inlineltx|\maketitle| is invoked) while \<^isadof> allows to define authors at -any place within a document: +while \<^isadof> allows to define authors at any place within a document: \begin{ltx} \provideisadof{text.scholarly_paper.author}% @@ -1313,8 +1304,8 @@ any place within a document: } \end{ltx} -Finally, the collected information is used in the \inlineltx|\author| command using the -\inlineltx|AtBeginDocument|-hook: +Finally, the collected information is used in the \<^boxed_latex>\\author\ command using the +\<^boxed_latex>\AtBeginDocument\-hook: \begin{ltx} \newcommand{\DOFauthor}{\author{\dof@author}} @@ -1350,7 +1341,7 @@ text\ inherited ontologies to overwrite these restrictions and, therefore, to provide also support for additional document templates. For example, the ontology \<^boxed_theory_text>\technical_report\ extends the \<^boxed_theory_text>\scholarly_paper\ ontology and its \<^LaTeX> supports provides support - for the \inlineltx|scrrept|-class which is not supported by the \<^LaTeX> support for + for the \<^boxed_latex>\scrrept\-class which is not supported by the \<^LaTeX> support for \<^boxed_theory_text>\scholarly_paper\. \ @@ -1362,7 +1353,6 @@ text\ \ - (*<*) end (*>*) diff --git a/examples/technical_report/Isabelle_DOF-Manual/05_Implementation.thy b/examples/technical_report/Isabelle_DOF-Manual/05_Implementation.thy index 4377317..14150b3 100755 --- a/examples/technical_report/Isabelle_DOF-Manual/05_Implementation.thy +++ b/examples/technical_report/Isabelle_DOF-Manual/05_Implementation.thy @@ -1,7 +1,7 @@ (************************************************************************* * Copyright (C) - * 2019-2020 University of Exeter - * 2018-2019 University of Paris-Saclay + * 2019-2021 University of Exeter + * 2018-2021 University of Paris-Saclay * 2018 The University of Sheffield * * License: @@ -41,74 +41,55 @@ text\ IDE support. \ -(* should work as text*, but doesn't. *) -(* -text*[xxx::SML] +section\\<^isadof>: A User-Defined Plugin in Isabelle/Isar\ +text\ + A plugin in Isabelle starts with defining the local data and registering it in the framework. As + mentioned before, contexts are structures with independent cells/compartments having three + primitives \<^boxed_sml>\init\, \<^boxed_sml>\extend\ and \<^boxed_sml>\merge\. Technically this is done by + instantiating a functor \<^boxed_sml>\Generic_Data\, and the following fairly typical code-fragment + is drawn from \<^isadof>: + +@{boxed_sml [display] \structure Data = Generic_Data ( type T = docobj_tab * docclass_tab * ... val empty = (initial_docobj_tab, initial_docclass_tab, ...) val extend = I fun merge((d1,c1,...),(d2,c2,...)) = (merge_docobj_tab (d1,d2,...), merge_docclass_tab(c1,c2,...)) -); -\ -*) - - - -section\\<^isadof>: A User-Defined Plugin in Isabelle/Isar\ -text\ - A plugin in Isabelle starts with defining the local data and registering it in the framework. As - mentioned before, contexts are structures with independent cells/compartments having three - primitives \inlinesml+init+, \inlinesml+extend+ and \inlinesml+merge+. Technically this is done by - instantiating a functor \inlinesml+Generic_Data+, and the following fairly typical code-fragment - is drawn from \<^isadof>: - -\begin{sml} -structure Data = Generic_Data -( type T = docobj_tab * docclass_tab * ... - val empty = (initial_docobj_tab, initial_docclass_tab, ...) - val extend = I - fun merge((d1,c1,...),(d2,c2,...)) = (merge_docobj_tab (d1,d2,...), - merge_docclass_tab(c1,c2,...)) -); -\end{sml} - where the table \inlinesml+docobj_tab+ manages document classes and \inlinesml+docclass_tab+ the +);\} + where the table \<^boxed_sml>\docobj_tab\ manages document classes and \<^boxed_sml>\docclass_tab\ the environment for class definitions (inducing the inheritance relation). Other tables capture, \eg, the class invariants, inner-syntax antiquotations. Operations follow the MVC-pattern, where Isabelle/Isar provides the controller part. A typical model operation has the type: -\begin{sml} -val opn :: -> Context.generic -> Context.generic -\end{sml} +@{boxed_sml [display] +\val opn :: -> Context.generic -> Context.generic\} representing a transformation on system contexts. For example, the operation of declaring a local reference in the context is presented as follows: -\begin{sml} -fun declare_object_local oid ctxt = +@{boxed_sml [display] +\fun declare_object_local oid ctxt = let fun decl {tab,maxano} = {tab=Symtab.update_new(oid,NONE) tab, maxano=maxano} in (Data.map(apfst decl)(ctxt) handle Symtab.DUP _ => error("multiple declaration of document reference")) -end -\end{sml} +end\} where \<^boxed_theory_text>\Data.map\ is the update function resulting from the instantiation of the - functor \inlinesml|Generic_Data|. This code fragment uses operations from a library structure - \inlinesml+Symtab+ that were used to update the appropriate table for document objects in + functor \<^boxed_sml>\Generic_Data\. This code fragment uses operations from a library structure + \<^boxed_sml>\Symtab\ that were used to update the appropriate table for document objects in the plugin-local state. Possible exceptions to the update operation were mapped to a system-global error reporting function. Finally, the view-aspects were handled by an API for parsing-combinators. The library structure - \inlinesml+Scan+ provides the operators: + \<^boxed_sml>\Scan\ provides the operators: -\begin{sml} -op || : ('a -> 'b) * ('a -> 'b) -> 'a -> 'b +@{boxed_sml [display] +\op || : ('a -> 'b) * ('a -> 'b) -> 'a -> 'b op -- : ('a -> 'b * 'c) * ('c -> 'd * 'e) -> 'a -> ('b * 'd) * 'e op >> : ('a -> 'b * 'c) * ('b -> 'd) -> 'a -> 'd * 'c op option : ('a -> 'b * 'a) -> 'a -> 'b option * 'a -op repeat : ('a -> 'b * 'a) -> 'a -> 'b list * 'a -\end{sml} +op repeat : ('a -> 'b * 'a) -> 'a -> 'b list * 'a \} for alternative, sequence, and piping, as well as combinators for option and repeat. Parsing combinators have the advantage that they can be smoothlessly integrated into standard programs, and they enable the dynamic extension of the grammar. There is a more high-level structure @@ -128,13 +109,12 @@ val attributes =(Parse.$$$ "[" |-- (reference The ``model'' \<^boxed_theory_text>\declare_reference_opn\ and ``new'' \<^boxed_theory_text>\attributes\ parts were combined via the piping operator and registered in the Isar toplevel: -\begin{sml} - fun declare_reference_opn (((oid,_),_),_) = +@{boxed_sml [display] +\fun declare_reference_opn (((oid,_),_),_) = (Toplevel.theory (DOF_core.declare_object_global oid)) val _ = Outer_Syntax.command <@>{command_keyword "declare_reference"} "declare document reference" - (attributes >> declare_reference_opn); -\end{sml} + (attributes >> declare_reference_opn);\} Altogether, this gives the extension of Isabelle/HOL with Isar syntax and semantics for the new \emph{command}: @@ -154,14 +134,13 @@ text\ principle: based on a number of combinators, new user-defined antiquotation syntax and semantics can be added to the system that works on the internal plugin-data freely. For example, in -\begin{sml} -val _ = Theory.setup( +@{boxed_sml [display] +\val _ = Theory.setup( Thy_Output.antiquotation <@>{binding docitem} docitem_antiq_parser (docitem_antiq_gen default_cid) #> ML_Antiquotation.inline <@>{binding docitem_value} - ML_antiq_docitem_value) -\end{sml} + ML_antiq_docitem_value)\} the text antiquotation \<^boxed_theory_text>\docitem\ is declared and bounded to a parser for the argument syntax and the overall semantics. This code defines a generic antiquotation to be used in text elements such as @@ -188,9 +167,8 @@ text\ late-binding table \<^boxed_theory_text>\ISA_transformer_tab\, we register for each inner-syntax-annotation (ISA's), a function of type -\begin{sml} - theory -> term * typ * Position.T -> term option -\end{sml} +@{boxed_sml [display] +\ theory -> term * typ * Position.T -> term option\} Executed in a second pass of term parsing, ISA's may just return \<^boxed_theory_text>\None\. This is adequate for ISA's just performing some checking in the logical context \<^boxed_theory_text>\theory\; @@ -205,8 +183,8 @@ text\ For the moment, there is no high-level syntax for the definition of class invariants. A formulation, in SML, of the first class-invariant in @{docitem "sec:class_inv"} is straight-forward: -\begin{sml} -fun check_result_inv oid {is_monitor:bool} ctxt = +@{boxed_sml [display] +\fun check_result_inv oid {is_monitor:bool} ctxt = let val kind = compute_attr_access ctxt "kind" oid <@>{here} <@>{here} val prop = compute_attr_access ctxt "property" oid <@>{here} <@>{here} val tS = HOLogic.dest_list prop @@ -216,10 +194,9 @@ fun check_result_inv oid {is_monitor:bool} ctxt = | _ => false end val _ = Theory.setup (DOF_core.update_class_invariant - "tiny_cert.result" check_result_inv) -\end{sml} + "tiny_cert.result" check_result_inv)\} - The \inlinesml{setup}-command (last line) registers the \<^boxed_theory_text>\check_result_inv\ function + The \<^boxed_sml>\setup\-command (last line) registers the \<^boxed_theory_text>\check_result_inv\ function into the \<^isadof> kernel, which activates any creation or modification of an instance of \<^boxed_theory_text>\result\. We cannot replace \<^boxed_theory_text>\compute_attr_access\ by the corresponding antiquotation \<^boxed_theory_text>\@{docitem_value kind::oid}\, since \<^boxed_theory_text>\oid\ is @@ -232,10 +209,9 @@ text\ deterministic automata. These are stored in the \<^boxed_theory_text>\docobj_tab\ for monitor-objects in the \<^isadof> component. We implemented the functions: -\begin{sml} - val enabled : automaton -> env -> cid list - val next : automaton -> env -> cid -> automaton -\end{sml} +@{boxed_sml [display] +\ val enabled : automaton -> env -> cid list + val next : automaton -> env -> cid -> automaton\} where \<^boxed_theory_text>\env\ is basically a map between internal automaton states and class-id's (\<^boxed_theory_text>\cid\'s). An automaton is said to be \<^emph>\enabled\ for a class-id, iff it either occurs in its accept-set or its reject-set (see @{docitem "sec:monitors"}). During @@ -252,41 +228,38 @@ text\ ``keycommand''~@{cite "chervet:keycommand:2010"} package. In fact, the core \<^isadof> \LaTeX-commands are just wrappers for the corresponding commands from the keycommand package: -\begin{ltx} -\newcommand\newisadof[1]{% +@{boxed_latex [display] +\\newcommand\newisadof[1]{% \expandafter\newkeycommand\csname isaDof.#1\endcsname}% \newcommand\renewisadof[1]{% \expandafter\renewkeycommand\csname isaDof.#1\endcsname}% \newcommand\provideisadof[1]{% - \expandafter\providekeycommand\csname isaDof.#1\endcsname}% -\end{ltx} + \expandafter\providekeycommand\csname isaDof.#1\endcsname}%\} The \LaTeX-generator of \<^isadof> maps each \<^boxed_theory_text>\doc_item\ to an \LaTeX-environment (recall @{docitem "text-elements"}). As generic \<^boxed_theory_text>\doc_item\ are derived from the text element, the enviornment \inlineltx|{isamarkuptext*}| builds the core of \<^isadof>'s \LaTeX{} implementation. For example, the @{docitem "ass123"} from page \pageref{ass123} is mapped to -\begin{ltx} -\begin{isamarkuptext*}% +@{boxed_latex [display] +\\begin{isamarkuptext*}% [label = {ass122},type = {CENELEC_50128.SRAC}, args={label = {ass122}, type = {CENELEC_50128.SRAC}, CENELEC_50128.EC.assumption_kind = {formal}} ] The overall sampling frequence of the odometer subsystem is therefore 14 khz, which includes sampling, computing and result communication times ... -\end{isamarkuptext*} -\end{ltx} +\end{isamarkuptext*}\} This environment is mapped to a plain \LaTeX command via (again, recall @{docitem "text-elements"}): -\begin{ltx} - \NewEnviron{isamarkuptext*}[1][]{\isaDof[env={text},#1]{\BODY}} -\end{ltx} +@{boxed_latex [display] +\ \NewEnviron{isamarkuptext*}[1][]{\isaDof[env={text},#1]{\BODY}} \} For the command-based setup, \<^isadof> provides a dispatcher that selects the most specific implementation for a given \<^boxed_theory_text>\doc_class\: -\begin{ltx} -%% The Isabelle/DOF dispatcher: +@{boxed_latex [display] +\%% The Isabelle/DOF dispatcher: \newkeycommand+[\|]\isaDof[env={UNKNOWN},label=,type={dummyT},args={}][1]{% \ifcsname isaDof.\commandkey{type}\endcsname% \csname isaDof.\commandkey{type}\endcsname% @@ -307,8 +280,7 @@ implementation for a given \<^boxed_theory_text>\doc_class\: definition for "\commandkey{env}" available either.}% \fi% \fi% -} -\end{ltx} +}\} \ (*<*) diff --git a/examples/technical_report/Isabelle_DOF-Manual/document/lstisadof-manual.sty b/examples/technical_report/Isabelle_DOF-Manual/document/lstisadof-manual.sty index d81005e..9c1589d 100755 --- a/examples/technical_report/Isabelle_DOF-Manual/document/lstisadof-manual.sty +++ b/examples/technical_report/Isabelle_DOF-Manual/document/lstisadof-manual.sty @@ -184,6 +184,7 @@ \lstdefinestyle{lltx}{language=[AlLaTeX]TeX, ,basicstyle=\ttfamily% ,showspaces=false% + ,escapechar=ë ,showlines=false% ,morekeywords={newisadof} % ,keywordstyle=\bfseries% diff --git a/examples/technical_report/TR_my_commented_isabelle/TR_MyCommentedIsabelle.thy b/examples/technical_report/TR_my_commented_isabelle/TR_MyCommentedIsabelle.thy index 190f91e..4054bbd 100755 --- a/examples/technical_report/TR_my_commented_isabelle/TR_MyCommentedIsabelle.thy +++ b/examples/technical_report/TR_my_commented_isabelle/TR_MyCommentedIsabelle.thy @@ -1,7 +1,7 @@ (************************************************************************* * Copyright (C) - * 2019 The University of Exeter - * 2018-2019 The University of Paris-Saclay + * 2019-2021 The University of Exeter + * 2018-2021 The University of Paris-Saclay * 2018 The University of Sheffield * * License: @@ -1196,7 +1196,7 @@ text\ Registers \<^ML_type>\Toplevel.transition -> Toplevel.transition\ parsers to the Isar interpreter.\ -text\The file \<^file>\~~/src/HOL/ex/Commands.thy\ shows some example Isar command definitions, with the +text\The file \<^file>\~~/src/HOL/Examples/Commands.thy\ shows some example Isar command definitions, with the all-important theory header declarations for outer syntax keywords.\ subsubsection*[ex1137::example]\Examples: \<^theory_text>\text\\ diff --git a/examples/technical_report/TR_my_commented_isabelle/document/preamble.tex b/examples/technical_report/TR_my_commented_isabelle/document/preamble.tex index 0919e95..1aebc72 100755 --- a/examples/technical_report/TR_my_commented_isabelle/document/preamble.tex +++ b/examples/technical_report/TR_my_commented_isabelle/document/preamble.tex @@ -13,6 +13,7 @@ %% This is a placeholder for user-specific configuration and packages. +\renewcommand{\isasymtheta}{\texorpdfstring{\isamath{\vartheta}}{ϑ}} \usepackage{prooftree} \title{} \author{<AUTHOR>} diff --git a/install b/install index 68d5b5e..71c66ef 100755 --- a/install +++ b/install @@ -84,34 +84,6 @@ check_isabelle_version() { fi } -check_pdftex() { - echo "* Checking (La)TeX installation:" - OLDDIR=`pwd` - DIR=`mktemp -d` - cd $DIR; - pdftex -interaction=nonstopmode \\expanded{Success}\\end > /dev/null - if [ $? -eq 0 ]; then - echo " Success: pdftex supports \\expanded{} primitive." - else - cd $OLDDIR - echo " WARNING:" - echo " The version of pdf(La)TeX you are using is outdated (and does" - echo " not support the \\expanded primitive). It is not supported by the" - echo " current version of Isabelle/DOF. Please install a supported TeX" - echo " distribution (e.g., TeXLive 2019 or later)." - echo - read -p " Still continue (y/N)? " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; - then - echo " Continuing installation on your OWN risk." - else - exit_error - fi - fi - cd $OLDDIR -} - check_afp_entries() { echo "* Checking availability of AFP entries:" missing="" @@ -286,7 +258,6 @@ echo "" echo "Isabelle/DOF Installer" echo "======================" check_isabelle_version -check_pdftex if [ "$SKIP" = "true" ]; then echo "* Warning: skipping installation of Isabelle patch and AFP entries." else diff --git a/src/DOF/Isa_DOF.thy b/src/DOF/Isa_DOF.thy index 48604d5..6188ba5 100755 --- a/src/DOF/Isa_DOF.thy +++ b/src/DOF/Isa_DOF.thy @@ -854,11 +854,13 @@ fun err msg pos = error (msg ^ Position.here pos); fun check_path check_file ctxt dir (name, pos) = let - val _ = Context_Position.report ctxt pos Markup.language_path; + val _ = Context_Position.report ctxt pos (Markup.language_path true); (* TODO: pos should be + "lifted" to + type source *) val path = Path.append dir (Path.explode name) handle ERROR msg => err msg pos; val _ = Path.expand path handle ERROR msg => err msg pos; - val _ = Context_Position.report ctxt pos (Markup.path (Path.smart_implode path)); + val _ = Context_Position.report ctxt pos (Markup.path (Path.implode_symbolic path)); val _ = (case check_file of NONE => path diff --git a/src/DOF/latex/DOF-COL.sty b/src/DOF/latex/DOF-COL.sty old mode 100755 new mode 100644 diff --git a/src/DOF/latex/DOF-amssymb.sty b/src/DOF/latex/DOF-amssymb.sty new file mode 100644 index 0000000..f4993ed --- /dev/null +++ b/src/DOF/latex/DOF-amssymb.sty @@ -0,0 +1,26 @@ +%% Copyright (C) 2021 University of Exeter +%% 2021 University of Paris-Saclay +%% +%% License: +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt; either +%% version 1.3c of the License, or (at your option) any later version. +%% OR +%% The 2-clause BSD-style license. +%% +%% SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause + + +\NeedsTeXFormat{LaTeX2e}\relax +\ProvidesPackage{DOF-amssymb} + [<isadofltxversion>% + Document-Type Support Framework for Isabelle (amssymb wrapper for lualatex/pdflatex).] + +\usepackage{ifxetex,ifluatex} +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage{amssymb} +\else % if luatex or xetex + \usepackage{unicode-math} + \usepackage{latexsym} +\fi diff --git a/src/DOF/latex/DOF-core.sty b/src/DOF/latex/DOF-core.sty old mode 100755 new mode 100644 diff --git a/src/document-templates/root-eptcs-UNSUPPORTED.tex b/src/document-templates/root-eptcs-UNSUPPORTED.tex index 2c91e18..41a271e 100755 --- a/src/document-templates/root-eptcs-UNSUPPORTED.tex +++ b/src/document-templates/root-eptcs-UNSUPPORTED.tex @@ -34,7 +34,7 @@ \usepackage{xcolor} \usepackage{isabellesym} \usepackage{amsmath} -\usepackage{amssymb} +\usepackage{DOF-amssymb} \usepackage[numbers, sort&compress, sectionbib]{natbib} \IfFileExists{DOF-core.sty}{}{% \PackageError{DOF-core}{Isabelle/DOF not installed. diff --git a/src/document-templates/root-lipics-v2019-UNSUPPORTED.tex b/src/document-templates/root-lipics-v2019-UNSUPPORTED.tex index 644d5ad..7437e72 100755 --- a/src/document-templates/root-lipics-v2019-UNSUPPORTED.tex +++ b/src/document-templates/root-lipics-v2019-UNSUPPORTED.tex @@ -29,7 +29,7 @@ \usepackage{isabelle} \usepackage{isabellesym} % \usepackage{amsmath} -% \usepackage{amssymb} +% \usepackage{DOF-amssymb} \usepackage[numbers, sort&compress, sectionbib]{natbib} \IfFileExists{DOF-core.sty}{}{% \PackageError{DOF-core}{Isabelle/DOF not installed. diff --git a/src/document-templates/root-lncs.tex b/src/document-templates/root-lncs.tex index bd3a36d..b1b84b5 100755 --- a/src/document-templates/root-lncs.tex +++ b/src/document-templates/root-lncs.tex @@ -34,7 +34,7 @@ \usepackage{xcolor} \usepackage{isabellesym} \usepackage{amsmath} -\usepackage{amssymb} +\usepackage{DOF-amssymb} \usepackage[numbers, sort&compress, sectionbib]{natbib} \IfFileExists{DOF-core.sty}{}{% \PackageError{DOF-core}{Isabelle/DOF not installed. diff --git a/src/document-templates/root-scrartcl.tex b/src/document-templates/root-scrartcl.tex index cce436e..2113751 100755 --- a/src/document-templates/root-scrartcl.tex +++ b/src/document-templates/root-scrartcl.tex @@ -22,7 +22,7 @@ %% preamble.tex. \RequirePackage{ifvtex} -\documentclass[fontsize=11pt,DIV=12,paper=a4]{scrartcl} +\documentclass[abstract=true,fontsize=11pt,DIV=12,paper=a4]{scrartcl} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{textcomp} @@ -44,7 +44,7 @@ \input{ontologies} \IfFileExists{preamble.tex}{\input{preamble.tex}}{}% \usepackage{amsmath} -\usepackage{amssymb} +\usepackage{DOF-amssymb} \usepackage[numbers, sort&compress, sectionbib]{natbib} \usepackage{graphicx} \usepackage{hyperref} @@ -75,7 +75,7 @@ \begin{document} \begin{frontmatter} \maketitle - \tableofcontents + % \tableofcontents \end{frontmatter} \input{session} % optional bibliography diff --git a/src/document-templates/root-scrreprt-modern.tex b/src/document-templates/root-scrreprt-modern.tex index 5eecf8c..38a3199 100755 --- a/src/document-templates/root-scrreprt-modern.tex +++ b/src/document-templates/root-scrreprt-modern.tex @@ -65,7 +65,7 @@ \input{ontologies} \IfFileExists{preamble.tex}{\input{preamble.tex}}{}% \usepackage{amsmath} -\usepackage{amssymb} +\usepackage{DOF-amssymb} \usepackage[numbers, sort&compress, sectionbib]{natbib} \usepackage{graphicx} \usepackage{hyperref} diff --git a/src/document-templates/root-scrreprt.tex b/src/document-templates/root-scrreprt.tex index 1bb7e04..a7dbcf4 100755 --- a/src/document-templates/root-scrreprt.tex +++ b/src/document-templates/root-scrreprt.tex @@ -44,7 +44,7 @@ \input{ontologies} \IfFileExists{preamble.tex}{\input{preamble.tex}}{}% \usepackage{amsmath} -\usepackage{amssymb} +\usepackage{DOF-amssymb} \usepackage[numbers, sort&compress, sectionbib]{natbib} \usepackage{graphicx} \usepackage{hyperref} diff --git a/src/ontologies/CENELEC_50128/DOF-CENELEC_50128.sty b/src/ontologies/CENELEC_50128/DOF-CENELEC_50128.sty index d5d07b7..5fc62f1 100755 --- a/src/ontologies/CENELEC_50128/DOF-CENELEC_50128.sty +++ b/src/ontologies/CENELEC_50128/DOF-CENELEC_50128.sty @@ -14,7 +14,7 @@ \NeedsTeXFormat{LaTeX2e}\relax \ProvidesPackage{DOF-cenelec_50128} - [2019/08/18 Unreleased/Isabelle2020% + [<isadofltxversion>% Document-Type Support Framework for Isabelle (CENELEC 50128).] \RequirePackage{DOF-COL} diff --git a/src/ontologies/scholarly_paper/DOF-scholarly_paper-thm.sty b/src/ontologies/scholarly_paper/DOF-scholarly_paper-thm.sty index 7f88c19..5cb198d 100755 --- a/src/ontologies/scholarly_paper/DOF-scholarly_paper-thm.sty +++ b/src/ontologies/scholarly_paper/DOF-scholarly_paper-thm.sty @@ -13,7 +13,7 @@ \NeedsTeXFormat{LaTeX2e}\relax \ProvidesPackage{DOF-scholarly_paper-thm} - [2020/01/14 Unreleased/Isabelle2020% + [<isadofltxversion>% Document-Type Support Framework for Isabelle (LNCS).] \RequirePackage{amsthm} diff --git a/src/ontologies/scholarly_paper/DOF-scholarly_paper.sty b/src/ontologies/scholarly_paper/DOF-scholarly_paper.sty index 58f2a9a..def9c64 100755 --- a/src/ontologies/scholarly_paper/DOF-scholarly_paper.sty +++ b/src/ontologies/scholarly_paper/DOF-scholarly_paper.sty @@ -14,7 +14,7 @@ \NeedsTeXFormat{LaTeX2e}\relax \ProvidesPackage{DOF-scholarly_paper} - [2020/01/14 Unreleased/Isabelle2020% + [<isadofltxversion>% Document-Type Support Framework for Isabelle (LNCS).] \RequirePackage{DOF-COL} diff --git a/src/patches/thy_output.Isabelle2020.ML b/src/patches/thy_output.Isabelle2021.ML old mode 100755 new mode 100644 similarity index 100% rename from src/patches/thy_output.Isabelle2020.ML rename to src/patches/thy_output.Isabelle2021.ML