9bc493250f
By default invariants checking generates warnings. if invariants_strict_checking theory option is enabled, the checking generates errors. Errors to resolve: - Option type in invariant: See src/ontologies/scholarly_paper/scholarly_paper.thy:133 doc_class technical = text_section + definition_list :: "string list" <= "[]" status :: status <= "description" formal_results :: "thm list" invariant L1 :: "the (level σ) > 0" The attribute L1 uses "the" to project the level value but the default value is None: See src/ontologies/scholarly_paper/scholarly_paper.thy:69 doc_class text_section = text_element + main_author :: "author option" <= None fixme_list :: "string list" <= "[]" level :: "int option" <= "None" It generates an error in src/ontologies/CENELEC_50128/CENELEC_50128.thy for the Definition* commands, for which the level is not defined. It triggers an error because "the None" triggers an error. Get rid of the option type? The value None is used in the check function in examples/scholarly_paper/2020-iFM-CSP/paper.thy to check that a subsequent instance of the same class has a level >= than the previous instance of the same class. Update this function? - What to do with the checking done in scholarly_paper (see check function) which use low level invariant to check the attributes? Migrate to High level invariant? If we change the default value of the level attribute in the text_lement class from "None" to "Some 0" then check function in scholarly_paper is triggered in examples/scholarly_paper/2020-iFM-CSP/paper.thy for the introduction instance "introtext" line 55 and generates a checking error. It comes from the fact that the previous instance introheader line 54 is a section*, and then has a default value level of 1. Then, if the default value of the level attribute in the text_element is put to Some 0, the low level checking invariant function "check" in scholarly_paper triggers an error, because the "check" function checks that the instances in a sequence of the same class have a growing level. for a sequence: [("scholarly_paper.introduction", "introheader") , ("scholarly_paper.introduction", "introtext")] introtext must have a level >= than introheader. Same issue with the examples/scholarly_paper/2018-cicm-isabelle_dof-applications/IsaDofApplications.thy theory. - Bypass checking of high-level invariants when the class default_cid = "text", the top (default) document class. We want the class default_cid to stay abstract and not have the capability to be defined with attribute, invariants, etc. Hence this bypass handles docitem without a class associated, for example when you just want a document element to be referenceable without using the burden of ontology classes. ex: text*[sdf]\<open> Lorem ipsum @{thm refl}\<close> The functions get_doc_class_global and get_doc_class_local trigger an error when the class is "text" (default_cid), then the functions like check_invariants which use it will fail if the checking is enabled by default for all the theories. A quick and dirty fix is proposed to pass the compilation, but must be revised. See the diff. |
||
---|---|---|
.woodpecker | ||
etc | ||
examples | ||
src | ||
.gitattributes | ||
.gitignore | ||
CHANGELOG.md | ||
CITATION | ||
LICENSE | ||
README.md | ||
ROOTS | ||
install-afp |
README.md
Isabelle/DOF: Document Preparation Setup
Isabelle/DOF is a novel Document Ontology Framework on top of Isabelle. Isabelle/DOF allows for both conventional typesetting and formal development. The manual for Isabelle/DOF 1.3.0/Isabelle2021-1 is available online.
Pre-requisites
Isabelle/DOF has three major prerequisites:
- Isabelle: Isabelle/DOF requires Isabelle 2022. Please download the Isabelle 2022 distribution for your operating system from the Isabelle website.
- AFP: Isabelle/DOF requires several entries from the Archive of Formal Proofs (AFP). Please install the AFP following the instructions given at https://www.isa-afp.org/using.html.
- LaTeX: Isabelle/DOF requires a modern LaTeX installation, i.e., at least TeX Live 2022 with all available updates applied.
Installation
Isabelle/DOF is provided as an Isabelle component. After installing the
prerequisites, change into the directory containing Isabelle/DOF (this should be
the directory containing this README.md
file) and execute (if you executed
this command already during the installation of the prerequisites, you can skip
it now):
foo@bar:~$ isabelle components -u .
The final step for the installation is:
foo@bar:~$ isabelle build -D .
This will compile Isabelle/DOF and run the example suite.
Usage
Opening an Example
If you want to work with or extend one of the examples, e.g., you can open it similar to any standard Isabelle theory:
isabelle jedit -d . -l Isabelle_DOF examples/scholarly_paper/2018_cicm/IsaDofApplications.thy
This will open an example of a scientific paper using the pre-compiled session
Isabelle_DOF
, i.e., you will not be able to edit the ontology definitions.
If you want to edit the ontology definition, just open the theory file with the
default HOL session:
isabelle jedit -d . -l HOL examples/scholarly_paper/2018_cicm/IsaDofApplications.thy
While this gives you more flexibility, it might "clutter" your editing experience, as a lot of internal theories are loaded into Isabelle's editor.
Creating a New Project
The DOF-plugin provides an alternative to Isabelle's mkroot
command.
Isabelle projects that use DOF need to be created using
foo@bar:~$ isabelle dof_mkroot
The dof_mkroot
command takes the same parameter as the standard mkroot
command of Isabelle. Thereafter, the normal Isabelle command for building
documents can be used.
Using the -o
option, different ontology setups can be selected and using the
-t
option, different LaTeX setups can be selected. For example,
foo@bar:~$ isabelle dof_mkroot -o scholarly_paper -t scrartcl
creates a setup using the scholarly_paper ontology and the article class from the KOMA-Script bundle.
The help (option -h
) show a list of all supported ontologies and document
templates:
foo@bar:~$ isabelle dof_mkroot -h
Usage: isabelle dof_mkroot [OPTIONS] [DIRECTORY]
Options are:
-I init Mercurial repository and add generated files
-h print help
-n NAME alternative session name (default: directory base name)
-o NAMES list of ontologies, separated by blanks
(default: "technical_report scholarly_paper")
-q quiet mode: less verbosity
-t NAME template (default: "scrreprt-modern")
Create session root directory for Isabelle/DOF (default: current directory).
Releases
For releases, signed archives including a PDF version of the Isabelle/DOF manual are available:
- Isabelle/DOF 1.3.0/Isabelle2021-1
Older Releases
- Isabelle/DOF 1.2.0/Isabelle2021
- Isabelle/DOF 1.1.0/Isabelle2021
- Isabelle/DOF 1.1.0/Isabelle2020
- Isabelle/DOF 1.0.0/Isabelle2019
Team
Main contacts:
Contributors
- Idir Ait-Sadoune
- Paolo Crisafulli
- Chantal Keller
- Nicolas Méric
License
This project is licensed under a 2-clause BSD license.
SPDX-License-Identifier: BSD-2-Clause
Publications
-
Achim D. Brucker, Idir Ait-Sadoune, Paolo Crisafulli, and Burkhart Wolff. Using The Isabelle Ontology Framework: Linking the Formal with the Informal. In Conference on Intelligent Computer Mathematics (CICM). Lecture Notes in Computer Science (11006), Springer-Verlag, 2018. doi:10.1007/978-3-319-96812-4_3.
-
Achim D. Brucker and Burkhart Wolff. Isabelle/DOF: Design and Implementation. In Software Engineering and Formal Methods (SEFM). Lecture Notes in Computer Science (11724), Springer-Verlag, 2019. doi:10.1007/978-3-030-30446-1_15.
-
Achim D. Brucker, Burkhart Wolff. Using Ontologies in Formal Developments Targeting Certification. In Integrated Formal Methods (IFM). Lecture Notes in Computer Science (11918). Springer-Verlag 2019. doi:10.1007/978-3-030-34968-4_4
-
Sergio Bezzecchi, Paolo Crisafulli, Charlotte Pichot, and Burkhart Wolff. Making Agile Development Processes fit for V-style Certification Procedures.. In ERTS 2018. https://hal.archives-ouvertes.fr/hal-01702815
Upstream Repository
The upstream git repository, i.e., the single source of truth, for this project is hosted at https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF.