From ce22b5f906af5852187bd7065ee24ca3284e2f53 Mon Sep 17 00:00:00 2001 From: Simon Foster Date: Fri, 21 Jun 2024 10:41:36 +0100 Subject: [PATCH] Added dot notation for channel sets --- Channels_Events.thy | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Channels_Events.thy b/Channels_Events.thy index bf6941e..b97e90b 100644 --- a/Channels_Events.thy +++ b/Channels_Events.thy @@ -52,17 +52,23 @@ definition csempty ("\\") where [code_unfold]: "\\ chans" ("_") - "_chans" :: "id \ chans \ chans" ("_,/ _") + "_chan_id" :: "id \ chan" ("_") + "_chan_inst" :: "chan \ id \ chan" ("_\_" [100,101] 101) + "_chan" :: "chan \ chans" ("_") + "_chans" :: "chan \ chans \ chans" ("_,/ _") "_ch_enum" :: "chans \ logic" ("\_\") "_ch_collect" :: "id \ pttrn \ logic \ logic \ logic" ("\_/ _ \ _./ _\") "_ch_collect_ns" :: "id \ pttrn \ logic \ logic" ("\_/ _./ _\") -translations +translations + "_chan_id c" => "c" + "_chan_inst c x" => "CONST chinst c x" "_chan c" => "CONST csbasic c" "_chans e es" => "CONST csinsert e es" "_ch_enum A" => "A" "_ch_enum (_chan c)" <= "CONST csbasic c" + "_chan (_chan_inst c x)" <= "_chan (CONST chinst c x)" + "_chan_inst (_chan_inst c x) y" <= "_chan_inst (CONST chinst c x) y" "_ch_enum (_chans c cs)" <= "CONST csinsert c (_ch_enum cs)" "_ch_collect e x A P" == "CONST cscollect e A (\ x. P)" "_ch_collect_ns e x P" == "_ch_collect e x (CONST UNIV) P" @@ -108,5 +114,4 @@ translations "_rncollect (_evt_id c\<^sub>1) (_evt_id c\<^sub>2) x A P" == "CONST rncollect c\<^sub>1 c\<^sub>2 A (\ x. (((), ()), P))" "_rncollect_ns e\<^sub>1 e\<^sub>2 x P" == "_rncollect e\<^sub>1 e\<^sub>2 x (CONST UNIV) P" - end \ No newline at end of file