From 4f349de9b9b3405b66f7ff1204755fe5ee56544d Mon Sep 17 00:00:00 2001 From: bu Date: Sat, 6 Apr 2019 12:08:38 +0200 Subject: [PATCH] some patches in install to make it run on MacOS --- examples/cenelec/Example.thy | 92 ++++++++++++++++++++++++++++++++ examples/math_exam/Noodles.thy | 5 ++ examples/math_exam/On_Noodle.thy | 30 +++++++++++ 3 files changed, 127 insertions(+) create mode 100644 examples/cenelec/Example.thy create mode 100644 examples/math_exam/Noodles.thy create mode 100644 examples/math_exam/On_Noodle.thy diff --git a/examples/cenelec/Example.thy b/examples/cenelec/Example.thy new file mode 100644 index 0000000..803c5ee --- /dev/null +++ b/examples/cenelec/Example.thy @@ -0,0 +1,92 @@ +chapter\ Example : Forward and Standard (use-after-define) Referencing\ + +theory Example + imports "../../ontologies/CENELEC_50128" + "../../ontologies/scholarly_paper" +begin + +section\ Some examples of Isabelle's standard antiquotations. \ +(* some show-off of standard anti-quotations: *) +text \THIS IS A TEXT\ + +text\ @{thm refl} of name @{thm [source] refl} + @{thm[mode=Rule] conjI} + @{file "../../Isa_DOF.thy"} + @{value "3+4::int"} + @{const hd} + @{theory List}} + @{term "3"} + @{type bool} + @{term [show_types] "f x = a + x"} \ + + + + +section\ Core Examples for stating text-elements as doc-items.\ + +text\An "anonymous" text-item, automatically coerced into the top-class "text".\ +text*[tralala] \ Brexit means Brexit \ + +text\Examples for declaration of typed doc-items "assumption" and "hypothesis", + concepts defined in the underlying ontology @{theory "CENELEC_50128"}. \ +text*[ass1::assumption] \ The subsystem Y is safe. \ +text*[hyp1::hypothesis] \ P not equal NP \ + +text\A real example fragment from a larger project, declaring a text-element as a + "safety-related application condition", a concept defined in the @{theory "CENELEC_50128"} + ontology:\ + +text*[new_ass::hypothesis]\Under the assumption @{assumption \ass1\} we establish the following: ... \ + +text*[ass122::SRAC] \ The overall sampling frequence of the odometer +subsystem is therefore 14 khz, which includes sampling, computing and +result communication times... \ + +text*[t10::test_result] \ This is a meta-test. This could be an ML-command +that governs the external test-execution via, eg., a makefile or specific calls +to a test-environment or test-engine \ + + +section\ References to doc-items.\ +text\Finally some examples of references to doc-items, i.e. text-elements with declared + meta-information and status. \ +text \ As established by @{docref (unchecked) \t10\}, + @{docref (define) \t10\} \ +text \ the @{docref \t10\} + as well as the @{docref \ass122\}\ +text \ represent a justification of the safety related applicability + condition @{SRAC \ass122\} aka exported constraint @{EC \ass122\}.\ + + + + +section\ Some Tests for Ontology Framework and its CENELEC Instance \ + +declare_reference* [lalala::requirement, alpha="main", beta=42] +declare_reference* [blablabla::cid, alpha="beta sdf", beta=gamma, delta=dfg_fgh\<^sub>1] + +paragraph* [sdfk::introduction] \ just a paragraph - lexical variant \ + + + + +section*[h::example]\ Some global inspection commands for the status of docitem and doc-class tables ... \ + + + +section*[i::example]\ Text Antiquotation Infrastructure ... \ + +text\ @{docitem \lalala\} -- produces warning. \ +text\ @{docitem (unchecked) \lalala\} -- produces no warning. \ + +text\ @{docitem \ass122\} -- global reference to a text-item in another file. \ + +text\ @{EC \ass122\} -- global reference to a exported constraint in another file. + Note that the link is actually a srac, which, according to + the ontology, happens to be an "ec". \ + + + +end + + \ No newline at end of file diff --git a/examples/math_exam/Noodles.thy b/examples/math_exam/Noodles.thy new file mode 100644 index 0000000..5a9be9e --- /dev/null +++ b/examples/math_exam/Noodles.thy @@ -0,0 +1,5 @@ +theory Noodles + imports "small_math" +begin + +title*[t::title]\On Noodles\ \ No newline at end of file diff --git a/examples/math_exam/On_Noodle.thy b/examples/math_exam/On_Noodle.thy new file mode 100644 index 0000000..91aa424 --- /dev/null +++ b/examples/math_exam/On_Noodle.thy @@ -0,0 +1,30 @@ +theory "On_Noodle" + imports small_math +begin + +open_monitor*[this::article] + +title*[t1::title]\On Noodles\ + +text*[simon::author]\Simon Foster\ +text*[a::abstract, keyword_list = "[topology]"] +\We present the first fundamental results on the goundbreaking theory of noodles...\ +section*[intro::introduction]\Introduction\ + +text\ Authorities say, that Noodles are unleavened dough which is stretched, + extruded, or rolled flat and cut into one or a variety of shapes which usually +include long, thin strips, or waves, helices, tubes, strings, or shells, or +folded over, or cut into other shapes. Noodles are usually cooked in boiling water, +sometimes with cooking oil or salt added. \ + +section*[def_sec::technical]\Basic definitions\ + +text*[d1::"definition"]\My first definition\ +definition noodle ::"bool" where "noodle = (THE x. True)" + +(* +update_instance*[def1, formal_results:="[@{thm ''noodle_def''}]"] +*) + +close_monitor*[this::article] +