diff --git a/ROOT b/ROOT index 46c0f3b..da826df 100644 --- a/ROOT +++ b/ROOT @@ -10,3 +10,11 @@ session "Isabelle_DOF" = "Functional-Automata" + "ontologies/technical_report" "ontologies/mathex_onto" +session "Isabelle_DOF-tests" = "Isabelle_DOF" + + options [document = false] + theories + "tests/AssnsLemmaThmEtc" + "tests/Concept_ExampleInvariant" + "tests/Concept_Example" + "tests/InnerSyntaxAntiquotations" + "tests/Attributes" diff --git a/examples/conceptual/AssnsLemmaThmEtc.thy b/tests/AssnsLemmaThmEtc.thy similarity index 93% rename from examples/conceptual/AssnsLemmaThmEtc.thy rename to tests/AssnsLemmaThmEtc.thy index 1f98909..4cc0e85 100644 --- a/examples/conceptual/AssnsLemmaThmEtc.thy +++ b/tests/AssnsLemmaThmEtc.thy @@ -1,5 +1,8 @@ -theory AssnsLemmaThmEtc - imports "../../ontologies/Conceptual" "../../ontologies/math_paper" +theory + AssnsLemmaThmEtc +imports + "../ontologies/Conceptual" + "../ontologies/math_paper" begin section\Elementary Creation of Doc-items and Access of their Attibutes\ @@ -17,14 +20,18 @@ text*[aa::F, property = "[@{term ''True''}]"] \Our definition of the HOL-Logic has the following properties:\ assert*[aa::F] "True" - +(* does not work in batch mode ... (* sample for accessing a property filled with previous assert's of "aa" *) ML\ ISA_core.property_list_dest @{context} @{docitem_attribute property :: aa};\ + + assert*[aa::F] " X \ Y \ True" (*example with uni-code *) ML\ ISA_core.property_list_dest @{context} @{docitem_attribute property :: aa}; app writeln (tl (rev it));\ +*) + assert*[aa::F] "\x::bool. X \ Y \ True" (*problem with uni-code *) ML\ @@ -33,12 +40,12 @@ Syntax.read_term_global @{theory} "[@{termrepr ''True @ True''}] @{term "[@{term '' True @ True ''}]"}; (* with isa-check *) @{term "[@{termrepr '' True @ True ''}]"}; (* without isa check *) \ - +(* ML\val [_,_,Const _ $ s,_] = (HOLogic.dest_list @{docitem_attribute property :: aa}); val t = HOLogic.dest_string s; holstring_to_bstring @{context} t \ - +*) lemma "All (\x. X \ Y \ True)" oops diff --git a/examples/conceptual/Attributes.thy b/tests/Attributes.thy similarity index 96% rename from examples/conceptual/Attributes.thy rename to tests/Attributes.thy index 78ab865..de62802 100644 --- a/examples/conceptual/Attributes.thy +++ b/tests/Attributes.thy @@ -1,5 +1,7 @@ -theory Attributes - imports "../../ontologies/Conceptual" +theory + Attributes +imports + "../ontologies/Conceptual" begin section\Elementary Creation of Doc-items and Access of their Attibutes\ @@ -18,7 +20,10 @@ Symtab.dest docclass_tab; text\A text item containing standard theorem antiquotations and complex meta-information.\ -text*[dfgdfg::B, Conceptual.B.x ="''f''", y = "[''sdf'']"]\ Lorem ipsum ... @{thm refl} \ +(* crashes in batch mode ... +text*[dfgdfg::B, Conceptual.B.x ="''f''", y = "[''sdf'']"]\ Lorem ipsum ... @{thm refl} \ +*) +text*[dfgdfg::B]\ Lorem ipsum ... @{thm refl} \ text\document class declarations lead also HOL-type declarations (relevant for ontological links).\ typ "C" @@ -106,7 +111,6 @@ text\ @{docitem_attribute omega::y} \ section\Simulation of a Monitor\ open_monitor*[figs1::figure_group, - (* anchor="''fig-demo''", ? ? ? apparently eliminated by Achim *) caption="''Sample ''"] figure*[fig_A::figure, spawn_columns=False, @@ -130,6 +134,6 @@ text\@{trace_attribute figs1}\ text\Final Status:\ print_doc_items print_doc_classes -check_doc_global + end (*>*) diff --git a/examples/conceptual/Concept_Example.thy b/tests/Concept_Example.thy similarity index 87% rename from examples/conceptual/Concept_Example.thy rename to tests/Concept_Example.thy index a8b8c6a..563bcce 100644 --- a/examples/conceptual/Concept_Example.thy +++ b/tests/Concept_Example.thy @@ -1,10 +1,12 @@ chapter\Setting and modifying attributes of doc-items\ -theory Concept_Example - imports "../../ontologies/Conceptual" (* we use the generic "Conceptual" ontology *) +theory + Concept_Example +imports + "../ontologies/Conceptual" (* we use the generic "Conceptual" ontology *) begin -text\@{theory Draft.Conceptual} provides a monitor @{typ M} enforcing a particular document structure. +text\@{theory "Isabelle_DOF-tests.Conceptual"} provides a monitor @{typ M} enforcing a particular document structure. Here, we say: From now on, this structural rules are respected wrt. all doc\_classes M is enabled for.\ open_monitor*[struct::M] @@ -29,7 +31,7 @@ fancy unicode such as: @{term "\\\<^sub>i''\"} \ text*[f::F] \ Lectus accumsan velit ultrices, ... }\ -theorem some_proof : "P" sorry +theorem some_proof : "True" by simp text\This is an example where we add a theorem into a kind of "result-list" of the doc-item f.\ update_instance*[f::F,r:="[@{thm ''Concept_Example.some_proof''}]"] @@ -52,4 +54,4 @@ print_doc_items end - \ No newline at end of file + diff --git a/examples/conceptual/Concept_ExampleInvariant.thy b/tests/Concept_ExampleInvariant.thy similarity index 97% rename from examples/conceptual/Concept_ExampleInvariant.thy rename to tests/Concept_ExampleInvariant.thy index ad9dafd..8987834 100644 --- a/examples/conceptual/Concept_ExampleInvariant.thy +++ b/tests/Concept_ExampleInvariant.thy @@ -1,7 +1,9 @@ chapter\Setting and modifying attributes of doc-items\ -theory Concept_ExampleInvariant - imports "../../ontologies/Conceptual" (* we use the generic "Conceptual" ontology *) +theory + Concept_ExampleInvariant +imports + "../ontologies/Conceptual" (* we use the generic "Conceptual" ontology *) begin section\Example: Standard Class Invariant\ @@ -108,4 +110,4 @@ close_monitor*[struct] end - \ No newline at end of file + diff --git a/examples/conceptual/InnerSyntaxAntiquotations.thy b/tests/InnerSyntaxAntiquotations.thy similarity index 88% rename from examples/conceptual/InnerSyntaxAntiquotations.thy rename to tests/InnerSyntaxAntiquotations.thy index 7e5e288..7ee6c38 100644 --- a/examples/conceptual/InnerSyntaxAntiquotations.thy +++ b/tests/InnerSyntaxAntiquotations.thy @@ -1,7 +1,9 @@ chapter\Inner Syntax Antiquotations (ISA)'s\ -theory InnerSyntaxAntiquotations - imports "../../ontologies/Conceptual" +theory + InnerSyntaxAntiquotations +imports + "../ontologies/Conceptual" begin text\Since the syntax chosen for values of doc-class attributes is HOL-syntax --- requiring @@ -14,7 +16,7 @@ They are the key-mechanism to denote \<^item> Ontological Links, i.e. attributes refering to document classes defined by the ontology \<^item> Ontological F-Links, i.e. attributes referring to formal entities inside Isabelle (such as thm's) -This file contains a number of examples resulting from the @{theory "Draft.Conceptual"} - ontology; +This file contains a number of examples resulting from the @{theory "Isabelle_DOF-tests.Conceptual"} - ontology; the emphasis of this presentation is to present the expressivity of ODL on a paradigmatical example. \ @@ -26,11 +28,13 @@ val {docobj_tab={tab = x, ...},docclass_tab, ISA_transformer_tab,...} = DOF_core \ text\Some sample lemma:\ -lemma murks : "Example" sorry +lemma murks : "Example=Example" by simp text\Example for a meta-attribute of ODL-type @{typ "file"} with an appropriate ISA for the - file @{file "./Attributes.thy"}\ -text*[xcv::F, u="@{file ''./examples/conceptual/Attributes.thy''}"]\Lorem ipsum ...\ + file @{file "InnerSyntaxAntiquotations.thy"}\ +(* not working: +text*[xcv::F, u="@{file ''InnerSyntaxAntiquotations.thy''}"]\Lorem ipsum ...\ +*) text*[xcv1::A, x=5]\Lorem ipsum ...\ text*[xcv3::A, x=7]\Lorem ipsum ...\ diff --git a/examples/conceptual/figures/A.png b/tests/figures/A.png similarity index 100% rename from examples/conceptual/figures/A.png rename to tests/figures/A.png diff --git a/examples/conceptual/figures/AnB.odp b/tests/figures/AnB.odp similarity index 100% rename from examples/conceptual/figures/AnB.odp rename to tests/figures/AnB.odp diff --git a/examples/conceptual/figures/B.png b/tests/figures/B.png similarity index 100% rename from examples/conceptual/figures/B.png rename to tests/figures/B.png