Large directory restructuring.
Isabelle_DOF/Isabelle_DOF/master This commit looks good Détails

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.
Cette révision appartient à :
Achim D. Brucker 2019-07-20 21:12:40 +01:00
Parent f8013d90a2
révision 8953f37629
50 fichiers modifiés avec 44 ajouts et 62 suppressions

6
.ci/Jenkinsfile externe
Voir le fichier

@ -4,15 +4,15 @@ pipeline {
stages {
stage('Build Docker') {
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 'rm -f .ci/isabelle4isadof/thy_output.ML'
}
}
stage('Check Docker') {
when { changeset "patches/*" }
when { changeset "src/patches/*" }
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 'rm -f .ci/isabelle4isadof/thy_output.ML'
}

Voir le fichier

@ -37,7 +37,7 @@ The installer will
* apply a patch to Isabelle that is necessary to use Isabelle/DOF.
If this patch installations fails, you need to manually replace
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:
```console
cp patches/thy_output.ML `isabelle getenv -b ISABELLE_HOME`/src/Pure/Thy/

1
ROOTS
Voir le fichier

@ -1 +1,2 @@
src
examples

Voir le fichier

@ -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

Voir le fichier

@ -1,11 +1,10 @@
(*<*)
theory MathExam
imports "Isabelle_DOF.mathex_onto"
imports "Isabelle_DOF.mathex"
HOL.Real
begin
(*>*)
open_monitor*[exam::MathExam]
(* open_monitor*[exam::MathExam] *)
section*[header::Header,examSubject= "[algebra]",
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.
\<close>
(* 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

Voir le fichier

@ -389,7 +389,7 @@ text\<open> The document class \inlineisar+figure+ --- supported by the \isadof
such as @{docitem_ref \<open>fig_figures\<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
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

Voir le fichier

@ -251,7 +251,7 @@ doc_class srac = ec +
\end{isar}
\<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
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

Voir le fichier

@ -125,7 +125,7 @@ check_afp_entries() {
check_isa_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"
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"
echo " - Installing LaTeX styles in $DIR"
mkdir -p "$DIR"
cp $GEN_DIR/latex/*.sty "$DIR"
cp $GEN_DIR/*/*/*.sty "$DIR"
DIR="$ISABELLE_HOME_USER/etc"
echo " - Registering Isabelle/DOF"
@ -221,7 +221,7 @@ done
ACTUAL_ISABELLE_VERSION=`$ISABELLE version`
GEN_DIR=document-generator
GEN_DIR=src
PROG=`echo $0 | sed 's|.*/||'`;
VARS=`$ISABELLE getenv ISABELLE_HOME_USER ISABELLE_HOME ISABELLE_TOOLS`
for i in $VARS; do

Voir le fichier

Voir le fichier

Voir le fichier

Voir le fichier

@ -1525,7 +1525,7 @@ end
(* 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.
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
present_token. *)

Voir le fichier

Voir le fichier

@ -3,12 +3,8 @@ session "Isabelle_DOF" = "Functional-Automata" +
sessions
"Regular-Sets"
theories
Isa_DOF
"ontologies/Conceptual"
"ontologies/CENELEC_50128"
"ontologies/scholarly_paper"
"ontologies/technical_report"
"ontologies/mathex_onto"
"DOF/Isa_DOF"
"ontologies/ontologies"
session "Isabelle_DOF-tests" = "Isabelle_DOF" +
options [document = false]

Voir le fichier

@ -12,7 +12,7 @@ identifies:
(*<<*)
theory CENELEC_50128
imports "../Isa_COL"
imports "../../DOF/Isa_COL"
begin
(*>>*)
@ -726,4 +726,4 @@ Proof_Context.init_global;
\<close>
end

Voir le fichier

@ -1,5 +1,5 @@
theory Conceptual
imports "../Isa_DOF" "../Isa_COL"
imports "../../DOF/Isa_DOF" "../../DOF/Isa_COL"
begin
doc_class A =

Voir le fichier

@ -12,7 +12,7 @@ proving environment after all ! So this ontology provides:
theory math_paper
imports "../Isa_DOF"
imports "../../DOF/Isa_DOF"
begin

Voir le fichier

@ -1,5 +1,5 @@
theory mathex_onto
imports "../Isa_COL"
theory mathex
imports "../../DOF/Isa_COL"
begin
(*<<*)
@ -98,4 +98,4 @@ doc_class MathExam =
accepts "\<lbrace>Author\<rbrace>\<^sup>+ ~~ Header ~~ \<lbrace>Exercise ~~ Solution\<rbrace>\<^sup>+ "
(*>>*)
end
end

12
src/ontologies/ontologies.thy Fichier normal
Voir le fichier

@ -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

Voir le fichier

@ -1,7 +1,7 @@
section\<open>An example ontology for a scholarly paper\<close>
theory scholarly_paper
imports "../Isa_COL"
imports "../../DOF/Isa_COL"
begin
doc_class title =

Voir le fichier

@ -1,7 +1,7 @@
section\<open>An example ontology for a math paper\<close>
theory small_math
imports "../Isa_COL"
imports "../../DOF/Isa_COL"
begin
doc_class title =

Voir le fichier

@ -1,7 +1,7 @@
section\<open>An example ontology for a scholarly paper\<close>
theory technical_report
imports "scholarly_paper"
imports "../scholarly_paper/scholarly_paper"
begin
(* for reports paper: invariant: level \<ge> -1 *)

Voir le fichier

@ -1,8 +1,8 @@
theory
AssnsLemmaThmEtc
imports
"../ontologies/Conceptual"
"../ontologies/math_paper"
"../ontologies/Conceptual/Conceptual"
"../ontologies/math_paper/math_paper"
begin
section\<open>Elementary Creation of Doc-items and Access of their Attibutes\<close>

Voir le fichier

@ -1,7 +1,7 @@
theory
Attributes
imports
"../ontologies/Conceptual"
"../ontologies/Conceptual/Conceptual"
begin
section\<open>Elementary Creation of Doc-items and Access of their Attibutes\<close>

Voir le fichier

@ -3,7 +3,7 @@ chapter\<open>Setting and modifying attributes of doc-items\<close>
theory
Concept_Example
imports
"../ontologies/Conceptual" (* we use the generic "Conceptual" ontology *)
"../ontologies/Conceptual/Conceptual" (* we use the generic "Conceptual" ontology *)
begin
text\<open>@{theory "Isabelle_DOF-tests.Conceptual"} provides a monitor @{typ M} enforcing a particular document structure.

Voir le fichier

@ -3,7 +3,7 @@ chapter\<open>Setting and modifying attributes of doc-items\<close>
theory
Concept_ExampleInvariant
imports
"../ontologies/Conceptual" (* we use the generic "Conceptual" ontology *)
"../ontologies/Conceptual/Conceptual" (* we use the generic "Conceptual" ontology *)
begin
section\<open>Example: Standard Class Invariant\<close>

Voir le fichier

@ -3,7 +3,7 @@ chapter\<open>Inner Syntax Antiquotations (ISA)'s\<close>
theory
InnerSyntaxAntiquotations
imports
"../ontologies/Conceptual"
"../ontologies/Conceptual/Conceptual"
begin
text\<open>Since the syntax chosen for values of doc-class attributes is HOL-syntax --- requiring

Voir le fichier

Avant

Largeur:  |  Hauteur:  |  Taille: 12 KiB

Après

Largeur:  |  Hauteur:  |  Taille: 12 KiB

Voir le fichier

Avant

Largeur:  |  Hauteur:  |  Taille: 96 KiB

Après

Largeur:  |  Hauteur:  |  Taille: 96 KiB