diff --git a/examples/scholarly_paper/2020-iFM-CSP/paper.thy b/examples/scholarly_paper/2020-iFM-CSP/paper.thy index b727d04..107f87e 100644 --- a/examples/scholarly_paper/2020-iFM-CSP/paper.thy +++ b/examples/scholarly_paper/2020-iFM-CSP/paper.thy @@ -353,7 +353,7 @@ Roscoe and Brooks @{cite "Roscoe1992AnAO"} finally proposed another ordering, ca that completeness could at least be assured for read-operations. This more complex ordering is based on the concept \<^emph>\refusals after\ a trace \s\ and defined by \\ P s \ {X | (s, X) \ \ P}\.\ -text*[process_ordering::"definition", short_name="''process ordering''"]\ +Definition*[process_ordering, short_name="''process ordering''"]\ We define \P \ Q \ \\<^sub>\ \ \\<^sub>\ \ \\<^sub>\ \, where \<^vs>\-0.2cm\ \<^enum> \<^vs>\-0.2cm\ \\\<^sub>\ = \ P \ \ Q \ \<^enum> \\\<^sub>\ = s \ \ P \ \ P s = \ Q s\ @@ -528,21 +528,21 @@ To handle termination better, we added two new processes \CHAOS\<^sub>S\<^ %thus must be without it. \ (* -text*[X2::"definition"]\\RUN A \ \ X. \ x \ A \ X\ \<^vs>\-0.7cm\\ -text*[X3::"definition"]\\CHAOS A \ \ X. (STOP \ (\ x \ A \ X))\ \<^vs>\-0.7cm\\ -text*[X4::"definition"]\\CHAOS\<^sub>S\<^sub>K\<^sub>I\<^sub>P A \ \ X. (SKIP \ STOP \ (\ x \ A \ X))\\<^vs>\-0.7cm\\ +Definition*[X22]\\RUN A \ \ X. \ x \ A \ X\ \<^vs>\-0.7cm\\ +Definition*[X32]\\CHAOS A \ \ X. (STOP \ (\ x \ A \ X))\ \<^vs>\-0.7cm\\ +Definition*[X42]\\CHAOS\<^sub>S\<^sub>K\<^sub>I\<^sub>P A \ \ X. (SKIP \ STOP \ (\ x \ A \ X))\\<^vs>\-0.7cm\\ -text\ The \RUN\-process defined @{definition X2} represents the process that accepts all +text\ The \RUN\-process defined @{definition X22} represents the process that accepts all events, but never stops nor deadlocks. The \CHAOS\-process comes in two variants shown in -@{definition X3} and @{definition X4}: the process that non-deterministically stops or +@{definition X32} and @{definition X42}: the process that non-deterministically stops or accepts any offered event, whereas \CHAOS\<^sub>S\<^sub>K\<^sub>I\<^sub>P\ can additionally terminate.\ *) -text*[X2::"definition"]\\RUN A \ \ X. \ x \ A \ X\ \<^vs>\-0.7cm\\ -text*[X3::"definition"]\\CHAOS A \ \ X. (STOP \ (\ x \ A \ X))\ \<^vs>\-0.7cm\\ -text*[X4::"definition"]\\CHAOS\<^sub>S\<^sub>K\<^sub>I\<^sub>P A \ \ X. (SKIP \ STOP \ (\ x \ A \ X))\\<^vs>\-0.7cm\\ -text*[X5::"definition"]\\DF A \ \ X. (\ x \ A \ X)\ \<^vs>\-0.7cm\\ -text*[X6::"definition"]\\DF\<^sub>S\<^sub>K\<^sub>I\<^sub>P A \ \ X. ((\ x \ A \ X) \ SKIP)\ \<^vs>\-0.7cm\ \ +Definition*[X2]\\RUN A \ \ X. \ x \ A \ X\ \<^vs>\-0.7cm\\ +Definition*[X3]\\CHAOS A \ \ X. (STOP \ (\ x \ A \ X))\ \<^vs>\-0.7cm\\ +Definition*[X4]\\CHAOS\<^sub>S\<^sub>K\<^sub>I\<^sub>P A \ \ X. (SKIP \ STOP \ (\ x \ A \ X))\\<^vs>\-0.7cm\\ +Definition*[X5]\\DF A \ \ X. (\ x \ A \ X)\ \<^vs>\-0.7cm\\ +Definition*[X6]\\DF\<^sub>S\<^sub>K\<^sub>I\<^sub>P A \ \ X. ((\ x \ A \ X) \ SKIP)\ \<^vs>\-0.7cm\ \ text\ \<^vs>\-0.3cm\ \<^noindent> In the following, we denote \ \\

