# HG changeset patch # User wenzelm # Date 1452547383 -3600 # Node ID 324bc1ffba12e06bafb3a8b5428da04dbfe47a04 # Parent 5b946c81dfbf586806f8008c2e2adf52af61cfc8 eliminated old defs; diff -r 5b946c81dfbf -r 324bc1ffba12 src/HOL/TLA/Action.thy --- a/src/HOL/TLA/Action.thy Mon Jan 11 21:21:02 2016 +0100 +++ b/src/HOL/TLA/Action.thy Mon Jan 11 22:23:03 2016 +0100 @@ -9,25 +9,19 @@ imports Stfun begin - -(** abstract syntax **) - -type_synonym 'a trfun = "(state * state) \ 'a" -type_synonym action = "bool trfun" +type_synonym 'a trfun = "state \ state \ 'a" +type_synonym action = "bool trfun" instance prod :: (world, world) world .. -consts - (** abstract syntax **) - before :: "'a stfun \ 'a trfun" - after :: "'a stfun \ 'a trfun" - unch :: "'a stfun \ action" +definition enabled :: "action \ stpred" + where "enabled A s \ \u. (s,u) \ A" + - SqAct :: "[action, 'a stfun] \ action" - AnAct :: "[action, 'a stfun] \ action" - enabled :: "action \ stpred" - -(** concrete syntax **) +consts + before :: "'a stfun \ 'a trfun" + after :: "'a stfun \ 'a trfun" + unch :: "'a stfun \ action" syntax (* Syntax for writing action expressions in arbitrary contexts *) @@ -40,8 +34,6 @@ (*** Priming: same as "after" ***) "_prime" :: "lift \ lift" ("(_`)" [100] 99) - "_SqAct" :: "[lift, lift] \ lift" ("([_]'_(_))" [0,1000] 99) - "_AnAct" :: "[lift, lift] \ lift" ("(<_>'_(_))" [0,1000] 99) "_Enabled" :: "lift \ lift" ("(Enabled _)" [100] 100) translations @@ -50,25 +42,30 @@ "_after" == "CONST after" "_prime" => "_after" "_unchanged" == "CONST unch" - "_SqAct" == "CONST SqAct" - "_AnAct" == "CONST AnAct" "_Enabled" == "CONST enabled" - "w \ [A]_v" <= "_SqAct A v w" - "w \ _v" <= "_AnAct A v w" "s \ Enabled A" <= "_Enabled A s" "w \ unchanged f" <= "_unchanged f w" axiomatization where unl_before: "(ACT $v) (s,t) \ v s" and unl_after: "(ACT v$) (s,t) \ v t" and - unchanged_def: "(s,t) \ unchanged v \ (v t = v s)" -defs - square_def: "ACT [A]_v \ ACT (A \ unchanged v)" - angle_def: "ACT _v \ ACT (A \ \ unchanged v)" + +definition SqAct :: "[action, 'a stfun] \ action" + where square_def: "SqAct A v \ ACT (A \ unchanged v)" + +definition AnAct :: "[action, 'a stfun] \ action" + where angle_def: "AnAct A v \ ACT (A \ \ unchanged v)" - enabled_def: "s \ Enabled A \ \u. (s,u) \ A" +syntax + "_SqAct" :: "[lift, lift] \ lift" ("([_]'_(_))" [0, 1000] 99) + "_AnAct" :: "[lift, lift] \ lift" ("(<_>'_(_))" [0, 1000] 99) +translations + "_SqAct" == "CONST SqAct" + "_AnAct" == "CONST AnAct" + "w \ [A]_v" \ "_SqAct A v w" + "w \ _v" \ "_AnAct A v w" (* The following assertion specializes "intI" for any world type diff -r 5b946c81dfbf -r 324bc1ffba12 src/HOL/TLA/Init.thy --- a/src/HOL/TLA/Init.thy Mon Jan 11 21:21:02 2016 +0100 +++ b/src/HOL/TLA/Init.thy Mon Jan 11 22:23:03 2016 +0100 @@ -16,25 +16,22 @@ type_synonym temporal = "behavior form" - consts - Initial :: "('w::world \ bool) \ temporal" first_world :: "behavior \ ('w::world)" st1 :: "behavior \ state" st2 :: "behavior \ state" +definition Initial :: "('w::world \ bool) \ temporal" + where Init_def: "Initial F sigma = F (first_world sigma)" + syntax "_TEMP" :: "lift \ 'a" ("(TEMP _)") "_Init" :: "lift \ lift" ("(Init _)"[40] 50) - translations "TEMP F" => "(F::behavior \ _)" "_Init" == "CONST Initial" "sigma \ Init F" <= "_Init F sigma" -defs - Init_def: "sigma \ Init F == (first_world sigma) \ F" - overloading fw_temp \ "first_world :: behavior \ behavior" fw_stp \ "first_world :: behavior \ state" diff -r 5b946c81dfbf -r 324bc1ffba12 src/HOL/TLA/Memory/MemClerk.thy --- a/src/HOL/TLA/Memory/MemClerk.thy Mon Jan 11 21:21:02 2016 +0100 +++ b/src/HOL/TLA/Memory/MemClerk.thy Mon Jan 11 22:23:03 2016 +0100 @@ -74,10 +74,10 @@ unanswered call for that process. *) lemma MClkidle: "\ \$Calling send p \ $(cst!p) = #clkA \ \MClkNext send rcv cst p" - by (auto simp: Return_def MC_action_defs) + by (auto simp: AReturn_def MC_action_defs) lemma MClkbusy: "\ $Calling rcv p \ \MClkNext send rcv cst p" - by (auto simp: Call_def MC_action_defs) + by (auto simp: ACall_def MC_action_defs) (* Enabledness of actions *) @@ -86,7 +86,7 @@ \ Calling send p \ \Calling rcv p \ cst!p = #clkA \ Enabled (MClkFwd send rcv cst p)" by (tactic \action_simp_tac (@{context} addsimps [@{thm MClkFwd_def}, - @{thm Call_def}, @{thm caller_def}, @{thm rtrner_def}]) [exI] + @{thm ACall_def}, @{thm caller_def}, @{thm rtrner_def}]) [exI] [@{thm base_enabled}, @{thm Pair_inject}] 1\) lemma MClkFwd_ch_enabled: "\ Enabled (MClkFwd send rcv cst p) \ @@ -103,7 +103,7 @@ apply (tactic \action_simp_tac @{context} [@{thm MClkReply_change} RSN (2, @{thm enabled_mono})] [] 1\) apply (tactic \action_simp_tac (@{context} addsimps - [@{thm MClkReply_def}, @{thm Return_def}, @{thm caller_def}, @{thm rtrner_def}]) + [@{thm MClkReply_def}, @{thm AReturn_def}, @{thm caller_def}, @{thm rtrner_def}]) [exI] [@{thm base_enabled}, @{thm Pair_inject}] 1\) done diff -r 5b946c81dfbf -r 324bc1ffba12 src/HOL/TLA/Memory/Memory.thy --- a/src/HOL/TLA/Memory/Memory.thy Mon Jan 11 21:21:02 2016 +0100 +++ b/src/HOL/TLA/Memory/Memory.thy Mon Jan 11 22:23:03 2016 +0100 @@ -178,7 +178,7 @@ *) lemma Memoryidle: "\ \$(Calling ch p) \ \ RNext ch mm rs p" - by (auto simp: Return_def RM_action_defs) + by (auto simp: AReturn_def RM_action_defs) (* Enabledness conditions *) @@ -191,7 +191,7 @@ apply (tactic \action_simp_tac @{context} [@{thm MemReturn_change} RSN (2, @{thm enabled_mono}) ] [] 1\) apply (tactic - \action_simp_tac (@{context} addsimps [@{thm MemReturn_def}, @{thm Return_def}, + \action_simp_tac (@{context} addsimps [@{thm MemReturn_def}, @{thm AReturn_def}, @{thm rtrner_def}]) [exI] [@{thm base_enabled}, @{thm Pair_inject}] 1\) done diff -r 5b946c81dfbf -r 324bc1ffba12 src/HOL/TLA/Memory/MemoryImplementation.thy --- a/src/HOL/TLA/Memory/MemoryImplementation.thy Mon Jan 11 21:21:02 2016 +0100 +++ b/src/HOL/TLA/Memory/MemoryImplementation.thy Mon Jan 11 22:23:03 2016 +0100 @@ -320,7 +320,7 @@ (* ==================== Lemmas about the environment ============================== *) lemma Envbusy: "\ $(Calling memCh p) \ \ENext p" - by (auto simp: ENext_def Call_def) + by (auto simp: ENext_def ACall_def) (* ==================== Lemmas about the implementation's states ==================== *) @@ -333,7 +333,7 @@ lemma S1Env: "\ ENext p \ $(S1 rmhist p) \ unchanged (c p, r p, m p, rmhist!p) \ (S2 rmhist p)$" - by (force simp: ENext_def Call_def c_def r_def m_def + by (force simp: ENext_def ACall_def c_def r_def m_def caller_def rtrner_def MVNROKBA_def S_def S1_def S2_def Calling_def) lemma S1ClerkUnch: "\ [MClkNext memCh crCh cst p]_(c p) \ $(S1 rmhist p) \ unchanged (c p)" @@ -352,7 +352,7 @@ \ unchanged (rmhist!p)" by (tactic \action_simp_tac (@{context} addsimps [@{thm HNext_def}, @{thm S_def}, @{thm S1_def}, @{thm MemReturn_def}, @{thm RPCFail_def}, @{thm MClkReply_def}, - @{thm Return_def}]) [] [temp_use @{context} @{thm squareE}] 1\) + @{thm AReturn_def}]) [] [temp_use @{context} @{thm squareE}] 1\) (* ------------------------------ State S2 ---------------------------------------- *) @@ -367,7 +367,7 @@ \ unchanged (e p, r p, m p, rmhist!p) \ (S3 rmhist p)$" by (tactic \action_simp_tac (@{context} addsimps [@{thm MClkFwd_def}, - @{thm Call_def}, @{thm e_def}, @{thm r_def}, @{thm m_def}, @{thm caller_def}, + @{thm ACall_def}, @{thm e_def}, @{thm r_def}, @{thm m_def}, @{thm caller_def}, @{thm rtrner_def}, @{thm S_def}, @{thm S2_def}, @{thm S3_def}, @{thm Calling_def}]) [] [] 1\) lemma S2RPCUnch: "\ [RPCNext crCh rmCh rst p]_(r p) \ $(S2 rmhist p) \ unchanged (r p)" @@ -380,7 +380,7 @@ \ unchanged (rmhist!p)" using [[fast_solver]] by (auto elim!: squareE [temp_use] simp: HNext_def MemReturn_def RPCFail_def - MClkReply_def Return_def S_def S2_def) + MClkReply_def AReturn_def S_def S2_def) (* ------------------------------ State S3 ---------------------------------------- *) @@ -405,7 +405,7 @@ \ (S4 rmhist p)$ \ unchanged (rmhist!p)" by (tactic \action_simp_tac (@{context} addsimps [@{thm RPCFwd_def}, @{thm HNext_def}, @{thm MemReturn_def}, @{thm RPCFail_def}, - @{thm MClkReply_def}, @{thm Return_def}, @{thm Call_def}, @{thm e_def}, + @{thm MClkReply_def}, @{thm AReturn_def}, @{thm ACall_def}, @{thm e_def}, @{thm c_def}, @{thm m_def}, @{thm caller_def}, @{thm rtrner_def}, @{thm S_def}, @{thm S3_def}, @{thm S4_def}, @{thm Calling_def}]) [] [] 1\) @@ -413,7 +413,7 @@ \ unchanged (e p, c p, m p) \ (S6 rmhist p)$" by (tactic \action_simp_tac (@{context} addsimps [@{thm HNext_def}, - @{thm RPCFail_def}, @{thm Return_def}, @{thm e_def}, @{thm c_def}, + @{thm RPCFail_def}, @{thm AReturn_def}, @{thm e_def}, @{thm c_def}, @{thm m_def}, @{thm caller_def}, @{thm rtrner_def}, @{thm MVOKBARF_def}, @{thm S_def}, @{thm S3_def}, @{thm S6_def}, @{thm Calling_def}]) [] [] 1\) @@ -422,7 +422,7 @@ lemma S3Hist: "\ HNext rmhist p \ $(S3 rmhist p) \ unchanged (r p) \ unchanged (rmhist!p)" by (auto simp: HNext_def MemReturn_def RPCFail_def MClkReply_def - Return_def r_def rtrner_def S_def S3_def Calling_def) + AReturn_def r_def rtrner_def S_def S3_def Calling_def) (* ------------------------------ State S4 ---------------------------------------- *) @@ -441,7 +441,7 @@ \ (S4 rmhist p)$ \ unchanged (rmhist!p)" by (tactic \action_simp_tac (@{context} addsimps [@{thm ReadInner_def}, @{thm GoodRead_def}, @{thm BadRead_def}, @{thm HNext_def}, @{thm MemReturn_def}, - @{thm RPCFail_def}, @{thm MClkReply_def}, @{thm Return_def}, @{thm e_def}, + @{thm RPCFail_def}, @{thm MClkReply_def}, @{thm AReturn_def}, @{thm e_def}, @{thm c_def}, @{thm r_def}, @{thm rtrner_def}, @{thm caller_def}, @{thm MVNROKBA_def}, @{thm S_def}, @{thm S4_def}, @{thm RdRequest_def}, @{thm Calling_def}, @{thm MemInv_def}]) [] [] 1\) @@ -455,7 +455,7 @@ \ (S4 rmhist p)$ \ unchanged (rmhist!p)" by (tactic \action_simp_tac (@{context} addsimps [@{thm WriteInner_def}, @{thm GoodWrite_def}, @{thm BadWrite_def}, @{thm HNext_def}, @{thm MemReturn_def}, - @{thm RPCFail_def}, @{thm MClkReply_def}, @{thm Return_def}, @{thm e_def}, + @{thm RPCFail_def}, @{thm MClkReply_def}, @{thm AReturn_def}, @{thm e_def}, @{thm c_def}, @{thm r_def}, @{thm rtrner_def}, @{thm caller_def}, @{thm MVNROKBA_def}, @{thm S_def}, @{thm S4_def}, @{thm WrRequest_def}, @{thm Calling_def}]) [] [] 1\) @@ -471,12 +471,12 @@ lemma S4Return: "\ MemReturn rmCh ires p \ $S4 rmhist p \ unchanged (e p, c p, r p) \ HNext rmhist p \ (S5 rmhist p)$" - by (auto simp: HNext_def MemReturn_def Return_def e_def c_def r_def + by (auto simp: HNext_def MemReturn_def AReturn_def e_def c_def r_def rtrner_def caller_def MVNROKBA_def MVOKBA_def S_def S4_def S5_def Calling_def) lemma S4Hist: "\ HNext rmhist p \ $S4 rmhist p \ (m p)$ = $(m p) \ (rmhist!p)$ = $(rmhist!p)" by (auto simp: HNext_def MemReturn_def RPCFail_def MClkReply_def - Return_def m_def rtrner_def S_def S4_def Calling_def) + AReturn_def m_def rtrner_def S_def S4_def Calling_def) (* ------------------------------ State S5 ---------------------------------------- *) @@ -493,14 +493,14 @@ lemma S5Reply: "\ RPCReply crCh rmCh rst p \ $(S5 rmhist p) \ unchanged (e p, c p, m p,rmhist!p) \ (S6 rmhist p)$" by (tactic \action_simp_tac (@{context} addsimps [@{thm RPCReply_def}, - @{thm Return_def}, @{thm e_def}, @{thm c_def}, @{thm m_def}, @{thm MVOKBA_def}, + @{thm AReturn_def}, @{thm e_def}, @{thm c_def}, @{thm m_def}, @{thm MVOKBA_def}, @{thm MVOKBARF_def}, @{thm caller_def}, @{thm rtrner_def}, @{thm S_def}, @{thm S5_def}, @{thm S6_def}, @{thm Calling_def}]) [] [] 1\) lemma S5Fail: "\ RPCFail crCh rmCh rst p \ $(S5 rmhist p) \ unchanged (e p, c p, m p,rmhist!p) \ (S6 rmhist p)$" by (tactic \action_simp_tac (@{context} addsimps [@{thm RPCFail_def}, - @{thm Return_def}, @{thm e_def}, @{thm c_def}, @{thm m_def}, + @{thm AReturn_def}, @{thm e_def}, @{thm c_def}, @{thm m_def}, @{thm MVOKBARF_def}, @{thm caller_def}, @{thm rtrner_def}, @{thm S_def}, @{thm S5_def}, @{thm S6_def}, @{thm Calling_def}]) [] [] 1\) @@ -511,7 +511,7 @@ \ (rmhist!p)$ = $(rmhist!p)" using [[fast_solver]] by (auto elim!: squareE [temp_use] simp: HNext_def MemReturn_def RPCFail_def - MClkReply_def Return_def S_def S5_def) + MClkReply_def AReturn_def S_def S5_def) (* ------------------------------ State S6 ---------------------------------------- *) @@ -526,7 +526,7 @@ \ unchanged (e p,r p,m p) \ (S3 rmhist p)$ \ unchanged (rmhist!p)" by (tactic \action_simp_tac (@{context} addsimps [@{thm HNext_def}, - @{thm MClkReply_def}, @{thm MClkRetry_def}, @{thm Call_def}, @{thm Return_def}, + @{thm MClkReply_def}, @{thm MClkRetry_def}, @{thm ACall_def}, @{thm AReturn_def}, @{thm e_def}, @{thm r_def}, @{thm m_def}, @{thm caller_def}, @{thm rtrner_def}, @{thm S_def}, @{thm S6_def}, @{thm S3_def}, @{thm Calling_def}]) [] [] 1\) @@ -534,7 +534,7 @@ \ unchanged (e p,r p,m p) \ (S1 rmhist p)$" by (tactic \action_simp_tac (@{context} addsimps [@{thm HNext_def}, - @{thm MemReturn_def}, @{thm RPCFail_def}, @{thm Return_def}, @{thm MClkReply_def}, + @{thm MemReturn_def}, @{thm RPCFail_def}, @{thm AReturn_def}, @{thm MClkReply_def}, @{thm e_def}, @{thm r_def}, @{thm m_def}, @{thm caller_def}, @{thm rtrner_def}, @{thm S_def}, @{thm S6_def}, @{thm S1_def}, @{thm Calling_def}]) [] [] 1\) @@ -545,7 +545,7 @@ by (auto simp: S_def S6_def dest!: Memoryidle [temp_use]) lemma S6Hist: "\ HNext rmhist p \ $S6 rmhist p \ (c p)$ = $(c p) \ (rmhist!p)$ = $(rmhist!p)" - by (auto simp: HNext_def MClkReply_def Return_def c_def rtrner_def S_def S6_def Calling_def) + by (auto simp: HNext_def MClkReply_def AReturn_def c_def rtrner_def S_def S6_def Calling_def) section "Correctness of predicate-action diagram" @@ -676,7 +676,7 @@ apply (drule S6_excl [temp_use]) apply (auto simp: RPCFail_def MemFail_def e_def c_def m_def resbar_def) apply (force simp: S3_def S_def) - apply (auto simp: Return_def) + apply (auto simp: AReturn_def) done lemma Step1_4_4a1: "\ $S4 rmhist p \ (S4 rmhist p)$ \ ReadInner rmCh mm ires p l @@ -724,7 +724,7 @@ @{thm c_def}, @{thm r_def}, @{thm resbar_def}]) [] [] 1\) apply (drule S4_excl [temp_use] S5_excl [temp_use])+ using [[fast_solver]] - apply (auto elim!: squareE [temp_use] simp: MemReturn_def Return_def) + apply (auto elim!: squareE [temp_use] simp: MemReturn_def AReturn_def) done lemma Step1_4_5a: "\ RPCReply crCh rmCh rst p \ $S5 rmhist p \ (S6 rmhist p)$ @@ -733,7 +733,7 @@ apply clarsimp apply (drule S5_excl [temp_use] S6_excl [temp_use])+ apply (auto simp: e_def c_def m_def resbar_def) - apply (auto simp: RPCReply_def Return_def S5_def S_def dest!: MVOKBAnotRF [temp_use]) + apply (auto simp: RPCReply_def AReturn_def S5_def S_def dest!: MVOKBAnotRF [temp_use]) done lemma Step1_4_5b: "\ RPCFail crCh rmCh rst p \ $S5 rmhist p \ (S6 rmhist p)$ @@ -741,7 +741,7 @@ \ MemFail memCh (resbar rmhist) p" apply clarsimp apply (drule S6_excl [temp_use]) - apply (auto simp: e_def c_def m_def RPCFail_def Return_def MemFail_def resbar_def) + apply (auto simp: e_def c_def m_def RPCFail_def AReturn_def MemFail_def resbar_def) apply (auto simp: S5_def S_def) done @@ -752,7 +752,7 @@ apply (drule S6_excl [temp_use])+ apply (tactic \action_simp_tac (@{context} addsimps [@{thm e_def}, @{thm r_def}, @{thm m_def}, @{thm MClkReply_def}, @{thm MemReturn_def}, - @{thm Return_def}, @{thm resbar_def}]) [] [] 1\) + @{thm AReturn_def}, @{thm resbar_def}]) [] [] 1\) apply simp_all (* simplify if-then-else *) apply (tactic \ALLGOALS (action_simp_tac (@{context} addsimps [@{thm MClkReplyVal_def}, @{thm S6_def}, @{thm S_def}]) [] [@{thm MVOKBARFnotNR}])\) @@ -909,7 +909,7 @@ lemma S1_Returndisabled: "\ S1 rmhist p \ \Enabled (_(rtrner memCh!p, resbar rmhist!p))" by (tactic \action_simp_tac (@{context} addsimps [@{thm angle_def}, @{thm MemReturn_def}, - @{thm Return_def}, @{thm S_def}, @{thm S1_def}]) [notI] [@{thm enabledE}] 1\) + @{thm AReturn_def}, @{thm S_def}, @{thm S1_def}]) [notI] [@{thm enabledE}] 1\) lemma RNext_fair: "\ \\S1 rmhist p \ WF(RNext memCh mm (resbar rmhist) p)_(rtrner memCh!p, resbar rmhist!p)" @@ -1088,7 +1088,7 @@ lemma MClkReplyS6: "\ $ImpInv rmhist p \ _(c p) \ $S6 rmhist p" by (tactic \action_simp_tac (@{context} addsimps [@{thm angle_def}, - @{thm MClkReply_def}, @{thm Return_def}, @{thm ImpInv_def}, @{thm S_def}, + @{thm MClkReply_def}, @{thm AReturn_def}, @{thm ImpInv_def}, @{thm S_def}, @{thm S1_def}, @{thm S2_def}, @{thm S3_def}, @{thm S4_def}, @{thm S5_def}]) [] [] 1\) lemma S6MClkReply_enabled: "\ S6 rmhist p \ Enabled (_(c p))" diff -r 5b946c81dfbf -r 324bc1ffba12 src/HOL/TLA/Memory/ProcedureInterface.thy --- a/src/HOL/TLA/Memory/ProcedureInterface.thy Mon Jan 11 21:21:02 2016 +0100 +++ b/src/HOL/TLA/Memory/ProcedureInterface.thy Mon Jan 11 22:23:03 2016 +0100 @@ -37,14 +37,13 @@ (* slice through array-valued state function *) -consts - slice :: "('a \ 'b) stfun \ 'a \ 'b stfun" +definition slice :: "('a \ 'b) stfun \ 'a \ 'b stfun" + where "slice x i s \ x s i" + syntax - "_slice" :: "[lift, 'a] \ lift" ("(_!_)" [70,70] 70) + "_slice" :: "[lift, 'a] \ lift" ("(_!_)" [70,70] 70) translations - "_slice" == "CONST slice" -defs - slice_def: "(PRED (x!i)) s == x s i" + "_slice" \ "CONST slice" (* state predicates *) @@ -55,22 +54,24 @@ (* actions *) -consts - ACall :: "('a,'r) channel \ PrIds \ 'a stfun \ action" - AReturn :: "('a,'r) channel \ PrIds \ 'r stfun \ action" +definition ACall :: "('a,'r) channel \ PrIds \ 'a stfun \ action" + where "ACall ch p v \ ACT + \ $Calling ch p + \ (cbit$ \ $rbit) + \ (arg$ = $v)" + +definition AReturn :: "('a,'r) channel \ PrIds \ 'r stfun \ action" + where "AReturn ch p v == ACT + $Calling ch p + \ (rbit$ = $cbit) + \ (res$ = $v)" + syntax - "_Call" :: "['a, 'b, lift] \ lift" ("(Call _ _ _)" [90,90,90] 90) - "_Return" :: "['a, 'b, lift] \ lift" ("(Return _ _ _)" [90,90,90] 90) + "_Call" :: "['a, 'b, lift] \ lift" ("(Call _ _ _)" [90,90,90] 90) + "_Return" :: "['a, 'b, lift] \ lift" ("(Return _ _ _)" [90,90,90] 90) translations - "_Call" == "CONST ACall" - "_Return" == "CONST AReturn" -defs - Call_def: "(ACT Call ch p v) == ACT \ $Calling ch p - \ (cbit$ \ $rbit) - \ (arg$ = $v)" - Return_def: "(ACT Return ch p v) == ACT $Calling ch p - \ (rbit$ = $cbit) - \ (res$ = $v)" + "_Call" \ "CONST ACall" + "_Return" \ "CONST AReturn" (* temporal formulas *) @@ -91,14 +92,14 @@ declare slice_def [simp] -lemmas Procedure_defs = caller_def rtrner_def Calling_def Call_def Return_def +lemmas Procedure_defs = caller_def rtrner_def Calling_def ACall_def AReturn_def PLegalCaller_def LegalCaller_def PLegalReturner_def LegalReturner_def (* Calls and returns change their subchannel *) lemma Call_changed: "\ Call ch p v \ _((caller ch)!p)" - by (auto simp: angle_def Call_def caller_def Calling_def) + by (auto simp: angle_def ACall_def caller_def Calling_def) lemma Return_changed: "\ Return ch p v \ _((rtrner ch)!p)" - by (auto simp: angle_def Return_def rtrner_def Calling_def) + by (auto simp: angle_def AReturn_def rtrner_def Calling_def) end diff -r 5b946c81dfbf -r 324bc1ffba12 src/HOL/TLA/Memory/RPC.thy --- a/src/HOL/TLA/Memory/RPC.thy Mon Jan 11 21:21:02 2016 +0100 +++ b/src/HOL/TLA/Memory/RPC.thy Mon Jan 11 22:23:03 2016 +0100 @@ -83,7 +83,7 @@ *) lemma RPCidle: "\ \$(Calling send p) \ \RPCNext send rcv rst p" - by (auto simp: Return_def RPC_action_defs) + by (auto simp: AReturn_def RPC_action_defs) lemma RPCbusy: "\ $(Calling rcv p) \ $(rst!p) = #rpcB \ \RPCNext send rcv rst p" by (auto simp: RPC_action_defs) @@ -101,14 +101,14 @@ lemma RPCFail_enabled: "\p. basevars (rtrner send!p, caller rcv!p, rst!p) \ \ \Calling rcv p \ Calling send p \ Enabled (RPCFail send rcv rst p)" by (tactic \action_simp_tac (@{context} addsimps [@{thm RPCFail_def}, - @{thm Return_def}, @{thm caller_def}, @{thm rtrner_def}]) [exI] + @{thm AReturn_def}, @{thm caller_def}, @{thm rtrner_def}]) [exI] [@{thm base_enabled}, @{thm Pair_inject}] 1\) lemma RPCReply_enabled: "\p. basevars (rtrner send!p, caller rcv!p, rst!p) \ \ \Calling rcv p \ Calling send p \ rst!p = #rpcB \ Enabled (RPCReply send rcv rst p)" by (tactic \action_simp_tac (@{context} addsimps [@{thm RPCReply_def}, - @{thm Return_def}, @{thm caller_def}, @{thm rtrner_def}]) [exI] + @{thm AReturn_def}, @{thm caller_def}, @{thm rtrner_def}]) [exI] [@{thm base_enabled}, @{thm Pair_inject}] 1\) end