Merge branch 'main' of https://git.logicalhacking.com/Isabelle_DOF/Isabelle_DOF
ci/woodpecker/push/build Pipeline failed
Details
ci/woodpecker/push/build Pipeline failed
Details
This commit is contained in:
commit
d2a1808fa8
|
@ -84,12 +84,12 @@ text*[d::D, a1 = "X3"] \<open> ... phasellus amet id massa nunc, pede suscipit r
|
|||
text\<open>Not only text-elements are "ontology-aware", proofs and code can this be too !\<close>
|
||||
|
||||
\<comment> \<open>Referencing from and to a ML-code context:\<close>
|
||||
(*<*)
|
||||
|
||||
ML*[c4::C, z = "Some @{A \<open>a1\<close>}"]\<open>
|
||||
fun fac x = if x = 0 then 1 else x * (fac(x-1))
|
||||
val v = \<^value_>\<open>A.x (the (z @{C \<open>c4\<close>}))\<close> |> HOLogic.dest_number |> snd |> fac
|
||||
\<close>
|
||||
(*>*)
|
||||
|
||||
definition*[a2::A, x=5, level="Some 1"] xx' where "xx' \<equiv> A.x @{A \<open>a1\<close>}" if "A.x @{A \<open>a1\<close>} = 5"
|
||||
|
||||
lemma*[e5::E] testtest : "xx + A.x @{A \<open>a1\<close>} = yy + A.x @{A \<open>a1\<close>} \<Longrightarrow> xx = yy" by simp
|
||||
|
@ -141,20 +141,13 @@ close_monitor*[struct]
|
|||
|
||||
text\<open>And the trace of the monitor is:\<close>
|
||||
ML\<open>val trace = @{trace_attribute struct}\<close>
|
||||
ML\<open>@{assert} (trace =
|
||||
[("Conceptual.A", "a0"), ("Conceptual.A", "a"), ("Conceptual.A", "ab"),
|
||||
("Conceptual.A", "ac"), ("Conceptual.C", "c1"), ("Conceptual.A", "a1"),
|
||||
("Conceptual.C", "c1"), ("Conceptual.D", "d"), ("Conceptual.C", "c4"),
|
||||
("Conceptual.A", "a2"), ("Conceptual.E", "e5"), ("Conceptual.E", "e6"),
|
||||
("Conceptual.E", "e6"), ("Conceptual.C", "c2"), ("Conceptual.F", "f")]) \<close>
|
||||
(* BUG : DECLARATIONS SHOULD NOT BE TRACED, JUST DEFINITIONS.
|
||||
ML\<open>@{assert} (trace =
|
||||
[("Conceptual.A", "a0"), ("Conceptual.A", "a"), ("Conceptual.A", "ab"),
|
||||
("Conceptual.A", "ac"), ("Conceptual.A", "a1"),
|
||||
("Conceptual.C", "c1"), ("Conceptual.D", "d"), ("Conceptual.C", "c4"),
|
||||
("Conceptual.A", "a2"), ("Conceptual.E", "e5"),
|
||||
("Conceptual.E", "e6"), ("Conceptual.C", "c2"), ("Conceptual.F", "f")]) \<close>
|
||||
*)
|
||||
|
||||
|
||||
text\<open>Note that the monitor \<^typ>\<open>M\<close> of the ontology \<^theory>\<open>Isabelle_DOF-Ontologies.Conceptual\<close> does
|
||||
not observe the common entities of \<^theory>\<open>Isabelle_DOF.Isa_COL\<close>, but just those defined in the
|
||||
|
|
|
@ -59,9 +59,8 @@ fun gen_enriched_document_command2 name {body} cid_transform attr_transform mark
|
|||
val file = {path = Path.make [oid' ^ "_snippet.tex"],
|
||||
pos = @{here},
|
||||
content = Bytes.string strg}
|
||||
|
||||
val _ = Generated_Files.write_file (Path.make ["latex_test"])
|
||||
file
|
||||
val dir = Path.append (Resources.master_directory thy) (Path.make ["latex_test"])
|
||||
val _ = Generated_Files.write_file dir file
|
||||
val _ = writeln (strg)
|
||||
in () end \<comment> \<open>important observation: thy is not modified.
|
||||
This implies that several text block can be
|
||||
|
|
|
@ -165,3 +165,7 @@
|
|||
\author{No Author Given}
|
||||
\input{ontologies}
|
||||
\IfFileExists{preamble.tex}{\input{preamble.tex}}{}%
|
||||
|
||||
% notation
|
||||
\newcommand{\isactrltermUNDERSCORE}{\isakeywordcontrol{term{\isacharunderscore}}}
|
||||
\newcommand{\isactrlvalueUNDERSCORE}{\isakeywordcontrol{value{\isacharunderscore}}}
|
|
@ -699,6 +699,13 @@ fun get_value_local oid ctxt =
|
|||
let val Instance v = get_instance_global oid (Proof_Context.theory_of ctxt)
|
||||
in v |> #value end
|
||||
|
||||
fun get_defined_global oid thy = let val Instance d = get_instance_global oid thy
|
||||
in d |> #defined end
|
||||
|
||||
fun get_defined_local oid ctxt =
|
||||
let val Instance d = get_instance_global oid (Proof_Context.theory_of ctxt)
|
||||
in d |> #defined end
|
||||
|
||||
(* missing : setting terms to ground (no type-schema vars, no schema vars. )*)
|
||||
|
||||
fun binding_from_pos get_objects get_object_name name thy =
|
||||
|
@ -1621,7 +1628,10 @@ fun register_oid_cid_in_open_monitors oid pos cid_pos thy =
|
|||
(Name_Space.dest_table (DOF_core.get_monitor_infos (Proof_Context.init_global thy)))
|
||||
fun conv_attrs (((lhs, pos), opn), rhs) = (markup2string lhs,pos,opn,
|
||||
Syntax.read_term_global thy rhs)
|
||||
val trace_attr = [((("trace", @{here}), "+="), "[("^cid_long^", ''"^oid^"'')]")]
|
||||
val defined = DOF_core.get_defined_global oid thy
|
||||
val trace_attr = if defined
|
||||
then [((("trace", @{here}), "+="), "[("^cid_long^", ''"^oid^"'')]")]
|
||||
else []
|
||||
val assns' = map conv_attrs trace_attr
|
||||
fun cid_of oid = let val DOF_core.Instance params = DOF_core.get_instance_global oid thy
|
||||
in #cid params end
|
||||
|
@ -1631,8 +1641,12 @@ fun register_oid_cid_in_open_monitors oid pos cid_pos thy =
|
|||
fun def_trans_value oid =
|
||||
(#1 o (calc_update_term {mk_elaboration=true} thy (cid_of oid) assns'))
|
||||
#> value ctxt
|
||||
val _ = if null enabled_monitors then () else writeln "registrating in monitors ..."
|
||||
val _ = app (fn (n, _) => writeln(oid^" : "^cid_long^" ==> "^n)) enabled_monitors;
|
||||
val _ = if null enabled_monitors
|
||||
then ()
|
||||
else if defined
|
||||
then (tracing "registrating in monitors ..." ;
|
||||
app (fn (n, _) => tracing (oid^" : "^cid_long^" ==> "^n)) enabled_monitors)
|
||||
else ()
|
||||
(* check that any transition is possible: *)
|
||||
fun class_inv_checks thy =
|
||||
enabled_monitors
|
||||
|
|
Loading…
Reference in New Issue