= {DF\<^sub>S\<^sub>K\<^sub>I\<^sub>P, DF, RUN, CHAOS, CHAOS\<^sub>S\<^sub>K\<^sub>I\<^sub>P}\. @@ -605,18 +605,19 @@ In the literature, deadlock and lifelock are phenomena that are often handled separately. One contribution of our work is establish their precise relationship inside the Failure/Divergence Semantics of \<^csp>.\ -text*[X10::"definition"] \ \deadlock\<^sub>-free P \ DF\<^sub>S\<^sub>K\<^sub>I\<^sub>P UNIV \\<^sub>\ P\ \<^vs>\-0.3cm\ \ +(* bizarre: Definition* does not work for this single case *) +text*[X10::"definition"]\ \deadlock\<^sub>-free P \ DF\<^sub>S\<^sub>K\<^sub>I\<^sub>P UNIV \\<^sub>\ P\ \<^vs>\-0.3cm\ \ text\\<^noindent> A process \P\ is deadlock-free if and only if after any trace \s\ without \\\, the union of \\\ and all events of \P\ can never be a refusal set associated to \s\, which means that \P\ cannot be deadlocked after any non-terminating trace. \<^vs>\-0.2cm\\ -text*[T1::"theorem", short_name="\DF definition captures deadlock-freeness\"] +Theorem*[T1, short_name="\DF definition captures deadlock-freeness\"] \ \hfill \break \deadlock_free P \ (\s\\ P. tickFree s \ (s, {\}\events_of P) \ \ P)\ \<^vs>\-0.4cm\\ -text*[X11::"definition"]\ \livelock\<^sub>-free P \ \ P = {} \ \<^vs>\-0.2cm\\ +Definition*[X11]\ \livelock\<^sub>-free P \ \ P = {} \ \<^vs>\-0.2cm\\ text\ Recall that all five reference processes are livelock-free. We also have the following lemmas about the @@ -630,12 +631,12 @@ text\\<^vs>\-0.3cm\ Finally, we proved the following theorem that confirms the relationship between the two vital properties:\<^vs>\-0.3cm\ \ -text*[T2::"theorem", short_name="''DF implies LF''"] +Theorem*[T2, short_name="''DF implies LF''"] \ \hspace{0.5cm} \deadlock_free P \ livelock_free P\ \<^vs>\-0.3cm\\ text\ This is totally natural, at a first glance, but surprising as the proof of deadlock-freeness only requires -failure refinement \\\<^sub>\\ (see @{definition X10}) where divergence traces are mixed within the failures set. +failure refinement \\\<^sub>\\ (see @{definition \X10\}) where divergence traces are mixed within the failures set. Note that the existing tools in the literature normally detect these two phenomena separately, such as FDR for which checking livelock-freeness is very costly. In our framework, deadlock-freeness of a given system @@ -684,7 +685,7 @@ processes and we call the resulting process \SYSTEM\: \<^vs>\ @{theory_text [display,indent=5] \ definition SEND \ (\ X. left?x \ (mid!x \ (ack \ X))) -definition REC \ (\ X. mid?x \ (right!x \ (ack \ X))) +definition REC \ (\ X. mid?x \ (right!x \ (ack \ X))) definition SYN \ (range mid) \ {ack} definition "SYSTEM \ (SEND \SYN\ REC) \\ SYN"\} @@ -788,7 +789,7 @@ Roughly similar to labelled transition systems, we provide for deterministic \<^ form that is based on an explicit state. The general schema of normalized processes is defined as follows: \<^vs>\0.1cm\ -@{cartouche [display,indent=20] \P\<^sub>n\<^sub>o\<^sub>r\<^sub>m\\\<^sub>,\\ \ \ X. (\\. \e\(\ \) \ X (\ \ e))\} +@{cartouche [display,indent=20] \P\<^sub>n\<^sub>o\<^sub>r\<^sub>m\\\<^sub>,\\ \ \ X. (\\. \e\(\ \) \ X(\ \ e))\} \<^vs>\-0.1cm\ where \\\ is a transition function which returns the set of events that can be triggered from the current state \\\ given as parameter. The update function \\\ takes two parameters \\\ and an event \e\ and returns the new state. @@ -893,7 +894,7 @@ denotational semantics. %\FORK i = picks \ putsdown \ FORK i\. After that we apply the same method %to get the philosopher process under a normal form. -Thanks to @{math_content \T3\}, we obtain normalized processes +Thanks to @{theorem \T3\}, we obtain normalized processes for \FORKs\, \PHILs\ and \DINING\: @{theory_text [display,indent=5] \definition "trans\<^sub>F \ \fs. (\\<^sub>i\<^sub><\<^sub>N. trans\<^sub>f i (fs!i))" diff --git a/examples/technical_report/Isabelle_DOF-Manual/document/figures/definition-use-CSP.png b/examples/technical_report/Isabelle_DOF-Manual/document/figures/definition-use-CSP.png old mode 100755 new mode 100644 index b4973ae..abcf35e Binary files a/examples/technical_report/Isabelle_DOF-Manual/document/figures/definition-use-CSP.png and b/examples/technical_report/Isabelle_DOF-Manual/document/figures/definition-use-CSP.png differ diff --git a/src/DOF/Isa_DOF.thy b/src/DOF/Isa_DOF.thy index 8d7a1fc..210bfb8 100755 --- a/src/DOF/Isa_DOF.thy +++ b/src/DOF/Isa_DOF.thy @@ -1397,13 +1397,13 @@ fun meta_args_2_string thy ((((lab, _), cid_opt), attr_list) : ODL_Command_Parse (* for the moment naive, i.e. without textual normalization of attribute names and adapted term printing *) let val l = "label = "^ (enclose "{" "}" lab) - val _ = writeln("meta_args_2_string lab:"^ lab ^":"^ (@{make_string } cid_opt) ) + (* val _ = writeln("meta_args_2_string lab:"^ lab ^":"^ (@{make_string } cid_opt) ) *) val cid_long = case cid_opt of NONE => (case DOF_core.get_object_global lab thy of NONE => DOF_core.default_cid | SOME X => #cid X) | SOME(cid,_) => DOF_core.parse_cid_global thy cid - val _ = writeln("meta_args_2_string cid_long:"^ cid_long ) + (* val _ = writeln("meta_args_2_string cid_long:"^ cid_long ) *) val cid_txt = "type = " ^ (enclose "{" "}" cid_long); fun ltx_of_term _ _ (Const ("List.list.Cons", @{typ "char \ char list \ char list"}) $ t1 $ t2) diff --git a/src/ontologies/scholarly_paper/DOF-scholarly_paper-thm.sty b/src/ontologies/scholarly_paper/DOF-scholarly_paper-thm.sty index 5a4f3d0..7f88c19 100755 --- a/src/ontologies/scholarly_paper/DOF-scholarly_paper-thm.sty +++ b/src/ontologies/scholarly_paper/DOF-scholarly_paper-thm.sty @@ -20,7 +20,7 @@ \newtheorem{example}{Example} \newtheorem{definition}{Definition} -\newtheorem{theorem}{Theorem} +\newtheorem{theorem}{Theorem} diff --git a/src/ontologies/scholarly_paper/DOF-scholarly_paper.sty b/src/ontologies/scholarly_paper/DOF-scholarly_paper.sty index d3abfd1..fd25de0 100755 --- a/src/ontologies/scholarly_paper/DOF-scholarly_paper.sty +++ b/src/ontologies/scholarly_paper/DOF-scholarly_paper.sty @@ -341,6 +341,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Besser: Einfach durchreichen wg Vererbung ! +\NewEnviron{isamarkupDefinition*}[1][]{\isaDof[env={text.scholarly_paper.definition},#1]{\BODY}} \newisadof{text.scholarly_paper.definition}% [label=,type=% , scholarly_paper.math_content.short_name =% @@ -399,6 +400,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Besser: Einfach durchreichen wg Vererbung ! +\NewEnviron{isamarkupLemma*}[1][]{\isaDof[env={text.scholarly_paper.lemma},#1]{\BODY}} \newisadof{text.scholarly_paper.lemma}% [label=,type=% , scholarly_paper.math_content.short_name =% @@ -426,6 +428,7 @@ } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Besser: Einfach durchreichen wg Vererbung ! +\NewEnviron{isamarkupTheorem*}[1][]{\isaDof[env={text.scholarly_paper.theorem},#1]{\BODY}} \newisadof{text.scholarly_paper.theorem}% [label=,type=% , scholarly_paper.math_content.short_name =%