Large directory restructuring.
Isabelle_DOF/Isabelle_DOF/master This commit looks good
Details
Isabelle_DOF/Isabelle_DOF/master This commit looks good
Details
This commit restructures the file hierarchy: 1) implementation is moved into src/ directory to clean up the main directory and to make it easier for users to find the README.md. 2) ontologies (both, the Isabelle-part and the LaTeX-part) are now structured into directories.
This commit is contained in:
parent
f8013d90a2
commit
8953f37629
|
@ -4,15 +4,15 @@ pipeline {
|
||||||
stages {
|
stages {
|
||||||
stage('Build Docker') {
|
stage('Build Docker') {
|
||||||
steps {
|
steps {
|
||||||
sh 'cp patches/thy_output.ML .ci/isabelle4isadof/'
|
sh 'cp src/patches/thy_output.ML .ci/isabelle4isadof/'
|
||||||
sh 'docker build -t logicalhacking:isabelle4dof .ci/isabelle4isadof'
|
sh 'docker build -t logicalhacking:isabelle4dof .ci/isabelle4isadof'
|
||||||
sh 'rm -f .ci/isabelle4isadof/thy_output.ML'
|
sh 'rm -f .ci/isabelle4isadof/thy_output.ML'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Check Docker') {
|
stage('Check Docker') {
|
||||||
when { changeset "patches/*" }
|
when { changeset "src/patches/*" }
|
||||||
steps {
|
steps {
|
||||||
sh 'cp patches/thy_output.ML .ci/isabelle4isadof/'
|
sh 'cp src/patches/thy_output.ML .ci/isabelle4isadof/'
|
||||||
sh 'docker build --no-cache -t logicalhacking:isabelle4dof .ci/isabelle4isadof'
|
sh 'docker build --no-cache -t logicalhacking:isabelle4dof .ci/isabelle4isadof'
|
||||||
sh 'rm -f .ci/isabelle4isadof/thy_output.ML'
|
sh 'rm -f .ci/isabelle4isadof/thy_output.ML'
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ The installer will
|
||||||
* apply a patch to Isabelle that is necessary to use Isabelle/DOF.
|
* apply a patch to Isabelle that is necessary to use Isabelle/DOF.
|
||||||
If this patch installations fails, you need to manually replace
|
If this patch installations fails, you need to manually replace
|
||||||
the file ``Isabelle2019/src/Pure/Thy/thy_output.ML`` in the Isabelle
|
the file ``Isabelle2019/src/Pure/Thy/thy_output.ML`` in the Isabelle
|
||||||
distribution with the file ``patches/thy_output.ML`` from the
|
distribution with the file ``src/patches/thy_output.ML`` from the
|
||||||
Isabelle/DOF distribution:
|
Isabelle/DOF distribution:
|
||||||
```console
|
```console
|
||||||
cp patches/thy_output.ML `isabelle getenv -b ISABELLE_HOME`/src/Pure/Thy/
|
cp patches/thy_output.ML `isabelle getenv -b ISABELLE_HOME`/src/Pure/Thy/
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
# Isabelle_DOF: Document Preparation Setup
|
|
||||||
|
|
||||||
This directory contains the LaTeX setup for Isabelle's
|
|
||||||
document generation system.
|
|
||||||
|
|
||||||
|
|
||||||
## Tips and Tricks
|
|
||||||
|
|
||||||
During debugging of LaTeX errors, it can be very helpful to use
|
|
||||||
more than 79 characters for error messages (otherwise, long errors
|
|
||||||
are truncated)"
|
|
||||||
``` bash
|
|
||||||
max_print_line=200 error_line=200 half_error_line=100 pdflatex root.tex
|
|
||||||
```
|
|
||||||
|
|
||||||
## Team
|
|
||||||
|
|
||||||
Main contacts:
|
|
||||||
* [Achim D. Brucker](http://www.brucker.ch/)
|
|
||||||
* [Burkhart Wolff](https://www.lri.fr/~wolff/)
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
This project is licensed under a 2-clause BSD license.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: BSD-2-Clause
|
|
|
@ -1,11 +1,10 @@
|
||||||
(*<*)
|
(*<*)
|
||||||
theory MathExam
|
theory MathExam
|
||||||
imports "Isabelle_DOF.mathex_onto"
|
imports "Isabelle_DOF.mathex"
|
||||||
HOL.Real
|
HOL.Real
|
||||||
begin
|
begin
|
||||||
(*>*)
|
(*>*)
|
||||||
open_monitor*[exam::MathExam]
|
(* open_monitor*[exam::MathExam] *)
|
||||||
|
|
||||||
|
|
||||||
section*[header::Header,examSubject= "[algebra]",
|
section*[header::Header,examSubject= "[algebra]",
|
||||||
date="''02-05-2018''", timeAllowed="90::int"] \<open>Exam number 1\<close>
|
date="''02-05-2018''", timeAllowed="90::int"] \<open>Exam number 1\<close>
|
||||||
|
@ -94,6 +93,6 @@ text*[q2::Task, local_grade="threeStars", mark="3::int", type="formal"]
|
||||||
with a difference of 5.
|
with a difference of 5.
|
||||||
\<close>
|
\<close>
|
||||||
(* this does not work on the level of the LaTeX output for known restrictions of the Toplevel. *)
|
(* this does not work on the level of the LaTeX output for known restrictions of the Toplevel. *)
|
||||||
close_monitor*[exam :: MathExam]
|
(* close_monitor*[exam :: MathExam] *)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -389,7 +389,7 @@ text\<open> The document class \inlineisar+figure+ --- supported by the \isadof
|
||||||
such as @{docitem_ref \<open>fig_figures\<close>}.
|
such as @{docitem_ref \<open>fig_figures\<close>}.
|
||||||
\<close>
|
\<close>
|
||||||
|
|
||||||
subsection*[mathex_onto::example]\<open> The Math-Exam Scenario \<close>
|
subsection*[mathex::example]\<open> The Math-Exam Scenario \<close>
|
||||||
text\<open> The Math-Exam Scenario is an application with mixed formal and
|
text\<open> 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
|
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, as the french
|
during the exam and the preparation requires a very rigorous process, as the french
|
||||||
|
|
|
@ -251,7 +251,7 @@ doc_class srac = ec +
|
||||||
\end{isar}
|
\end{isar}
|
||||||
\<close>
|
\<close>
|
||||||
|
|
||||||
section*[mathex_onto::example]\<open> The Math-Exam Scenario \<close>
|
section*[mathex::example]\<open> The Math-Exam Scenario \<close>
|
||||||
text\<open> The Math-Exam Scenario is an application with mixed formal and
|
text\<open> 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
|
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, as the french
|
during the exam and the preparation requires a very rigorous process, as the french
|
||||||
|
|
6
install
6
install
|
@ -125,7 +125,7 @@ check_afp_entries() {
|
||||||
|
|
||||||
check_isa_dof_patch() {
|
check_isa_dof_patch() {
|
||||||
echo "* Check availability of Isabelle/DOF patch:"
|
echo "* Check availability of Isabelle/DOF patch:"
|
||||||
src="patches/thy_output.ML"
|
src="src/patches/thy_output.ML"
|
||||||
dst="$ISABELLE_HOME/src/Pure/Thy/thy_output.ML"
|
dst="$ISABELLE_HOME/src/Pure/Thy/thy_output.ML"
|
||||||
|
|
||||||
if command -v cmp > /dev/null 2>&1 && cmp -s "$src" "$dst" ; then
|
if command -v cmp > /dev/null 2>&1 && cmp -s "$src" "$dst" ; then
|
||||||
|
@ -185,7 +185,7 @@ install_and_register(){
|
||||||
DIR="$ISABELLE_HOME_USER/DOF/latex"
|
DIR="$ISABELLE_HOME_USER/DOF/latex"
|
||||||
echo " - Installing LaTeX styles in $DIR"
|
echo " - Installing LaTeX styles in $DIR"
|
||||||
mkdir -p "$DIR"
|
mkdir -p "$DIR"
|
||||||
cp $GEN_DIR/latex/*.sty "$DIR"
|
cp $GEN_DIR/*/*/*.sty "$DIR"
|
||||||
|
|
||||||
DIR="$ISABELLE_HOME_USER/etc"
|
DIR="$ISABELLE_HOME_USER/etc"
|
||||||
echo " - Registering Isabelle/DOF"
|
echo " - Registering Isabelle/DOF"
|
||||||
|
@ -221,7 +221,7 @@ done
|
||||||
|
|
||||||
|
|
||||||
ACTUAL_ISABELLE_VERSION=`$ISABELLE version`
|
ACTUAL_ISABELLE_VERSION=`$ISABELLE version`
|
||||||
GEN_DIR=document-generator
|
GEN_DIR=src
|
||||||
PROG=`echo $0 | sed 's|.*/||'`;
|
PROG=`echo $0 | sed 's|.*/||'`;
|
||||||
VARS=`$ISABELLE getenv ISABELLE_HOME_USER ISABELLE_HOME ISABELLE_TOOLS`
|
VARS=`$ISABELLE getenv ISABELLE_HOME_USER ISABELLE_HOME ISABELLE_TOOLS`
|
||||||
for i in $VARS; do
|
for i in $VARS; do
|
||||||
|
|
|
@ -1525,7 +1525,7 @@ end
|
||||||
(* the following 2 lines set parser and converter for LaTeX generation of meta-attributes.
|
(* the following 2 lines set parser and converter for LaTeX generation of meta-attributes.
|
||||||
Currently of *all* commands, no distinction between text* and text command.
|
Currently of *all* commands, no distinction between text* and text command.
|
||||||
This code depends on a MODIFIED Isabelle2017 version resulting from applying the files
|
This code depends on a MODIFIED Isabelle2017 version resulting from applying the files
|
||||||
under Isabell_DOF/patches.
|
under src/patches.
|
||||||
*)
|
*)
|
||||||
(* REMARK PORT 2018 : transmission of meta-args to LaTeX crude and untested. Can be found in
|
(* REMARK PORT 2018 : transmission of meta-args to LaTeX crude and untested. Can be found in
|
||||||
present_token. *)
|
present_token. *)
|
|
@ -3,12 +3,8 @@ session "Isabelle_DOF" = "Functional-Automata" +
|
||||||
sessions
|
sessions
|
||||||
"Regular-Sets"
|
"Regular-Sets"
|
||||||
theories
|
theories
|
||||||
Isa_DOF
|
"DOF/Isa_DOF"
|
||||||
"ontologies/Conceptual"
|
"ontologies/ontologies"
|
||||||
"ontologies/CENELEC_50128"
|
|
||||||
"ontologies/scholarly_paper"
|
|
||||||
"ontologies/technical_report"
|
|
||||||
"ontologies/mathex_onto"
|
|
||||||
|
|
||||||
session "Isabelle_DOF-tests" = "Isabelle_DOF" +
|
session "Isabelle_DOF-tests" = "Isabelle_DOF" +
|
||||||
options [document = false]
|
options [document = false]
|
|
@ -12,7 +12,7 @@ identifies:
|
||||||
|
|
||||||
(*<<*)
|
(*<<*)
|
||||||
theory CENELEC_50128
|
theory CENELEC_50128
|
||||||
imports "../Isa_COL"
|
imports "../../DOF/Isa_COL"
|
||||||
begin
|
begin
|
||||||
(*>>*)
|
(*>>*)
|
||||||
|
|
||||||
|
@ -726,4 +726,4 @@ Proof_Context.init_global;
|
||||||
\<close>
|
\<close>
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
theory Conceptual
|
theory Conceptual
|
||||||
imports "../Isa_DOF" "../Isa_COL"
|
imports "../../DOF/Isa_DOF" "../../DOF/Isa_COL"
|
||||||
begin
|
begin
|
||||||
|
|
||||||
doc_class A =
|
doc_class A =
|
|
@ -12,7 +12,7 @@ proving environment after all ! So this ontology provides:
|
||||||
|
|
||||||
|
|
||||||
theory math_paper
|
theory math_paper
|
||||||
imports "../Isa_DOF"
|
imports "../../DOF/Isa_DOF"
|
||||||
begin
|
begin
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
theory mathex_onto
|
theory mathex
|
||||||
imports "../Isa_COL"
|
imports "../../DOF/Isa_COL"
|
||||||
begin
|
begin
|
||||||
|
|
||||||
(*<<*)
|
(*<<*)
|
||||||
|
@ -98,4 +98,4 @@ doc_class MathExam =
|
||||||
accepts "\<lbrace>Author\<rbrace>\<^sup>+ ~~ Header ~~ \<lbrace>Exercise ~~ Solution\<rbrace>\<^sup>+ "
|
accepts "\<lbrace>Author\<rbrace>\<^sup>+ ~~ Header ~~ \<lbrace>Exercise ~~ Solution\<rbrace>\<^sup>+ "
|
||||||
|
|
||||||
(*>>*)
|
(*>>*)
|
||||||
end
|
end
|
|
@ -0,0 +1,12 @@
|
||||||
|
theory
|
||||||
|
ontologies
|
||||||
|
imports
|
||||||
|
"CENELEC_50128/CENELEC_50128"
|
||||||
|
"Conceptual/Conceptual"
|
||||||
|
"mathex/mathex"
|
||||||
|
"math_paper/math_paper"
|
||||||
|
"scholarly_paper/scholarly_paper"
|
||||||
|
"small_math/small_math"
|
||||||
|
"technical_report/technical_report"
|
||||||
|
begin
|
||||||
|
end
|
|
@ -1,7 +1,7 @@
|
||||||
section\<open>An example ontology for a scholarly paper\<close>
|
section\<open>An example ontology for a scholarly paper\<close>
|
||||||
|
|
||||||
theory scholarly_paper
|
theory scholarly_paper
|
||||||
imports "../Isa_COL"
|
imports "../../DOF/Isa_COL"
|
||||||
begin
|
begin
|
||||||
|
|
||||||
doc_class title =
|
doc_class title =
|
|
@ -1,7 +1,7 @@
|
||||||
section\<open>An example ontology for a math paper\<close>
|
section\<open>An example ontology for a math paper\<close>
|
||||||
|
|
||||||
theory small_math
|
theory small_math
|
||||||
imports "../Isa_COL"
|
imports "../../DOF/Isa_COL"
|
||||||
begin
|
begin
|
||||||
|
|
||||||
doc_class title =
|
doc_class title =
|
|
@ -1,7 +1,7 @@
|
||||||
section\<open>An example ontology for a scholarly paper\<close>
|
section\<open>An example ontology for a scholarly paper\<close>
|
||||||
|
|
||||||
theory technical_report
|
theory technical_report
|
||||||
imports "scholarly_paper"
|
imports "../scholarly_paper/scholarly_paper"
|
||||||
begin
|
begin
|
||||||
|
|
||||||
(* for reports paper: invariant: level \<ge> -1 *)
|
(* for reports paper: invariant: level \<ge> -1 *)
|
|
@ -1,8 +1,8 @@
|
||||||
theory
|
theory
|
||||||
AssnsLemmaThmEtc
|
AssnsLemmaThmEtc
|
||||||
imports
|
imports
|
||||||
"../ontologies/Conceptual"
|
"../ontologies/Conceptual/Conceptual"
|
||||||
"../ontologies/math_paper"
|
"../ontologies/math_paper/math_paper"
|
||||||
begin
|
begin
|
||||||
|
|
||||||
section\<open>Elementary Creation of Doc-items and Access of their Attibutes\<close>
|
section\<open>Elementary Creation of Doc-items and Access of their Attibutes\<close>
|
|
@ -1,7 +1,7 @@
|
||||||
theory
|
theory
|
||||||
Attributes
|
Attributes
|
||||||
imports
|
imports
|
||||||
"../ontologies/Conceptual"
|
"../ontologies/Conceptual/Conceptual"
|
||||||
begin
|
begin
|
||||||
|
|
||||||
section\<open>Elementary Creation of Doc-items and Access of their Attibutes\<close>
|
section\<open>Elementary Creation of Doc-items and Access of their Attibutes\<close>
|
|
@ -3,7 +3,7 @@ chapter\<open>Setting and modifying attributes of doc-items\<close>
|
||||||
theory
|
theory
|
||||||
Concept_Example
|
Concept_Example
|
||||||
imports
|
imports
|
||||||
"../ontologies/Conceptual" (* we use the generic "Conceptual" ontology *)
|
"../ontologies/Conceptual/Conceptual" (* we use the generic "Conceptual" ontology *)
|
||||||
begin
|
begin
|
||||||
|
|
||||||
text\<open>@{theory "Isabelle_DOF-tests.Conceptual"} provides a monitor @{typ M} enforcing a particular document structure.
|
text\<open>@{theory "Isabelle_DOF-tests.Conceptual"} provides a monitor @{typ M} enforcing a particular document structure.
|
|
@ -3,7 +3,7 @@ chapter\<open>Setting and modifying attributes of doc-items\<close>
|
||||||
theory
|
theory
|
||||||
Concept_ExampleInvariant
|
Concept_ExampleInvariant
|
||||||
imports
|
imports
|
||||||
"../ontologies/Conceptual" (* we use the generic "Conceptual" ontology *)
|
"../ontologies/Conceptual/Conceptual" (* we use the generic "Conceptual" ontology *)
|
||||||
begin
|
begin
|
||||||
|
|
||||||
section\<open>Example: Standard Class Invariant\<close>
|
section\<open>Example: Standard Class Invariant\<close>
|
|
@ -3,7 +3,7 @@ chapter\<open>Inner Syntax Antiquotations (ISA)'s\<close>
|
||||||
theory
|
theory
|
||||||
InnerSyntaxAntiquotations
|
InnerSyntaxAntiquotations
|
||||||
imports
|
imports
|
||||||
"../ontologies/Conceptual"
|
"../ontologies/Conceptual/Conceptual"
|
||||||
begin
|
begin
|
||||||
|
|
||||||
text\<open>Since the syntax chosen for values of doc-class attributes is HOL-syntax --- requiring
|
text\<open>Since the syntax chosen for values of doc-class attributes is HOL-syntax --- requiring
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
Loading…
Reference in New Issue