packages feed

cpsa 4.4.2 → 4.4.3

raw patch · 205 files changed

+5636/−3987 lines, 205 filesdep ~basenew-component:exe:cpsa4debranchnew-component:exe:cpsa4query

Dependency ranges changed: base

Files

NEWS view
@@ -1,5 +1,21 @@ CPSA NEWS -- history of user-visible changes. +* Changes in version 4.4.3++** Added the cpsa4query program which loads CPSA output and a query.+   It assembles the skeletons in the output into a forest of+   derivation trees.  It then runs the query against the selected+   trees in the forest and returns the labels of the skeletons that+   satisfy the query.++** Added cpsa4debranch program.  This program allows protocol+   designers to use a branch instruction when writing roles, which are+   removed and expanded by this program.++** Updated the default strand bound to 12++** Updated Coq scripts for Coq version 8.18.0+ * Changes in version 4.4.2  ** Fixed message equivalence test in cpsa4graph.
README view
@@ -34,7 +34,7 @@ and authenticated communication channels.  This program has been built and tested using the Haskell miminal-installer and Haskell Platform.  THese are available from+installer and Haskell Platform.  These are available from <http://haskell.org> or from an operating system specific source.  The name of the Linux package is usually haskell-platform.  If you have problems installing Haskell, try using Haskell Stack, and issue the@@ -46,7 +46,11 @@  $ cabal build $ cabal install --overwrite-policy=always-: To find the directory containing documentation and samples, type:++DOCUMENTATION LOCATION++To find the directory containing documentation and samples, type:+ $ cpsa4 -h  QUICK START (Linux)
coq/Alg.v view
@@ -107,7 +107,7 @@ Proof.   intros.   unfold alg_eqb.-  destruct (alg_dec x y); subst; intuition.+  destruct (alg_dec x y); subst; intuition auto with *. Qed.  (** Event *)
coq/Alt_sem.v view
@@ -55,7 +55,7 @@   rewrite G.   rewrite skipn_all.   rewrite app_nil_l.-  rewrite minus_diag; simpl.+  rewrite Nat.sub_diag; simpl.   clear G.   induction H; simpl; auto.   rewrite IHins_inputs; auto.@@ -105,12 +105,6 @@     inv H6.   - inv H.     inv H6.-  - inv H.-    apply IHo in H8; auto.-  - inv H.-    apply IHo in H8; auto.-  - inv H.-    apply IHo in H8; auto.   - inv H.     apply IHo in H8; auto.   - inv H.
coq/CRun.v view
@@ -99,7 +99,7 @@       end     | _ => None     end-  | Frsh =>+  | Frsh_ =>     match cruniqs rst with     | u :: us =>       Some (mkCRSt (crenv rst) (crtr rst) us (crs rst), u)@@ -194,18 +194,6 @@       Some rst     else       None-  | Ltkp u v w =>-    x <- lookup u (crenv rst);;-    y <- lookup v (crenv rst);;-    z <- lookup w (crenv rst);;-    match y, z with-    | CNm b, CNm c =>-      if calg_eqb x (CSk (Lt b c)) then-        Some rst-      else-        None-    | _, _ => None-    end   | Invp u v =>     x <- lookup u (crenv rst);;     y <- lookup v (crenv rst);;@@ -213,39 +201,6 @@       Some rst     else       None-  | Namp u v =>-    x <- lookup u (crenv rst);;-    y <- lookup v (crenv rst);;-    match x, y with-    | CAk k, CNm b =>-      if akey_eqb k (Pb b) then-        Some rst-      else-        None-    | CIk k, CNm b =>-      if akey_eqb k (Pb b) then-        Some rst-      else-        None-    | _, _ => None-    end-  | Nm2p u v w =>-    x <- lookup u (crenv rst);;-    y <- lookup v (crenv rst);;-    z <- lookup w (crenv rst);;-    match x, y, z with-    | CAk k, CTg s, CNm c =>-      if akey_eqb k (Pb2 s c) then-        Some rst-      else-        None-    | CIk k, CTg s, CNm c =>-      if akey_eqb k (Pb2 s c) then-        Some rst-      else-        None-    | _, _, _ => None-    end   | Return _ => None end. @@ -290,33 +245,7 @@   - exists []; simpl.     destruct (lookup n (crenv rst)); inv H; auto.     destruct (lookup n0 (crenv rst)); inv H1; auto.-    destruct (lookup n1 (crenv rst)); inv H0; auto.-    destruct c0; inv H1; auto.-    destruct c1; inv H0; auto.-    destruct (calg_eqb c (CSk (Lt n2 n3))); inv H1; auto.-  - exists []; simpl.-    destruct (lookup n (crenv rst)); inv H; auto.-    destruct (lookup n0 (crenv rst)); inv H1; auto.     destruct (negb (chas_enc c) && calg_eqb c (cinv c0)); inv H0; auto.-  - exists []; simpl.-    destruct (lookup n (crenv rst)); inv H; auto.-    destruct (lookup n0 (crenv rst)); inv H1; auto.-    destruct c; inv H0; auto.-    + destruct c0; inv H1; auto.-      destruct (akey_eqb a (Pb n1)); inv H0; auto.-    + destruct c0; inv H1; auto.-      destruct (akey_eqb a (Pb n1)); inv H0; auto.-  - exists []; simpl.-    destruct (lookup n (crenv rst)); inv H; auto.-    destruct (lookup n0 (crenv rst)); inv H1; auto.-    destruct (lookup n1 (crenv rst)); inv H0; auto.-    destruct c; inv H1; auto.-    + destruct c0; inv H0; auto.-      destruct c1; inv H1; auto.-      destruct (akey_eqb a (Pb2 s n2)); inv H0; auto.-    + destruct c0; inv H0; auto.-      destruct c1; inv H1; auto.-      destruct (akey_eqb a (Pb2 s n2)); inv H0; auto. Qed.  (** The semantics of lists of statements *)@@ -353,30 +282,6 @@       destruct (crtr rst); inv H1; auto.       destruct (cruniqs rst); inv H0; auto.       destruct (map_m (fun x : nat => lookup x (crenv rst)) l); inv H1; auto.-    + apply do_some in H.-      repeat destruct_ex_and.-      apply crun_stmt_env_extends in H.-      apply IHstmts in H0.-      repeat destruct_ex_and; subst.-      rewrite H.-      exists (x0 ++ x1).-      rewrite app_assoc; auto.-    + apply do_some in H.-      repeat destruct_ex_and.-      apply crun_stmt_env_extends in H.-      apply IHstmts in H0.-      repeat destruct_ex_and; subst.-      rewrite H.-      exists (x0 ++ x1).-      rewrite app_assoc; auto.-    + apply do_some in H.-      repeat destruct_ex_and.-      apply crun_stmt_env_extends in H.-      apply IHstmts in H0.-      repeat destruct_ex_and; subst.-      rewrite H.-      exists (x0 ++ x1).-      rewrite app_assoc; auto.     + apply do_some in H.       repeat destruct_ex_and.       apply crun_stmt_env_extends in H.
coq/CRun_csem.v view
@@ -29,7 +29,7 @@     + rewrite G; auto.     + contradiction G.       rewrite calg_eq_correct; auto.-  - rewrite <- beq_nat_refl; auto.+  - rewrite Nat.eqb_refl; auto. Qed.  Lemma crun_expr_implies_expr_csem:@@ -108,7 +108,7 @@         -- destruct c; inv H.            destruct (bool_dec (n1 =? n0) true) as [F|F].            ++ rewrite F in H1; inv H1.-              apply beq_nat_true in F; subst; auto.+              apply Nat.eqb_eq in F; subst; auto.            ++ rewrite not_true_iff_false in F.               rewrite F in H1; inv H1. Qed.@@ -140,7 +140,7 @@     rewrite H1; auto.   - simpl.     rewrite H0.-    rewrite <- beq_nat_refl; auto.+    rewrite Nat.eqb_refl; auto.     rewrite H1.     destruct (bool_dec (calg_eqb a a) true) as [G|G].     + rewrite G; auto.@@ -159,48 +159,11 @@     rewrite H0.     rewrite H1.     rewrite H2.-    destruct (bool_dec (calg_eqb (CSk (Lt b c))-                                 (CSk (Lt b c))) true) as [G|G].-    + rewrite G; auto.-    + contradiction G.-      rewrite calg_eq_correct; auto.-  - simpl.-    rewrite H0.-    rewrite H1.-    rewrite H2.     simpl.     destruct (bool_dec (calg_eqb (cinv b) (cinv b)) true) as [G|G].     + rewrite G; auto.     + contradiction G.       rewrite calg_eq_correct; auto.-  - simpl.-    rewrite H0.-    rewrite H1.-    simpl.-    unfold akey_eqb.-    destruct (akey_dec (Pb b) (Pb b)) as [G|G]; auto.-    contradict G; auto.-  - simpl.-    rewrite H0.-    rewrite H1.-    simpl.-    unfold akey_eqb.-    destruct (akey_dec (Pb b) (Pb b)) as [G|G]; auto.-    contradict G; auto.-  - simpl.-    rewrite H0.-    rewrite H1.-    rewrite H2.-    unfold akey_eqb.-    destruct (akey_dec (Pb2 s b) (Pb2 s b)) as [G|G]; auto.-    contradict G; auto.-  - simpl.-    rewrite H0.-    rewrite H1.-    rewrite H2.-    unfold akey_eqb.-    destruct (akey_dec (Pb2 s b) (Pb2 s b)) as [G|G]; auto.-    contradict G; auto. Qed.  Lemma crun_stmt_implies_stmt_csem:@@ -237,7 +200,7 @@            destruct x; inv H.            destruct (bool_dec (n2 =? n1) true) as [G|G].            ++ rewrite G in H2; inv H2.-              apply beq_nat_true in G; subst.+              apply Nat.eqb_eq in G; subst.               destruct (option_dec (lookup n0 (crenv rst))) as [G|G].               ** rewrite G in H1; inv H1.               ** destruct G.@@ -268,23 +231,6 @@            eapply CStmt_same; eauto.         -- rewrite not_true_iff_false in G.            rewrite G in H; inv H.-  - alt_option_dec (lookup n (crenv rst)) v G;-      rewrite G in H.-    + inv H.-    + alt_option_dec (lookup n0 (crenv rst)) u F;-        rewrite F in H.-      * inv H.-      * alt_option_dec (lookup n1 (crenv rst)) w E;-          rewrite E in H.-        -- inv H.-        -- destruct u; inv H.-           destruct w; inv H1.-           destruct (alt_bool_dec (calg_eqb v (CSk (Lt n2 n3)))) as [D|D];-             rewrite D in H0.-           ++ rewrite calg_eq_correct in D; subst.-              inv H0.-              eapply CStmt_ltkp; eauto.-           ++ inv H0.   - alt_option_dec (lookup n (crenv rst)) x G;       rewrite G in H.     + inv H.@@ -300,49 +246,6 @@            apply calg_eq_correct in E.            eapply CStmt_invp; eauto.         -- inv H.-  - alt_option_dec (lookup n (crenv rst)) x G;-      rewrite G in H.-    + inv H.-    + alt_option_dec (lookup n0 (crenv rst)) y F;-        rewrite F in H.-      * inv H.-      * destruct x; inv H.-        -- destruct y; inv H1.-           unfold akey_eqb in H0.-           destruct (akey_dec a (Pb n1)) as [E|E]; subst.-           ++ inv H0.-              eapply CStmt_pub_namp; eauto.-           ++ inv H0.-        -- destruct y; inv H1.-           unfold akey_eqb in H0.-           destruct (akey_dec a (Pb n1)) as [E|E]; subst.-           ++ inv H0.-              eapply CStmt_priv_namp; eauto.-           ++ inv H0.-  - alt_option_dec (lookup n (crenv rst)) x G;-      rewrite G in H.-    + inv H.-    + alt_option_dec (lookup n0 (crenv rst)) y F;-        rewrite F in H.-      * inv H.-      * alt_option_dec (lookup n1 (crenv rst)) z E;-          rewrite E in H.-        -- inv H.-        -- destruct x; inv H.-           ++ destruct y; inv H1.-              destruct z; inv H0.-              unfold akey_eqb in H1.-              destruct (akey_dec a (Pb2 s n2)) as [D|D].-              ** inv H1.-                 eapply CStmt_pub_nm2p; eauto.-              ** inv H1.-           ++ destruct y; inv H1.-              destruct z; inv H0.-              unfold akey_eqb in H1.-              destruct (akey_dec a (Pb2 s n2)) as [D|D].-              ** inv H1.-                 eapply CStmt_priv_nm2p; eauto.-              ** inv H1. Qed.  Lemma stmt_list_csem_implies_crun_stmts:@@ -376,15 +279,6 @@     rewrite e3.     apply CStmt_return; auto.   - inv e2.-  - apply crun_stmt_implies_stmt_csem in e1.-    apply IHo in H1.-    eapply CStmt_pair; eauto.-  - apply crun_stmt_implies_stmt_csem in e1.-    apply IHo in H1.-    eapply CStmt_pair; eauto.-  - apply crun_stmt_implies_stmt_csem in e1.-    apply IHo in H1.-    eapply CStmt_pair; eauto.   - apply crun_stmt_implies_stmt_csem in e1.     apply IHo in H1.     eapply CStmt_pair; eauto.
coq/CSem.v view
@@ -101,7 +101,7 @@ Proof.   intros.   unfold calg_eqb.-  destruct (calg_dec x y); subst; intuition.+  destruct (calg_dec x y); subst; intuition auto with *. Qed.  Lemma calg_eq_complete:@@ -110,7 +110,7 @@ Proof.   intros.   unfold calg_eqb.-  destruct (calg_dec x y); subst; intuition.+  destruct (calg_dec x y); subst; intuition auto with *. Qed.  (** ** Type of an Algebra Term *)@@ -404,40 +404,12 @@     chas_enc a = false ->       (* For probabilistic encryption *)     a = b ->                    (* Sameness check *)     stmt_csem ev tr us rs (Same x y) ev tr us rs-| CStmt_ltkp: forall ev tr us rs x y z a b c,-    lookup x ev = Some a ->-    lookup y ev = Some (CNm b) ->-    lookup z ev = Some (CNm c) ->-    a = CSk (Lt b c) ->         (* Ltk check *)-    stmt_csem ev tr us rs (Ltkp x y z) ev tr us rs | CStmt_invp: forall ev tr us rs x y a b,     lookup x ev = Some a ->     lookup y ev = Some b ->     chas_enc a = false ->       (* For probabilistic encryption *)     a = cinv b ->               (* Inverse check *)-    stmt_csem ev tr us rs (Invp x y) ev tr us rs-| CStmt_pub_namp: forall ev tr us rs x y a b,-    lookup x ev = Some (CAk a) ->-    lookup y ev = Some (CNm b) ->-    a = Pb b ->                (* Name check *)-    stmt_csem ev tr us rs (Namp x y) ev tr us rs-| CStmt_priv_namp: forall ev tr us rs x y a b,-    lookup x ev = Some (CIk a) ->-    lookup y ev = Some (CNm b) ->-    a = Pb b ->                (* Name check *)-    stmt_csem ev tr us rs (Namp x y) ev tr us rs-| CStmt_pub_nm2p: forall ev tr us rs x y z a s b,-    lookup x ev = Some (CAk a) ->-    lookup y ev = Some (CTg s) ->-    lookup z ev = Some (CNm b) ->-    a = Pb2 s b ->              (* Tagged name check *)-    stmt_csem ev tr us rs (Nm2p x y z) ev tr us rs-| CStmt_priv_nm2p: forall ev tr us rs x y z a s b,-    lookup x ev = Some (CIk a) ->-    lookup y ev = Some (CTg s) ->-    lookup z ev = Some (CNm b) ->-    a = Pb2 s b ->              (* Tagged name check *)-    stmt_csem ev tr us rs (Nm2p x y z) ev tr us rs.+    stmt_csem ev tr us rs (Invp x y) ev tr us rs. #[global] Hint Constructors stmt_csem : core. @@ -452,11 +424,6 @@   - exists []; auto.   - exists []; auto.   - exists []; auto.-  - exists []; auto.-  - exists []; auto.-  - exists []; auto.-  - exists []; auto.-  - exists []; auto. Qed.  (** Main theorem about statements *)@@ -879,30 +846,6 @@     exists ctr.     exists cus.     exists rs.-    pose proof H7 as H.-    apply ex_lookup in H7.-    destruct H7.-    erewrite lookup_ev in H; eauto.-    inv H.-    destruct x; simpl in H2; inv H2.-    pose proof H11 as H.-    apply ex_lookup in H11.-    destruct H11.-    erewrite lookup_ev in H; eauto.-    inv H.-    destruct x; simpl in H4; inv H4.-    pose proof H15 as H.-    apply ex_lookup in H15.-    destruct H15.-    erewrite lookup_ev in H; eauto.-    inv H.-    destruct x; simpl in H5; inv H5.-    split; auto.-    eapply CStmt_ltkp; eauto.-  - exists cev.-    exists ctr.-    exists cus.-    exists rs.     pose proof H6 as H.     apply ex_lookup in H6.     destruct H6.@@ -920,90 +863,6 @@     apply no_enc_eq in H2; auto; subst.     split; auto.     eapply CStmt_invp; eauto.-  - exists cev.-    exists ctr.-    exists cus.-    exists rs.-    pose proof H6 as H.-    apply ex_lookup in H6.-    destruct H6.-    erewrite lookup_ev in H; eauto.-    inv H.-    destruct x; simpl in H2; inv H2.-    pose proof H10 as H.-    apply ex_lookup in H10.-    destruct H10.-    erewrite lookup_ev in H; eauto.-    inv H.-    destruct x; simpl in H4; inv H4.-    split; auto.-    eapply CStmt_pub_namp; eauto.-  - exists cev.-    exists ctr.-    exists cus.-    exists rs.-    pose proof H6 as H.-    apply ex_lookup in H6.-    destruct H6.-    erewrite lookup_ev in H; eauto.-    inv H.-    destruct x; simpl in H2; inv H2.-    pose proof H10 as H.-    apply ex_lookup in H10.-    destruct H10.-    erewrite lookup_ev in H; eauto.-    inv H.-    destruct x; simpl in H4; inv H4.-    split; auto.-    eapply CStmt_priv_namp; eauto.-  - exists cev.-    exists ctr.-    exists cus.-    exists rs.-    pose proof H7 as H.-    apply ex_lookup in H7.-    destruct H7.-    erewrite lookup_ev in H; eauto.-    inv H.-    destruct x; simpl in H2; inv H2.-    pose proof H11 as H.-    apply ex_lookup in H11.-    destruct H11.-    erewrite lookup_ev in H; eauto.-    inv H.-    destruct x; simpl in H4; inv H4.-    pose proof H15 as H.-    apply ex_lookup in H15.-    destruct H15.-    erewrite lookup_ev in H; eauto.-    inv H.-    destruct x; simpl in H5; inv H5.-    split; auto.-    eapply CStmt_pub_nm2p; eauto.-  - exists cev.-    exists ctr.-    exists cus.-    exists rs.-    pose proof H7 as H.-    apply ex_lookup in H7.-    destruct H7.-    erewrite lookup_ev in H; eauto.-    inv H.-    destruct x; simpl in H2; inv H2.-    pose proof H11 as H.-    apply ex_lookup in H11.-    destruct H11.-    erewrite lookup_ev in H; eauto.-    inv H.-    destruct x; simpl in H4; inv H4.-    pose proof H15 as H.-    apply ex_lookup in H15.-    destruct H15.-    erewrite lookup_ev in H; eauto.-    inv H.-    destruct x; simpl in H5; inv H5.-    split; auto.-    eapply CStmt_priv_nm2p; eauto. Qed.  (** So far, the proofs have been fairly straightforward.  But that@@ -1420,14 +1279,8 @@              (Send c x) ev tr us rs [CSd d a] [] | Sim_same: forall ev tr us rs x y,     stmt_sim ev tr us rs (Same x y) ev tr us rs [] []-| Sim_ltkp: forall ev tr us rs x y z,-    stmt_sim ev tr us rs (Ltkp x y z) ev tr us rs [] [] | Sim_invp: forall ev tr us rs x y,-    stmt_sim ev tr us rs (Invp x y) ev tr us rs [] []-| Sim_namp: forall ev tr us rs x y,-    stmt_sim ev tr us rs (Namp x y) ev tr us rs [] []-| Sim_nm2p: forall ev tr us rs x y z,-    stmt_sim ev tr us rs (Nm2p x y z) ev tr us rs [] [].+    stmt_sim ev tr us rs (Invp x y) ev tr us rs [] []. #[global] Hint Constructors stmt_sim : core. @@ -1494,17 +1347,6 @@     split; auto.   - pose proof H1 as G.     apply has_enc_lookup in H1; simpl; auto.-    pose proof H2 as F.-    apply has_enc_lookup in H2; simpl; auto.-    pose proof H3 as E.-    apply has_enc_lookup in H3; simpl; auto.-    exists cev.-    exists rs.-    exists [].-    exists [].-    split; auto.-  - pose proof H1 as G.-    apply has_enc_lookup in H1; simpl; auto.     rewrite inv_has_enc in H3.     pose proof H2 as F.     apply has_enc_lookup in H2; simpl; auto.@@ -1513,46 +1355,6 @@     exists [].     exists [].     split; auto.-  - pose proof H1 as G.-    apply has_enc_lookup in H1; simpl; auto.-    pose proof H2 as F.-    apply has_enc_lookup in H2; simpl; auto.-    exists cev.-    exists rs.-    exists [].-    exists [].-    split; auto.-  - pose proof H1 as G.-    apply has_enc_lookup in H1; simpl; auto.-    pose proof H2 as F.-    apply has_enc_lookup in H2; simpl; auto.-    exists cev.-    exists rs.-    exists [].-    exists [].-    split; auto.-  - pose proof H1 as G.-    apply has_enc_lookup in H1; simpl; auto.-    pose proof H2 as F.-    apply has_enc_lookup in H2; simpl; auto.-    pose proof H3 as E.-    apply has_enc_lookup in H3; simpl; auto.-    exists cev.-    exists rs.-    exists [].-    exists [].-    split; auto.-  - pose proof H1 as G.-    apply has_enc_lookup in H1; simpl; auto.-    pose proof H2 as F.-    apply has_enc_lookup in H2; simpl; auto.-    pose proof H3 as E.-    apply has_enc_lookup in H3; simpl; auto.-    exists cev.-    exists rs.-    exists [].-    exists [].-    split; auto. Qed.  Lemma stmt_sim_injective:@@ -1606,10 +1408,6 @@     eapply CStmt_same; eauto.     rewrite has_enc_to_alg.     rewrite to_alg_calg; auto.-  - apply has_enc_lookup in H7; auto.-    apply has_enc_lookup in H11; auto.-    apply has_enc_lookup in H15; auto.-    eapply CStmt_ltkp; eauto.   - apply has_enc_lookup in H6; auto.     pose proof H11 as G.     rewrite inv_has_enc in H11.@@ -1618,20 +1416,6 @@     rewrite has_enc_to_alg.     rewrite to_alg_calg; auto.     destruct b; auto.-  - apply has_enc_lookup in H6; auto.-    apply has_enc_lookup in H10; auto.-    eapply CStmt_pub_namp; eauto.-  - apply has_enc_lookup in H6; auto.-    apply has_enc_lookup in H10; auto.-    eapply CStmt_priv_namp; eauto.-  - apply has_enc_lookup in H7; auto.-    apply has_enc_lookup in H11; auto.-    apply has_enc_lookup in H15; auto.-    eapply CStmt_pub_nm2p; eauto.-  - apply has_enc_lookup in H7; auto.-    apply has_enc_lookup in H11; auto.-    apply has_enc_lookup in H15; auto.-    eapply CStmt_priv_nm2p; eauto. Qed.  (** Relate sequences of statements@@ -1909,7 +1693,7 @@   rewrite G.   rewrite skipn_all.   rewrite app_nil_l.-  rewrite minus_diag; simpl.+  rewrite Nat.sub_diag; simpl.   clear G.   induction H; simpl; auto.   rewrite IHcins_inputs; auto.@@ -1935,12 +1719,6 @@     inv H7.   - inv H.     inv H7.-  - inv H.-    apply IHo in H9; auto.-  - inv H.-    apply IHo in H9; auto.-  - inv H.-    apply IHo in H9; auto.   - inv H.     apply IHo in H9; auto.   - inv H.
coq/Derives.v view
@@ -217,14 +217,14 @@ Proof.   split.   - intro H.-    induction H; try apply orb_true_iff; intuition.+    induction H; try apply orb_true_iff; intuition auto with *.     destruct x; apply orb_true_iff; left; apply set_mem_correct2; auto.   - induction x; intro H; simpl in H; apply orb_true_iff in H;       destruct H; auto;         try match goal with             | [ H: set_mem alg_dec _ pub = true |- _ ] =>               apply set_mem_correct1 in H; auto-            end; try intuition.+            end; try intuition auto with *.     + apply andb_true_iff in H.       destruct H; auto.     + apply andb_true_iff in H.
+ coq/Examples/Blanchet.v view
@@ -0,0 +1,44 @@+(** Protocol: blanchet-fixed (blanchet.scm:3:1) *)++Require Import Proc.+Import List.ListNotations.+Open Scope list_scope.+Open Scope string.++(** Role: init (blanchet.scm:4:3) *)++Definition init: proc :=+  mkProc+  [(0, Chan); (1, Name); (2, Ikey); (3, Akey)]+  [+   (* Send (blanchet.scm:7:6) *)+   Bind (4, Skey) (Frsh_);+   Bind (5, Mesg) (Pair_ 4 1);+   Bind (6, Mesg) (Encr_ 5 2);+   Bind (7, Mesg) (Encr_ 6 3);+   Send 0 7;+   (* Recv (blanchet.scm:8:6) *)+   Bind (8, Mesg) (Recv_ 0);+   Bind (9, Data) (Decr_ 8 4);+   Return [9; 4]+  ].++(** Role: resp (blanchet.scm:12:3) *)++Definition resp: proc :=+  mkProc+  [(0, Chan); (1, Name); (2, Akey); (3, Ikey)]+  [+   (* Recv (blanchet.scm:15:6) *)+   Bind (4, Mesg) (Recv_ 0);+   Bind (5, Mesg) (Decr_ 4 3);+   Bind (6, Mesg) (Decr_ 5 2);+   Bind (7, Skey) (Frst_ 6);+   Bind (8, Name) (Scnd_ 6);+   Same 8 1;+   (* Send (blanchet.scm:16:6) *)+   Bind (9, Data) (Frsh_);+   Bind (10, Mesg) (Encr_ 9 7);+   Send 0 10;+   Return [9; 7]+  ].
+ coq/Examples/Blanchet_akey.v view
@@ -0,0 +1,44 @@+(** Protocol: blanchet-akey-fixed (blanchet_akey.scm:3:1) *)++Require Import Proc.+Import List.ListNotations.+Open Scope list_scope.+Open Scope string.++(** Role: init (blanchet_akey.scm:4:3) *)++Definition init: proc :=+  mkProc+  [(0, Chan); (1, Akey); (2, Ikey)]+  [+   (* Send (blanchet_akey.scm:7:6) *)+   Bind (3, Skey) (Frsh_);+   Bind (4, Mesg) (Pair_ 1 3);+   Bind (5, Mesg) (Encr_ 4 2);+   Bind (6, Mesg) (Encr_ 5 1);+   Send 0 6;+   (* Recv (blanchet_akey.scm:8:6) *)+   Bind (7, Mesg) (Recv_ 0);+   Bind (8, Data) (Decr_ 7 3);+   Return [8; 3]+  ].++(** Role: resp (blanchet_akey.scm:12:3) *)++Definition resp: proc :=+  mkProc+  [(0, Chan); (1, Akey); (2, Ikey)]+  [+   (* Recv (blanchet_akey.scm:15:6) *)+   Bind (3, Mesg) (Recv_ 0);+   Bind (4, Mesg) (Decr_ 3 2);+   Bind (5, Mesg) (Decr_ 4 1);+   Bind (6, Akey) (Frst_ 5);+   Bind (7, Skey) (Scnd_ 5);+   Invp 6 2;+   (* Send (blanchet_akey.scm:16:6) *)+   Bind (8, Data) (Frsh_);+   Bind (9, Mesg) (Encr_ 8 7);+   Send 0 9;+   Return [8; 7]+  ].
+ coq/Examples/Blanchet_akey_proof.v view
@@ -0,0 +1,27 @@+(** * Blanchet Akey Protocol Generated Code Verification *)++Require Import Sem Sem_tactics Blanchet_akey Blanchet_akey_role.++Theorem correct_blanchet_akey_init_io_liveness:+  correct_io_liveness init_role init.+Proof.+  sem_liveness.+Qed.++Theorem correct_blanchet_akey_resp_io_liveness:+  correct_io_liveness resp_role resp.+Proof.+  sem_liveness.+Qed.++Theorem correct_blanchet_akey_init_io_safety:+  correct_io_safety init_role init.+Proof.+  sem_safety.+Qed.++Theorem correct_blanchet_akey_resp_io_safety:+  correct_io_safety resp_role resp.+Proof.+  sem_safety.+Qed.
+ coq/Examples/Blanchet_akey_role.v view
@@ -0,0 +1,26 @@+(** Protocol: blanchet-akey-fixed (blanchet_akey.scm:3:1) *)++Require Import String List Alg Role.+Import List.ListNotations.+Open Scope list_scope.+Open Scope string.++(** Role: init (blanchet_akey.scm:4:3) *)++Definition init_role: role :=+  mkRole+  [Sd 2 (En (En (Pr (Ak (Av 1)) (Sk (Sv 4))) (Ik (Av 0))) (Ak (Av 1)));+   Rv 2 (En (Dt 3) (Sk (Sv 4)))]+  [Sk (Sv 4)]+  [Ch 2; Ak (Av 1); Ik (Av 0)]+  [Dt 3; Sk (Sv 4)].++(** Role: resp (blanchet_akey.scm:12:3) *)++Definition resp_role: role :=+  mkRole+  [Rv 2 (En (En (Pr (Ak (Av 1)) (Sk (Sv 4))) (Ik (Av 0))) (Ak (Av 1)));+   Sd 2 (En (Dt 3) (Sk (Sv 4)))]+  [Dt 3]+  [Ch 2; Ak (Av 0); Ik (Av 1)]+  [Dt 3; Sk (Sv 4)].
+ coq/Examples/Blanchet_proof.v view
@@ -0,0 +1,27 @@+(** * Blanchet Protocol Generated Code Verification *)++Require Import Sem Sem_tactics Blanchet Blanchet_role.++Theorem correct_blanchet_init_io_liveness:+  correct_io_liveness init_role init.+Proof.+  sem_liveness.+Qed.++Theorem correct_blanchet_resp_io_liveness:+  correct_io_liveness resp_role resp.+Proof.+  sem_liveness.+Qed.++Theorem correct_blanchet_init_io_safety:+  correct_io_safety init_role init.+Proof.+  sem_safety.+Qed.++Theorem correct_blanchet_resp_io_safety:+  correct_io_safety resp_role resp.+Proof.+  sem_safety.+Qed.
+ coq/Examples/Blanchet_role.v view
@@ -0,0 +1,26 @@+(** Protocol: blanchet-fixed (blanchet.scm:3:1) *)++Require Import String List Alg Role.+Import List.ListNotations.+Open Scope list_scope.+Open Scope string.++(** Role: init (blanchet.scm:4:3) *)++Definition init_role: role :=+  mkRole+  [Sd 2 (En (En (Pr (Sk (Sv 4)) (Nm 1)) (Ik (Pb 0))) (Ak (Pb 1)));+   Rv 2 (En (Dt 3) (Sk (Sv 4)))]+  [Sk (Sv 4)]+  [Ch 2; Nm 1; Ik (Pb 0); Ak (Pb 1)]+  [Dt 3; Sk (Sv 4)].++(** Role: resp (blanchet.scm:12:3) *)++Definition resp_role: role :=+  mkRole+  [Rv 2 (En (En (Pr (Sk (Sv 4)) (Nm 1)) (Ik (Pb 0))) (Ak (Pb 1)));+   Sd 2 (En (Dt 3) (Sk (Sv 4)))]+  [Dt 3]+  [Ch 2; Nm 1; Ak (Pb 0); Ik (Pb 1)]+  [Dt 3; Sk (Sv 4)].
− coq/Examples/Ltk.v
@@ -1,27 +0,0 @@-(** Protocol: ltk (ltk.scm:3:1) *)--Require Import Proc.-Import List.ListNotations.-Open Scope list_scope.-Open Scope string.--(** Role: rho (ltk.scm:4:3) *)--Definition rho: proc :=-  mkProc-  [(0, Chan); (1, Ikey)]-  [-   (* Recv (ltk.scm:7:6) *)-   Bind (2, Mesg) (Recv_ 0);-   Bind (3, Mesg) (Decr_ 2 1);-   Bind (4, Name) (Frst_ 3);-   Bind (5, Mesg) (Scnd_ 3);-   Bind (6, Name) (Frst_ 5);-   Bind (7, Skey) (Scnd_ 5);-   Ltkp 7 4 6;-   (* Send (ltk.scm:8:6) *)-   Bind (8, Mesg) (Pair_ 4 6);-   Bind (9, Mesg) (Encr_ 8 7);-   Send 0 9;-   Return []-  ].
− coq/Examples/Ltk_proof.v
@@ -1,15 +0,0 @@-(** * Ltk Protocol Generated Code Verification *)--Require Import Sem Sem_tactics Ltk Ltk_role.--Theorem correct_ltk_rho_io_liveness:-  correct_io_liveness rho_role rho.-Proof.-  sem_liveness.-Qed.--Theorem correct_ltk_rho_io_safety:-  correct_io_safety rho_role rho.-Proof.-  sem_safety.-Qed.
− coq/Examples/Ltk_role.v
@@ -1,16 +0,0 @@-(** Protocol: ltk (ltk.scm:3:1) *)--Require Import String List Alg Role.-Import List.ListNotations.-Open Scope list_scope.-Open Scope string.--(** Role: rho (ltk.scm:4:3) *)--Definition rho_role: role :=-  mkRole-  [Rv 2 (En (Pr (Nm 0) (Pr (Nm 1) (Sk (Lt 0 1)))) (Ak (Av 3)));-   Sd 2 (En (Pr (Nm 0) (Nm 1)) (Sk (Lt 0 1)))]-  []-  [Ch 2; Ik (Av 3)]-  [].
− coq/Examples/Privk.v
@@ -1,24 +0,0 @@-(** Protocol: privk (privk.scm:3:1) *)--Require Import Proc.-Import List.ListNotations.-Open Scope list_scope.-Open Scope string.--(** Role: rho (privk.scm:4:3) *)--Definition rho: proc :=-  mkProc-  [(0, Chan); (1, Ikey)]-  [-   (* Recv (privk.scm:7:6) *)-   Bind (2, Mesg) (Recv_ 0);-   Bind (3, Mesg) (Decr_ 2 1);-   Bind (4, Name) (Frst_ 3);-   Bind (5, Ikey) (Scnd_ 3);-   Namp 5 4;-   (* Send (privk.scm:8:6) *)-   Bind (6, Mesg) (Encr_ 4 5);-   Send 0 6;-   Return []-  ].
− coq/Examples/Privk2.v
@@ -1,25 +0,0 @@-(** Protocol: privk2 (privk2.scm:3:1) *)--Require Import Proc.-Import List.ListNotations.-Open Scope list_scope.-Open Scope string.--(** Role: rho (privk2.scm:4:3) *)--Definition rho: proc :=-  mkProc-  [(0, Chan); (1, Ikey)]-  [-   (* Recv (privk2.scm:7:6) *)-   Bind (2, Mesg) (Recv_ 0);-   Bind (3, Mesg) (Decr_ 2 1);-   Bind (4, Name) (Frst_ 3);-   Bind (5, Ikey) (Scnd_ 3);-   Bind (6, Mesg) (Quot_ "enc");-   Nm2p 5 6 4;-   (* Send (privk2.scm:8:6) *)-   Bind (7, Mesg) (Encr_ 4 5);-   Send 0 7;-   Return []-  ].
− coq/Examples/Privk2_proof.v
@@ -1,15 +0,0 @@-(** * Privk2 Protocol Generated Code Verification *)--Require Import Sem Sem_tactics Privk2 Privk2_role.--Theorem correct_privk2_rho_io_liveness:-  correct_io_liveness rho_role rho.-Proof.-  sem_liveness.-Qed.--Theorem correct_privk2_rho_io_safety:-  correct_io_safety rho_role rho.-Proof.-  sem_safety.-Qed.
− coq/Examples/Privk2_role.v
@@ -1,16 +0,0 @@-(** Protocol: privk2 (privk2.scm:3:1) *)--Require Import String List Alg Role.-Import List.ListNotations.-Open Scope list_scope.-Open Scope string.--(** Role: rho (privk2.scm:4:3) *)--Definition rho_role: role :=-  mkRole-  [Rv 1 (En (Pr (Nm 0) (Ik (Pb2 "enc" 0))) (Ak (Av 2)));-   Sd 1 (En (Nm 0) (Ik (Pb2 "enc" 0)))]-  []-  [Ch 1; Ik (Av 2)]-  [].
− coq/Examples/Privk_proof.v
@@ -1,15 +0,0 @@-(** * Privk Protocol Generated Code Verification *)--Require Import Sem Sem_tactics Privk Privk_role.--Theorem correct_privk_rho_io_liveness:-  correct_io_liveness rho_role rho.-Proof.-  sem_liveness.-Qed.--Theorem correct_privk_rho_io_safety:-  correct_io_safety rho_role rho.-Proof.-  sem_safety.-Qed.
− coq/Examples/Privk_role.v
@@ -1,16 +0,0 @@-(** Protocol: privk (privk.scm:3:1) *)--Require Import String List Alg Role.-Import List.ListNotations.-Open Scope list_scope.-Open Scope string.--(** Role: rho (privk.scm:4:3) *)--Definition rho_role: role :=-  mkRole-  [Rv 1 (En (Pr (Nm 0) (Ik (Pb 0))) (Ak (Av 2)));-   Sd 1 (En (Nm 0) (Ik (Pb 0)))]-  []-  [Ch 1; Ik (Av 2)]-  [].
− coq/Examples/Pubk.v
@@ -1,24 +0,0 @@-(** Protocol: pubk (pubk.scm:3:1) *)--Require Import Proc.-Import List.ListNotations.-Open Scope list_scope.-Open Scope string.--(** Role: rho (pubk.scm:4:3) *)--Definition rho: proc :=-  mkProc-  [(0, Chan); (1, Ikey)]-  [-   (* Recv (pubk.scm:7:6) *)-   Bind (2, Mesg) (Recv_ 0);-   Bind (3, Mesg) (Decr_ 2 1);-   Bind (4, Name) (Frst_ 3);-   Bind (5, Akey) (Scnd_ 3);-   Namp 5 4;-   (* Send (pubk.scm:8:6) *)-   Bind (6, Mesg) (Encr_ 4 5);-   Send 0 6;-   Return []-  ].
− coq/Examples/Pubk2.v
@@ -1,25 +0,0 @@-(** Protocol: pubk2 (pubk2.scm:3:1) *)--Require Import Proc.-Import List.ListNotations.-Open Scope list_scope.-Open Scope string.--(** Role: rho (pubk2.scm:4:3) *)--Definition rho: proc :=-  mkProc-  [(0, Chan); (1, Ikey)]-  [-   (* Recv (pubk2.scm:7:6) *)-   Bind (2, Mesg) (Recv_ 0);-   Bind (3, Mesg) (Decr_ 2 1);-   Bind (4, Name) (Frst_ 3);-   Bind (5, Akey) (Scnd_ 3);-   Bind (6, Mesg) (Quot_ "enc");-   Nm2p 5 6 4;-   (* Send (pubk2.scm:8:6) *)-   Bind (7, Mesg) (Encr_ 4 5);-   Send 0 7;-   Return []-  ].
− coq/Examples/Pubk2_proof.v
@@ -1,15 +0,0 @@-(** * Pubk2 Protocol Generated Code Verification *)--Require Import Sem Sem_tactics Pubk2 Pubk2_role.--Theorem correct_pubk2_rho_io_liveness:-  correct_io_liveness rho_role rho.-Proof.-  sem_liveness.-Qed.--Theorem correct_pubk2_rho_io_safety:-  correct_io_safety rho_role rho.-Proof.-  sem_safety.-Qed.
− coq/Examples/Pubk2_role.v
@@ -1,16 +0,0 @@-(** Protocol: pubk2 (pubk2.scm:3:1) *)--Require Import String List Alg Role.-Import List.ListNotations.-Open Scope list_scope.-Open Scope string.--(** Role: rho (pubk2.scm:4:3) *)--Definition rho_role: role :=-  mkRole-  [Rv 1 (En (Pr (Nm 0) (Ak (Pb2 "enc" 0))) (Ak (Av 2)));-   Sd 1 (En (Nm 0) (Ak (Pb2 "enc" 0)))]-  []-  [Ch 1; Ik (Av 2)]-  [].
− coq/Examples/Pubk_proof.v
@@ -1,15 +0,0 @@-(** * Pubk Protocol Generated Code Verification *)--Require Import Sem Sem_tactics Pubk Pubk_role.--Theorem correct_pubk_rho_io_liveness:-  correct_io_liveness rho_role rho.-Proof.-  sem_liveness.-Qed.--Theorem correct_pubk_rho_io_safety:-  correct_io_safety rho_role rho.-Proof.-  sem_safety.-Qed.
− coq/Examples/Pubk_role.v
@@ -1,16 +0,0 @@-(** Protocol: pubk (pubk.scm:3:1) *)--Require Import String List Alg Role.-Import List.ListNotations.-Open Scope list_scope.-Open Scope string.--(** Role: rho (pubk.scm:4:3) *)--Definition rho_role: role :=-  mkRole-  [Rv 1 (En (Pr (Nm 0) (Ak (Pb 0))) (Ak (Av 2)));-   Sd 1 (En (Nm 0) (Ak (Pb 0)))]-  []-  [Ch 1; Ik (Av 2)]-  [].
coq/Examples/_CoqProject view
@@ -2,6 +2,12 @@ Nsl.v Nsl_role.v Nsl_proof.v+Blanchet.v+Blanchet_role.v+Blanchet_proof.v+Blanchet_akey.v+Blanchet_akey_role.v+Blanchet_akey_proof.v Otway_rees.v Otway_rees_role.v Otway_rees_proof.v@@ -11,21 +17,6 @@ Bad_unilateral.v Bad_unilateral_role.v Bad_unilateral_proof.v-Ltk.v-Ltk_role.v-Ltk_proof.v Invk.v Invk_role.v Invk_proof.v-Pubk.v-Pubk_role.v-Pubk_proof.v-Pubk2.v-Pubk2_role.v-Pubk2_proof.v-Privk.v-Privk_role.v-Privk_proof.v-Privk2.v-Privk2_role.v-Privk2_proof.v
+ coq/Examples/blanchet.scm view
@@ -0,0 +1,50 @@+(herald "Corrected Blanchet's Simple Example Protocol")++(defprotocol blanchet-fixed basic+  (defrole init+    (vars (a b name) (s skey) (d data) (ch chan))+    (trace+     (send ch (enc (enc s b (privk a)) (pubk b)))+     (recv ch (enc d s)))+    (uniq-orig s)+    (inputs ch b (privk a) (pubk b))+    (outputs d s))+  (defrole resp+    (vars (a b name) (s skey) (d data) (ch chan))+    (trace+     (recv ch (enc (enc s b (privk a)) (pubk b)))+     (send ch (enc d s)))+    (uniq-orig d)+    (inputs ch b (pubk a) (privk b))+    (outputs d s))+  (comment "Fixed Blanchet's protocol using named asymmetric keys"))++(defskeleton blanchet-fixed+  (vars (a b name) (s skey) (d data))+  (defstrand init 2 (a a) (b b) (s s) (d d))+  (non-orig (privk b))+  (uniq-orig s)+  (comment "Analyze from the initiator's perspective"))++(defskeleton blanchet-fixed+  (vars (a b name) (s skey) (d data))+  (defstrand init 2 (a a) (b b) (s s) (d d))+  (deflistener d)+  (non-orig (privk b))+  (uniq-orig s d)+  (comment "From the initiator's perspective, is the secret leaked?"))++(defskeleton blanchet-fixed+  (vars (a b name) (s skey) (d data))+  (defstrand resp 2 (a a) (b b) (s s) (d d))+  (non-orig (privk a) (privk b))+  (uniq-orig s)+  (comment "Analyze from the responder's perspective"))++(defskeleton blanchet-fixed+  (vars (a b name) (s skey) (d data))+  (defstrand resp 2 (a a) (b b) (s s) (d d))+  (deflistener d)+  (non-orig (privk a) (privk b))+  (uniq-orig s d)+  (comment "From the responders's perspective, is the secret leaked?"))
+ coq/Examples/blanchet_akey.scm view
@@ -0,0 +1,48 @@+(herald blanchet-akey-fixed)++(defprotocol blanchet-akey-fixed basic+  (defrole init+    (vars (ch chan) (a b akey) (s skey) (d data))+    (trace+     (send ch (enc (enc b s (invk a)) b))+     (recv ch(enc d s)))+    (uniq-orig s)+    (inputs ch b (invk a))+    (outputs d s))+  (defrole resp+    (vars (ch chan) (a b akey) (s skey) (d data))+    (trace+     (recv ch (enc (enc b s (invk a)) b))+     (send ch (enc d s)))+    (uniq-orig d)+    (inputs ch a (invk b))+    (outputs d s))+  (comment "Blanchet's protocol using unnamed asymmetric keys"))++(defskeleton blanchet-akey-fixed+  (vars (b akey))+  (defstrand init 2 (b b))+  (non-orig (invk b))+  (comment "Analyze from the initiator's perspective"))++(defskeleton blanchet-akey-fixed+  (vars (b akey) (d data))+  (defstrand init 2 (b b) (d d))+  (deflistener d)+  (non-orig (invk b))+  (uniq-orig d)+  (comment "From the initiator's perspective, is the secret leaked?"))++(defskeleton blanchet-akey-fixed+  (vars (a b akey))+  (defstrand resp 2 (a a) (b b))+  (non-orig (invk a) (invk b))+  (comment "Analyze from the responder's perspective"))++(defskeleton blanchet-akey-fixed+  (vars (a b akey) (s skey) (d data))+  (defstrand resp 2 (a a) (b b) (s s) (d d))+  (deflistener d)+  (non-orig (invk a) (invk b))+  (uniq-orig s)+  (comment "From the responders's perspective, is the secret leaked?"))
− coq/Examples/ltk.scm
@@ -1,9 +0,0 @@-(herald ltk)--(defprotocol ltk basic-  (defrole rho-    (vars (ch chan) (a b name) (k akey))-    (trace-     (recv ch (enc a b (ltk a b) k))-     (send ch (enc a b (ltk a b))))-    (inputs ch (invk k))))
− coq/Examples/privk.scm
@@ -1,9 +0,0 @@-(herald privk)--(defprotocol privk basic-  (defrole rho-    (vars (ch chan) (a name) (k akey))-    (trace-     (recv ch (enc a (privk a) k))-     (send ch (enc a (privk a))))-    (inputs ch (invk k))))
− coq/Examples/privk2.scm
@@ -1,9 +0,0 @@-(herald privk2)--(defprotocol privk2 basic-  (defrole rho-    (vars (ch chan) (a name) (k akey))-    (trace-     (recv ch (enc a (privk "enc" a) k))-     (send ch (enc a (privk "enc" a))))-    (inputs ch (invk k))))
− coq/Examples/pubk.scm
@@ -1,9 +0,0 @@-(herald pubk)--(defprotocol pubk basic-  (defrole rho-    (vars (ch chan) (a name) (k akey))-    (trace-     (recv ch (enc a (pubk a) k))-     (send ch (enc a (pubk a))))-    (inputs ch (invk k))))
− coq/Examples/pubk2.scm
@@ -1,9 +0,0 @@-(herald pubk2)--(defprotocol pubk2 basic-  (defrole rho-    (vars (ch chan) (a name) (k akey))-    (trace-     (recv ch (enc a (pubk "enc" a) k))-     (send ch (enc a (pubk "enc" a))))-    (inputs ch (invk k))))
coq/Nonce.v view
@@ -113,7 +113,7 @@     + apply H2; simpl.       apply in_inv in H3; intuition.     + apply H1 in H3.-      apply in_inv in H3; intuition; subst; simpl; auto.+      apply in_inv in H3; intuition auto with *; subst; simpl; auto. Qed.  (** An easily computed condition for a compiler source target pair to
coq/Proc.v view
@@ -57,7 +57,7 @@ Proof.   intros.   unfold type_eqb.-  destruct (type_dec x y); subst; intuition.+  destruct (type_dec x y); subst; intuition auto with *. Qed.  (** The inverse type *)@@ -101,10 +101,7 @@ | Bind: decl -> expr -> stmt    (* Bind a variable *) | Send: pvar -> pvar -> stmt    (* Send a message *) | Same: pvar -> pvar -> stmt    (* Check for sameness *)-| Ltkp: pvar -> pvar -> pvar -> stmt (* Check LTK predicate *)-| Invp: pvar -> pvar -> stmt    (* Check Inv predicate *)-| Namp: pvar -> pvar -> stmt    (* Check Name predicate *)-| Nm2p: pvar -> pvar -> pvar -> stmt. (* Check Name2 predicate *)+| Invp: pvar -> pvar -> stmt.   (* Check Inv predicate *)  (** Procedures *) 
coq/Run.v view
@@ -94,7 +94,7 @@       end     | _ => None     end-  | Frsh =>+  | Frsh_ =>     match runiqs rst with     | u :: us =>       Some (mkRSt (renv rst) (rtr rst) us, u)@@ -146,18 +146,6 @@       Some rst     else       None-  | Ltkp u v w =>-    x <- lookup u (renv rst);;-    y <- lookup v (renv rst);;-    z <- lookup w (renv rst);;-    match y, z with-    | Nm b, Nm c =>-      if alg_eqb x (Sk (Lt b c)) then-        Some rst-      else-        None-    | _, _ => None-    end   | Invp u v =>     x <- lookup u (renv rst);;     y <- lookup v (renv rst);;@@ -165,39 +153,6 @@       Some rst     else       None-  | Namp u v =>-    x <- lookup u (renv rst);;-    y <- lookup v (renv rst);;-    match x, y with-    | Ak k, Nm b =>-      if akey_eqb k (Pb b) then-        Some rst-      else-        None-    | Ik k, Nm b =>-      if akey_eqb k (Pb b) then-        Some rst-      else-        None-    | _, _ => None-    end-  | Nm2p u v w =>-    x <- lookup u (renv rst);;-    y <- lookup v (renv rst);;-    z <- lookup w (renv rst);;-    match x, y, z with-    | Ak k, Tg s, Nm c =>-      if akey_eqb k (Pb2 s c) then-        Some rst-      else-        None-    | Ik k, Tg s, Nm c =>-      if akey_eqb k (Pb2 s c) then-        Some rst-      else-        None-    | _, _, _ => None-    end   | Return _ => None end. 
coq/Run_sem.v view
@@ -29,7 +29,7 @@     + rewrite G; auto.     + contradiction G.       rewrite alg_eq_correct; auto.-  - rewrite <- beq_nat_refl; auto.+  - rewrite Nat.eqb_refl; auto. Qed.  Lemma run_expr_implies_expr_sem:@@ -98,7 +98,7 @@         -- destruct c; inv H.            destruct (bool_dec (n1 =? n0) true) as [F|F].            ++ rewrite F in H1; inv H1.-              apply beq_nat_true in F; subst; auto.+              apply Nat.eqb_eq in F; subst; auto.            ++ rewrite not_true_iff_false in F.               rewrite F in H1; inv H1. Qed.@@ -129,7 +129,7 @@     rewrite H1; auto.   - simpl.     rewrite H0.-    rewrite <- beq_nat_refl; auto.+    rewrite Nat.eqb_refl; auto.     rewrite H1.     destruct (bool_dec (alg_eqb a a) true) as [G|G].     + rewrite G; auto.@@ -148,48 +148,11 @@     rewrite H0.     rewrite H1.     rewrite H2.-    destruct (bool_dec (alg_eqb (Sk (Lt b c))-                                (Sk (Lt b c))) true) as [G|G].-    + rewrite G; auto.-    + contradiction G.-      rewrite alg_eq_correct; auto.-  - simpl.-    rewrite H0.-    rewrite H1.-    rewrite H2.     simpl.     destruct (bool_dec (alg_eqb (inv b) (inv b)) true) as [G|G].     + rewrite G; auto.     + contradiction G.       rewrite alg_eq_correct; auto.-  - simpl.-    rewrite H0.-    rewrite H1.-    simpl.-    unfold akey_eqb.-    destruct (akey_dec (Pb b) (Pb b)) as [G|G]; auto.-    contradict G; auto.-  - simpl.-    rewrite H0.-    rewrite H1.-    simpl.-    unfold akey_eqb.-    destruct (akey_dec (Pb b) (Pb b)) as [G|G]; auto.-    contradict G; auto.-  - simpl.-    rewrite H0.-    rewrite H1.-    rewrite H2.-    unfold akey_eqb.-    destruct (akey_dec (Pb2 s b) (Pb2 s b)) as [G|G]; auto.-    contradict G; auto.-  - simpl.-    rewrite H0.-    rewrite H1.-    rewrite H2.-    unfold akey_eqb.-    destruct (akey_dec (Pb2 s b) (Pb2 s b)) as [G|G]; auto.-    contradict G; auto. Qed.  Lemma run_stmt_implies_stmt_sem:@@ -226,7 +189,7 @@            destruct x; inv H.            destruct (bool_dec (n2 =? n1) true) as [G|G].            ++ rewrite G in H2; inv H2.-              apply beq_nat_true in G; subst.+              apply Nat.eqb_eq in G; subst.               destruct (option_dec (lookup n0 (renv rst))) as [G|G].               ** rewrite G in H1; inv H1.               ** destruct G.@@ -257,23 +220,6 @@            eapply Stmt_same; eauto.         -- rewrite not_true_iff_false in G.            rewrite G in H; inv H.-  - alt_option_dec (lookup n (renv rst)) v G;-      rewrite G in H.-    + inv H.-    + alt_option_dec (lookup n0 (renv rst)) u F;-        rewrite F in H.-      * inv H.-      * alt_option_dec (lookup n1 (renv rst)) w E;-          rewrite E in H.-        -- inv H.-        -- destruct u; inv H.-           destruct w; inv H1.-           destruct (alt_bool_dec (alg_eqb v (Sk (Lt n2 n3)))) as [D|D];-             rewrite D in H0.-           ++ rewrite alg_eq_correct in D; subst.-              inv H0.-              eapply Stmt_ltkp; eauto.-           ++ inv H0.   - alt_option_dec (lookup n (renv rst)) x G;       rewrite G in H.     + inv H.@@ -289,49 +235,6 @@            apply alg_eq_correct in E.            eapply Stmt_invp; eauto.         -- inv H.-  - alt_option_dec (lookup n (renv rst)) x G;-      rewrite G in H.-    + inv H.-    + alt_option_dec (lookup n0 (renv rst)) y F;-        rewrite F in H.-      * inv H.-      * destruct x; inv H.-        -- destruct y; inv H1.-           unfold akey_eqb in H0.-           destruct (akey_dec a (Pb n1)) as [E|E]; subst.-           ++ inv H0.-              eapply Stmt_pub_namp; eauto.-           ++ inv H0.-        -- destruct y; inv H1.-           unfold akey_eqb in H0.-           destruct (akey_dec a (Pb n1)) as [E|E]; subst.-           ++ inv H0.-              eapply Stmt_priv_namp; eauto.-           ++ inv H0.-  - alt_option_dec (lookup n (renv rst)) x G;-      rewrite G in H.-    + inv H.-    + alt_option_dec (lookup n0 (renv rst)) y F;-        rewrite F in H.-      * inv H.-      * alt_option_dec (lookup n1 (renv rst)) z E;-          rewrite E in H.-        -- inv H.-        -- destruct x; inv H.-           ++ destruct y; inv H1.-              destruct z; inv H0.-              unfold akey_eqb in H1.-              destruct (akey_dec a (Pb2 s n2)) as [D|D].-              ** inv H1.-                 eapply Stmt_pub_nm2p; eauto.-              ** inv H1.-           ++ destruct y; inv H1.-              destruct z; inv H0.-              unfold akey_eqb in H1.-              destruct (akey_dec a (Pb2 s n2)) as [D|D].-              ** inv H1.-                 eapply Stmt_priv_nm2p; eauto.-              ** inv H1. Qed.  Lemma stmt_list_sem_implies_run_stmts:@@ -364,15 +267,6 @@     rewrite e3.     apply Stmt_return; auto.   - inv e2.-  - apply run_stmt_implies_stmt_sem in e1.-    apply IHo in H1.-    eapply Stmt_pair; eauto.-  - apply run_stmt_implies_stmt_sem in e1.-    apply IHo in H1.-    eapply Stmt_pair; eauto.-  - apply run_stmt_implies_stmt_sem in e1.-    apply IHo in H1.-    eapply Stmt_pair; eauto.   - apply run_stmt_implies_stmt_sem in e1.     apply IHo in H1.     eapply Stmt_pair; eauto.
coq/Sem.v view
@@ -141,40 +141,12 @@     has_enc a = false ->        (* For probabilistic encryption *)     a = b ->                    (* Sameness check *)     stmt_sem ev tr us (Same x y) ev tr us-| Stmt_ltkp: forall ev tr us x y z a b c,-    lookup x ev = Some a ->-    lookup y ev = Some (Nm b) ->-    lookup z ev = Some (Nm c) ->-    a = Sk (Lt b c) ->          (* Ltk check *)-    stmt_sem ev tr us (Ltkp x y z) ev tr us | Stmt_invp: forall ev tr us x y a b,     lookup x ev = Some a ->     lookup y ev = Some b ->     has_enc a = false ->        (* For probabilistic encryption *)     a = inv b ->                (* Inverse check *)-    stmt_sem ev tr us (Invp x y) ev tr us-| Stmt_pub_namp: forall ev tr us x y a b,-    lookup x ev = Some (Ak a) ->-    lookup y ev = Some (Nm b) ->-    a = Pb b ->                (* Name check *)-    stmt_sem ev tr us (Namp x y) ev tr us-| Stmt_priv_namp: forall ev tr us x y a b,-    lookup x ev = Some (Ik a) ->-    lookup y ev = Some (Nm b) ->-    a = Pb b ->                (* Name check *)-    stmt_sem ev tr us (Namp x y) ev tr us-| Stmt_pub_nm2p: forall ev tr us x y z a s b,-    lookup x ev = Some (Ak a) ->-    lookup y ev = Some (Tg s) ->-    lookup z ev = Some (Nm b) ->-    a = Pb2 s b ->              (* Tagged name check *)-    stmt_sem ev tr us (Nm2p x y z) ev tr us-| Stmt_priv_nm2p: forall ev tr us x y z a s b,-    lookup x ev = Some (Ik a) ->-    lookup y ev = Some (Tg s) ->-    lookup z ev = Some (Nm b) ->-    a = Pb2 s b ->              (* Tagged name check *)-    stmt_sem ev tr us (Nm2p x y z) ev tr us.+    stmt_sem ev tr us (Invp x y) ev tr us. #[global] Hint Constructors stmt_sem : core. @@ -186,11 +158,6 @@   intros.   inversion H; subst.   - exists [(v, val)]; auto.-  - exists []; auto.-  - exists []; auto.-  - exists []; auto.-  - exists []; auto.-  - exists []; auto.   - exists []; auto.   - exists []; auto.   - exists []; auto.
cpsa.cabal view
@@ -1,5 +1,5 @@ Name:                   cpsa-Version:                4.4.2+Version:                4.4.3 Maintainer:             ramsdell@mitre.org Cabal-Version:          >= 1.10 License:                BSD3@@ -256,26 +256,22 @@   coq/Unilateral_proof.v coq/Makefile coq/Run.v coq/procdoc.tex   coq/Run_sem.v coq/_CoqProject coq/Monad.v coq/procdoc.mk coq/README   coq/Sem.v coq/mkdist coq/Unilateral_role.v coq/mkdoc-  coq/Examples/Otway_rees_proof.v coq/Examples/Otway_rees.v-  coq/Examples/Ltk_proof.v coq/Examples/nsl.scm-  coq/Examples/privk2.scm coq/Examples/Yahalom.v coq/Examples/update-  coq/Examples/Privk2_role.v coq/Examples/invk.scm-  coq/Examples/Privk2.v coq/Examples/Pubk2_role.v-  coq/Examples/Makefile coq/Examples/ltk.scm-  coq/Examples/Pubk2_proof.v coq/Examples/Invk_role.v-  coq/Examples/Privk.v coq/Examples/Bad_unilateral_proof.v-  coq/Examples/Invk_proof.v coq/Examples/Nsl_proof.v-  coq/Examples/_CoqProject coq/Examples/Ltk.v coq/Examples/Nsl_role.v-  coq/Examples/README coq/Examples/Ltk_role.v coq/Examples/pubk.scm-  coq/Examples/Privk_proof.v coq/Examples/bad_unilateral.scm-  coq/Examples/Pubk.v coq/Examples/Yahalom_proof.v-  coq/Examples/Pubk2.v coq/Examples/otway_rees.scm-  coq/Examples/Bad_unilateral_role.v coq/Examples/privk.scm-  coq/Examples/Privk_role.v coq/Examples/Otway_rees_role.v-  coq/Examples/Nsl.v coq/Examples/Invk.v coq/Examples/Pubk_role.v-  coq/Examples/Bad_unilateral.v coq/Examples/Privk2_proof.v-  coq/Examples/pubk2.scm coq/Examples/Pubk_proof.v-  coq/Examples/yahalom.scm coq/Examples/Yahalom_role.v coq/Proc.v+  coq/Examples/Bad_unilateral.v coq/Examples/Bad_unilateral_proof.v+  coq/Examples/Bad_unilateral_role.v coq/Examples/Blanchet.v+  coq/Examples/Blanchet_akey.v coq/Examples/Blanchet_akey_proof.v+  coq/Examples/Blanchet_akey_role.v coq/Examples/Blanchet_proof.v+  coq/Examples/Blanchet_role.v coq/Examples/Invk.v+  coq/Examples/Invk_proof.v coq/Examples/Invk_role.v+  coq/Examples/Makefile coq/Examples/Nsl.v coq/Examples/Nsl_proof.v+  coq/Examples/Nsl_role.v coq/Examples/Otway_rees.v+  coq/Examples/Otway_rees_proof.v coq/Examples/Otway_rees_role.v+  coq/Examples/README coq/Examples/Yahalom.v+  coq/Examples/Yahalom_proof.v coq/Examples/Yahalom_role.v+  coq/Examples/_CoqProject coq/Examples/bad_unilateral.scm+  coq/Examples/blanchet.scm coq/Examples/blanchet_akey.scm+  coq/Examples/invk.scm coq/Examples/nsl.scm+  coq/Examples/otway_rees.scm coq/Examples/update+  coq/Examples/yahalom.scm coq/Proc.v   coq/Derives.v coq/unilateral.scm coq/Unilateral.v coq/Role.v   coq/Subst.v coq/CSem.v coq/CRun.v coq/CRun_csem.v @@ -448,3 +444,27 @@     CPSA.Lib.Printer CPSA.Lib.Entry CPSA.Lib.Expand     CPSA.Roletran.Algebra CPSA.Roletran.Protocol CPSA.Roletran.Loader     CPSA.Roletran.Displayer CPSA.Roletran.Emitter++Executable cpsa4debranch+  Main-Is:              CPSA/Debranch/Main.hs+  Default-Language:     Haskell2010+  Build-Depends:        base+  GHC-Options:+    -Wall -fno-warn-name-shadowing -fwarn-unused-imports+  Hs-Source-Dirs:       src+  Other-Modules:+    Paths_cpsa CPSA.Lib.Pretty CPSA.Lib.SExpr+    CPSA.Lib.Printer CPSA.Lib.Entry CPSA.Lib.Expand++Executable cpsa4query+  Main-Is:              CPSA/Query/Main.hs+  Default-Language:     Haskell2010+  Build-Depends:        base, containers+  GHC-Options:+    -Wall -fno-warn-name-shadowing -fwarn-unused-imports+  Hs-Source-Dirs:       src+  Other-Modules:+    Paths_cpsa CPSA.Lib.Pretty CPSA.Lib.SExpr+    CPSA.Lib.Printer CPSA.Lib.Entry CPSA.Lib.Expand+    CPSA.Lib.Utilities+    CPSA.Query.Loader CPSA.Query.Tree CPSA.Query.Query
doc/cpsa4roletran.md view
@@ -54,8 +54,12 @@    The `outputs` contain the terms returned by the generated    procedure. +The params `field` is an alias for the `inputs` field and the+`returns` field is an alias for the `outputs` field.+ The translator ignores all fields in a role definition except its-name, `vars`, `trace`, `uniq-orig`, `inputs`, and `outputs`.+name, `vars`, `trace`, `uniq-orig`, `inputs`, `params`, `outputs`, and+`returns`.  The translator performs various checks to ensure that each role read is well formed.  It ensures the each term in the inputs is either a
doc/cpsaintroslides.pdf view

binary file changed (93084 → 101593 bytes)

doc/cpsauser.html view
@@ -3,7 +3,7 @@ <head>   <meta http-equiv="content-type"   content="application/xhtml+xml; charset=UTF-8" />-  <title>CPSA 4.3 User Guide</title>+  <title>CPSA 4.4 User Guide</title>   <meta name="generator" content="Amaya 9.54, see http://www.w3.org/Amaya/" />   <style type="text/css">     h1 { text-align: center }@@ -12,7 +12,7 @@ </head>  <body>-<h1>CPSA 4.3 User Guide</h1>+<h1>CPSA 4.4 User Guide</h1>  <p>The Cryptographic Protocol Shapes Analyzer (CPSA) attempts to enumerate all essentially different executions possible for a cryptographic protocol. We call@@ -63,7 +63,10 @@   (<a href="http://json.org">JSON</a>) to ease processing in other   languages.  The   <a href="#cpsajson"><code>cpsa4json</code></a> program translates-  JSON encoded CPSA into CPSA S-Expressions. Finally,+  JSON encoded CPSA into CPSA+  S-Expressions. The <a href="#cpsaquery"><code>cpsa4query</code></a>+  program queries CPSA output as derivation trees.+  Finally,   the <a href="#cpsa42latex"><code>cpsa42latex</code></a> program   translates CPSA macros into equivalent LaTeX macros.</p> @@ -147,6 +150,7 @@ ROLE-ALIST ::= (non-orig POS-TERM*) ROLE-ALIST             |  (pen-non-orig POS-TERM*) ROLE-ALIST             |  (uniq-orig TERM*) ROLE-ALIST+            |  (uniq-gen TERM*) ROLE-ALIST             |  (conf ID*) ROLE-ALIST             |  (auth ID*) ROLE-ALIST             |  (priority POS-INT*) ROLE-ALIST@@ -188,7 +192,7 @@  <p>The protocol association list has no predefined keys, while the role association list has nine predefined keys. The value associated-with <code>non-orig, pen-non-orig, uniq-orig, conf, auth</code> must+with <code>non-orig, pen-non-orig, uniq-orig, uniq-gen, conf, auth</code> must be atoms in the algebra. Each <code>non-orig</code> term must not be carried by any event in the role's trace, but each of its variables must occur in some term.  A role non-origination assumption of the@@ -197,6 +201,7 @@ each <code>pen-non-orig</code> term, each of its variables must occur in some term, but unlike a non-origination assumption, the term may be carried.  Each <code>uniq-orig</code> term must originate in the+role's trace.  Each <code>uniq-gen</code> term must generate in the role's trace.  Each <code>conf</code> term must be a channel variable, and it asserts the channel is confidential.  Each <code>auth</code> term must be a channel variable, and it asserts the channel is@@ -470,7 +475,7 @@   any branch of its analysis as soon as the conclusions of the goals   are satisfied.  See   <a href="cpsagoals.pdf">CPSA Security Goals and Rules</a> for-  details.</p>  +  details.</p>  <p>To be precise, a security goal is an order-sorted first-order logic   sentence in a restricted form.  The set of sort symbols available@@ -682,7 +687,7 @@ Usage: cpsa4 [OPTIONS] [FILE]   -o FILE    --output=FILE      output FILE   -l INT     --limit=INT        step count limit (default 2000)-  -b INT     --bound=INT        strand count bound (default 8)+  -b INT     --bound=INT        strand count bound (default 12)   -d INT     --depth=INT        tree depth bound (default unbounded)   -m INT     --margin=INT       set output margin (default 72)   -e         --expand           expand macros only; don't analyze@@ -815,7 +820,8 @@ draws a dashed line between <code>(send (* a b))</code> and <code>(recv (* b a))</code>.</p> -<p>In the tree drawing, the label of a shape is blue. For dead+<p>In the tree drawing, the label of a shape is blue, and the label of+  a realized skeleton that is not a shape is grey. For dead skeletons, the label is red, unless it has been seen before, in which case it is orange. Otherwise the label is green for skeletons seen before. Seen skeleton labels are rendered in an italic font.</p>@@ -1049,6 +1055,104 @@   -m INT   --margin=INT   set output margin (default 72)   -h       --help         show help message   -v       --version      show version number</pre>+</blockquote>++<h2 id="cpsaquery">Querying CPSA Output as Derivation Trees</h2>++<p>The <code>cpsa4query</code> program loads CPSA output and a query.+It assembles the skeletons in the output into a forest of derivation+trees.  It then runs the query against the selected trees in the+forest and returns the labels of the skeletons that satisfy the+query.</p>++<p>Each tree vertex is a skeleton represented as a S-Expression.+Information in the skeleton can be accessed by treating it as an+association list.  The query language allows one to ask questions+about the association list, such as if it has a given key.  For+example, you can list the shapes in a tree by asking if the+association list has the symbol "shape" as a key.</p>++<h3>Usage</h3>++<blockquote>+  <pre>$ cpsa4query -h+Usage: cpsa4query [OPTIONS] QUERY [FILE]+  -o FILE  --output=FILE  output FILE+  -m INT   --margin=INT   set output margin (default 72)+  -h       --help         show help message+  -v       --version      show version number</pre>+</blockquote>++<h3>Description</h3>++<p>A query is a file containing S-Expressions.  The first S-Expression+contains the query proper, and the remaining S-Expressions are integers+that select which trees in the forest will be the searched by the+query proper.  If there are no integers, the entire forest is+searched.  The syntax of the query proper is:</p>++<blockquote>+  <pre>QUERY ::= (has-key SYMBOL)+       |  (null SYMBOL)+       |  (member SEXPR SYMBOL)+       |  (has-children)+       |  (has-duplicates)+       |  (not QUERY)+       |  (and QUERY*)+       |  (or QUERY*)</pre>+</blockquote>++The <code>has-key</code> predicate asks if <code>SYMBOL</code> is a+key in a skeleton.  The <code>null</code> predicate asks+if <code>SYMBOL</code> is a key and the value is the empty list.  The+<code>member</code> predicate asks if <code>SEXPR</code> is a member+of the value associated with key <code>SYMBOL</code>.+The <code>has-children</code> predicate asks if the current skeleton+has children.  The <code>has-duplicates</code> predicate asks if the+current skeleton has duplicates as descendents.  The remaining+operations implement the usual way to combine boolean functions.++<h3>Examples</h3>++<blockquote>+  <pre>(has-key shape) 0 1</pre>+</blockquote>++<p>finds the skeletons in the first and second tree that have shape as+a key.  If this query is run against the test file output+<code>tst/unilateral.txt</code>, it will find that skeletons 1 and 3+are shapes.</p>++<blockquote>+  <pre>(has-key aborted)</pre>+</blockquote>++<p>finds the skeletons in the forest that have aborted as a key.  If+this query is run against the test file output+<code>tst/wide-mouth-frog.txt</code>, it will find that skeleton 18 is+aborted.</p>++<blockquote>+  <pre>(and (not (has-children))+     (not (has-duplicates))+     (has-key unrealized))</pre>+</blockquote>++<p>finds the skeletons in the forest that are terminal and unrealized.+If this query is run against the test file output+<code>tst/blanchet.txt</code>, it will produce</p>++<blockquote>+  <pre>    2    6    8   16   20   22   30   34   36   42</pre>+</blockquote>++<h3>Transcript</h3>++<blockquote>+  <pre>$ cat query.txt+(has-key shape) 0 1+$ cpsa4query query.txt tst/unilateral.txt+    1    3</pre> </blockquote>  <h2>S-expressions</h2>
doc/index.html view
@@ -14,9 +14,10 @@ <body>  <p>[<a href="cpsauser.html">CPSA User Guide</a>]+[<a href="cpsaintroslides.pdf">CPSA Introductory Slides</a>] [<a href="cpsaprimer.pdf">CPSA Primer</a>] [<a href="cpsagoals.pdf">CPSA Security Goals and Rules</a>]-[<a href="cpsaintroslides.pdf">CPSA Introductory Slides</a>]+[<a href="cpsa4manual.pdf">CPSA Manual</a>] [<a href="http://www.mitre.org/publications/technical-papers/completeness-of-cpsa">CPSA Correctness Proof</a>]</p>  <h1>CPSA</h1><img class="pic" src="cpsalogo.svg" alt="CPSA Logo"/>
doc/src/cpsa4manual/goals.tex view
@@ -602,8 +602,8 @@ \begin{center}   \verb|(facts (neq a b))| \end{center}-to the point of view skeleton and the \texttt{neq} rule below to the-protocol.+to the point of view skeleton.  CPSA contains a rule governing+\texttt{neq} rule stating essentially:  %below, eliminates skeletons that %violate the constraint.@@ -818,12 +818,15 @@ esp. Figs.~\ref{fig:leads:to}--\ref{fig:derived:state:rules} and pp.~\pageref{state:gen:rules:start}--\pageref{state:gen:rules:end}). -\paragraph{``Assume'' declarations.}  A formula may be provided after-the \verb|trace| declaration in a \verb|defprotocol| declaration in an-\verb|assume| clause.  For instance:\footnote{See the file-  \texttt{dhcr\_um\_expt\_assume.scm} in the manual examples-  directory.}+\paragraph{``Assume'' declarations.} %+\index{assume declarations}+%+A formula may be provided after the \verb|trace| declaration in a+\verb|defprotocol| declaration in an \verb|assume| clause.  For+instance:\footnote{See the file \texttt{dhcr\_um\_expt\_assume.scm} in+  the manual examples directory.}+% \begin{verbatim}(defrole init     (vars ...)     (trace ...)@@ -885,17 +888,18 @@ within the trace declaration within a role.  These are: % \begin{description}-  \item[cheq,] used to ensure that two values are equal in any-  instance of the role that progresses beyond this point;-  \item[rely,] used after a reception to declare a formula containing-  only free variables appearing up to and including this reception.-  Every instance of the role long enough to include a successful-  instance of this reception must satisfy the formula;-  \item[guar,] used before a transmission to declare a formula-  containing only free variables appearing up to and including the-  following transmission.  Every instance of the role long enough to-  include an instance of the following transmission must satisfy the-  formula.+%     \item[cheq,] used to ensure that two values are equal in any+%     instance of the role that progresses beyond this point;+  \item[rely,] \index{rely declarations} used after a reception to+  declare a formula containing only free variables appearing up to and+  including this reception.  Every instance of the role long enough to+  include a successful instance of this reception must satisfy the+  formula;+  \item[guar,] \index{guarantee declarations} used before a+  transmission to declare a formula containing only free variables+  appearing up to and including the following transmission.  Every+  instance of the role long enough to include an instance of the+  following transmission must satisfy the formula. \end{description} % All of these trace annotations will cause similar rules to be@@ -905,9 +909,10 @@ express constraints on what happens in the ``real'' events around them. -\paragraph{Checking equality.}  Many protocols use \emph{commitments}-%-\begin{figure}\small+\iffalse+{\paragraph{Checking equality.}  Many protocols use \emph{commitments}+  % +  \begin{figure}\small \begin{verbatim}(defrole auctioneer     (vars (a b name) (n data) (quote outcome text) (sealed mesg))     (trace@@ -919,24 +924,24 @@     \caption[Decommitment with \texttt{cheq}]{A role that accepts a      commitment and decommits it with \texttt{cheq}}-  \label{fig:commit:cheq}-\end{figure}-%-that are messages that the recipient obtains early in a session, but-cannot fully destructure.  Subsequent messages may \emph{decommit} by-providing information that allows the recipient to further destructure-an earlier message.  A \emph{check-equality} annotation, written:-%+   \label{fig:commit:cheq}+ \end{figure}+ % + that are messages that the recipient obtains early in a session, but+ cannot fully destructure.  Subsequent messages may \emph{decommit} by+ providing information that allows the recipient to further destructure+ an earlier message.  A \emph{check-equality} annotation, written:+ %  \begin{verbatim}  (cheq var term)\end{verbatim}-%+%  may be used in these situations.  For instance, in Fig.~\ref{fig:commit:cheq}, an auctioneer receives a sealed bid in its first event.\footnote{See the file   \texttt{commitment.scm} in the manual examples directory.}-%+%  \begin{figure}\small-%+  %  \begin{verbatim}  (defgenrule cheq-auctioneer-4     (forall ((z strd) (quote text) (n data) (b a name) (sealed mesg))       (implies@@ -945,12 +950,12 @@           (p "auctioneer" "a" z a) (p "auctioneer" "sealed" z sealed))         (= sealed (hash a b n quote))))) \end{verbatim}-%+  %    \caption[Generated rule, \texttt{cheq}]{Generated rule for the     auctioneer's \texttt{cheq}}   \label{fig:commit:cheq:rule} \end{figure}-%+%  If, after returning a receipt for the bid, the auctioneer subsequently---presumably, when the auction has closed---receives a nonce and a quote, and checks that the sealed bid is a hash reflecting@@ -965,6 +970,8 @@ annotation does not count as an event.  The relevant role parameters are the ones named \verb|"sealed"|, \verb|"a"|, \verb|"b"|, \verb|"n"|, and \verb|"quote"|.+}+\fi   \paragraph{Expressing rely and guarantee statements.}  In work on trust management, and on compiling cryptographic
doc/src/cpsaintroslides.tex view
@@ -119,12 +119,12 @@ \begin{zitemize} \item Programs \begin{zitemize}-\item \texttt{cpsa}: main analysis tool-\item \texttt{cpsashapes}: extracts shapes from \texttt{cpsa} output-\item \texttt{cpsagraph}: visualize output using XHTML and SVG-\item \texttt{cpsadiff}: compare two \texttt{cpsa} output files-\item \texttt{cpsasas}: produce shape analysis sentences-\item \texttt{cpsapp}: pretty print input and output+\item \texttt{cpsa4}: main analysis tool+\item \texttt{cpsa4shapes}: extracts shapes from \texttt{cpsa} output+\item \texttt{cpsa4graph}: visualize output using XHTML and SVG+\item \texttt{cpsa4diff}: compare two \texttt{cpsa} output files+\item \texttt{cpsa4sas}: produce shape analysis sentences+\item \texttt{cpsa4pp}: pretty print input and output \item Build tools: GNU makefile template and a Haskell script \end{zitemize} \item Documentation@@ -148,8 +148,8 @@ \item protocol as a set of roles \item problem point-of-view\\ (what is assumed to have happened) \end{zitemize}-\item User runs the tool (\texttt{\$ echo build | ghci Make.hs} \\-  or on Windows, click on \texttt{Make.hs} and type \texttt{build})+\item User runs the tool (\texttt{\$ echo build | ghci Make4.hs} \\+  or on Windows, click on \texttt{Make4.hs} and type \texttt{build}) \item In a web browser, user views the output that shows \begin{zitemize} \item what else CPSA inferred must have happened, or
doc/src/macros.tex view
@@ -1,5 +1,5 @@ \newcommand{\cpsa}{\textsc{cpsa}}-\newcommand{\version}{4.4.2}+\newcommand{\version}{4.4.3} \newcommand{\cpsacopying}{\begingroup   \renewcommand{\thefootnote}{}\footnotetext{{\copyright} 2010 The     MITRE Corporation.  Permission to copy without fee all or part of
src/CPSA/Algebra.hs view
@@ -16,81 +16,47 @@  -------------------------------------------------------------------- --- The module implements a many-sorted algebra, but is used as an--- order-sorted algebra.  It exports a name, and the origin used to--- generate variables.+-- The module implements many-sorted algebras, but is used as+-- order-sorted algebras.  It exports a name, and the origin used to+-- generate variables.  An algebra is defined by its signature and the+-- set of generators (variables) used to create terms.  An algebra's+-- signature defines its sorts and operations.  In this implementation+-- of algebras, the signature is not fixed.  There is a default+-- signature, and the lang field in a protocol allows variations from+-- the default. --- The Diffie-Hellman Order-Sorted Signature is+-- All signatures have a message top sort called mesg.  All other+-- sorts are a subsort of mesg.  A signature may have a collection of+-- data sorts, and akey sorts.  The default algebra has data sorts+-- named text, data, name, and skey.  A term k of an akey sort obeys+-- the equation (invk (invk k)) == t.  All signatures include a+-- infinite set of quoted constants, sometimes called tags. --- Sorts: mesg, text, data, name, skey, akey, tag,---        string, base, expt, and rndx------ Subsorts: text, data, name, skey, akey,---           base, expt < mesg and rndx < expt------ Operations:---   cat : mesg X mesg -> mesg               Pairing---   enc : mesg X mesg -> mesg               Encryption---   hash : mesg -> mesg                     Hashing---   string : mesg                           Tag constants---   ltk : name X name -> skey               Long term shared key---   bltk : name X name -> skey              Bidirectional long-term key---   pubk : name -> akey                     Public key of principal---   pubk : string X name -> akey            Tagged public key of principal---   invk : akey -> akey                     Inverse of asymmetric key---   gen : base                              DH generator---   exp : base X expt -> base               Exponentiation---   mul : expt X expt -> expt               Group operation---   rec : expt -> expt                      Group inverse---   one : expt                              Group identity------ Atoms: messages of sort text, data, name, skey, akey, and rndx, and---        messages of the form (exp (gen) x) where x is of sort rndx.+-- For Diffie-Hellman, there is a base sort, and two exponent sorts,+-- expt and rndx, and expt is a supersort of rndx.  There is an base+-- constant (gen), the Diffie-Hellman generator, and operations on+-- exponents.  Constant (one) is the group identity, (mul x y) is the+-- group operation, and (rec x) is the group inverse. (exp x y)+-- exponentiates base x with expt y. --- A free Abelian group has a set of basis elements, and the sort rndx--- is the sort for basis elements.  Limiting the atoms associated with--- an exponent to basis elements is the basis elements as atoms--- principle.  This principle enables CPSA to correctly handle--- origination assumptions.+-- The user defined operations for a sigature include tupling,+-- hashing, encryption and signing. --- The implementation exploits the isomorphism between order-sorted--- algebras and many-sorted algebras by adding inclusion operations to--- produce an equivalent Diffie-Hellman Many-Sorted Signature.  There--- is an inclusion operation for each subsort of mesg.  Diffie-Hellman--- exponents are handled specially using a canonical representation as--- monomials.+-- All signatures have a name sort.  Asymmetric keys can be named+-- using (pubk x) where x is of sort name.  Symmetric keys can named+-- using (ltk x y) where x and y are of sort name. --- Sorts: mesg, text, data, name, skey, akey,---        string, base, expt, and rndx------ Operations:---   cat : mesg X mesg -> mesg               Pairing---   enc : mesg X mesg -> mesg               Encryption---   hash : mesg -> mesg                     Hashing---   string : mesg                           Tag constants---   ltk : name X name -> skey               Long term shared key---   bltk : name X name -> skey              Bidirectional long-term key---   pubk : name -> akey                     Public key of principal---   pubk : string X name -> akey            Tagged public key of principal---   invk : akey -> akey                     Inverse of asymmetric key---   text : text -> mesg                     Sort text inclusion---   data : data -> mesg                     Sort date inclusion---   name : name -> mesg                     Sort name inclusion---   skey : skey -> mesg                     Sort skey inclusion---   akey : akey -> mesg                     Sort akey inclusion---   base : base -> mesg                     Sort base inclusion------  A message of sort expt, a monomial, is represented by a map from---  identifiers to descriptions.  A description is a pair consisting---  of a flag saying if the variable is of sort rndx or expt, and a---  non-zero integer.  For t of sort expt, the monomial associated---  with t is+-- A message of sort expt, a monomial, is represented by a map from+-- identifiers to descriptions.  A description is a pair consisting+-- of a flag saying if the variable is of sort rndx or expt, and a+-- non-zero integer.  For t of sort expt, the monomial associated+-- with t is -- --      x1 ^ c1 * x2 ^ c2 * ... * xn ^ cn -- -- for all xi in the domain of t and t(xi) = (_, ci). --- In both algebras, invk(invk(t)) = t for all t of sort akey,+-- In all algebras, invk(invk(t)) = t for all t of sort akey, -- (exp h (one)) = h, (exp (exp h x) y) = (exp h (mul x y)), and -- the Abelian group axioms hold. @@ -105,6 +71,7 @@     gmerge,     clone,     loadVars,+    loadVarPair,     basePrecursor,     baseRndx,     newVar,@@ -128,6 +95,7 @@     foldCarriedTerms,     carriedBy,     constituent,+    sortedVarsIn,     decryptionKey,     invertKey,     decompose,@@ -165,7 +133,7 @@     unify,     compose,     absentSubst,-    substDomainWithin, +    substDomainWithin,      Env,     emptyEnv,@@ -174,13 +142,16 @@     match,     unmatchedVarsWithin,     envsAgreeOutside,+    envOfParamVarPairs,     substitution,     strandBoundEnv,+    renamerAndNewVars,     reify,     substUpdate,     strdMatch,     strdLookup,     strdUpdate,+    indxMatch,     indxLookup,     indxUpdate, @@ -535,12 +506,6 @@     compare = compareTerm #endif --- Basic terms are introduced by defining a function used to decide if--- a term is well-formed.  The context of an occurrence of an identifier--- determines its sort.  A term that contains just an identifier and its--- sort information is called a variable.  The sort of a variable is--- one of mesg, text, data, name, skey, and akey.- -- Terms that represent algebra variables. isVar :: Term -> Bool isVar (I _) = True           -- Sort: mesg@@ -713,7 +678,7 @@ isAtom (F Base _) = False isAtom (F s _) = varSym s isAtom (G x) = isBasisVar x     -- NOT:  isGroupVar x.  Used for nons-                                -- and uniqs +                                -- and uniqs isAtom _ = False  -- Is the term numeric?@@ -822,6 +787,17 @@ constituent t _ =   error $ "Algebra.constituent: Bad atom " ++ show t +-- A sorted variable is of one of the forms:+--+-- I (Id _,_)+-- F symb [t]   where symb is a varSym+-- D (Id _,_)+-- X (Id _,_)+-- G x          where x isGroupVar+--+sortedVarsIn :: Term -> [Term]+sortedVarsIn = L.nub . (foldVars (flip (:)) [])+ -- The key used to decrypt an encrypted term, otherwise Nothing. decryptionKey :: Term -> Maybe Term decryptionKey (F (Enc _) [_, t]) = Just (inv t)@@ -1239,9 +1215,8 @@ idMapped subst (X x) = M.member x subst idMapped _ (Y _) = True - -- Set (specifically, list) of variables that occur in a term, but--- their identifier is *not* a key in the map.  +-- their identifier is *not* a key in the map. idUnmapped :: IdMap -> Term -> [Term] idUnmapped map (I x)            | M.member x map = []@@ -1256,7 +1231,7 @@ idUnmapped _ (C _) = [] idUnmapped _ (Z _) = [] idUnmapped _ (Y _) = []- + idUnmapped map (G t) =     L.map G          $ filter (\g -> not $ M.member (getGroupVar g) map)@@ -1277,15 +1252,15 @@ -- the domain of the mapping.  idMapDomain :: IdMap -> [Id]-idMapDomain map = +idMapDomain map =     M.foldrWithKey (\k _ ks -> k:ks) [] map  {--  -- We're not using these two functions currently, but let's not wipe--- them out.  +-- them out. --- Is map1 a subfunction of map2?  +-- Is map1 a subfunction of map2?  idMapExtendsTo :: IdMap -> IdMap -> Bool idMapExtendsTo map1 map2 =@@ -1298,7 +1273,7 @@ -- Yield the set of Ids that are in the domain of map1 but not map2  idMapDomainMinus :: IdMap -> IdMap -> [Id]-idMapDomainMinus map1 map2 = +idMapDomainMinus map1 map2 =     M.foldrWithKey f [] map1     where       f key _ soFar =@@ -1308,7 +1283,7 @@  --} --- Is map1 a subfunction of map2, ignoring arguments in ids?  +-- Is map1 a subfunction of map2, ignoring arguments in ids?  idMapExtendsOutside :: IdMap -> IdMap -> [Id] -> Bool idMapExtendsOutside map1 map2 ids =@@ -1319,7 +1294,6 @@           (key `elem` ids) ||             ((M.member key map2) &&              (val == (map2 M.! key)))-      -- Do maps 1 and 2 differ at most for arguments in ids? idMapsAgreeOutside :: IdMap -> IdMap -> [Id] -> Bool@@ -1327,8 +1301,6 @@     idMapExtendsOutside map1 map2 ids &&     idMapExtendsOutside map2 map1 ids -    - -- Unification and substitution  expSubst :: IdMap -> Term -> Group -> Term@@ -1406,7 +1378,7 @@  -- Domain of a substitution substDomain :: Subst -> [Id]-substDomain (Subst s) = idMapDomain s +substDomain (Subst s) = idMapDomain s  -- Determine whether every Id in the domain of a subst is the varId of -- one of the given terms.  Assume that each given term is a variable!@@ -1416,7 +1388,6 @@     subset dom (map varId vars)     where       dom = substDomain subst-                       -- Composition of substitutions @@ -1722,26 +1693,34 @@ -- -- Maybe we should check by isVar. -unmatchedVarsWithin :: Env -> Term -> [Term] -> Bool +unmatchedVarsWithin :: Env -> Term -> [Term] -> Bool unmatchedVarsWithin (Env (_, r)) t vars =-    all (flip elem vars) unmatchedIds +    all (flip elem vars) unmatchedIds     where-      -- problems = filter (not . (flip elem vars)) unmatchedIds +      -- problems = filter (not . (flip elem vars)) unmatchedIds       unmatchedIds = idUnmapped r t  envsAgreeOutside :: Env -> Env -> [Term] -> Bool-envsAgreeOutside (Env (_, r1)) (Env (_, r2)) vars =  +envsAgreeOutside (Env (_, r1)) (Env (_, r2)) vars =     idMapsAgreeOutside r1 r2 ids     where       ids = map varId vars +envOfParamVarPairs :: [(Term,Term)] -> Env+envOfParamVarPairs [] = emptyEnv+envOfParamVarPairs ((p,v) : rest) =+    let Env (l, r) = envOfParamVarPairs rest in+    if idMapped r p then Env(l, r)+    else+        Env (l, M.insert (varId p) v r)+ -- Apply a substitution to the range of an environment substUpdate :: Env -> Subst -> Env substUpdate (Env (x, r)) s =   Env (x, M.map (substitute s) r)  -- envDomain :: Env -> [Id]--- envDomain (Env (_, r)) = idMapDomain r +-- envDomain (Env (_, r)) = idMapDomain r  -- The matcher has the property that when pattern P and term T match -- then instantiate (match P T emptyEnv) P = T.@@ -1758,35 +1737,67 @@  type GenEnv = (Gen, Env) +-- Ensure Gen is larger that what is in an environment.+-- Used for detecting illformed genenvs.+checkGenEnv :: GenEnv -> Bool+checkGenEnv ((Gen g), Env (v, r)) =+    all checkId (S.toList v) &&+        all checkId (map fst mapAsList) &&+            all (checkGenTerm g) (map snd mapAsList)+    where+      checkId (Id (i, _)) = g > i+      mapAsList = M.toList r++checkGenTerm :: Integer -> Term -> Bool+checkGenTerm g (I (Id (i, _))) = g > i+checkGenTerm _ (C _) = True+checkGenTerm g (F _ xs) = all (checkGenTerm g) xs+checkGenTerm g (G t) =+    M.foldlWithKey f True t+    where+      f acc (Id (i, _)) (_, _) = acc && g > i+checkGenTerm _ _ = True++validateGenEnv :: GenEnv -> GenEnv+validateGenEnv ge | checkGenEnv ge = ge+                  | otherwise = error ("Bad genenv " ++ show ge)++useCheckGenEnv :: Bool+useCheckGenEnv = False -- True+ match ::  Term -> Term -> GenEnv -> [GenEnv]-match (I x) t (g, Env (v, r)) =+match t t' ge | useCheckGenEnv = map validateGenEnv (xmatch t t' ge)+match t t' ge | otherwise = xmatch t t' ge++xmatch ::  Term -> Term -> GenEnv -> [GenEnv]+xmatch (I x) t (g, Env (v, r)) =   case M.lookup x r of     Nothing -> [(g, Env (v, M.insert x t r))]     Just t' -> if t == t' then [(g, Env (v, r))] else []-match (C c) (C c') ge = if c == c' then [ge] else []-match (F Base [t0]) (F Base [t1]) ge =+xmatch (C c) (C c') ge = if c == c' then [ge] else []+xmatch (F Base [t0]) (F Base [t1]) ge =   matchBase t0 t1 ge-match (F Bltk u) (F Bltk u') ge =+xmatch (F Bltk u) (F Bltk u') ge =   L.nub $ matchLists u u' ge ++ matchLists u (reverse u') ge-match (F s u) (F s' u') ge+xmatch (F s u) (F s' u') ge   | s == s' = matchLists u u' ge-match (F (Invk op) [t]) t' ge =-  match t (F (Invk op) [t']) ge-match (G t) (G t') (g, Env (v, r)) =+xmatch (F (Invk op) [t]) t' ge =+  xmatch t (F (Invk op) [t']) ge+xmatch (G t) (G t') (g, Env (v, r)) =   do     (v', g', r') <- matchGroup t t' v g r     return (g', Env(v', r'))-match (D x) t (g, Env (v, r)) =+xmatch (D x) t (g, Env (v, r)) =   case M.lookup x r of     Nothing -> [(g, Env (v, M.insert x t r))]     Just t' -> if t == t' then [(g, Env (v, r))] else []-match (Z p) (Z p') r = if p == p' then [r] else []-match (X x) t (g, Env (v, r)) =+xmatch (Z p) (Z p') r = if p == p' then [r] else []+xmatch (X x) t (g, Env (v, r)) =   case M.lookup x r of     Nothing -> [(g, Env (v, M.insert x t r))]     Just t' -> if t == t' then [(g, Env (v, r))] else []-match (Y p) (Y p') r = if p == p' then [r] else []-match _ _ _ = []+xmatch (Y p) (Y p') r = if p == p' then [r] else []+xmatch _ _ _ = []  -- On input t, outputs (b, e) such that if t is of sort base then -- t = b^e and b is a variable or (gen).@@ -1825,13 +1836,13 @@ matchBase (I x) (F Exp [t0', G t1']) ge   = matchExp (I x) (M.empty) t0' t1' ge matchBase (I x) (I y) ge-  = match (I x) (I y) ge+  = xmatch (I x) (I y) ge     -- matchExp (I x) (M.empty) (I y) (M.empty) ge  matchBase (I x) (F Genr []) ge   = matchExp (I x) (M.empty) (F Genr []) (M.empty) ge matchBase t0 t1 ge-  = match t0 t1 ge+  = xmatch t0 t1 ge  {-   case M.lookup x r of@@ -1875,7 +1886,7 @@       -- if x is already mapped, it needs to be mapped to a power of the base of t0'       Just t  -- t is destination/flex material           | fst (calcBase t0') == fst (calcBase t) ->-            match (G t1) (G (mul t1' (mul (snd $ calcBase t0') (invert (snd $ calcBase t))))) ge+              xmatch (G t1) (G (mul t1' (mul (snd $ calcBase t0') (invert (snd $ calcBase t))))) ge           | otherwise -> []       _ -> matchLists [I x, G t1] [F Exp [t0', G w], G (mul t1' (invert w))]            (g', Env (S.insert wid v, r))@@ -1891,7 +1902,7 @@ matchLists [] [] ge = [ge] matchLists (t : u) (t' : u') ge =   do-    ge' <- match t t' ge+    ge' <- xmatch t t' ge     matchLists u u' ge' matchLists _ _ _ = [] @@ -2223,6 +2234,33 @@        f bnd (Z i) = max bnd (i+1)        f bnd _ = bnd +-- Suppose that vs is a list of sorted variables with no repetitions.+-- renamerAndNewVars will clone vs to create a sequence of new+-- variables vs' with the same sorting info.  It also creates an Env+-- that will instantiate each old var v in vs by its clone v' in vs'.+-- It returns the new generator, the environment, and the list of new+-- variables vs'++-- This code based on Strand.grow.++renamerAndNewVars :: [Term] -> Gen -> (Gen, Env, [Term])+renamerAndNewVars vs g =+    iter vs g emptyEnv []+    where+      iter [] g e vs' = (g, e, vs')+      iter (v : rest) g e vs' =+          case match v v (g, e) of+            [] -> error ("Algebra.renamerAndNewVars:  "+                         ++ "argument must be variable list without repetitions.  Found "+                         ++ (show vs))+            _ ->+                let (g', v') = clone g v in+                case match v v' (g', e) of+                  (g'', e') : _ -> iter rest g'' e' (v' : vs')+                  [] -> error ("Algebra.renamerAndNewVars:  "+                               ++ "cloned variable failed to match.  "+                               ++ (show v) ++ " -> " ++ (show v') ++ " under " ++ (show e))+ -- Add type information to an environment, and return it as a list of -- associations. @@ -2272,12 +2310,9 @@     h (Z z) = Z $ f z     h t = t ---   indxMatch ::  Term -> Int -> (Gen, Env) -> [(Gen, Env)]---   indxMatch t t' (g, e) =---          maybe [] (\e -> [(g, e)]) $ indxMatchI t t' e------   indxMatchI ::  Term -> Int -> Env -> Maybe Env---   indxMatchI t p env = matchI t (Y p) env+indxMatch ::  Term -> Int -> (Gen, Env) -> [(Gen, Env)]+indxMatch t p (g, e) =+    match t (Y p) (g, e)  indxLookup :: Env -> Term -> Maybe Int indxLookup env t =
src/CPSA/Cohort.hs view
@@ -23,7 +23,7 @@ z :: Show a => a -> b -> b z x y = unsafePerformIO (print x >> return y) -  zShow :: Show a => a -> a+zShow :: Show a => a -> a zShow x = z (show x) x  zz :: Show a => a -> a@@ -80,6 +80,10 @@ omitGeneralization :: Bool omitGeneralization = False -- True +-- This check is just a sanity check and is normally left off.+usePovCheck :: Bool+usePovCheck = False -- True+ -- Minimum priority to solve minPriority :: Int minPriority = 1@@ -221,10 +225,19 @@       f (CM _) ts = ts       f (TM t) ts = S.insert t ts +-- A sanity check for cohort members normally left off.+povCheck :: Preskel -> Bool+povCheck k =+    case pov k of+      Nothing -> True+      Just k0 -> not (null (homomorphism k0 k (prob k)))+ maybeSolved :: CMT -> Place -> [Term] -> Set CMT ->                Preskel -> Node -> Subst -> [(Term, Term)] -> Bool maybeSolved ct pos eks escape k n subst absent =-    not useSolvedFilter || solved ct pos eks escape k n subst absent+    not useSolvedFilter+            || solved ct pos eks escape k n subst absent+               && (not usePovCheck || povCheck k)  data Mode = Mode     { noGeneralization :: Bool,
src/CPSA/Coq/Main.hs view
@@ -109,16 +109,8 @@   hPutStrLn h ("   Send " ++ ref chan ++ " " ++ ref msg ++ ";") emitStmt h _ (Same _ x y) =   hPutStrLn h ("   Same " ++ ref x ++ " " ++ ref y ++ ";")-emitStmt h _ (Ltkp _ x y z) =-  hPutStrLn h ("   Ltkp " ++ ref x ++ " " ++ ref y ++-               " " ++ ref z ++ ";") emitStmt h _ (Invp _ x y) =   hPutStrLn h ("   Invp " ++ ref x ++ " " ++ ref y ++ ";")-emitStmt h _ (Namp _ x y) =-  hPutStrLn h ("   Namp " ++ ref x ++ " " ++ ref y ++ ";")-emitStmt h _ (Nm2p _ x y z) =-  hPutStrLn h ("   Nm2p " ++ ref x ++ " " ++-                          ref y ++ " " ++ ref z ++ ";") emitStmt h margin (Return returns) =   do     hPutStr h "   Return "
+ src/CPSA/Debranch/Main.hs view
@@ -0,0 +1,100 @@+-- Expand Zappa branching++-- Copyright (c) 2009 The MITRE Corporation+--+-- This program is free software: you can redistribute it and/or+-- modify it under the terms of the BSD License as published by the+-- University of California.++module Main (main) where++import System.IO+import CPSA.Lib.SExpr+import CPSA.Lib.Printer (pp)+import CPSA.Lib.Entry+import CPSA.Lib.Expand (readSExprs)++main :: IO ()+main =+    do+      (p, (output, margin)) <- start filterOptions filterInterp+      sexprs <- readSExprs p+      h <- outputHandle output+      _ <- mapM (writeCpsaLn (pp margin defaultIndent) h) (map debranch sexprs)+      hClose h++writeCpsaLn :: (SExpr a -> String) -> Handle -> SExpr a -> IO ()+writeCpsaLn printer h sexpr =+    do+      hPutStrLn h $ printer sexpr+      hPutStrLn h ""++-- Type of an environment used for substitutions+type Env = [(String, SExpr Pos)]++-- Debranch a protocol and leave everything else alone.+debranch :: SExpr Pos -> SExpr Pos+debranch (L pos (S _ "defprotocol" : S _ name : S _ alg : xs)) =+    L pos (S pos "defprotocol" : S pos name : S pos alg :+             concatMap protBody xs)+debranch (L pos (S _ "defprotocol" : _)) =+    error (shows pos "Bad protocol")+debranch x = x++-- Debranch the body of a protocol focusing in on roles.+protBody :: SExpr Pos -> [SExpr Pos]+protBody (L pos (S _ "defrole" : S _ name : vars :+                   L _ (S _ "trace" : events) : alist)) =+    let traceEnvs = branchSplits events in+    if length traceEnvs == 1 then -- No branching in this role+        [defrole pos name vars (fst (head traceEnvs)) alist]+    else+        map f (zip [0..] traceEnvs)+        where+          f :: (Int, ([SExpr Pos], Env)) -> SExpr Pos+          f (i, (trace, env)) =+              defrole pos (name ++ show i) vars+                          (map (subst env) trace)+                          (map (g env) alist)+          g :: Env -> SExpr Pos -> SExpr Pos+          g env (L pos (s@(S _ _) : args)) =+              L pos (s : map (subst env) args)+          g _ x = x+protBody (L pos (S _ "defrole" : _)) =+    error (shows pos "Bad role")+protBody x = [x]++-- Find splits in a trace and return environments made from cheq's.+branchSplits :: [SExpr Pos] -> [([SExpr Pos], Env)]+branchSplits [] = [([], [])]+branchSplits [L _ (S _ "branch" : branches)] =+    ([], []) : concatMap f branches+    where+      f (L _ branch) = branchSplits branch+      f _ = [([], [])]+branchSplits (L _ [S _ "cheq", S _ var, term] : events) =+    map f (branchSplits events)+    where+      f (trace, env) = (trace, g ((var, term) : env))+      substEnv env (v, t) = (v, subst env t)+      g env = map (substEnv env) env+branchSplits (event : events) =+    map f (branchSplits events)+    where+      f (trace, env) = (event : trace, env)++-- Construct a role from its parts.+defrole :: Pos -> String -> SExpr Pos -> [SExpr Pos] -> [SExpr Pos] -> SExpr Pos+defrole pos name vars trace alist =+    L pos (S pos "defrole" : S pos name : vars+                 : L pos (S pos "trace" : trace) : alist)++-- Substitute variables in a term when they are in an environment.+subst :: Env -> SExpr Pos -> SExpr Pos+subst env s@(S _ sym) =+    case lookup sym env of+      Just term -> term+      Nothing -> s+subst env (L pos (S _ fun : terms)) =+    L pos (S pos fun : map (subst env) terms)+subst _ x = x
src/CPSA/GenRules.hs view
@@ -54,10 +54,28 @@ conjunctionOfConj :: Conj -> Conjunction conjunctionOfConj = map snd -type Conjunctor = [Term] -> Conjunction -- Function which, given new-                                        -- free variables, plugs them-                                        -- in to yield a conjunction--- [Term] ->+-- a Renamer is a function that will replace variables within the+-- AForm that should be regarded as universally bound with the+-- variable that will be chosen for the universal quantifier.++-- The loader will in fact read these variables as occurrences of the+-- role parameters+type Renamer = AForm -> AForm++type Conjunctor = Conjunction -> Renamer -> Conjunction+-- Function which, given Conjunction and a fn to plug in new+-- variables, plugs them in to yield a conjunction++-- The loader ensures that when an existential formula's body is+-- loaded, anything that can be read as a local, existentially bound+-- variable will be.  Since these are generated immediately before the+-- body is read, there can be no occurrences of the role parameters+-- present in the body.  Likewise, there can be no occurrences of the+-- local, existentially bound variables outside this body.++-- Hence a renamer for the antecedent may be safely applied here,+-- without capturing variables that should be locally bound.+ type Existor = Conjunctor  -- Used to say:   -- Function which, given new@@ -66,41 +84,26 @@                                         -- in to yield a conjunctor  ruleOfClauses :: Sig -> Gen -> String ->-                 VarListSpec -> Conjunctor ->-                 [([Term],Existor)] -> (Gen,Rule)-ruleOfClauses sig g rn sortedVarLists antecedent evarDisjuncts =-    let (g',uvars) = sortedVarsOfStrings sig g sortedVarLists in+                 [Term] ->  -- VarListSpec ->+                 Conjunction ->+                 [([Term],Conjunction)] -> (Gen,Rule)+ruleOfClauses _ g rn fvs antecedent evarDisjuncts = -- sig is vacuous+    let (g', env, uvars) = renamerAndNewVars fvs g in     let disjuncts =             map-            (\(evars,existor) ->-                 (evars,(existor -- evars-                          -- use only the members-                          -- of uvars that avoid names in evars-                         (avoidByName evars uvars))))+            (\(evars,c) -> (evars,+                            (map (instantiateAForm env) c)))             evarDisjuncts in     (g',       (Rule { rlname = rn,               rlgoal =                   (Goal                    { uvars = uvars,-                     antec = antecedent uvars,+                     antec = map (instantiateAForm env) antecedent,                      consq = disjuncts,                      concl = map snd disjuncts}),               rlcomment = [] }))-    where-      varOfName _ [] = Nothing-      varOfName name (v : rest) =-          if (name == varName v)-          then Just v-          else varOfName name rest -      avoidByName evars uvars =-          map (\uv ->-                   case varOfName (varName uv) evars of-                     Nothing -> uv-                     Just ev -> ev)-          uvars- applyToSoleEntry :: (a -> b) ->  String -> [a] -> b applyToSoleEntry f _ [a] = f a applyToSoleEntry _ s _ = error s@@ -119,15 +122,14 @@ neqRules sig g =     foldr      (\sortName (g,rs) ->-          let (g', r) =-                  (ruleOfClauses sig g ("neqRl_" ++ sortName)-                   [(sortName,["x"])]-                   (applyToSoleEntry-                    (\x -> [(AFact "neq" [x,x])])-                    "neqrules:  Impossible var list.")+          let (g', v) = newVar sig g "x" sortName in+          let (g'', r) =+                  (ruleOfClauses sig g' ("neqRl_" ++ sortName)+                   [v]+                   [(AFact "neq" [v,v])]                    [])       -- false conclusion           in-          (g', r : rs))+            (g'', r : rs))      (g,[])      ["indx", "strd", "mesg"] @@ -140,15 +142,14 @@      (g, [])      where        f g (i,j) =-           ruleOfClauses sig g ("trRl_" ++ (rname rl) ++ "-at-" ++ (show i))-             [("strd",["z"])]-             (applyToSoleEntry-              (\z -> [(Length rl z (indxOfInt (j+1)))])-              "transRules:  Impossible var list.")-             [([],                   -- no existentially bound vars-               (applyToSoleEntry-                        (\z -> [(Trans (z, (indxOfInt i)))])-                        "transRules:  Impossible var list."))]+           let (g', z) = newVar sig g "z" "strd" in+           ruleOfClauses sig g' ("trRl_" ++ (rname rl) ++ "-at-" ++ (show i))+             [z]+             [(Length rl z (indxOfInt (j+1)))]+             [                  --one disjunct+              ([],              -- no existentially bound vars+               [(Trans (z, (indxOfInt i)))] -- one conjunct+               )]  lastRecvInCS :: Role -> Int -> Int -> Int lastRecvInCS rl start end =@@ -183,41 +184,38 @@              [lastRecv+1..end-1]         causeRule g rl start ind =-           ruleOfClauses sig g+           let (g',z) = newVar sig g "z" "strd" in+           let (g'', z1) = newVar sig g' "z1" "strd" in+           let (g''', i) = newVar sig g'' "i" "indx" in++           ruleOfClauses sig g'''              ("cau-" ++ (rname rl) ++ "-" ++ (show ind))-             [("strd",["z", "z1"]), ("indx", ["i"])]-             (applyToThreeEntries-              (\z z1 i -> [(Length rl z (indxOfInt (ind+1))),-                           (Prec -- LeadsTo-                            (z1,i) (z,(indxOfInt ind)))])-                      "csRules:  Impossible var list.")-             [([],-               (applyToThreeEntries-                (\z z1 _ -> [Equals z z1])-                "csRules:  Impossible var list.")),-              ([],-               (applyToThreeEntries-                (\z z1 i -> [(Prec (z1,i) (z,(indxOfInt start)))])-                "csRules:  Impossible var list."))]+             [z, z1, i]+             [(Length rl z (indxOfInt (ind+1))),+              (Prec (z1,i) (z, (indxOfInt ind)))] +             [([],              -- either z = z1+               [Equals z z1]),+              ([],              -- or z1's i node comes before start+                                -- of critical section+               [(Prec (z1,i) (z,(indxOfInt start)))])]+        effectRule g rl end ind =-           ruleOfClauses sig g+           let (g',z) = newVar sig g "z" "strd" in+           let (g'', z1) = newVar sig g' "z1" "strd" in+           let (g''', i) = newVar sig g'' "i" "indx" in++           ruleOfClauses sig g'''              ("eff-" ++ (rname rl) ++ "-" ++ (show ind))-             [("strd",["z", "z1"]), ("indx", ["i"])]-             (applyToThreeEntries-              (\z z1 i -> [(Length rl z (indxOfInt (ind+1))),-                           (Prec --LeadsTo-                            (z, (indxOfInt ind)) (z1,i))])-              "csRules:  Impossible var list.")-             [([],-               (applyToThreeEntries-                (\z z1 _ -> [Equals z z1])-                "csRules:  Impossible var list.")),-              ([],-               (applyToThreeEntries-                (\z z1 i -> [(Length rl z (indxOfInt (end+1))),-                             (Prec (z, (indxOfInt end)) (z1,i))])-                "csRules:  Impossible var list."))]+             [z, z1, i]+             [(Length rl z (indxOfInt (ind+1))),+              (Prec (z, (indxOfInt ind)) (z1,i))]+             [([],              -- either z = z1+               [Equals z z1]),+              ([],              -- or z is long and z1's i node comes+                                -- after end of critical section+               [(Length rl z (indxOfInt (end+1))),+                (Prec (z, (indxOfInt end)) (z1,i))])]  data FoundAt = FoundAt Int              | Missing Term@@ -241,6 +239,7 @@ boundVarNamesOfVarListSpec ((_,names) : rest) =     L.nub $ names ++ boundVarNamesOfVarListSpec rest +{-- freeVarsInExistential :: ([Term],Existor) -> [Term] freeVarsInExistential (vars,c) =     let bvns = map varName vars in@@ -255,6 +254,7 @@      (foldr (\vc acc -> (freeVarsInExistential vc) ++ acc)       []       vcs)+--}  freeVarsInConjLists :: [([Term], Conj)] -> [Term] freeVarsInConjLists [] = []@@ -309,67 +309,54 @@           else               loop (i+1) -ruleOfDisjAtHeight :: Sig -> Gen -> Role -> String -> [([Term],Existor)] -> Int -> (Gen, Rule)-ruleOfDisjAtHeight sig g rl rulename disj ht =-    let fvs = freeVarsInDisjunction disj in-    ruleOfClauses-    sig g rulename-            (("strd", [renameApart "z" (concatMap fst disj)])-             : varListSpecOfVars (freeVarsSubsetByName fvs (rvars rl)))-            (\vars ->-                 applyToStrandVarAndParams-                 (\z pvars ->-                      (Length rl z (indxOfInt ht))-                      : (map-                         (\v ->-                              case paramOfName (varName v) rl of-                                Nothing -> errorWithMsg v " not found."-                                Just p ->-                                    case firstOccurs p rl of-                                      Nothing -> errorWithMsg v " not found."-                                      Just i ->-                                          if i < ht then (Param rl p (i+1) z v)-                                          else errorWithMsg v-                                                   (" introduced for " ++ (varName p) ++ " too high in role " ++ (rname rl) ++": " ++ (show i) ++-                                                    " not below " ++ (show ht) ++ "in " ++ rulename ++ "."))-                         pvars))-                 vars-                 "ruleOfDisjAtHeight:  vars not strand+prams?")-            disj+{- +Sig -> Gen -> String -> [Term] ->+Conjunction -> [([Term],Conjunction)] -> (Gen,Rule)++--}++ruleOfDisjAtHeight :: Sig -> Gen -> Role -> String -> [([Term],[AForm])] -> Int -> (Gen, Rule)+ruleOfDisjAtHeight sig g rl rulename disj ht =+    let fvs = fvsConsq disj in+    let rvs = L.filter (\t -> L.elem t (rvars rl)) fvs in+    let (g',z) = newVar sig g "z" "strd" in+    (ruleOfClauses+     sig g' rulename+     (fvs ++ [z])+     ((Length rl z (indxOfInt ht)) :+      (map+       (\v ->+            case firstOccurs v rl of+              Nothing -> errorWithMsg v " not found."+              Just i ->+                  if i < ht+                  then (Param rl v (i+1) z v)+                  else errorWithMsg v+                           (" introduced for " ++ (varName v) ++ " too high in role " +++                            (rname rl) ++": " ++ (show i) +++                            " not below " ++ (show ht) ++ "in " ++ rulename ++ "."))+       rvs))+     disj)     where       errorWithMsg v tail =           error ("ruleOfDisjAtHeight:  Parameter " ++                  (varName v) ++ tail)  genOneAssumeRl :: Sig -> Gen -> Role -> Int -> [([Term], Conj)] -> (Gen, Rule)-genOneAssumeRl sig g rl n disjuncts =-    case conclHeight rl disjuncts of+genOneAssumeRl sig g rl n disjs =+    case conclHeight rl disjs of       Missing v -> error ("genOneAssumeRl:  Variable not in role " ++ (rname rl)-                         ++ ": " ++ (show (varName v)))+                         ++ ": " ++ (show v))       FoundAt ht ->+          let disjuncts = map (\(vs,cs) -> (vs, map snd cs)) disjs in           ruleOfDisjAtHeight           sig g rl ("assume-" ++ (rname rl) ++ "-" ++ (show n))-                  (map (\(evars,conj) ->-                            (evars,-                             (\pvars ->-                              case envsRoleParams rl g pvars of-                                (_,e) : _ -> (map snd $ instantiateConj e conj)-                                _ -> error ("genOneAssumeRl:  Parameter matching failed "-                                            ++  (show pvars) ++ (rname rl)))))-                   disjuncts)-                  ht-------       where---         freeVars bndList conjunct = (aFreeVars [] conjunct) L.\\ bndList------         vars = L.nub (concatMap (\(vars,conj) ->---                                      concatMap (freeVars vars) (map snd conj))---                       disjuncts)+              disjuncts+              ht  genAssumeRls :: Sig -> Gen -> Role -> [[([Term], Conj)]] -> (Gen, [Rule])-genAssumeRls sig g rl disjunctLists =+genAssumeRls sig g rl disjs =     (g',rls)     where       (g',rls,_) =@@ -377,25 +364,19 @@                        (let (g', new_rule) = genOneAssumeRl sig g rl n ds in                         (g', new_rule : rs, n+1)))                (g, [], (0 :: Int))-               disjunctLists+               disjs  genOneRelyGuarRl :: Sig -> Gen -> Role -> Int -> String -> [([Term], Conj)] -> (Gen, Rule)-genOneRelyGuarRl sig g rl ht kind disjuncts =-    case conclHeight rl disjuncts of+genOneRelyGuarRl sig g rl ht kind disjs =+    case conclHeight rl disjs of       Missing v -> error ("genOneRelyGuarRl:  Variable not in role " ++ (rname rl)                          ++ ": " ++ (show (varName v)))-      FoundAt fndHt | fndHt <= ht ->-          ruleOfDisjAtHeight-          sig g rl (kind ++ "-" ++ (rname rl) ++ "-" ++ (show ht))-                  (map (\(evars,conj) ->-                            (evars,-                             (\pvars ->-                              case envsRoleParams rl g pvars of-                                (_,e) : _ -> (map snd $ instantiateConj e conj)-                                _ -> error ("genOneAssumeRl:  Parameter matching failed "-                                            ++  (show pvars) ++ (rname rl)))))-                   disjuncts)-                  ht+      FoundAt fndHt+          | fndHt <= ht ->+              let disjuncts = map (\(vs,cs) -> (vs, map snd cs)) disjs in+              (ruleOfDisjAtHeight+               sig g rl (kind ++ "-" ++ (rname rl) ++ "-" ++ (show ht))+               disjuncts ht)         | otherwise -> error ("genOneRelyGuarRl:  Variable found above ht " ++ (show ht) ++                               " in " ++ (rname rl)) @@ -423,12 +404,8 @@                  sig g rl ("gen-st-" ++ (rname rl) ++ "-" ++ (show n))                  [ -- One disjunct, no existentially bound variables                    ([],-                   -- One conjunctor:-                    (\pvars ->-                         case envsRoleParams rl g pvars of-                           (_,e) : _ -> [GenStV (instantiate e t)]-                           [] -> error ("genStateRls:  Parameter matching failed "-                                       ++  (show pvars) ++ (show t))))]+                   -- One conjunct:+                    [GenStV t])]                  ht)  genFactRls :: Sig -> Gen -> Role -> [(String,[Term])] -> (Gen, [Rule])@@ -455,12 +432,8 @@                  sig g rl ("fact-" ++ (rname rl) ++ "-" ++ pred ++ (show n))                  [ -- One disjunct, no existentially bound variables                    ([],-                   -- One conjunctor:-                    (\pvars ->-                         case envsRoleParams rl g pvars of-                           (_,e) : _ ->  [AFact pred (map (instantiate e) args)]-                           _ -> error ("genFactRls:  Parameter matching failed "-                                       ++  (show pvars) ++ (concatMap show args))))]+                   -- One conjunct:+                    [AFact pred args])]                  ht)        {--
src/CPSA/Graph/Loader.hs view
@@ -14,9 +14,9 @@ module CPSA.Graph.Loader (Preskel, Dir (..), Vertex, protocol, role, env,                           inst, part, lastVertex, vertices, Node, vnode,                           strands, label, parent, seen, unrealized, shape,-                          empty, protSrc, preskelSrc, initial, strand, pos,-                          leadstosuccs, prev, next, msg, dir, succs, preds,-                          State, loadFirst, loadNext)+                          empty, realized, protSrc, preskelSrc, initial,+                          strand, pos, leadstosuccs, prev, next, msg,+                          dir, succs, preds, State, loadFirst, loadNext)                           where  import qualified Data.List as L@@ -38,6 +38,7 @@       unrealized :: Maybe [Vertex], -- Nodes not realized if available       shape :: Bool,            -- Is preskel a shape?       empty :: Bool,            -- Does preskel have an empty cohort?+      realized :: Bool,         -- Is preskel realized?       protSrc :: SExpr Pos,     -- Source for the protocol       preskelSrc :: SExpr Pos } -- Source for this preskeleton     deriving Show@@ -261,6 +262,7 @@       unrealized <- loadNodes heights (assoc "unrealized" xs)       let shape = maybe False (const True) (assoc "shape" xs)       let empty = elem "empty cohort" (qassoc "comment" xs)+      let realized = maybe False (const True) (assoc "realized" xs)       let orderings = maybe [] id (assoc "precedes" xs)       let lt = maybe [] id (assoc "leads-to" xs)       pairs <- loadOrderings heights orderings True@@ -283,6 +285,7 @@                              unrealized = unrealized',                              shape = shape,                              empty = empty,+                             realized = realized,                              protSrc = src p,                              preskelSrc = s }             where
src/CPSA/Graph/SVG.hs view
@@ -118,7 +118,7 @@       color AliveDup = "green"       color DeadTree = "red"       color DeadDup = "orange"-      color Realized = "blue"+      color Realized = "grey"       italic AliveTree props = props       italic Shape props = ("font-weight", "bold"):props       italic AliveDup props = ("font-style", "italic"):props
src/CPSA/Graph/Tree.hs view
@@ -212,7 +212,10 @@     where       kind =           case (alive t, dup) of-            (True, False) -> if shape (vertex t) then Shape else AliveTree+            (True, False) ->+                if shape (vertex t) then Shape+                else if realized (vertex t) then Realized+                     else AliveTree             (True, True) -> AliveDup             (False, False) -> DeadTree             (False, True) -> DeadDup
src/CPSA/Lib/Utilities.hs view
@@ -20,7 +20,7 @@  subset :: Eq a => [a] -> [a] -> Bool subset as bs =-    all (flip elem bs) as +    all (flip elem bs) as  -- Delete the nth item in a list deleteNth :: Int -> [a] -> [a]
src/CPSA/Loader.hs view
@@ -73,7 +73,7 @@         do           sig <- loadLang pos sig xs           (gen, rolesAndPreRules, rest) <- loadRoles sig origin (x : xs)-          (gen', r) <- mkListenerRole sig pos gen+          (gen, r) <- mkListenerRole sig pos gen           let rs = map fst rolesAndPreRules            -- let _ = zz (showRoleGenStates rolesAndPreRules)@@ -87,7 +87,7 @@                          []   -- loader-generated rules was rls                          [] -          (gen, forgettableRls, memorableRls) <- initRules sig gen' fakeProt rolesAndPreRules+          (gen, forgettableRls, memorableRls) <- initRules sig gen fakeProt rolesAndPreRules            (gen, newRls, comment) <- loadRules sig fakeProt gen rest           -- Check for duplicate role names@@ -553,7 +553,7 @@        return (g,                neqs ++ fixedStateRls ++ fcRls ++-                    asRls ++ trRls ++ csRls ++ gsRls, +                    asRls ++ trRls ++ csRls ++ gsRls,                rlRls ++ grRls ++ cqRls)  {--@@ -646,50 +646,45 @@  -- 2.  If the earliest occurrence of a group var is in an In event, -- then the group var does not *originate* in a later event.  Ie its--- earliest *carried* occurrence will not be a later transmission.  +-- earliest *carried* occurrence will not be a later transmission.  -- 3.  If the earliest occurrence of a group var is an Out event, that -- must be an rndx. -badGroupMemberOccurrences :: [Term] -> Trace -> Maybe ([Term], Int) +badGroupMemberOccurrences :: [Term] -> Trace -> Maybe ([Term], Int) badGroupMemberOccurrences vars events =-    loop groupVars events 0    +    loop groupVars events 0     where       groupVars = filter isVarExpr vars       usedAndRemaining e = L.partition (flip occursIn $ evtTerm e)        checkGroupVar (Out _) v = isRndx v       -- See IMPORTANT note above-      checkGroupVar (In (Plain _)) v = not (isRndx v) || True +      checkGroupVar (In (Plain _)) v = not (isRndx v) || True       checkGroupVar (In (ChMsg c _)) v = not (isRndx v) || isLocn c || True -      loop _ [] _ = Nothing +      loop _ [] _ = Nothing       loop gvs (e : evts) i =           let (fsts,rest) = usedAndRemaining e gvs in           case L.filter (not . checkGroupVar e) fsts of-            [] -> loop rest evts (i+1) -            bad -> Just (bad,i) +            [] -> loop rest evts (i+1)+            bad -> Just (bad,i)  badOrigNotGen :: [Term] -> Trace -> [(Term,Int)] badOrigNotGen vars events =     foldr     (\v soFar -> case recvButOrig v events of                    Nothing -> soFar-                   Just p -> (v,p) : soFar) [] groupVars +                   Just p -> (v,p) : soFar) [] groupVars     where       groupVars = filter isVarExpr vars       recvButOrig v c =-          if (originates v c &&   -- first carried outbound -              not(generates v c)) -- first occurs inbound -          then +          if (originates v c &&   -- first carried outbound+              not(generates v c)) -- first occurs inbound+          then               firstOccursPos v c           else-              Nothing --              -    --+              Nothing  loadTrace :: MonadFail m => Sig -> Gen -> [Term] ->              [SExpr Pos] -> m (Gen, [Term], [Term], PreRules, Trace)@@ -700,7 +695,7 @@                     -> Trace -> [SExpr Pos]                     -> m (Gen, [Term], [Term], PreRules, Trace)       loadTraceLoop gen newVars uniqs pr events [] =-          let events' = reverse events in +          let events' = reverse events in           case badGroupMemberOccurrences vars events' of             Nothing ->                 case badOrigNotGen vars events' of@@ -965,7 +960,7 @@ loadInstMax sig pos p kvars gen role env =     do       r <- lookupRole pos p role-      let height = length (rtrace r) +      let height = length (rtrace r)       let vars = rvars r       (gen', env') <- foldM (loadMaplet sig kvars vars)                       (gen, emptyEnv) env
src/CPSA/Options.hs view
@@ -35,7 +35,7 @@   optTryYoungNodesFirst = False,   optGoalsSat = False,   optLimit = 2000,-  optBound = 8,+  optBound = 12,   optDepth = 0,                 -- Infinite   optMargin = 72,   optIndent = 2 }
src/CPSA/Proc/Proc.hs view
@@ -41,10 +41,7 @@   = Send String Var Var         -- Send a message   | Bind Decl Expr              -- Bind a variable to an expression   | Same String Var Var         -- Are two values the same?-  | Ltkp String Var Var Var     -- Vars related by the ltk function?   | Invp String Var Var         -- Vars related by the invk function?-  | Namp String Var Var         -- Vars related by the pubk function?-  | Nm2p String Var Var Var     -- Vars related by the pubk2 function?   | Return [Var]                -- Return values from the procedure   | Comment String              -- Insert a comment @@ -96,17 +93,9 @@ parseStmt (L _ [S _ op, S _ x, S _ y])   | prefix "same_" op =     return $ Same op x y-parseStmt (L _ [S _ "ltkp", S _ x, S _ y, S _ z]) =-    return $ Ltkp "ltkp" x y z parseStmt (L _ [S _ op, S _ x, S _ y])   | prefix "invp_" op =     return $ Invp op x y-parseStmt (L _ [S _ op, S _ x, S _ y])-  | prefix "namp_" op =-    return $ Namp op x y-parseStmt (L _ [S _ op, S _ x, S _ y, S _ z])-  | prefix "nm2p_" op =-    return $ Nm2p op x y z parseStmt (L _ (S _ "return" : xs)) =   do     returns <- mapM parseString xs
src/CPSA/Protocol.hs view
@@ -8,13 +8,13 @@  module CPSA.Protocol (Event (..), evtCm, evtTerm, evtChan, evtMap, evt,     inbnd, outbnd, Trace, tterms, originates, originationPos,-    generates, generationPos, firstOccursPos, +    generates, generationPos, firstOccursPos,     acquiredPos, gainedPos, genGainedPos, usedPos, insPrecedeOuts,     Role, rname, rvars, rtrace, rnon, rpnon, runique, runiqgen, rabsent,     rconf, rauth, rcomment, rsearch, rnorig, rpnorig, ruorig, rugen, rabs,     rpconf, rpauth, rpriority, mkRole, tchans, varSubset, varsInTerms,     addVars, firstOccurs, paramOfName, envsRoleParams,-    AForm (..), NodeTerm, Goal (..), Conj,+    AForm (..), NodeTerm, Goal (..), Conj, fvsAForm, fvsConj, fvsAntec, fvsConsq,     aFormOrder, aFreeVars, instantiateAForm, instantiateConj, Rule (..),     Prot, mkProt, pname, alg, pgen, psig, roles,     nullaryrules, unaryrules, generalrules, rules, userrules, generatedrules,@@ -198,7 +198,7 @@       loop pos (In t' : c)           | test t (cmTerm t') ||             testMaybe maybeInv (cmTerm t') = Just pos -- Found it-                                                      -- incoming +                                                      -- incoming           | otherwise = loop (pos + 1) c  -- At what position is a term acquired in a trace?@@ -438,7 +438,20 @@           | name == varName v = Just v -- $ z v v           | otherwise = seek rest -envsRoleParams :: Role -> Gen -> [Term] -> [(Gen, Env)]+paramVarPairs :: Role -> [Term] -> [(Term,Term)]+paramVarPairs rl =+    foldl+    (\soFar v ->+         case paramOfName (varName v) rl of+           Nothing -> soFar+           Just p -> (p,v) : soFar)+    []++envsRoleParams :: Role -> [Term] -> Env+envsRoleParams rl vars =+    envOfParamVarPairs $ paramVarPairs rl vars++{-- envsRoleParams rl g =     foldl     (\ges v -> concatMap@@ -457,6 +470,7 @@                                    [ge])                ges)     [(g,emptyEnv)]+--}  -- Security Goals @@ -795,6 +809,56 @@ instantiateConj :: Env -> Conj -> Conj instantiateConj e =     map (\(p,a) -> (p, instantiateAForm e a))++fvsAForm :: AForm -> [Term]+fvsAForm (Length _ z l) = L.nub $ sortedVarsIn z ++ sortedVarsIn l+fvsAForm (Param _ _ _ z v) = L.nub $ sortedVarsIn z ++ sortedVarsIn v+fvsAForm (Prec (z1,i1) (z2,i2)) =+    L.nub $ sortedVarsIn z1 ++ sortedVarsIn i1 +++     sortedVarsIn z2 ++ sortedVarsIn i2++fvsAForm (Non t) = L.nub $ sortedVarsIn t+fvsAForm (Pnon t) = L.nub $ sortedVarsIn t+fvsAForm (Uniq t) = L.nub $ sortedVarsIn t+fvsAForm (Ugen t) = L.nub $ sortedVarsIn t++fvsAForm (UniqAt t (z1,i1)) =+    L.nub $ sortedVarsIn t ++ sortedVarsIn z1 ++ sortedVarsIn i1+fvsAForm (UgenAt t (z1,i1)) =+    L.nub $ sortedVarsIn t ++ sortedVarsIn z1 ++ sortedVarsIn i1++fvsAForm (GenStV t) = L.nub $ sortedVarsIn t+fvsAForm (Conf t) = L.nub $ sortedVarsIn t+fvsAForm (Auth t) = L.nub $ sortedVarsIn t++fvsAForm (Commpair (z1,i1) (z2,i2)) =+    L.nub $ sortedVarsIn z1 ++ sortedVarsIn i1 +++     sortedVarsIn z2 ++ sortedVarsIn i2+fvsAForm (SameLocn (z1,i1) (z2,i2)) =+    L.nub $ sortedVarsIn z1 ++ sortedVarsIn i1 +++     sortedVarsIn z2 ++ sortedVarsIn i2+fvsAForm (LeadsTo (z1,i1) (z2,i2)) =+    L.nub $ sortedVarsIn z1 ++ sortedVarsIn i1 +++     sortedVarsIn z2 ++ sortedVarsIn i2++fvsAForm (StateNode (z1,i1)) =+    L.nub $ sortedVarsIn z1 ++ sortedVarsIn i1+fvsAForm (Trans (z1,i1)) =+    L.nub $ sortedVarsIn z1 ++ sortedVarsIn i1++fvsAForm (Equals t1 t2) = L.nub $ sortedVarsIn t1 ++ sortedVarsIn t2+fvsAForm (Component t1 t2) = L.nub $ sortedVarsIn t1 ++ sortedVarsIn t2++fvsAForm (AFact _ ts) = L.nub $ concatMap sortedVarsIn ts++fvsConj :: Conj -> [Term]+fvsConj c = L.nub $ concatMap fvsAForm $ map snd c++fvsAntec :: [AForm] -> [Term]+fvsAntec afs = L.nub $ concatMap fvsAForm afs++fvsConsq :: [([Term], [AForm])] -> [Term]+fvsConsq exs = L.nub $ concatMap (\(evs,c) -> (fvsAntec c) L.\\ evs) exs  data Rule   = Rule { rlname :: String,    -- Name of rule
+ src/CPSA/Query/Loader.hs view
@@ -0,0 +1,157 @@+-- Loads preskeletons and supplies functions for dealing with the+-- preskeleton's alist.  The code is based on what is in+-- CPSA.Graph.Loader.++-- Copyright (c) 2009 The MITRE Corporation+--+-- This program is free software: you can redistribute it and/or+-- modify it under the terms of the BSD License as published by the+-- University of California.++module CPSA.Query.Loader (Preskel, label, parent, seen, alist, strip,+                          assoc, nassoc, State, loadFirst, loadNext)+                          where++import qualified Data.List as L+import CPSA.Lib.SExpr+import CPSA.Lib.Entry (gentlyReadSExpr)++-- A view of preskeletons designed for queries.++data Preskel = Preskel+    { label :: Int,             -- Label from the input or generated+                                -- by the loader+      parent :: Maybe Int,      -- Parent from the input+      seen :: [Int], -- Seen preskeletons isomorphic to cohort members+      alist :: [SExpr Pos] }     -- Body of this preskeleton+    deriving Show++instance Eq Preskel where+    k0 == k1 = label k0 == label k1++instance Ord Preskel where+    compare k0 k1 = compare (label k0) (label k1)++-- The remaing is in support of the loader++-- Load one preskeleton at a time from the input.  The state of+-- loading follows.++newtype State = State (PosHandle, Int)++-- Load the initial comments and the first preskeleton.  It's an error+-- if there is no preskeleton in the input.++loadFirst :: PosHandle -> IO ([SExpr Pos], Preskel, State)+loadFirst h =+    loadComments h []++loadComments :: PosHandle -> [SExpr Pos]+             -> IO ([SExpr Pos], Preskel, State)+loadComments h cmts =+    do+      x <- gentlyReadSExpr h+      case x of+        Nothing -> fail "Empty input"+        Just x ->+            case x of+              cmt@(L _ (S _ "comment" : _)) ->+                  loadComments h (cmt:cmts)+              cmt@(L _ (S _ "herald" : _)) ->+                  loadComments h (cmt:cmts)+              _ ->+                  do+                    n <- loadSExpr (State (h, 0)) x+                    case n of+                      Nothing -> fail "Empty input"+                      Just (p, s) -> return (reverse cmts, p, s)++-- Load the next preskeleton or return Nothing on EOF+loadNext :: State -> IO (Maybe (Preskel, State))+loadNext s@(State (h, _)) =+    do+      x <- gentlyReadSExpr h+      case x of+        Nothing -> return Nothing+        Just x -> loadSExpr s x++-- Load from one S-expression+loadSExpr :: State -> SExpr Pos -> IO (Maybe (Preskel, State))+loadSExpr (State (h, tag)) x@(L pos (S _ "defskeleton" : xs)) =+    do+      k <- loadPreskel x pos tag xs+      return (Just (k, State (h, 1 + max tag (label k))))+loadSExpr s (L _ (S _ "defprotocol" : _)) =+    loadNext s+loadSExpr s (L _ (S _ "comment" : _)) =+    loadNext s+loadSExpr _ x = fail (shows (annotation x) "Malformed input")++-- Preskeletons++loadPreskel :: MonadFail m => SExpr Pos -> Pos ->+               Int -> [SExpr Pos] -> m Preskel+loadPreskel _ _ tag (S _ _ : (L _ (S _ "vars" : _)) : xs) =+    do+      checkAlist xs -- Ensure alist syntax+      label <- nassoc "label" xs+      parent <- nassoc "parent" xs+      seen <- nsassoc "seen" xs+      return Preskel { label = maybe tag id label,+                       parent  = parent,+                       seen = maybe [] (L.sort . L.nub) seen,+                       alist = xs }+loadPreskel _ pos _ _ = fail (shows pos "Malformed skeleton")++-- Strip positions from an S-expression++strip :: SExpr a -> SExpr ()+strip (S _ s) = S () s+strip (Q _ s) = Q () s+strip (N _ n) = N () n+strip (L _ l) = L () (map strip l)++-- Ensure alist has the proper form+checkAlist :: MonadFail m => [SExpr Pos] -> m ()+checkAlist [] = return ()+checkAlist ((L _ (S _ _ : _)) : xs) = checkAlist xs+checkAlist xs = fail (shows (annotation $ head xs) "Malformed association list")++-- Lookup value in alist, appending values with the same key+assoc :: String -> [SExpr Pos] -> Maybe [SExpr Pos]+assoc key alist =+    loop alist Nothing+    where+      loop ((L _ (S _ head : tail)) : rest) vals+          | key == head = loop rest (extend tail vals)+          | otherwise = loop rest vals+      loop _ vals = vals+      extend x Nothing = Just x+      extend x (Just y) = Just (x ++ y)++-- assoc key alist =+--    concat [ rest | L _ (S _ head : rest) <- alist, key == head ]++nassoc :: MonadFail m => String -> [SExpr Pos] -> m (Maybe Int)+nassoc key xs =+    case assoc key xs of+      Nothing -> return Nothing+      Just [val] ->+          do+            ns <- num val+            return (Just ns)+      Just (x:_) -> fail (shows (annotation x) "Expecting one number")+      Just [] -> fail (shows (annotation (head xs)) "Expecting one number")++num :: MonadFail m => SExpr Pos -> m Int+num (N _ n) = return n+num x = fail (shows (annotation x) "Expecting a number")++nsassoc :: MonadFail m => String -> [SExpr Pos] -> m (Maybe [Int])+nsassoc key xs =+    case assoc key xs of+      Nothing -> return Nothing+      Just val ->+          do+            ns <- mapM num val+            return (Just ns)
+ src/CPSA/Query/Main.hs view
@@ -0,0 +1,224 @@+-- Reads and runs a query on a derivation tree.++-- This programs loads CPSA output and a query.  It assembles the+-- skeletons in the output into a forest of derivation trees.  It then+-- runs the query against the selected trees in the forest and returns+-- the labels of the skeletons that satisfy the query.++-- Each tree vertex is a skeleton represented as a S-Expression.+-- Information in the skeleton can be accessed by treating it as an+-- association list.  The query language allows one to ask questions+-- about the association list, such as if it has a given key.  For+-- example, you can list the shapes in a tree by asking if the+-- association list has the symbol "shape" as a key.++-- A query is a file containing S-Expressions.  The first S-Expression+-- contains the query proper, and the remaining S-Expressions are the+-- integers that select which trees in the forest will be the searched+-- by the query proper.  If there are no integers, the entire forest+-- is searched.  The syntax of the query proper is:++-- QUERY ::= (has-key SYMBOL)+--        |  (null SYMBOL)+--        |  (member SEXPR SYMBOL)+--        |  (has-children)+--        |  (has-duplicates)+--        |  (not QUERY)+--        |  (and QUERY*)+--        |  (or QUERY*)++-- The has-key predicate asks if SYMBOL is a key in a skeleton.  The+-- null? predicate asks if SYMBOL is a key and the value is the empty+-- list.  The member predicate asks if SEXPR is a member of the value+-- associated with key SYMBOL.  The has-children? predicate asks if+-- the current skeleton has children.  The has-duplicates? predicate+-- asks if the current skeleton has duplicates as descendents.  The+-- remaining operations implement the usual way to combine boolean+-- functions.++-- EXAMPLES+--+-- (has-key shape) 0 1+--+-- finds the skeletons in the first and second tree that have shape as+-- a key.  If this query is run against the test file output+-- tst/unilateral.txt, it will find that skeletons 1 and 3 are shapes.+--+-- (has-key aborted)+--+-- finds the skeletons in the forest that have aborted as a key.+-- If this query is run against the test file output+-- tst/wide-mouth-frog, it will find that skeleton 18 is aborted.++-- TRANSCRIPT+--+-- $ cat query.txt+-- (has-key shape) 0 1+-- $ cpsa4query query.txt tst/unilateral.txt+--     1    3++-- Usage: cpsa4query [OPTIONS] QUERY [FILE]+--   -o FILE  --output=FILE  output FILE+--   -m INT   --margin=INT   set output margin (default 72)+--   -h       --help         show help message+--   -v       --version      show version number++-- Copyright (c) 2009 The MITRE Corporation+--+-- This program is free software: you can redistribute it and/or+-- modify it under the terms of the BSD License as published by the+-- University of California.++module Main (main) where++import Numeric+import System.IO+import System.Console.GetOpt+import System.Environment+import Paths_cpsa+import Text.Printf (printf)+import CPSA.Lib.SExpr+import CPSA.Lib.Entry (abort, success, cpsaVersion, outputHandle)+import CPSA.Query.Loader+import CPSA.Query.Tree+import CPSA.Query.Query++main :: IO ()+main =+    do+      (query, p, (output, margin)) <- start filterOptions filterInterp+      ks <- loadPreskels p+      q <- loadQuery query+      ans <- execQuery q (forest ks)+      h <- outputHandle output+      showAns h margin ans+      hClose h++-- Returns the input query and S-expression and an interpretation of+-- the command line options.+start :: [OptDescr a] -> ([a] -> IO b) -> IO (String, PosHandle, b)+start options interp =+    do+      argv <- getArgs+      (flags, files) <- opts options argv+      opts <- interp flags+      (query, p) <- openInput options files+      return (query, p, opts)++opts :: [OptDescr a] -> [String] -> IO ([a], [String])+opts options argv =+    case getOpt RequireOrder options argv of+      (o, n, []) -> return (o, n)+      (_, _, errs) ->+          do+            msg <- usage options errs+            abort msg++openInput ::  [OptDescr a] -> [String] -> IO (String, PosHandle)+openInput _ [query, file] =+    do                          -- Input from named file+      input <- openFile file ReadMode+      p <- posHandle file input+      return (query, p)+openInput _ [query] =+    do+      p <- posHandle "" stdin          -- Input from the standard input+      return (query, p)+openInput options [] =+    do+      msg <- usage options ["no input files\n"]+      abort msg+openInput options _ =+    do+      msg <- usage options ["too many input files\n"]+      abort msg++usage :: [OptDescr a] -> [String] -> IO String  -- Return usage string+usage options errs =+    do+      name <- getProgName+      datadir <- getDataDir+      let header = "Usage: " ++ name ++ " [OPTIONS] QUERY [FILE]"+      let footer = "\nDocumentation directory: " ++ datadir+      return (concat errs ++ usageInfo header options ++ footer)++-- Command line option flags+data Flag+    = Help                      -- Help+    | Info                      -- Version information+    | Margin String             -- Output line length+    | Output String             -- Output file name+      deriving Show++defaultMargin :: Int+defaultMargin = 72++filterOptions :: [OptDescr Flag]+filterOptions =+    [ Option ['o'] ["output"]  (ReqArg Output "FILE")  "output FILE",+      Option ['m'] ["margin"]  (ReqArg Margin "INT")+      ("set output margin (default " ++ show defaultMargin ++ ")"),+      Option ['h'] ["help"]    (NoArg Help)          "show help message",+      Option ['v'] ["version"] (NoArg Info)          "show version number" ]++-- Interpret option flags+filterInterp :: [Flag] -> IO (Maybe FilePath, Int)+filterInterp flags =+    loop flags Nothing defaultMargin+    where+      loop [] file margin =+          return (file, margin)+      loop (Output name : flags) Nothing margin =+          loop flags (Just name) margin+      loop (Margin value : flags) file _ =+          case readDec value of+            [(margin, "")] ->+                loop flags file margin+            _ ->+                do+                  msg <- usage filterOptions ["Bad value for margin\n"]+                  abort msg+      loop (Info : _) _ _ =+          success cpsaVersion+      loop (Help : _) _ _ =+          do                    -- Show help then exit with success+            msg <- usage filterOptions []+            success msg+      loop _ _ _ =+           do                   -- Show help then exit with failure+             msg <- usage filterOptions ["Bad option combination\n"]+             abort msg++-- Load preskeletons+loadPreskels :: PosHandle -> IO ([Preskel])+loadPreskels h =+    do+      (_, k, s) <- loadFirst h+      ks <- loop [k] s+      return ks+    where+      loop ks s =+          do+            n <- loadNext s+            case n of+              Nothing ->        -- EOF+                  return $ reverse ks+              Just (k, s) ->+                  loop (k:ks) s++showAns :: Handle -> Int -> [Int] -> IO ()+showAns h margin ans =+    loop ans 0+    where+      loop [] 0 = return ()+      loop [] _ = hPutStrLn h ""+      loop (i:ints) col+          | col < margin =+              do+                let field = printf "%5d" i+                hPutStr h field+                loop ints (col + 5)+          | otherwise =+              do+                hPutStrLn h ""+                loop (i:ints) 0
+ src/CPSA/Query/Query.hs view
@@ -0,0 +1,120 @@+-- Reads and runs a query on a derivation tree.++-- Copyright (c) 2009 The MITRE Corporation+--+-- This program is free software: you can redistribute it and/or+-- modify it under the terms of the BSD License as published by the+-- University of California.++module CPSA.Query.Query (Query, loadQuery, execQuery) where++import System.IO+import Data.List (nub, sort)+import CPSA.Lib.SExpr+import CPSA.Lib.Entry+import CPSA.Query.Tree+import CPSA.Query.Loader (Preskel (..), assoc)++data Query+    = HasKey String+    | Null String+    | Member (SExpr Pos) String+    | HasChildren+    | HasDuplicates+    | Not Query+    | And [Query]+    | Or [Query]+    deriving Show++loadQuery :: String -> IO (Query, [Int])+loadQuery file =+    do+      input <- openFile file ReadMode+      p <- posHandle file input+      q <- readSExpr p+      case q of+        Nothing -> fail "no query in query input"+        Just x ->+            do+              pq <- parseQuery x+              ints <- getInts p+              return (pq, ints)++parseQuery :: SExpr Pos -> IO Query+parseQuery (L _ [S _ "has-key", S _ sym]) =+    return (HasKey sym)+parseQuery (L _ [S _ "null", S _ sym]) =+    return (Null sym)+parseQuery (L _ [S _ "member", x, S _ sym]) =+    return (Member x sym)+parseQuery (L _ [S _ "has-children"]) =+    return HasChildren+parseQuery (L _ [S _ "has-duplicates"]) =+    return HasDuplicates+parseQuery (L _ [S _ "not", x]) =+    do+      q <- parseQuery x+      return (Not q)+parseQuery (L _ (S _ "and" : xs)) =+    do+      qs <- mapM parseQuery xs+      return (And qs)+parseQuery (L _ (S _ "or" : xs)) =+    do+      qs <- mapM parseQuery xs+      return (Or qs)+parseQuery _ = fail "query does not parse"++getInts :: PosHandle -> IO [Int]+getInts p =+    do+      i <- readSExpr p+      case i of+        Nothing -> return []+        Just x ->+            case x of+              N _ n ->+                  do+                    rest <- getInts p+                    return (n:rest)+              _ -> fail "bad int in query file"++execQuery :: (Query, [Int]) -> Forest -> IO [Int]+execQuery (q, []) ts =+    return (sort $ concatMap (execQueryTree q) ts)+execQuery (q, ints) ts =+    do+      ts <- mapM (getTree ts) (nub ints)+      return (sort $ concatMap (execQueryTree q) ts)++getTree :: Forest -> Int -> IO Tree+getTree _ int  | int < 0 = fail ("Bad tree index " ++ show int)+getTree ts int =+    loop ts int+    where+      loop [] _ = fail ("Cannot find tree " ++ show int)+      loop (t:_) 0 = return t+      loop (_:ts) i = loop ts (i - 1)++execQueryTree :: Query -> Tree -> [Int]+execQueryTree q t =+    ans ++ concatMap (execQueryTree q) (children t)+    where+      ans = if runQuery q t then [label (vertex t)] else []++runQuery :: Query -> Tree -> Bool+runQuery (HasKey sym) t =+    maybe False (const True) (assoc sym (alist (vertex t)))+runQuery (Null sym) t =+    maybe False null (assoc sym (alist (vertex t)))+runQuery (Member x sym) t =+    case assoc sym (alist (vertex t)) of+      Nothing -> False+      Just l -> elem x l+runQuery HasChildren t =+    not (null (children t))+runQuery HasDuplicates t =+    not (null (duplicates t))+runQuery (Not q) t = not (runQuery q t)+runQuery (And qs) t = all (\ q -> runQuery q t) qs+runQuery (Or qs) t = any (\ q -> runQuery q t) qs
+ src/CPSA/Query/Tree.hs view
@@ -0,0 +1,86 @@+-- Generate a tree of preskeletons++-- This code is based on what is in CPSA.Graph.Tree++-- Copyright (c) 2009 The MITRE Corporation+--+-- This program is free software: you can redistribute it and/or+-- modify it under the terms of the BSD License as published by the+-- University of California.++module CPSA.Query.Tree (Tree (..), Forest, forest) where++import qualified Data.Map as M+import Data.Map (Map)+import Data.List (foldl')+import CPSA.Lib.Utilities (seqList)+import CPSA.Query.Loader++-- The preskeletons in the output are assembled together for display+-- into trees based on the parent relation.  In reality, the+-- relationship between preskeletons is not tree-like, but includes+-- other edges as a result of a preskeleton having cohort members that+-- have been seen before.  These members are called a tree node's+-- duplicates, and their children are displayed somewhere else in the+-- display.++data Tree = Tree+    { vertex :: !Preskel,+      children :: !Forest,      -- Freshly discovered preskeletons+      duplicates :: !Forest }   -- Preskeletons already seen+    deriving Show++instance Eq Tree where+    t0 == t1 = vertex t0 == vertex t1++instance Ord Tree where+    compare t0 t1 = compare (vertex t0) (vertex t1)++makeTree :: Preskel -> [Tree] -> [Tree] -> Tree+makeTree k kids dups =+    Tree { vertex = k,+           children = seqList kids,+           duplicates = seqList dups }++type Forest = [Tree]++-- Assemble preskeletons into a forest and then set the alive flag+forest :: [Preskel] -> Forest+forest ks =+    reverse (foldl' f [] ks)+    where+      f ts k+        | parent k == Nothing = -- Found tree root+            assemble (childMap ks) k : ts+        | otherwise = ts        -- Otherwise skip k++-- A child map maps a label to a preskeleton and a list of its+-- childnen.  The map is derived by looking at the parent field.  The+-- code assumes a parent precedes its children in the input list.+childMap :: [Preskel] -> Map Int (Preskel, [Preskel])+childMap ks =+    foldl' child M.empty ks+    where+      child cm k =+          case parent k of+            Nothing -> cm'+            Just p ->+                M.adjust addChild p cm'+          where+            cm' = M.insert (label k) (k, []) cm+            addChild (k', children) =+                (k', k : children)++-- Assemble preskeletons into a tree+assemble :: Map Int (Preskel, [Preskel]) -> Preskel -> Tree+assemble table k =+    makeTree k (kids k) (dups k)+    where+      kids k =+          case M.lookup (label k) table of+            Nothing -> []       -- This should never happen+            Just (_, ks) -> map (assemble table) (reverse ks)+      dups k =+          [ makeTree k' [] []   -- Make an empty tree for a duplicate+            | tag <- seen k,+              k' <- maybe [] (\(k, _) -> [k]) (M.lookup tag table) ]
src/CPSA/Reduction.hs view
@@ -533,7 +533,7 @@       L () (S () "no" :             (displayForm              (ctx $ (uvars g) ++ (evars g) ++ (kvars k))-             (unSatReport k g ge)) : +             (unSatReport k g ge)) :             (displayEnv (ctx $ uvars g) (ctx $ kvars k) (snd ge)))     ctx ts = addToContext emptyContext ts     evars g = concatMap fst $ consq g
src/CPSA/Roletran/Derivation.hs view
@@ -220,9 +220,8 @@     Pr x y -> loopPair pos st recvd todo t v x y     En x y -> loopEncr pos st more recvd todo t v x y     Hsh _ -> loopHash pos st more recvd todo t v-    Sky (Ltk x y) -> loopLtk pos st more recvd todo t v x y-    Aky k -> loopAsym pos st more recvd todo t v k-    Iky k -> loopAsym pos st more recvd todo t v k+    Aky _ -> loopAsym pos st more recvd todo t v+    Iky _ -> loopAsym pos st more recvd todo t v     _ -> loopOther pos st more recvd todo t v  -- Reduce a pair.  Adds two instructions and allocates two variables.@@ -272,45 +271,11 @@         let st = (fresh, cs, stmt : stmts)         loop pos st True recvd todo --- Reduce a long term key.-loopLtk :: MonadFail m => Pos -> State -> Bool ->-           [(Term, Vari)] -> [(Term, Vari)] ->-           Term -> Vari -> Var -> Var -> m State-loopLtk pos st@(fresh, cs, stmts) more recvd todo t v x y =-  case synth st t of-    Nothing ->-      case M.lookup (Nam x) (compStore st) of-        Nothing ->              -- Create variable reference to x-          let st = (-                fresh + 1,-                cs,-                stmts) in-            loop pos st True recvd ((Nam x, fresh) : (t, v) : todo)-        Just u ->-          case M.lookup (Nam y) (compStore st) of-            Nothing ->              -- Create variable reference to y-              let st = (-                    fresh + 1,-                    cs,-                    stmts) in-                loop pos st True recvd ((Nam y, fresh) : (t, v) : todo)-            Just w ->-              let st = (-                    fresh,-                    M.insert t v cs,-                    Ltkp v u w : stmts) in-                loop pos st True recvd todo-    Just ((fresh, cs, stmts), h) ->-      do                        -- Otherwise, check sameness-        let stmt = Same (kind t) v h-        let st = (fresh, cs, stmt : stmts)-        loop pos st more recvd todo- -- Reduce an asymmtric key. loopAsym :: MonadFail m => Pos -> State -> Bool ->             [(Term, Vari)] -> [(Term, Vari)] ->-            Term -> Vari -> Akey -> m State-loopAsym pos st@(fresh, cs, stmts) more recvd todo t v (AVar _) =+            Term -> Vari -> m State+loopAsym pos st@(fresh, cs, stmts) more recvd todo t v =   case synth st t of     Nothing ->       case synth st (inv t) of@@ -321,50 +286,6 @@             let stmt = Invp (kind t) v h             let st = (fresh, M.insert t v cs, stmt : stmts)             loop pos st True recvd todo-    Just ((fresh, cs, stmts), h) ->-      do                        -- Otherwise, check sameness-        let stmt = Same (kind t) v h-        let st = (fresh, cs, stmt : stmts)-        loop pos st more recvd todo-loopAsym pos st@(fresh, cs, stmts) more recvd todo t v (Pubk x) =-  case synth st t of-    Nothing ->-      case M.lookup (Nam x) (compStore st) of-        Nothing ->              -- Create variable reference to x-          let st = (-                fresh + 1,-                cs,-                stmts) in-            loop pos st True recvd ((Nam x, fresh) : (t, v) : todo)-        Just u ->-          do-            let stmt = Namp (kind t) v u-            let st = (fresh, M.insert t v cs, stmt : stmts)-            loop pos st True recvd todo-    Just ((fresh, cs, stmts), h) ->-      do                        -- Otherwise, check sameness-        let stmt = Same (kind t) v h-        let st = (fresh, cs, stmt : stmts)-        loop pos st more recvd todo-loopAsym pos st@(fresh, cs, stmts) more recvd todo t v (Pubk2 q x) =-  case synth st t of-    Nothing ->-      case M.lookup (Nam x) (compStore st) of-        Nothing ->              -- Create variable reference to x-          let st = (-                fresh + 1,-                cs,-                stmts) in-            loop pos st True recvd ((Nam x, fresh) : (t, v) : todo)-        Just u ->-          case synth st (Tag q) of-            Just ((fresh, cs, stmts), h) ->-              do-                let stmt = Nm2p (kind t) v h u-                let st = (fresh, M.insert t v cs, stmt : stmts)-                loop pos st True recvd todo-            Nothing ->-              fail (shows pos ("Tag not synthesized " ++ show (displayTerm t)))     Just ((fresh, cs, stmts), h) ->       do                        -- Otherwise, check sameness         let stmt = Same (kind t) v h
src/CPSA/Roletran/Emitter.hs view
@@ -87,17 +87,11 @@   | Send Vari Decl              -- Send a message   | Bind Decl Expr              -- Bind a variable to an expression   | Same Kind Vari Vari         -- Are two values the same?-  | Ltkp Vari Vari Vari         -- Values related by the ltk function?   | Invp Kind Vari Vari         -- Values related by the invk function?-  | Namp Kind Vari Vari         -- Values related by the pubk function?-  | Nm2p Kind Vari Vari Vari    -- Values related by the pubk2 function?   | Return [Vari]               -- Return values from the procedure   | Comment String              -- Insert a comment --- For Invp, Namp, and Nm2p, the kind is associated with the first--- variable.  A name is associated with the second two variables in--- Ltkp, the second variable in Namp, and the third variable in Nm2p.--- A tag is associated with the second variable in Nm2p.+-- For Invp, the kind is associated with the first variable.  -- Expressions -- The kind is associated with the returned value data Expr@@ -165,18 +159,9 @@ displayStmt first (Same s x y) =   mark "(same" [s] ++ " " ++ var first x ++   " " ++ var first y ++ ")"-displayStmt first (Ltkp x y z) =-  "(ltkp " ++ var first x ++ " " ++ var first y ++-  " " ++ var first z ++ ")" displayStmt first (Invp s x y) =   mark "(invp" [s] ++ " " ++ var first x ++   " " ++ var first y ++ ")"-displayStmt first (Namp s x y) =-  mark "(namp" [s] ++ " " ++ var first x ++-  " " ++ var first y ++ ")"-displayStmt first (Nm2p s x y z) =-  mark "(nm2p" [s] ++ " " ++ var first x ++-  " " ++ var first y ++ " " ++ var first z ++ ")" displayStmt first (Return vs) =   "(return" ++ foldr f ")" vs   where
src/CPSA/Roletran/Loader.hs view
@@ -79,8 +79,10 @@         Just env ->           do             u <- mapM (loadBasic env) (assoc "uniq-orig" rest)-            i <- mapM (loadChanTerm env) (assoc "inputs" rest)-            o <- mapM (loadTerm env) (assoc "outputs" rest)+            i <- mapM (loadChanTerm env) -- Allow params as a synonym+                 (assoc "inputs" rest ++ assoc "params" rest)+            o <- mapM (loadTerm env) -- Allow returns as a synonym+                 (assoc "outputs" rest ++ assoc "returns" rest)             mkRole name pos env c u i o loadRole pos _ = fail (shows pos "Malformed role") 
src/CPSA/Strand.hs view
@@ -41,33 +41,33 @@ import Control.Exception (try) import System.IO.Error (ioeGetErrorString) -zP :: Show a => a -> b -> b-zP x y = unsafePerformIO (print x >> return y)+z :: Show a => a -> b -> b+z x y = unsafePerformIO (print x >> return y)  zz :: Show a => a -> a-zz x = zP x x+zz x = z x x  zShow :: Show a => a -> a-zShow x = zP (show x) x+zShow x = z (show x) x  zb :: Show a => a -> Bool -> Bool-zb a False = zP a False+zb a False = z a False zb _ b = b  zn :: Show a => a -> Maybe b -> Maybe b-zn x Nothing = zP x Nothing+zn x Nothing = z x Nothing zn _ y = y  zf :: Show a => a -> Bool -> Bool-zf x False = zP x False+zf x False = z x False zf _ y = y  zt :: Show a => a -> Bool -> Bool-zt x True = zP x True+zt x True = z x True zt _ y = y  zl :: Show a => [a] -> [a]-zl a = zP (length a) a+zl a = z (length a) a  zi :: Instance -> String zi inst =@@ -601,7 +601,7 @@       Just k0 ->           if L.length (insts k0) == L.length (prob k)           then k-          else (zP ("skel's POV has " ++ (show (L.length (insts k0)))+          else (z ("skel's POV has " ++ (show (L.length (insts k0)))                    ++ " insts, but its prob has length "                    ++ (show (L.length (prob k))))                 k)@@ -701,27 +701,17 @@     all chanCheck (kauth k) &&     wellOrdered k && acyclicOrder k &&     roleOrigCheck k &&-    roleGenCheck k &&-    (povCheck k || --   (zP (show (povCheck k) ++ " pov length " ++-                   --     (show (case pov k of-                   --             Nothing -> 0-                   --             Just k0 -> L.length (insts k0))))-                    (povCheck k)) -- )+    roleGenCheck k     where       terms = kterms k       vs = kvars k       f b t = b && t `elem` vs---      f False _ = False---      f True t = t `elem` vs       nonCheck t = all (not . carriedBy t) terms       uniqueCheck t = any (carriedBy t) terms       uniqgenCheck t = any (constituent t) terms-      absentCheck (x, y) = varSubset [x, y] vs+      absentCheck (x, y) = varSubset [x, y] vs && x /= y       genStCheck t = foldVars f True t       chanCheck c = elem c vs-      povCheck k = case pov k of-                     Nothing -> True-                     Just k0 -> not (null (homomorphism k0 k (prob k)))  -- Do notation friendly preskeleton well formed check. wellFormedPreskel :: MonadFail m => Preskel -> m Preskel@@ -1648,7 +1638,7 @@ thinStrands :: PRS -> [(Sid, Sid)] -> [Sid] -> [PRS] thinStrands prs ps [] =         -- All strands analyzied     case multiPairs ps of       -- Generate multipairs-      [] -> [prs]+      [] -> reduce prs       mps -> thinMany prs mps   -- Try multistrand thinning thinStrands prs ps (s:ss) =   thinStrandPairs prs ps s ss ss@@ -2159,7 +2149,7 @@ {--  where          maybeShow x = if (5 == L.length (insts k') &&                            4 == L.length (insts k))-                       then (zP "validateEnv failed"+                       then (z "validateEnv failed"                              x)                        else x                        --}@@ -2180,7 +2170,7 @@ --            if (5 == L.length (insts k') && --                4 == L.length (insts k)) --            then---                zP (show (L.length v)) v+--                z (show (L.length v)) v --            else v     else []         -- error ("Yarg! JDR " ++ (show (L.length mapping)) ++ " vs " ++@@ -2216,7 +2206,7 @@           if (5 == L.length (insts k') &&               4 == L.length (insts k))           then-              zP (show i ++ " failed this time")+              z (show i ++ " failed this time")               False           else               False@@ -2895,12 +2885,12 @@     case varAtomLists of       [] -> AFact "false" []       (ebvs,as) : _ -> iter ebvs as ge-          +     where       varAtomLists = consq g-                     -      -- doesn't happen if e is a counterexample -      iter _ [] _ = AFact "true" [] ++      -- doesn't happen if e is a counterexample+      iter _ [] _ = AFact "true" []       iter ebvs (a : as) ge =           case satisfy a ebvs k ge of             [] -> a@@ -2910,7 +2900,7 @@ -- given atomic formula.  The second argument is the set of -- existentially bound variables, which we will use only in geq to -- handle adding identities involving the existentially bound--- variables.  +-- variables. satisfy :: AForm -> [Term] -> Sem satisfy (Length r z h) _ = glength r z h satisfy (Param r v i z t) _ = gparam r v i z t@@ -3008,7 +2998,7 @@  localSignal :: Preskel -> (Gen, Env) -> (Gen, Env) localSignal _ (g, e) =---    zP "yiao " (error ("localSignal: Env "  ++ (show e)))+--    z "yiao " (error ("localSignal: Env "  ++ (show e)))   (g, e)  -- Role length predicate@@ -3127,14 +3117,13 @@ guniqAt t (z, ht) k (g,e) =   do     (t', ls) <- korig k-    case indxLookup e ht of-      Just i -> (case ls of-                   [(s, j)] | i == j ->-                                do-                                  e <- match t t' (g,e)-                                  strdMatch z s e-                   _ -> [])-      Nothing -> []+    (g,e) <- match t t' (g,e)+    (case ls of+       [(s, j)] ->+           do+             (g,e) <- strdMatch z s (g,e)+             indxMatch ht j (g,e)+       _ -> [])  -- Unique generation gggen :: Term -> Sem@@ -3148,14 +3137,13 @@ gugenAt t (z, ht) k (g,e) =   do     (t', ls) <- kugen k-    case indxLookup e ht of-      Just i -> (case ls of-                   [(s, j)] | i == j ->-                                do-                                  e <- match t t' (g,e)-                                  strdMatch z s e-                   _ -> [])-      Nothing -> []+    (g,e) <- match t t' (g,e)+    (case ls of+       [(s, j)] ->+           do+             (g,e) <- strdMatch z s (g,e)+             indxMatch ht j (g,e)+       _ -> [])  ggenstv :: Term -> Sem ggenstv t k e =@@ -3207,7 +3195,7 @@   -- or else are among the existentially bound variables ebvs.   -- This always happens for goals because they must be role specific   -- but it is not always true for rules.-  | not (unmatchedVarsWithin e t ebvs) = +  | not (unmatchedVarsWithin e t ebvs) =       error ("In a rule equality check, " ++              "cannot find a binding for some variable in " ++ (show t) ++              " with ebvs " ++ (show ebvs))@@ -3234,14 +3222,14 @@   do     subst <- unify t t' (g, emptySubst)     return (fst subst, substUpdate e (snd subst))---} +--}  gcomponent :: Term -> Term -> Sem gcomponent t t' k (g, e) =     let result = foldl (\ges cmpt -> (geq [] t cmpt k (g, e)) ++ ges)                  []                  (components t') in-    --    zP ("> " ++ (show (length result))) result+    --    z ("> " ++ (show (length result))) result     result  --   satisfy (StateNode n) [] = gstateNode n@@ -3506,19 +3494,19 @@     loop k urs False False     where       urs = unaryrules $ protocol k-      loop _ [] False False = Unch  -- (zP "u" Unch)+      loop _ [] False False = Unch  -- (z "u" Unch)       loop k [] False True =           case preskelWellFormed k of-            True -> Found k     --  (zP "_" )+            True -> Found k     --  (z "_" )             False -> Unsat       loop k [] True b = loop k urs False b       loop k (ur : rest) b b' =           case tryRule k ur of             [] -> loop k rest b b'-            vas -> -- zP ("unary " ++ (rlname ur))+            vas -> -- z ("unary " ++ (rlname ur))                    (case rewriteUnaryOne k ur vas of-                      Nothing -> Unsat -- (zP "?" Unsat)-                      Just k' -> loop k' -- (zP "/" k')+                      Nothing -> Unsat -- (z "?" Unsat)+                      Just k' -> loop k' -- (z "/" k')                                  rest True True)  -- only interested in case ur is unary:@@ -3993,8 +3981,8 @@ -- of (zero or more) replacements. rewrite :: Preskel -> Maybe [Preskel] rewrite k =-    case nullUnary k of         --  (zP "<" k)-      Just [] -> Just []        -- zP ">>" (Just [])+    case nullUnary k of         --  (z "<" k)+      Just [] -> Just []        -- z ">>" (Just [])       Just [k'] -> iterate rewriteDepthCount [k'] [] True       Nothing -> iterate rewriteDepthCount [k] [] False       Just ks -> error ("rewrite:  nullUnary returned too many results ("@@ -4016,11 +4004,11 @@           concatMap (\k -> maybe [k] id (nullUnary k))        -- iterate todos done action, which yields Maybe [Preskel]-      iterate _ [] [_] False = Nothing          -- zP ">>" Nothing+      iterate _ [] [_] False = Nothing          -- z ">>" Nothing       iterate _ [] done False = error ("rewrite: non-singleton results with no change???  (" ++                                         (show (L.length done)) ++ ")")-      iterate _ [] done True = Just done        -- zP ">" (Just done)-      iterate 0 todos done True = Just (todos ++ done)  -- zP ">!" (Just (todos ++ done))+      iterate _ [] done True = Just done        -- z ">" (Just done)+      iterate 0 todos done True = Just (todos ++ done)  -- z ">!" (Just (todos ++ done))       iterate 0 _ done False = error ("rewrite: exhausted depth bound with no action???  (" ++                                         (show (L.length done)) ++ ")")       iterate dc (k : rest) done b =
tst/DH_hack.tst view
@@ -1,6 +1,6 @@ (herald "DH Hack" (bound 15)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/DH_hack.scm") (comment "Strand count bounded at 15") 
tst/ab.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/ab.scm")  (defprotocol ab basic
tst/abc.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/abc.scm")  (defprotocol abc basic
tst/aik.tst view
@@ -1,6 +1,6 @@ (herald "Anonymous identity protocol from TCG") -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/aik.scm")  (defprotocol aikprot basic
tst/atomic-open-closed.tst view
@@ -1,6 +1,6 @@ (herald atomic-open-closed (bound 44)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/atomic-open-closed.scm") (comment "Strand count bounded at 44") @@ -270,15 +270,15 @@     (forall ((z strd))       (implies (p "dev-close" z (idx 4)) (trans z (idx 2)))))   (defgenrule cau-dev-open-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-open" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-close-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-close" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-pass-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-pass" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))) @@ -606,15 +606,15 @@     (forall ((z strd))       (implies (p "dev-close" z (idx 4)) (trans z (idx 2)))))   (defgenrule cau-dev-open-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-open" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-close-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-close" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-pass-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-pass" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))) @@ -1046,15 +1046,15 @@     (forall ((z strd))       (implies (p "dev-close" z (idx 4)) (trans z (idx 2)))))   (defgenrule cau-dev-open-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-open" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-close-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-close" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-pass-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-pass" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))) 
tst/attest.tst view
@@ -1,6 +1,6 @@ (herald attest-door) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/attest.scm")  (defprotocol attest-door basic
tst/auth-enc.tst view
@@ -1,6 +1,6 @@ (herald auth-enc) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/auth-enc.scm")  (defprotocol auth-enc basic
tst/auth-hash.tst view
@@ -1,6 +1,6 @@ (herald auth-hash) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/auth-hash.scm")  (defprotocol auth-hash basic
tst/blanchet-strandmax.tst view
@@ -1,7 +1,7 @@ (herald "Blanchet's Simple Example Protocol (strand max)"   (comment "There is a flaw in this protocol by design")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/blanchet-strandmax.scm")  (defprotocol blanchet-max basic
tst/blanchet.tst view
@@ -1,7 +1,7 @@ (herald "Blanchet's Simple Example Protocol"   (comment "There is a flaw in this protocol by design")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/blanchet.scm")  (defprotocol blanchet basic
tst/bug_example.tst view
@@ -1,6 +1,6 @@ (herald bug_example (bound 20)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/bug_example.scm") (comment "Strand count bounded at 20") 
tst/cert_lang.tst view
@@ -1,6 +1,6 @@ (herald cert-lang) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/cert_lang.scm")  (defprotocol cert-uni basic
tst/chan-envelope.tst view
@@ -1,6 +1,6 @@ (herald "Envelope Protocol With Channels" (bound 15)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/chan-envelope.scm") (comment "Strand count bounded at 15") 
tst/chan-perrig-song.tst view
@@ -1,6 +1,6 @@ (herald perrig-song) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/chan-perrig-song.scm")  (defprotocol perrig-song basic
tst/chan-unilateral.tst view
@@ -1,6 +1,6 @@ (herald chan-unilateral) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/chan-unilateral.scm")  (defprotocol unilateral basic
tst/chan-yahalom-role-decl.tst view
@@ -1,6 +1,6 @@ (herald "Yahalom Protocol Without Forwarding" (bound 15)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/chan-yahalom-role-decl.scm") (comment "Strand count bounded at 15") 
tst/chan-yahalom.tst view
@@ -1,6 +1,6 @@ (herald "Yahalom Protocol Without Forwarding" (bound 15)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/chan-yahalom.scm") (comment "Strand count bounded at 15") 
tst/commitment.tst view
@@ -1,6 +1,6 @@ (herald commitment) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/commitment.scm")  (defprotocol commit basic@@ -20,11 +20,12 @@       (send (enc "receipt" sealed (privk "sig" b))) (recv (cat n quote))       (send (enc "result" a b n quote outcome (privk "sig" b)))))   (defrule cheq-auctioneer-4-    (forall ((z strd) (quote text) (n data) (b a name) (sealed mesg))+    (forall ((z strd) (a b name) (n data) (quote text) (sealed mesg))       (implies-        (and (p "auctioneer" z (idx 4)) (p "auctioneer" "quote" z quote)-          (p "auctioneer" "n" z n) (p "auctioneer" "b" z b)-          (p "auctioneer" "a" z a) (p "auctioneer" "sealed" z sealed))+        (and (p "auctioneer" z (idx 4))+          (p "auctioneer" "sealed" z sealed)+          (p "auctioneer" "quote" z quote) (p "auctioneer" "n" z n)+          (p "auctioneer" "b" z b) (p "auctioneer" "a" z a))         (= sealed (hash a b n quote)))))   (defgenrule neqRl_indx     (forall ((x indx)) (implies (fact neq x x) (false))))@@ -108,11 +109,12 @@       (send (enc "receipt" sealed (privk "sig" b))) (recv (cat n quote))       (send (enc "result" a b n quote outcome (privk "sig" b)))))   (defrule cheq-auctioneer-4-    (forall ((z strd) (quote text) (n data) (b a name) (sealed mesg))+    (forall ((z strd) (a b name) (n data) (quote text) (sealed mesg))       (implies-        (and (p "auctioneer" z (idx 4)) (p "auctioneer" "quote" z quote)-          (p "auctioneer" "n" z n) (p "auctioneer" "b" z b)-          (p "auctioneer" "a" z a) (p "auctioneer" "sealed" z sealed))+        (and (p "auctioneer" z (idx 4))+          (p "auctioneer" "sealed" z sealed)+          (p "auctioneer" "quote" z quote) (p "auctioneer" "n" z n)+          (p "auctioneer" "b" z b) (p "auctioneer" "a" z a))         (= sealed (hash a b n quote)))))   (defgenrule neqRl_indx     (forall ((x indx)) (implies (fact neq x x) (false))))@@ -190,11 +192,12 @@       (send (enc "receipt" sealed (privk "sig" b))) (recv (cat n quote))       (send (enc "result" a b n quote outcome (privk "sig" b)))))   (defrule cheq-auctioneer-4-    (forall ((z strd) (quote text) (n data) (b a name) (sealed mesg))+    (forall ((z strd) (a b name) (n data) (quote text) (sealed mesg))       (implies-        (and (p "auctioneer" z (idx 4)) (p "auctioneer" "quote" z quote)-          (p "auctioneer" "n" z n) (p "auctioneer" "b" z b)-          (p "auctioneer" "a" z a) (p "auctioneer" "sealed" z sealed))+        (and (p "auctioneer" z (idx 4))+          (p "auctioneer" "sealed" z sealed)+          (p "auctioneer" "quote" z quote) (p "auctioneer" "n" z n)+          (p "auctioneer" "b" z b) (p "auctioneer" "a" z a))         (= sealed (hash a b n quote)))))   (defgenrule neqRl_indx     (forall ((x indx)) (implies (fact neq x x) (false))))
tst/comp_test.tst view
@@ -1,6 +1,6 @@ (herald "Main Example") -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/comp_test.scm")  (defprotocol main-ex-src basic
tst/completeness-test.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/completeness-test.scm")  (defprotocol completeness-test basic
tst/crushing.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/crushing.scm")  (defprotocol crushing basic
tst/dass_simple.tst view
@@ -1,6 +1,6 @@ (herald "Distributed Authentication Security Service Protocol Variants") -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/dass_simple.scm")  (defprotocol dass-simple basic
tst/denning-sacco.tst view
@@ -1,6 +1,6 @@ (herald "Denning-Sacco Protocol") -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/denning-sacco.scm")  (defprotocol denning-sacco basic
tst/deorig_contract.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/deorig_contract.scm")  (defprotocol deorig-contract basic
tst/deorig_mesg.tst view
@@ -1,6 +1,6 @@ (herald deorig-mesg) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/deorig_mesg.scm")  (defprotocol deorig-mesg basic
tst/deorig_simple.tst view
@@ -1,6 +1,6 @@ (herald deorig-simple) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/deorig_simple.scm")  (defprotocol deorig-simple basic
tst/dh-ca_hack.tst view
@@ -1,8 +1,7 @@ (herald dhca (algebra basic) (bound 12)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/dh-ca_hack.scm")-(comment "Strand count bounded at 12")  (defprotocol dhca basic   (defrole init
tst/dh_encrypt_hack.tst view
@@ -1,6 +1,6 @@ (herald dhencrypt (algebra basic)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/dh_encrypt_hack.scm")  (defprotocol dhencrypt basic
tst/dh_group_sig.tst view
@@ -1,7 +1,7 @@ (herald "Signed group DH exchange (improved version)"   (algebra diffie-hellman) (limit 100)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/dh_group_sig.scm") (comment "Step count limited to 100") 
tst/dh_group_sig_auth_failure.tst view
@@ -1,7 +1,7 @@ (herald "Signed group DH exchange (version with auth failure)"   (algebra diffie-hellman) (limit 100)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/dh_group_sig_auth_failure.scm") (comment "Step count limited to 100") 
tst/dh_mim_hack.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/dh_mim_hack.scm")  (defprotocol dh_mim basic
tst/dhcr_um.scm view
@@ -36,7 +36,7 @@  (herald "DHCR: unified model (UM) original" 	(bound 20)-	(limit 325)+	(limit 2000) 	(algebra diffie-hellman))  (defmacro (kcfa l gb x gy)@@ -135,8 +135,8 @@ 	 (undisclosed l) 	 (undisclosed l-peer))) -(comment + ; Initiator point of view:  peer exponent secret (defskeleton dhcr-um   (vars (a b name) (l l-peer rndx))@@ -164,7 +164,7 @@   (facts (neq a b) 	 ;;	 (undisclosed l-peer) 	 ;;	 (undisclosed l)-	 )))+	 ))  (comment 					; Initiator point of view: partner's exponent secret
tst/dhcr_um.tst view

file too large to diff

tst/dhcr_um3.tst view
@@ -1,7 +1,7 @@ (herald "DHCR: unified model (UM) three-part" (bound 20) (limit 8000)   (algebra diffie-hellman)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/dhcr_um3.scm") (comment "Step count limited to 8000") (comment "Strand count bounded at 20")
tst/dhcr_um_exercise_resolved_bug.tst view
@@ -1,7 +1,7 @@ (herald "DHCR: unified model (UM) original" (bound 20) (limit 12000)   (algebra diffie-hellman)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/dhcr_um_exercise_resolved_bug.scm") (comment "Step count limited to 12000") (comment "Strand count bounded at 20")@@ -124,17 +124,17 @@     (forall ((z strd))       (implies (p "ltx-disclose" z (idx 2)) (trans z (idx 0)))))   (defgenrule gen-st-init-0-    (forall ((z strd) (l rndx) (a name))+    (forall ((z strd) (a name) (l rndx))       (implies         (and (p "init" z (idx 1)) (p "init" "l" z l) (p "init" "a" z a))         (gen-st (pv a l)))))   (defgenrule gen-st-resp-0-    (forall ((z strd) (l rndx) (b name))+    (forall ((z strd) (b name) (l rndx))       (implies         (and (p "resp" z (idx 1)) (p "resp" "l" z l) (p "resp" "b" z b))         (gen-st (pv b l)))))   (defgenrule gen-st-ltx-disclose-0-    (forall ((z strd) (l rndx) (self name))+    (forall ((z strd) (self name) (l rndx))       (implies         (and (p "ltx-disclose" z (idx 1)) (p "ltx-disclose" "l" z l)           (p "ltx-disclose" "self" z self)) (gen-st (pv self l)))))
tst/dhcr_um_expt.tst view

file too large to diff

tst/dhcr_umx.tst view
@@ -1,7 +1,7 @@ (herald "DHCR: unified model (UM) criss-cross" (bound 20) (limit 8000)   (algebra diffie-hellman)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/dhcr_umx.scm") (comment "Step count limited to 8000") (comment "Strand count bounded at 20")
tst/dhnsl_hack.tst view
@@ -1,7 +1,7 @@ (herald "Diffie-Hellman enhanced Needham-Schroeder-Lowe Protocol"   (algebra basic)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/dhnsl_hack.scm")  (defprotocol dhnsl basic
tst/dhstatic-state.tst view
@@ -1,6 +1,6 @@ (herald dhstatic-state (algebra diffie-hellman) (bound 16)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/dhstatic-state.scm") (comment "Strand count bounded at 16") @@ -79,12 +79,12 @@   (defgenrule fact-init-neq0     (forall ((z strd) (b a name))       (implies-        (and (p "init" z (idx 2)) (p "init" "b" z b) (p "init" "a" z a))+        (and (p "init" z (idx 2)) (p "init" "a" z a) (p "init" "b" z b))         (fact neq a b))))   (defgenrule fact-resp-neq0     (forall ((z strd) (b a name))       (implies-        (and (p "resp" z (idx 2)) (p "resp" "b" z b) (p "resp" "a" z a))+        (and (p "resp" z (idx 2)) (p "resp" "a" z a) (p "resp" "b" z b))         (fact neq a b))))   (defgenrule trRl_get-cert-at-3     (forall ((z strd))@@ -93,16 +93,18 @@     (forall ((z strd))       (implies (p "get-cert" z (idx 4)) (trans z (idx 2)))))   (defgenrule gen-st-init-0-    (forall ((z strd) (serial-a data) (ra rndx) (ca a name))+    (forall ((z strd) (a name) (ra rndx) (serial-a data) (ca name))       (implies-        (and (p "init" z (idx 1)) (p "init" "serial-a" z serial-a)-          (p "init" "ra" z ra) (p "init" "ca" z ca) (p "init" "a" z a))+        (and (p "init" z (idx 1)) (p "init" "ca" z ca)+          (p "init" "serial-a" z serial-a) (p "init" "ra" z ra)+          (p "init" "a" z a))         (gen-st (cat "privkey" a ra serial-a ca)))))   (defgenrule gen-st-resp-0-    (forall ((z strd) (serial-b data) (rb rndx) (ca b name))+    (forall ((z strd) (b name) (rb rndx) (serial-b data) (ca name))       (implies-        (and (p "resp" z (idx 1)) (p "resp" "serial-b" z serial-b)-          (p "resp" "rb" z rb) (p "resp" "ca" z ca) (p "resp" "b" z b))+        (and (p "resp" z (idx 1)) (p "resp" "ca" z ca)+          (p "resp" "serial-b" z serial-b) (p "resp" "rb" z rb)+          (p "resp" "b" z b))         (gen-st (cat "privkey" b rb serial-b ca)))))   (lang (cert-req (tupl 3)) (cert (tupl 4)) (sig sign))) @@ -1531,12 +1533,12 @@   (defgenrule fact-init-neq0     (forall ((z strd) (b a name))       (implies-        (and (p "init" z (idx 2)) (p "init" "b" z b) (p "init" "a" z a))+        (and (p "init" z (idx 2)) (p "init" "a" z a) (p "init" "b" z b))         (fact neq a b))))   (defgenrule fact-resp-neq0     (forall ((z strd) (b a name))       (implies-        (and (p "resp" z (idx 2)) (p "resp" "b" z b) (p "resp" "a" z a))+        (and (p "resp" z (idx 2)) (p "resp" "a" z a) (p "resp" "b" z b))         (fact neq a b))))   (defgenrule trRl_get-cert-at-3     (forall ((z strd))@@ -1545,16 +1547,18 @@     (forall ((z strd))       (implies (p "get-cert" z (idx 4)) (trans z (idx 2)))))   (defgenrule gen-st-init-0-    (forall ((z strd) (serial-a data) (ra rndx) (ca a name))+    (forall ((z strd) (a name) (ra rndx) (serial-a data) (ca name))       (implies-        (and (p "init" z (idx 1)) (p "init" "serial-a" z serial-a)-          (p "init" "ra" z ra) (p "init" "ca" z ca) (p "init" "a" z a))+        (and (p "init" z (idx 1)) (p "init" "ca" z ca)+          (p "init" "serial-a" z serial-a) (p "init" "ra" z ra)+          (p "init" "a" z a))         (gen-st (cat "privkey" a ra serial-a ca)))))   (defgenrule gen-st-resp-0-    (forall ((z strd) (serial-b data) (rb rndx) (ca b name))+    (forall ((z strd) (b name) (rb rndx) (serial-b data) (ca name))       (implies-        (and (p "resp" z (idx 1)) (p "resp" "serial-b" z serial-b)-          (p "resp" "rb" z rb) (p "resp" "ca" z ca) (p "resp" "b" z b))+        (and (p "resp" z (idx 1)) (p "resp" "ca" z ca)+          (p "resp" "serial-b" z serial-b) (p "resp" "rb" z rb)+          (p "resp" "b" z b))         (gen-st (cat "privkey" b rb serial-b ca)))))   (lang (cert-req (tupl 3)) (cert (tupl 4)) (sig sign))) 
tst/disclosure.tst view
@@ -1,6 +1,6 @@ (herald disclosure) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/disclosure.scm")  (defprotocol disc basic
tst/doorsep.tst view
@@ -1,6 +1,6 @@ (herald doorsep (comment "Door Simple Example Protocol")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/doorsep.scm")  (defprotocol doorsep basic
tst/doorsep2invk.tst view
@@ -1,6 +1,6 @@ (herald doorsep2invk (comment "Door Simple Example Protocol")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/doorsep2invk.scm")  (defprotocol doorsep basic
tst/dy.tst view

file too large to diff

tst/encsig.tst view
@@ -1,7 +1,7 @@ (herald "Encrypted Signed Message Example"   (comment "Shows examples of key usage of asymmetric keys")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/encsig.scm")  (defprotocol mult-keys-enc-sig basic
tst/envelope.tst view
@@ -1,6 +1,6 @@ (herald "Envelope Protocol" (bound 15)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/envelope.scm") (comment "Strand count bounded at 15") 
tst/epmo-hash.tst view
@@ -1,7 +1,7 @@ (herald "Electronic Purchase with Money Order Protocol with Key Hashing"   (comment "Annotated with trust management formulas")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/epmo-hash.scm")  (defprotocol epmo basic
tst/epmo-key-hash.tst view
@@ -1,7 +1,7 @@ (herald "Electronic Purchase with Money Order Protocol with Key Hashing"   (comment "Annotated with trust management formulas")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/epmo-key-hash.scm")  (defprotocol epmo basic
tst/epmo.tst view
@@ -1,7 +1,7 @@ (herald "Electronic Purchase with Money Order Protocol"   (comment "Annotated with trust management formulas")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/epmo.scm")  (defprotocol epmo basic
tst/epmo_acctnum-key-hash.tst view
@@ -2,7 +2,7 @@   "Electronic Purchase with Money Order Protocol Variant with Key Hashing"   (comment "This version includes account numbers in exchanges")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/epmo_acctnum-key-hash.scm")  (defprotocol epmo_acctnum basic
tst/expand.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "Expanded macros")  (herald expand (expand) (comment "test macro expansion"))
tst/facts.tst view
@@ -1,6 +1,6 @@ (herald facts) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/facts.scm")  (defprotocol unilateral basic
tst/factvar.tst view
@@ -1,6 +1,6 @@ (herald factvar) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/factvar.scm")  (defprotocol free-fact-var basic
tst/ffgg.tst view
@@ -1,7 +1,7 @@ (herald "The ffgg Protocol"   (comment "From A Necessarily Parallel Attack by Jon K. Millen")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/ffgg.scm")  (defprotocol ffgg basic
tst/fluffy_draft03_gske.tst view
@@ -3,7 +3,7 @@   (comment     "Based on the Internet-Draft: https://www.ietf.org/archive/id/draft-hardjono-ace-fluffy-03.txt")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/fluffy_draft03_gske.scm")  (defprotocol fluffy basic
tst/fragile_pruning.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/fragile_pruning.scm")  (defprotocol fragile_pruning basic
tst/goals.tst view
@@ -1,6 +1,6 @@ (herald goals) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/goals.scm")  (defprotocol ns basic
tst/hashtest-key-hash.tst view
@@ -1,6 +1,6 @@ (herald "Hashtest") -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/hashtest-key-hash.scm")  (defprotocol hashtest basic
tst/hashtest.tst view
@@ -1,6 +1,6 @@ (herald "Hashtest") -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/hashtest.scm")  (defprotocol hashtest basic
tst/incompleteness_example.tst view
@@ -1,7 +1,7 @@ (herald incompleteness-example   (comment "Shows a shape not found by CPSA")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/incompleteness_example.scm")  (defprotocol incompleteness-example basic
tst/isoreject-corrected.tst view
@@ -1,6 +1,6 @@ (herald isoreject-corrected) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/isoreject-corrected.scm")  (defprotocol isofix basic
tst/isoreject.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/isoreject.scm")  (defprotocol isoreject basic
tst/kelly1.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/kelly1.scm")  (defprotocol kelly1 basic
tst/kerberos.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/kerberos.scm")  (defprotocol kerberos basic
tst/locn_envelope.tst view
@@ -1,7 +1,7 @@ (herald "Envelope Protocol, location-based version" (bound 30)   (limit 1200)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/locn_envelope.scm") (comment "Step count limited to 1200") (comment "Strand count bounded at 30")
tst/mass.lsp view
@@ -1,3 +1,6 @@+(herald mass+	(bound 8))+ (defprotocol mass basic   (defrole init     (vars (a b name) (n1 n2 text))
tst/mass.tst view
@@ -1,5 +1,8 @@-(comment "CPSA 4.4.2")+(herald mass (bound 8))++(comment "CPSA 4.4.3") (comment "All input read from tst/mass.lsp")+(comment "Strand count bounded at 8")  (defprotocol mass basic   (defrole init
tst/mass2.lsp view
@@ -1,3 +1,6 @@+(herald mass2+	(bound 8))+ (defprotocol mass2 basic   (defrole init     (vars (a b name) (n1 n2 text))
tst/mass2.tst view
@@ -1,5 +1,8 @@-(comment "CPSA 4.4.2")+(herald mass2 (bound 8))++(comment "CPSA 4.4.3") (comment "All input read from tst/mass2.lsp")+(comment "Strand count bounded at 8")  (defprotocol mass2 basic   (defrole init
tst/missing_contraction.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/missing_contraction.scm")  (defprotocol missing-contraction basic
tst/neq_test.tst view
@@ -2,7 +2,7 @@   (comment "First skeleton should have a shape,"     "second should be dead.")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/neq_test.scm")  (defprotocol neq-test basic
tst/neuman-stubblebine-reauth.tst view
@@ -1,7 +1,8 @@ (herald neuman-stubblebine-reauth (bound 8)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/neuman-stubblebine-reauth.lsp")+(comment "Strand count bounded at 8")  (defprotocol neuman-stubblebine-reauth basic   (defrole init
tst/neuman-stubblebine.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/neuman-stubblebine.scm")  (defprotocol neuman-stubblebine basic
tst/no_contraction.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/no_contraction.scm")  (defprotocol no-contraction basic
tst/non_transforming.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/non_transforming.scm")  (defprotocol non_transforming basic
tst/nonaug-prune.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/nonaug-prune.scm")  (defprotocol nonaug-prune basic
tst/ns-l.tst view
@@ -1,7 +1,7 @@ (herald "Needham-Schroeder-Low Public-Key Protocol"   (comment "With deflistener's")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/ns-l.scm")  (defprotocol ns basic
tst/ns-rebinding.tst view
@@ -1,6 +1,6 @@ (herald "ALternate Needham-Schroeder Public-Key Protocol Variants") -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/ns-rebinding.scm")  (defprotocol ns basic@@ -27,13 +27,13 @@   (defgenrule fact-init-rel11     (forall ((z strd) (n2 n1 text))       (implies-        (and (p "init" z (idx 2)) (p "init" "n2" z n2)-          (p "init" "n1" z n1)) (fact rel1 n1 n2))))+        (and (p "init" z (idx 2)) (p "init" "n1" z n1)+          (p "init" "n2" z n2)) (fact rel1 n1 n2))))   (defgenrule fact-init-rel20     (forall ((z strd) (n2 n1 text))       (implies-        (and (p "init" z (idx 2)) (p "init" "n2" z n2)-          (p "init" "n1" z n1)) (fact rel2 n1 n2))))+        (and (p "init" z (idx 2)) (p "init" "n1" z n1)+          (p "init" "n2" z n2)) (fact rel2 n1 n2))))   (comment "Needham-Schroeder with no role origination assumptions"))  (defskeleton ns@@ -134,13 +134,13 @@   (defgenrule fact-init-rel11     (forall ((z strd) (n2 n1 text))       (implies-        (and (p "init" z (idx 2)) (p "init" "n2" z n2)-          (p "init" "n1" z n1)) (fact rel1 n1 n2))))+        (and (p "init" z (idx 2)) (p "init" "n1" z n1)+          (p "init" "n2" z n2)) (fact rel1 n1 n2))))   (defgenrule fact-init-rel20     (forall ((z strd) (n2 n1 text))       (implies-        (and (p "init" z (idx 2)) (p "init" "n2" z n2)-          (p "init" "n1" z n1)) (fact rel2 n1 n2))))+        (and (p "init" z (idx 2)) (p "init" "n1" z n1)+          (p "init" "n2" z n2)) (fact rel2 n1 n2))))   (comment "Needham-Schroeder with no role origination assumptions"))  (defskeleton ns@@ -242,13 +242,13 @@   (defgenrule fact-init-rel11     (forall ((z strd) (n2 n1 text))       (implies-        (and (p "init" z (idx 2)) (p "init" "n2" z n2)-          (p "init" "n1" z n1)) (fact rel1 n1 n2))))+        (and (p "init" z (idx 2)) (p "init" "n1" z n1)+          (p "init" "n2" z n2)) (fact rel1 n1 n2))))   (defgenrule fact-init-rel20     (forall ((z strd) (n2 n1 text))       (implies-        (and (p "init" z (idx 2)) (p "init" "n2" z n2)-          (p "init" "n1" z n1)) (fact rel2 n1 n2))))+        (and (p "init" z (idx 2)) (p "init" "n1" z n1)+          (p "init" "n2" z n2)) (fact rel2 n1 n2))))   (comment "Needham-Schroeder with no role origination assumptions"))  (defskeleton ns@@ -329,13 +329,13 @@   (defgenrule fact-init-rel11     (forall ((z strd) (n2 n1 text))       (implies-        (and (p "init" z (idx 2)) (p "init" "n2" z n2)-          (p "init" "n1" z n1)) (fact rel1 n1 n2))))+        (and (p "init" z (idx 2)) (p "init" "n1" z n1)+          (p "init" "n2" z n2)) (fact rel1 n1 n2))))   (defgenrule fact-init-rel20     (forall ((z strd) (n2 n1 text))       (implies-        (and (p "init" z (idx 2)) (p "init" "n2" z n2)-          (p "init" "n1" z n1)) (fact rel2 n1 n2))))+        (and (p "init" z (idx 2)) (p "init" "n1" z n1)+          (p "init" "n2" z n2)) (fact rel2 n1 n2))))   (comment "Needham-Schroeder with no role origination assumptions"))  (defskeleton ns@@ -481,13 +481,13 @@   (defgenrule fact-init-rel11     (forall ((z strd) (n2 n1 text))       (implies-        (and (p "init" z (idx 2)) (p "init" "n2" z n2)-          (p "init" "n1" z n1)) (fact rel1 n1 n2))))+        (and (p "init" z (idx 2)) (p "init" "n1" z n1)+          (p "init" "n2" z n2)) (fact rel1 n1 n2))))   (defgenrule fact-init-rel20     (forall ((z strd) (n2 n1 text))       (implies-        (and (p "init" z (idx 2)) (p "init" "n2" z n2)-          (p "init" "n1" z n1)) (fact rel2 n1 n2))))+        (and (p "init" z (idx 2)) (p "init" "n1" z n1)+          (p "init" "n2" z n2)) (fact rel2 n1 n2))))   (comment "Needham-Schroeder with no role origination assumptions"))  (defskeleton ns@@ -717,13 +717,13 @@   (defgenrule fact-init-rel11     (forall ((z strd) (n2 n1 text))       (implies-        (and (p "init" z (idx 2)) (p "init" "n2" z n2)-          (p "init" "n1" z n1)) (fact rel1 n1 n2))))+        (and (p "init" z (idx 2)) (p "init" "n1" z n1)+          (p "init" "n2" z n2)) (fact rel1 n1 n2))))   (defgenrule fact-init-rel20     (forall ((z strd) (n2 n1 text))       (implies-        (and (p "init" z (idx 2)) (p "init" "n2" z n2)-          (p "init" "n1" z n1)) (fact rel2 n1 n2))))+        (and (p "init" z (idx 2)) (p "init" "n1" z n1)+          (p "init" "n2" z n2)) (fact rel2 n1 n2))))   (comment "Needham-Schroeder with no role origination assumptions"))  (defskeleton ns@@ -842,13 +842,13 @@   (defgenrule fact-init-rel11     (forall ((z strd) (n2 n1 text))       (implies-        (and (p "init" z (idx 2)) (p "init" "n2" z n2)-          (p "init" "n1" z n1)) (fact rel1 n1 n2))))+        (and (p "init" z (idx 2)) (p "init" "n1" z n1)+          (p "init" "n2" z n2)) (fact rel1 n1 n2))))   (defgenrule fact-init-rel20     (forall ((z strd) (n2 n1 text))       (implies-        (and (p "init" z (idx 2)) (p "init" "n2" z n2)-          (p "init" "n1" z n1)) (fact rel2 n1 n2))))+        (and (p "init" z (idx 2)) (p "init" "n1" z n1)+          (p "init" "n2" z n2)) (fact rel2 n1 n2))))   (comment "Needham-Schroeder with no role origination assumptions"))  (defskeleton ns
tst/ns.tst view
@@ -1,6 +1,6 @@ (herald "Needham-Schroeder Public-Key Protocol Variants") -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/ns.scm")  (defprotocol ns basic
tst/nsl3.tst view
@@ -1,6 +1,6 @@ (herald "Three Party Needham-Schroeder-Lowe Protocol") -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/nsl3.scm")  (defprotocol nsl3 basic
tst/nslsk.tst view
@@ -1,6 +1,6 @@ (herald "Needham-Schroeder-Lowe Protocol with symmetric encryption") -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/nslsk.scm")  (defprotocol nslsk basic
tst/open-closed-multiloc.tst view
@@ -1,6 +1,6 @@ (herald open-closed (bound 44)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/open-closed-multiloc.scm") (comment "Strand count bounded at 44") @@ -118,12 +118,12 @@     (forall ((z strd))       (implies (p "dev-close" z (idx 4)) (trans z (idx 2)))))   (defgenrule eff-dev-up-3-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-up" z (idx 4)) (prec z (idx 3) z1 i))         (or (= z z1)           (and (p "dev-up" z (idx 5)) (prec z (idx 4) z1 i))))))   (defgenrule cau-dev-up-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-up" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))) @@ -298,12 +298,12 @@     (forall ((z strd))       (implies (p "dev-close" z (idx 4)) (trans z (idx 2)))))   (defgenrule eff-dev-up-3-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-up" z (idx 4)) (prec z (idx 3) z1 i))         (or (= z z1)           (and (p "dev-up" z (idx 5)) (prec z (idx 4) z1 i))))))   (defgenrule cau-dev-up-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-up" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))) @@ -476,12 +476,12 @@     (forall ((z strd))       (implies (p "dev-close" z (idx 4)) (trans z (idx 2)))))   (defgenrule eff-dev-up-3-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-up" z (idx 4)) (prec z (idx 3) z1 i))         (or (= z z1)           (and (p "dev-up" z (idx 5)) (prec z (idx 4) z1 i))))))   (defgenrule cau-dev-up-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-up" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))) 
tst/open-closed-tag.tst view
@@ -1,6 +1,6 @@ (herald open-closed (bound 44)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/open-closed-tag.scm") (comment "Strand count bounded at 44") 
tst/open-closed.tst view
@@ -1,6 +1,6 @@ (herald open-closed (bound 44)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/open-closed.scm") (comment "Strand count bounded at 44") 
tst/or.tst view
@@ -1,7 +1,7 @@ (herald "Otway-Rees Protocol"   (comment "Standard version using variables of sort mesg")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/or.scm")  (defprotocol or basic
tst/ordered.tst view
@@ -1,6 +1,6 @@ (herald ordered) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/ordered.scm")  (defprotocol ordered basic
tst/pca.tst view
@@ -1,7 +1,7 @@ (herald "Privacy Certificate Authority" (bound 15)   (comment "Generation of an Attestation Identity Certificate")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/pca.scm") (comment "Strand count bounded at 15") 
tst/pen-non-orig-test.tst view
@@ -1,6 +1,6 @@ (herald "pen-non-orig test") -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/pen-non-orig-test.scm")  (defprotocol pennonorigtest basic
tst/pfs-via-pubkey.tst view
@@ -1,6 +1,6 @@ (herald pfs-via-pubkey) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/pfs-via-pubkey.scm")  (defprotocol pfs-easy basic
tst/pkinit.tst view
@@ -1,6 +1,6 @@ (herald "Kerberos PK init") -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/pkinit.scm")  (defprotocol pkinit basic
tst/preprocess.tst view
@@ -1,6 +1,6 @@ (herald "Pre-processing test example: modified NS with two responders") -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/preprocess.scm")  (defprotocol ns basic
tst/print.tst view
@@ -1,7 +1,7 @@ (herald "Print Test"   (comment "See if read forms look like printed ones")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/print.scm")  (defprotocol print-test basic
tst/prottrans.tst view
@@ -1,6 +1,6 @@ (herald "Protocol Transformations With Rules") -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/prottrans.scm")  (defprotocol ns basic
tst/pruning1.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/pruning1.scm")  (defprotocol prune basic
tst/puzzle_example.tst view
@@ -1,6 +1,6 @@ (herald puzzle_example) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/puzzle_example.scm")  (defprotocol puzzle basic
tst/reflect.tst view
@@ -1,6 +1,6 @@ (herald reflect) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/reflect.scm")  (defprotocol reflect basic
tst/renamings.tst view
@@ -2,7 +2,7 @@   (comment "There is a flaw in this protocol by design")   (comment "It also shows how variable renaming works")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/renamings.scm")  (defprotocol blanchet basic
tst/role_uniq.tst view
@@ -1,6 +1,6 @@ (herald "Role Unique Origination") -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/role_uniq.scm")  (defprotocol blanchet basic
tst/rule-node.tst view
@@ -1,6 +1,6 @@ (herald rule-node) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/rule-node.scm")  (defprotocol rule-order basic@@ -99,6 +99,19 @@   (comment "Not closed under rules"))  (defskeleton rule-order+  (vars (s text))+  (defstrand init 2 (s s) (t s))+  (facts (le 0 (idx 0) 0 (idx 1)) (lt 0 (idx 0) 0 (idx 1)) (le 0 0 0 0))+  (rule le-lt lt-le prec-lt)+  (traces ((send (cat s s)) (recv (cat s s))))+  (label 3)+  (parent 2)+  (realized)+  (shape)+  (maps)+  (origs))++(defskeleton rule-order   (vars (s t text))   (defstrand init 2 (s s) (t t))   (defstrand init 2 (s t) (t s))@@ -110,11 +123,25 @@   (rule le-lt lt-le prec-lt)   (traces ((send (cat s t)) (recv (cat t s)))     ((send (cat t s)) (recv (cat s t))))-  (label 3)+  (label 4)   (parent 2)+  (seen 3 5)   (realized)+  (origs)+  (comment "2 in cohort - 0 not yet seen"))++(defskeleton rule-order+  (vars (s text))+  (defstrand init 2 (s s) (t s))+  (facts (lt 0 0 0 1) (le 0 (idx 0) 0 (idx 1)) (lt 0 (idx 0) 0 (idx 1))+    (le 0 0 0 0))+  (rule le-lt lt-le prec-lt)+  (traces ((send (cat s s)) (recv (cat s s))))+  (label 5)+  (parent 2)+  (realized)   (shape)-  (maps ((0 1) ((s s) (t t))))+  (maps)   (origs))  (comment "Nothing left to do")@@ -137,7 +164,7 @@   (vars (s t text))   (defstrand init 2 (s s) (t t))   (traces ((send (cat s t)) (recv (cat t s))))-  (label 4)+  (label 6)   (realized)   (origs)   (comment "Not closed under rules"))@@ -148,8 +175,8 @@   (facts (tell-me 0 (idx 0) 0 (idx 1)))   (rule prec-tell-me)   (traces ((send (cat s t)) (recv (cat t s))))-  (label 5)-  (parent 4)+  (label 7)+  (parent 6)   (realized)   (shape)   (maps ((0) ((s s) (t t))))@@ -178,7 +205,7 @@   (precedes ((1 0) (0 1)))   (traces ((send (cat s t)) (recv (cat t s)))     ((send (cat t s)) (recv (cat s t))))-  (label 6)+  (label 8)   (realized)   (origs)   (comment "Not closed under rules"))@@ -193,13 +220,26 @@   (rule prec-tell-me)   (traces ((send (cat s t)) (recv (cat t s)))     ((send (cat t s)) (recv (cat s t))))-  (label 7)-  (parent 6)+  (label 9)+  (parent 8)   (realized)   (shape)   (maps ((0 1) ((s s) (t t))))   (origs)) +(defskeleton rule-order-prec+  (vars (s text))+  (defstrand init 2 (s s) (t s))+  (facts (tell-me 0 (idx 0) 0 (idx 1)))+  (operation collapsed 1 0)+  (traces ((send (cat s s)) (recv (cat s s))))+  (label 10)+  (parent 9)+  (realized)+  (shape)+  (maps)+  (origs))+ (comment "Nothing left to do")  (defprotocol rule-order-prec basic@@ -223,7 +263,7 @@   (precedes ((1 0) (0 1)))   (traces ((send (cat s t)) (recv (cat t s)))     ((send (cat s t)) (recv (cat t s))))-  (label 8)+  (label 11)   (realized)   (origs)   (comment "Not closed under rules"))@@ -238,11 +278,24 @@   (rule prec-tell-me)   (traces ((send (cat s t)) (recv (cat t s)))     ((send (cat s t)) (recv (cat t s))))-  (label 9)-  (parent 8)+  (label 12)+  (parent 11)   (realized)   (shape)   (maps ((0 1) ((s s) (t t))))+  (origs))++(defskeleton rule-order-prec+  (vars (s t text))+  (defstrand init 2 (s s) (t t))+  (facts (tell-me 0 (idx 0) 0 (idx 1)))+  (operation collapsed 1 0)+  (traces ((send (cat s t)) (recv (cat t s))))+  (label 13)+  (parent 12)+  (realized)+  (shape)+  (maps)   (origs))  (comment "Nothing left to do")
tst/rule-order.tst view
@@ -1,6 +1,6 @@ (herald rule-order) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/rule-order.scm")  (defprotocol rule-order basic
tst/sigenc.tst view
@@ -1,7 +1,7 @@ (herald "Signed Encrypted Message Example"   (comment "Shows examples of key usage of asymmetric keys")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/sigenc.scm")  (defprotocol mult-keys-sig-enc basic
tst/sorted_epmo_acctnum.tst view
@@ -4,9 +4,8 @@     "This version uses sorts to avoid confusion"     "between a nonce and other data")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/sorted_epmo_acctnum.scm")-(comment "Strand count bounded at 12")  (defprotocol sorted_epmo_acctnum basic   (defrole bank
tst/sts.tst view
@@ -1,7 +1,7 @@ (herald "Station-to-station protocol" (bound 20)   (algebra diffie-hellman)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/sts.scm") (comment "Strand count bounded at 20") @@ -1598,7 +1598,7 @@   (label 43)   (parent 41)   (unrealized (0 2) (1 0))-  (comment "1 in cohort - 1 not yet seen"))+  (comment "2 in cohort - 2 not yet seen"))  (defskeleton station-to-station   (vars (a b name) (x y rndx))@@ -1669,6 +1669,27 @@   (comment "2 in cohort - 2 not yet seen"))  (defskeleton station-to-station+  (vars (a b name) (y rndx))+  (defstrand resp 3 (a a) (b b) (h (gen)) (y y))+  (deflistener (exp (gen) y))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (privk a) (privk b))+  (uniq-gen y)+  (operation nonce-test (displaced 2 0 resp 2) (exp (gen) y-0) (1 0))+  (traces+    ((recv (gen))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (gen) (privk b)) (exp (gen) y))))+      (recv (enc (enc (gen) (exp (gen) y) (privk a)) (exp (gen) y))))+    ((recv (exp (gen) y)) (send (exp (gen) y))))+  (label 46)+  (parent 43)+  (unrealized (0 2))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station   (vars (a b name) (h base) (y rndx) (w expt))   (defstrand resp 3 (a a) (b b) (h h) (y y))   (deflistener (exp h y))@@ -1688,11 +1709,10 @@     ((recv (exp h y)) (send (exp h y)))     ((recv (cat (exp h (mul y (rec w))) w))       (send (cat (exp h (mul y (rec w))) w))))-  (label 46)+  (label 47)   (parent 43)   (unrealized (0 2) (2 0))-  (dead)-  (comment "empty cohort"))+  (comment "1 in cohort - 1 not yet seen"))  (defskeleton station-to-station   (vars (a b b-0 name) (y x rndx))@@ -1725,7 +1745,7 @@           (exp (gen) (mul y x)))))     ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))     ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x))))-  (label 47)+  (label 48)   (parent 45)   (unrealized (3 0))   (dead)@@ -1762,12 +1782,238 @@           (exp (gen) (mul y x)))))     ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))     ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y))))-  (label 48)+  (label 49)   (parent 45)   (unrealized (3 0))   (dead)   (comment "empty cohort")) +(defskeleton station-to-station+  (vars (a b name) (w expt) (y rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) w)) (y y))+  (deflistener (exp (gen) (mul w y)))+  (deflistener (cat (exp (gen) y) w))+  (precedes ((0 1) (2 0)) ((1 1) (0 2)) ((2 1) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen y)+  (precur (2 0))+  (operation nonce-test (displaced 3 0 resp 2) (exp (gen) y-0) (2 0))+  (traces+    ((recv (exp (gen) w))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) w) (privk b))+            (exp (gen) (mul w y)))))+      (recv+        (enc (enc (exp (gen) w) (exp (gen) y) (privk a))+          (exp (gen) (mul w y)))))+    ((recv (exp (gen) (mul w y))) (send (exp (gen) (mul w y))))+    ((recv (cat (exp (gen) y) w)) (send (cat (exp (gen) y) w))))+  (label 50)+  (parent 47)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (precedes ((0 1) (2 0)) ((0 1) (3 1)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (0 2)))+  (non-orig (privk a) (privk b))+  (uniq-gen y x)+  (precur (2 0))+  (operation encryption-test (added-strand init 3)+    (enc (exp (gen) x) (exp (gen) y) (privk a)) (0 2))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul y x))))))+  (label 51)+  (parent 50)+  (unrealized (2 0) (3 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station+  (vars (a b name) (x y rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul x y)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))+  (precedes ((0 1) (2 0)) ((0 1) (3 1)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (0 2)))+  (non-orig (privk a) (privk b))+  (uniq-gen x y)+  (precur (2 0))+  (operation encryption-test (displaced 4 0 resp 2)+    (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+      (exp (gen) (mul x y))) (3 1))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (recv+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul x y)))))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul x y))))))+  (label 52)+  (parent 51)+  (unrealized (2 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (precedes ((0 1) (2 0)) ((0 1) (4 0)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (0 2)) ((4 1) (3 1)))+  (non-orig (privk a) (privk b))+  (uniq-gen y x)+  (precur (2 0))+  (operation encryption-test (added-listener (exp (gen) (mul y x)))+    (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+      (exp (gen) (mul y x))) (3 1))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x)))))+  (label 53)+  (parent 51)+  (unrealized (2 0) (4 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (precedes ((0 1) (2 0)) ((0 1) (5 0)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (0 2)) ((4 1) (3 1)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen y x)+  (precur (2 0))+  (operation nonce-test (added-listener (cat (exp (gen) y) x))+    (exp (gen) (mul y x)) (4 0))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x))))+  (label 54)+  (parent 53)+  (unrealized (2 0) (5 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) x) y))+  (precedes ((0 1) (2 0)) ((0 1) (5 0)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (0 2)) ((4 1) (3 1)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen y x)+  (precur (2 0))+  (operation nonce-test (added-listener (cat (exp (gen) x) y))+    (exp (gen) (mul y x)) (4 0))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y))))+  (label 55)+  (parent 53)+  (unrealized (2 0) (5 0))+  (dead)+  (comment "empty cohort"))+ (comment "Nothing left to do")  (defprotocol station-to-station diffie-hellman@@ -1805,7 +2051,7 @@       (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))       (send (enc (enc (exp (gen) x) h (privk a)) (exp h x))))     ((recv (exp h x)) (send (exp h x))))-  (label 49)+  (label 56)   (unrealized (0 1) (1 0))   (preskeleton)   (origs)@@ -1823,8 +2069,8 @@       (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))       (send (enc (enc (exp (gen) x) h (privk a)) (exp h x))))     ((recv (exp h x)) (send (exp h x))))-  (label 50)-  (parent 49)+  (label 57)+  (parent 56)   (unrealized (0 1) (1 0))   (origs)   (comment "5 in cohort - 5 not yet seen"))@@ -1844,8 +2090,8 @@           (enc (enc (gen) (exp (gen) x) (privk b)) (exp (gen) x))))       (send (enc (enc (exp (gen) x) (gen) (privk a)) (exp (gen) x))))     ((recv (exp (gen) x)) (send (exp (gen) x))))-  (label 51)-  (parent 50)+  (label 58)+  (parent 57)   (unrealized (0 1))   (dead)   (origs)@@ -1869,8 +2115,8 @@       (send         (enc (enc (exp (gen) x) (exp (gen) (rec x)) (privk a)) (gen))))     ((recv (gen)) (send (gen))))-  (label 52)-  (parent 50)+  (label 59)+  (parent 57)   (unrealized (0 1))   (dead)   (origs)@@ -1897,8 +2143,8 @@           (exp (gen) x-0))))     ((recv (exp (gen) x-0)) (send (exp (gen) x-0)))     ((send (exp (gen) x-0))))-  (label 53)-  (parent 50)+  (label 60)+  (parent 57)   (unrealized (0 1))   (dead)   (comment "empty cohort"))@@ -1925,8 +2171,8 @@       (send         (cat (exp (gen) y)           (enc (enc (exp (gen) y) h (privk b-0)) (exp h y))))))-  (label 54)-  (parent 50)+  (label 61)+  (parent 57)   (unrealized (0 1))   (dead)   (comment "empty cohort"))@@ -1949,8 +2195,8 @@     ((recv (exp h x)) (send (exp h x)))     ((recv (cat (exp h (mul x (rec w))) w))       (send (cat (exp h (mul x (rec w))) w))))-  (label 55)-  (parent 50)+  (label 62)+  (parent 57)   (unrealized (0 1) (2 0))   (comment "4 in cohort - 4 not yet seen")) @@ -1975,8 +2221,8 @@           (exp (gen) (mul w x)))))     ((recv (exp (gen) (mul w x))) (send (exp (gen) (mul w x))))     ((recv (cat (exp (gen) x) w)) (send (cat (exp (gen) x) w))))-  (label 56)-  (parent 55)+  (label 63)+  (parent 62)   (unrealized (0 1))   (comment "2 in cohort - 2 not yet seen")) @@ -2001,8 +2247,8 @@         (enc (enc (exp (gen) x) (exp (gen) (mul (rec x) w)) (privk a))           (exp (gen) w)))) ((recv (exp (gen) w)) (send (exp (gen) w)))     ((recv (cat (gen) w)) (send (cat (gen) w))))-  (label 57)-  (parent 55)+  (label 64)+  (parent 62)   (unrealized (0 1))   (comment "2 in cohort - 2 not yet seen")) @@ -2032,8 +2278,8 @@     ((recv (exp (gen) (mul w x-0))) (send (exp (gen) (mul w x-0))))     ((recv (cat (exp (gen) x-0) w)) (send (cat (exp (gen) x-0) w)))     ((send (exp (gen) x-0))))-  (label 58)-  (parent 55)+  (label 65)+  (parent 62)   (unrealized (0 1))   (comment "3 in cohort - 3 not yet seen")) @@ -2064,8 +2310,8 @@       (send         (cat (exp (gen) y)           (enc (enc (exp (gen) y) h (privk b-0)) (exp h y))))))-  (label 59)-  (parent 55)+  (label 66)+  (parent 62)   (unrealized (0 1))   (comment "3 in cohort - 3 not yet seen")) @@ -2101,8 +2347,8 @@       (send         (enc (enc (exp (gen) x-0) (exp (gen) x) (privk b))           (exp (gen) (mul x x-0))))))-  (label 60)-  (parent 56)+  (label 67)+  (parent 63)   (unrealized (2 0) (3 1))   (comment "1 in cohort - 1 not yet seen")) @@ -2134,8 +2380,8 @@         (cat (exp (gen) y)           (enc (enc (exp (gen) y) (exp (gen) x) (privk b))             (exp (gen) (mul x y)))))))-  (label 61)-  (parent 56)+  (label 68)+  (parent 63)   (unrealized (2 0))   (dead)   (comment "empty cohort"))@@ -2172,8 +2418,8 @@       (send         (enc (enc (exp (gen) x-0) (exp (gen) x) (privk b))           (exp (gen) (mul x x-0))))))-  (label 62)-  (parent 57)+  (label 69)+  (parent 64)   (unrealized (1 0) (2 0) (3 1))   (comment "1 in cohort - 1 not yet seen")) @@ -2205,8 +2451,8 @@         (cat (exp (gen) y)           (enc (enc (exp (gen) y) (exp (gen) x) (privk b))             (exp (gen) (mul x y)))))))-  (label 63)-  (parent 57)+  (label 70)+  (parent 64)   (unrealized (1 0) (2 0))   (dead)   (comment "empty cohort"))@@ -2243,8 +2489,8 @@       (send         (enc (enc (exp (gen) x-0) (exp (gen) x) (privk b))           (exp (gen) (mul x x-0))))))-  (label 64)-  (parent 58)+  (label 71)+  (parent 65)   (unrealized (2 0) (3 1))   (comment "1 in cohort - 1 not yet seen")) @@ -2283,8 +2529,8 @@       (send         (enc (enc (exp (gen) x-1) (exp (gen) x) (privk b))           (exp (gen) (mul x x-1))))))-  (label 65)-  (parent 58)+  (label 72)+  (parent 65)   (unrealized (1 0) (2 0) (4 1))   (comment "1 in cohort - 1 not yet seen")) @@ -2320,8 +2566,8 @@         (cat (exp (gen) y)           (enc (enc (exp (gen) y) (exp (gen) x) (privk b))             (exp (gen) (mul x y)))))))-  (label 66)-  (parent 58)+  (label 73)+  (parent 65)   (unrealized (1 0) (2 0))   (dead)   (comment "empty cohort"))@@ -2364,8 +2610,8 @@       (send         (enc (enc (exp (gen) x-0) (exp (gen) x) (privk b))           (exp (gen) (mul x x-0))))))-  (label 67)-  (parent 59)+  (label 74)+  (parent 66)   (unrealized (1 0) (2 0) (4 1))   (comment "1 in cohort - 1 not yet seen")) @@ -2397,8 +2643,8 @@         (cat (exp (gen) y)           (enc (enc (exp (gen) y) (exp (gen) x) (privk b))             (exp (gen) (mul x y)))))))-  (label 68)-  (parent 59)+  (label 75)+  (parent 66)   (unrealized (2 0))   (dead)   (comment "empty cohort"))@@ -2438,8 +2684,8 @@         (cat (exp (gen) y-0)           (enc (enc (exp (gen) y-0) (exp (gen) x) (privk b))             (exp (gen) (mul x y-0)))))))-  (label 69)-  (parent 59)+  (label 76)+  (parent 66)   (unrealized (1 0) (2 0))   (dead)   (comment "empty cohort"))@@ -2479,8 +2725,8 @@         (enc (enc (exp (gen) x-0) (exp (gen) x) (privk b))           (exp (gen) (mul x x-0)))))     ((recv (exp (gen) (mul x x-0))) (send (exp (gen) (mul x x-0)))))-  (label 70)-  (parent 60)+  (label 77)+  (parent 67)   (unrealized (2 0) (4 0))   (comment "2 in cohort - 2 not yet seen")) @@ -2519,8 +2765,8 @@         (enc (enc (exp (gen) x-0) (exp (gen) x) (privk b))           (exp (gen) (mul x x-0)))))     ((recv (exp (gen) (mul x x-0))) (send (exp (gen) (mul x x-0)))))-  (label 71)-  (parent 62)+  (label 78)+  (parent 69)   (unrealized (1 0) (2 0) (4 0))   (comment "2 in cohort - 2 not yet seen")) @@ -2559,8 +2805,8 @@         (enc (enc (exp (gen) x-0) (exp (gen) x) (privk b))           (exp (gen) (mul x x-0)))))     ((recv (exp (gen) (mul x x-0))) (send (exp (gen) (mul x x-0)))))-  (label 72)-  (parent 64)+  (label 79)+  (parent 71)   (unrealized (2 0) (4 0))   (comment "2 in cohort - 2 not yet seen")) @@ -2603,8 +2849,8 @@         (enc (enc (exp (gen) x-1) (exp (gen) x) (privk b))           (exp (gen) (mul x x-1)))))     ((recv (exp (gen) (mul x x-1))) (send (exp (gen) (mul x x-1)))))-  (label 73)-  (parent 65)+  (label 80)+  (parent 72)   (unrealized (1 0) (2 0) (5 0))   (comment "2 in cohort - 2 not yet seen")) @@ -2650,8 +2896,8 @@         (enc (enc (exp (gen) x-0) (exp (gen) x) (privk b))           (exp (gen) (mul x x-0)))))     ((recv (exp (gen) (mul x x-0))) (send (exp (gen) (mul x x-0)))))-  (label 74)-  (parent 67)+  (label 81)+  (parent 74)   (unrealized (1 0) (2 0) (5 0))   (comment "2 in cohort - 2 not yet seen")) @@ -2691,8 +2937,8 @@           (exp (gen) (mul x x-0)))))     ((recv (exp (gen) (mul x x-0))) (send (exp (gen) (mul x x-0))))     ((recv (cat (exp (gen) x) x-0)) (send (cat (exp (gen) x) x-0))))-  (label 75)-  (parent 70)+  (label 82)+  (parent 77)   (unrealized (2 0) (5 0))   (dead)   (comment "empty cohort"))@@ -2733,8 +2979,8 @@           (exp (gen) (mul x x-0)))))     ((recv (exp (gen) (mul x x-0))) (send (exp (gen) (mul x x-0))))     ((recv (cat (exp (gen) x-0) x)) (send (cat (exp (gen) x-0) x))))-  (label 76)-  (parent 70)+  (label 83)+  (parent 77)   (unrealized (2 0) (5 0))   (dead)   (comment "empty cohort"))@@ -2775,8 +3021,8 @@           (exp (gen) (mul x x-0)))))     ((recv (exp (gen) (mul x x-0))) (send (exp (gen) (mul x x-0))))     ((recv (cat (exp (gen) x) x-0)) (send (cat (exp (gen) x) x-0))))-  (label 77)-  (parent 71)+  (label 84)+  (parent 78)   (unrealized (1 0) (2 0) (5 0))   (dead)   (comment "empty cohort"))@@ -2817,8 +3063,8 @@           (exp (gen) (mul x x-0)))))     ((recv (exp (gen) (mul x x-0))) (send (exp (gen) (mul x x-0))))     ((recv (cat (exp (gen) x-0) x)) (send (cat (exp (gen) x-0) x))))-  (label 78)-  (parent 71)+  (label 85)+  (parent 78)   (unrealized (1 0) (2 0) (5 0))   (dead)   (comment "empty cohort"))@@ -2859,8 +3105,8 @@           (exp (gen) (mul x x-0)))))     ((recv (exp (gen) (mul x x-0))) (send (exp (gen) (mul x x-0))))     ((recv (cat (exp (gen) x) x-0)) (send (cat (exp (gen) x) x-0))))-  (label 79)-  (parent 72)+  (label 86)+  (parent 79)   (unrealized (2 0) (5 0))   (dead)   (comment "empty cohort"))@@ -2901,8 +3147,8 @@           (exp (gen) (mul x x-0)))))     ((recv (exp (gen) (mul x x-0))) (send (exp (gen) (mul x x-0))))     ((recv (cat (exp (gen) x-0) x)) (send (cat (exp (gen) x-0) x))))-  (label 80)-  (parent 72)+  (label 87)+  (parent 79)   (unrealized (2 0) (5 0))   (dead)   (comment "empty cohort"))@@ -2947,8 +3193,8 @@           (exp (gen) (mul x x-1)))))     ((recv (exp (gen) (mul x x-1))) (send (exp (gen) (mul x x-1))))     ((recv (cat (exp (gen) x) x-1)) (send (cat (exp (gen) x) x-1))))-  (label 81)-  (parent 73)+  (label 88)+  (parent 80)   (unrealized (1 0) (2 0) (6 0))   (dead)   (comment "empty cohort"))@@ -2993,8 +3239,8 @@           (exp (gen) (mul x x-1)))))     ((recv (exp (gen) (mul x x-1))) (send (exp (gen) (mul x x-1))))     ((recv (cat (exp (gen) x-1) x)) (send (cat (exp (gen) x-1) x))))-  (label 82)-  (parent 73)+  (label 89)+  (parent 80)   (unrealized (1 0) (2 0) (6 0))   (dead)   (comment "empty cohort"))@@ -3042,8 +3288,8 @@           (exp (gen) (mul x x-0)))))     ((recv (exp (gen) (mul x x-0))) (send (exp (gen) (mul x x-0))))     ((recv (cat (exp (gen) x) x-0)) (send (cat (exp (gen) x) x-0))))-  (label 83)-  (parent 74)+  (label 90)+  (parent 81)   (unrealized (1 0) (2 0) (6 0))   (dead)   (comment "empty cohort"))@@ -3091,8 +3337,8 @@           (exp (gen) (mul x x-0)))))     ((recv (exp (gen) (mul x x-0))) (send (exp (gen) (mul x x-0))))     ((recv (cat (exp (gen) x-0) x)) (send (cat (exp (gen) x-0) x))))-  (label 84)-  (parent 74)+  (label 91)+  (parent 81)   (unrealized (1 0) (2 0) (6 0))   (dead)   (comment "empty cohort"))@@ -3136,7 +3382,7 @@           (enc (enc (exp (gen) y) h (privk b)) (exp h y))))       (recv (enc (enc h (exp (gen) y) (privk a)) (exp h y))))     ((recv (exp h y)) (send (exp h y))))-  (label 85)+  (label 92)   (unrealized (0 2) (1 0))   (preskeleton)   (origs)@@ -3156,13 +3402,35 @@           (enc (enc (exp (gen) y) h (privk b)) (exp h y))))       (recv (enc (enc h (exp (gen) y) (privk a)) (exp h y))))     ((recv (exp h y)) (send (exp h y))))-  (label 86)-  (parent 85)+  (label 93)+  (parent 92)   (unrealized (0 2) (1 0))   (origs)-  (comment "1 in cohort - 1 not yet seen"))+  (comment "2 in cohort - 2 not yet seen"))  (defskeleton station-to-station+  (vars (a b name) (y rndx))+  (defstrand resp 3 (a a) (b b) (h (gen)) (y y))+  (deflistener (exp (gen) y))+  (precedes ((0 1) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen y)+  (operation nonce-test (displaced 2 0 resp 2) (exp (gen) y-0) (1 0))+  (traces+    ((recv (gen))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (gen) (privk b)) (exp (gen) y))))+      (recv (enc (enc (gen) (exp (gen) y) (privk a)) (exp (gen) y))))+    ((recv (exp (gen) y)) (send (exp (gen) y))))+  (label 94)+  (parent 93)+  (unrealized (0 2))+  (dead)+  (origs)+  (comment "empty cohort"))++(defskeleton station-to-station   (vars (a b name) (h base) (y rndx) (w expt))   (defstrand resp 3 (a a) (b b) (h h) (y y))   (deflistener (exp h y))@@ -3182,12 +3450,237 @@     ((recv (exp h y)) (send (exp h y)))     ((recv (cat (exp h (mul y (rec w))) w))       (send (cat (exp h (mul y (rec w))) w))))-  (label 87)-  (parent 86)+  (label 95)+  (parent 93)   (unrealized (0 2) (2 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station+  (vars (a b name) (w expt) (y rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) w)) (y y))+  (deflistener (exp (gen) (mul w y)))+  (deflistener (cat (exp (gen) y) w))+  (precedes ((0 1) (2 0)) ((2 1) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen y)+  (precur (2 0))+  (operation nonce-test (displaced 3 0 resp 2) (exp (gen) y-0) (2 0))+  (traces+    ((recv (exp (gen) w))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) w) (privk b))+            (exp (gen) (mul w y)))))+      (recv+        (enc (enc (exp (gen) w) (exp (gen) y) (privk a))+          (exp (gen) (mul w y)))))+    ((recv (exp (gen) (mul w y))) (send (exp (gen) (mul w y))))+    ((recv (cat (exp (gen) y) w)) (send (cat (exp (gen) y) w))))+  (label 96)+  (parent 95)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (precedes ((0 1) (2 0)) ((0 1) (3 1)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (0 2)))+  (non-orig (privk a) (privk b))+  (uniq-gen y x)+  (precur (2 0))+  (operation encryption-test (added-strand init 3)+    (enc (exp (gen) x) (exp (gen) y) (privk a)) (0 2))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul y x))))))+  (label 97)+  (parent 96)+  (unrealized (2 0) (3 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station+  (vars (a b name) (x y rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul x y)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))+  (precedes ((0 1) (2 0)) ((0 1) (3 1)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (0 2)))+  (non-orig (privk a) (privk b))+  (uniq-gen x y)+  (precur (2 0))+  (operation encryption-test (displaced 4 0 resp 2)+    (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+      (exp (gen) (mul x y))) (3 1))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (recv+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul x y)))))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul x y))))))+  (label 98)+  (parent 97)+  (unrealized (2 0))   (dead)   (comment "empty cohort")) +(defskeleton station-to-station+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (precedes ((0 1) (2 0)) ((0 1) (4 0)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (0 2)) ((4 1) (3 1)))+  (non-orig (privk a) (privk b))+  (uniq-gen y x)+  (precur (2 0))+  (operation encryption-test (added-listener (exp (gen) (mul y x)))+    (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+      (exp (gen) (mul y x))) (3 1))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x)))))+  (label 99)+  (parent 97)+  (unrealized (2 0) (4 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (precedes ((0 1) (2 0)) ((0 1) (5 0)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (0 2)) ((4 1) (3 1)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen y x)+  (precur (2 0))+  (operation nonce-test (added-listener (cat (exp (gen) y) x))+    (exp (gen) (mul y x)) (4 0))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x))))+  (label 100)+  (parent 99)+  (unrealized (2 0) (5 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) x) y))+  (precedes ((0 1) (2 0)) ((0 1) (5 0)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (0 2)) ((4 1) (3 1)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen y x)+  (precur (2 0))+  (operation nonce-test (added-listener (cat (exp (gen) x) y))+    (exp (gen) (mul y x)) (4 0))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) x) (exp (gen) y) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y))))+  (label 101)+  (parent 99)+  (unrealized (2 0) (5 0))+  (dead)+  (comment "empty cohort"))+ (comment "Nothing left to do")  (defprotocol station-to-station diffie-hellman@@ -3238,7 +3731,7 @@       (recv         (enc (enc (exp (gen) x) (exp (gen) y) (privk a-0))           (exp (gen) (mul x y)))) (send (privk b))))-  (label 88)+  (label 102)   (unrealized (1 2))   (origs ((privk b) (1 3)) ((privk a) (0 3)))   (comment "2 in cohort - 2 not yet seen"))@@ -3270,8 +3763,8 @@       (recv         (enc (enc (exp (gen) x) (exp (gen) y) (privk a))           (exp (gen) (mul y x)))) (send (privk b))))-  (label 89)-  (parent 88)+  (label 103)+  (parent 102)   (realized)   (shape)   (maps ((0 1) ((a a) (b b) (x x) (y y) (a-0 a))))@@ -3306,8 +3799,8 @@         (enc (enc (exp (gen) x) (exp (gen) y) (privk a-0))           (exp (gen) (mul x y)))) (send (privk b)))     ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y)))))-  (label 90)-  (parent 88)+  (label 104)+  (parent 102)   (unrealized (2 0))   (comment "2 in cohort - 2 not yet seen")) @@ -3342,8 +3835,8 @@           (exp (gen) (mul x y)))) (send (privk b)))     ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))     ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y))))-  (label 91)-  (parent 90)+  (label 105)+  (parent 104)   (unrealized (3 0))   (dead)   (comment "empty cohort"))@@ -3379,8 +3872,8 @@           (exp (gen) (mul x y)))) (send (privk b)))     ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))     ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x))))-  (label 92)-  (parent 90)+  (label 106)+  (parent 104)   (unrealized (3 0))   (dead)   (comment "empty cohort"))@@ -3437,7 +3930,7 @@         (enc (enc (exp (gen) x) (exp (gen) y) (privk a-0))           (exp (gen) (mul x y)))) (send (privk b)))     ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y)))))-  (label 93)+  (label 107)   (unrealized (1 2) (2 0))   (preskeleton)   (origs ((privk b) (1 3)) ((privk a) (0 3)))@@ -3469,8 +3962,8 @@         (enc (enc (exp (gen) x) (exp (gen) y) (privk a-0))           (exp (gen) (mul x y)))) (send (privk b)))     ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y)))))-  (label 94)-  (parent 93)+  (label 108)+  (parent 107)   (unrealized (1 2) (2 0))   (origs ((privk b) (1 3)) ((privk a) (0 3)))   (comment "2 in cohort - 2 not yet seen"))@@ -3505,8 +3998,8 @@           (exp (gen) (mul x y)))) (send (privk b)))     ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))     ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y))))-  (label 95)-  (parent 94)+  (label 109)+  (parent 108)   (unrealized (1 2) (3 0))   (dead)   (comment "empty cohort"))@@ -3541,8 +4034,8 @@           (exp (gen) (mul x y)))) (send (privk b)))     ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))     ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x))))-  (label 96)-  (parent 94)+  (label 110)+  (parent 108)   (unrealized (1 2) (3 0))   (dead)   (comment "empty cohort"))
tst/sts_unflip.tst view
@@ -1,2032 +1,2964 @@ (herald "Station-to-station protocol unflipped"   (algebra diffie-hellman)) -(comment "CPSA 4.4.2")-(comment "All input read from tst/sts_unflip.scm")--(defprotocol station-to-station-unflip diffie-hellman-  (defrole init-    (vars (x rndx) (h base) (a b name))-    (trace (send (exp (gen) x))-      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))-      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x)))-      (send (privk a)))-    (uniq-gen x))-  (defrole resp-    (vars (y rndx) (h base) (a b name))-    (trace (recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))-      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y)))-      (send (privk b)))-    (uniq-gen y))-  (defgenrule neqRl_indx-    (forall ((x indx)) (implies (fact neq x x) (false))))-  (defgenrule neqRl_strd-    (forall ((x strd)) (implies (fact neq x x) (false))))-  (defgenrule neqRl_mesg-    (forall ((x mesg)) (implies (fact neq x x) (false)))))--(defskeleton station-to-station-unflip-  (vars (a b name) (h base) (x rndx))-  (defstrand init 3 (a a) (b b) (h h) (x x))-  (non-orig (privk b))-  (uniq-gen x)-  (traces-    ((send (exp (gen) x))-      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))-      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x)))))-  (label 0)-  (unrealized (0 1))-  (origs)-  (comment "2 in cohort - 2 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x y rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))-  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y))-  (precedes ((0 0) (1 0)) ((1 1) (0 1)))-  (non-orig (privk b))-  (uniq-gen x y)-  (operation encryption-test (added-strand resp 2)-    (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-      (exp (gen) (mul x y))) (0 1))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))))-  (label 1)-  (parent 0)-  (realized)-  (shape)-  (maps ((0) ((a a) (b b) (x x) (h (exp (gen) y)))))-  (origs))--(defskeleton station-to-station-unflip-  (vars (a b name) (h base) (x rndx))-  (defstrand init 3 (a a) (b b) (h h) (x x))-  (deflistener (exp h x))-  (precedes ((0 0) (1 0)) ((1 1) (0 1)))-  (non-orig (privk b))-  (uniq-gen x)-  (operation encryption-test (added-listener (exp h x))-    (enc (enc h (exp (gen) x) (privk b)) (exp h x)) (0 1))-  (traces-    ((send (exp (gen) x))-      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))-      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x))))-    ((recv (exp h x)) (send (exp h x))))-  (label 2)-  (parent 0)-  (unrealized (0 1) (1 0))-  (comment "5 in cohort - 5 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x rndx))-  (defstrand init 3 (a a) (b b) (h (gen)) (x x))-  (deflistener (exp (gen) x))-  (precedes ((0 0) (1 0)) ((1 1) (0 1)))-  (non-orig (privk b))-  (uniq-gen x)-  (operation nonce-test (displaced 2 0 init 1) (exp (gen) x-0) (1 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (gen)-          (enc (enc (gen) (exp (gen) x) (privk b)) (exp (gen) x))))-      (send (enc (enc (gen) (exp (gen) x) (privk a)) (exp (gen) x))))-    ((recv (exp (gen) x)) (send (exp (gen) x))))-  (label 3)-  (parent 2)-  (unrealized (0 1))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) (rec x))) (x x))-  (deflistener (gen))-  (precedes ((0 0) (1 0)) ((1 1) (0 1)))-  (non-orig (privk b))-  (uniq-gen x)-  (operation nonce-test (contracted (h (exp (gen) (rec x)))) (gen)-    (1 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) (rec x))-          (enc (enc (exp (gen) (rec x)) (exp (gen) x) (privk b))-            (gen))))-      (send-        (enc (enc (exp (gen) (rec x)) (exp (gen) x) (privk a)) (gen))))-    ((recv (gen)) (send (gen))))-  (label 4)-  (parent 2)-  (unrealized (0 1))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x x-0 rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) x-0))) (x x))-  (deflistener (exp (gen) x-0))-  (defstrand init 1 (x x-0))-  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((2 0) (1 0)))-  (non-orig (privk b))-  (uniq-gen x x-0)-  (operation nonce-test (added-strand init 1) (exp (gen) x-0) (1 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) (mul (rec x) x-0))-          (enc-            (enc (exp (gen) (mul (rec x) x-0)) (exp (gen) x) (privk b))-            (exp (gen) x-0))))-      (send-        (enc (enc (exp (gen) (mul (rec x) x-0)) (exp (gen) x) (privk a))-          (exp (gen) x-0))))-    ((recv (exp (gen) x-0)) (send (exp (gen) x-0)))-    ((send (exp (gen) x-0))))-  (label 5)-  (parent 2)-  (unrealized (0 1))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b b-0 name) (h base) (x y rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) y))) (x x))-  (deflistener (exp (gen) y))-  (defstrand resp 2 (b b-0) (h h) (y y))-  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((2 1) (1 0)))-  (non-orig (privk b))-  (uniq-gen x y)-  (operation nonce-test (added-strand resp 2) (exp (gen) y) (1 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) (mul (rec x) y))-          (enc (enc (exp (gen) (mul (rec x) y)) (exp (gen) x) (privk b))-            (exp (gen) y))))-      (send-        (enc (enc (exp (gen) (mul (rec x) y)) (exp (gen) x) (privk a))-          (exp (gen) y)))) ((recv (exp (gen) y)) (send (exp (gen) y)))-    ((recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b-0)) (exp h y))))))-  (label 6)-  (parent 2)-  (unrealized (0 1))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b name) (h base) (x rndx) (w expt))-  (defstrand init 3 (a a) (b b) (h h) (x x))-  (deflistener (exp h x))-  (deflistener (cat (exp h (mul x (rec w))) w))-  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)))-  (non-orig (privk b))-  (uniq-gen x)-  (precur (2 0))-  (operation nonce-test (added-listener (cat (exp h (mul x (rec w))) w))-    (exp h x) (1 0))-  (traces-    ((send (exp (gen) x))-      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))-      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x))))-    ((recv (exp h x)) (send (exp h x)))-    ((recv (cat (exp h (mul x (rec w))) w))-      (send (cat (exp h (mul x (rec w))) w))))-  (label 7)-  (parent 2)-  (unrealized (0 1) (2 0))-  (comment "4 in cohort - 4 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b name) (w expt) (x rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) w)) (x x))-  (deflistener (exp (gen) (mul w x)))-  (deflistener (cat (exp (gen) x) w))-  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)))-  (non-orig (privk b))-  (uniq-gen x)-  (precur (2 0))-  (operation nonce-test (displaced 3 0 init 1) (exp (gen) x-0) (2 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) w)-          (enc (enc (exp (gen) w) (exp (gen) x) (privk b))-            (exp (gen) (mul w x)))))-      (send-        (enc (enc (exp (gen) w) (exp (gen) x) (privk a))-          (exp (gen) (mul w x)))))-    ((recv (exp (gen) (mul w x))) (send (exp (gen) (mul w x))))-    ((recv (cat (exp (gen) x) w)) (send (cat (exp (gen) x) w))))-  (label 8)-  (parent 7)-  (unrealized (0 1))-  (comment "1 in cohort - 1 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x rndx) (w expt))-  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) w))) (x x))-  (deflistener (exp (gen) w))-  (deflistener (cat (gen) w))-  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)))-  (non-orig (privk b))-  (uniq-gen x)-  (precur (2 0))-  (operation nonce-test (contracted (h (exp (gen) (mul (rec x) w))))-    (gen) (2 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) (mul (rec x) w))-          (enc (enc (exp (gen) (mul (rec x) w)) (exp (gen) x) (privk b))-            (exp (gen) w))))-      (send-        (enc (enc (exp (gen) (mul (rec x) w)) (exp (gen) x) (privk a))-          (exp (gen) w)))) ((recv (exp (gen) w)) (send (exp (gen) w)))-    ((recv (cat (gen) w)) (send (cat (gen) w))))-  (label 9)-  (parent 7)-  (unrealized (0 1))-  (comment "1 in cohort - 1 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x rndx) (w expt) (x-0 rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) w x-0)))-    (x x))-  (deflistener (exp (gen) (mul w x-0)))-  (deflistener (cat (exp (gen) x-0) w))-  (defstrand init 1 (x x-0))-  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 0) (2 0)))-  (non-orig (privk b))-  (uniq-gen x x-0)-  (precur (2 0))-  (operation nonce-test (added-strand init 1) (exp (gen) x-0) (2 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) (mul (rec x) w x-0))-          (enc-            (enc (exp (gen) (mul (rec x) w x-0)) (exp (gen) x)-              (privk b)) (exp (gen) (mul w x-0)))))-      (send-        (enc-          (enc (exp (gen) (mul (rec x) w x-0)) (exp (gen) x) (privk a))-          (exp (gen) (mul w x-0)))))-    ((recv (exp (gen) (mul w x-0))) (send (exp (gen) (mul w x-0))))-    ((recv (cat (exp (gen) x-0) w)) (send (cat (exp (gen) x-0) w)))-    ((send (exp (gen) x-0))))-  (label 10)-  (parent 7)-  (unrealized (0 1))-  (comment "1 in cohort - 1 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b b-0 name) (h base) (x rndx) (w expt) (y rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) w y))) (x x))-  (deflistener (exp (gen) (mul w y)))-  (deflistener (cat (exp (gen) y) w))-  (defstrand resp 2 (b b-0) (h h) (y y))-  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0)))-  (non-orig (privk b))-  (uniq-gen x y)-  (precur (2 0))-  (operation nonce-test (added-strand resp 2) (exp (gen) y) (2 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) (mul (rec x) w y))-          (enc-            (enc (exp (gen) (mul (rec x) w y)) (exp (gen) x) (privk b))-            (exp (gen) (mul w y)))))-      (send-        (enc (enc (exp (gen) (mul (rec x) w y)) (exp (gen) x) (privk a))-          (exp (gen) (mul w y)))))-    ((recv (exp (gen) (mul w y))) (send (exp (gen) (mul w y))))-    ((recv (cat (exp (gen) y) w)) (send (cat (exp (gen) y) w)))-    ((recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b-0)) (exp h y))))))-  (label 11)-  (parent 7)-  (unrealized (0 1))-  (comment "2 in cohort - 2 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x y rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))-  (deflistener (exp (gen) (mul x y)))-  (deflistener (cat (exp (gen) x) y))-  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y))-  (precedes ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0)))-  (non-orig (privk b))-  (uniq-gen x y)-  (precur (2 0))-  (operation encryption-test (added-strand resp 2)-    (enc (exp (gen) y) (exp (gen) x) (privk b)) (0 1))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))))-    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))-    ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y)))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))))-  (label 12)-  (parent 8)-  (unrealized (2 0))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x y rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))-  (deflistener (exp (gen) (mul x y)))-  (deflistener (cat (gen) (mul x y)))-  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y))-  (precedes ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0)))-  (non-orig (privk b))-  (uniq-gen x y)-  (precur (2 0))-  (operation encryption-test (added-strand resp 2)-    (enc (exp (gen) y) (exp (gen) x) (privk b)) (0 1))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))))-    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))-    ((recv (cat (gen) (mul x y))) (send (cat (gen) (mul x y))))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))))-  (label 13)-  (parent 9)-  (unrealized (1 0) (2 0))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x x-0 y rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))-  (deflistener (exp (gen) (mul x y)))-  (deflistener (cat (exp (gen) x-0) (mul x (rec x-0) y)))-  (defstrand init 1 (x x-0))-  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y))-  (precedes ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 0) (2 0))-    ((4 1) (2 0)))-  (non-orig (privk b))-  (uniq-gen x x-0 y)-  (precur (2 0))-  (operation encryption-test (added-strand resp 2)-    (enc (exp (gen) y) (exp (gen) x) (privk b)) (0 1))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))))-    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))-    ((recv (cat (exp (gen) x-0) (mul x (rec x-0) y)))-      (send (cat (exp (gen) x-0) (mul x (rec x-0) y))))-    ((send (exp (gen) x-0)))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))))-  (label 14)-  (parent 10)-  (unrealized (1 0) (2 0))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x y rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))-  (deflistener (exp (gen) (mul x y)))-  (deflistener (cat (exp (gen) y) x))-  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y))-  (precedes ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0)))-  (non-orig (privk b))-  (uniq-gen x y)-  (precur (2 0))-  (operation encryption-test (displaced 4 3 resp 2)-    (enc (exp (gen) y-0) (exp (gen) x) (privk b-0)) (0 1))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))))-    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))-    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))))-  (label 15)-  (parent 11)-  (unrealized (2 0))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b b-0 name) (h base) (x y y-0 rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) y-0)) (x x))-  (deflistener (exp (gen) (mul x y-0)))-  (deflistener (cat (exp (gen) y) (mul x (rec y) y-0)))-  (defstrand resp 2 (b b-0) (h h) (y y))-  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y-0))-  (precedes ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0))-    ((4 1) (2 0)))-  (non-orig (privk b))-  (uniq-gen x y y-0)-  (precur (2 0))-  (operation encryption-test (added-strand resp 2)-    (enc (exp (gen) y-0) (exp (gen) x) (privk b)) (0 1))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y-0)-          (enc (enc (exp (gen) y-0) (exp (gen) x) (privk b))-            (exp (gen) (mul x y-0)))))-      (send-        (enc (enc (exp (gen) y-0) (exp (gen) x) (privk a))-          (exp (gen) (mul x y-0)))))-    ((recv (exp (gen) (mul x y-0))) (send (exp (gen) (mul x y-0))))-    ((recv (cat (exp (gen) y) (mul x (rec y) y-0)))-      (send (cat (exp (gen) y) (mul x (rec y) y-0))))-    ((recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b-0)) (exp h y)))))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y-0)-          (enc (enc (exp (gen) y-0) (exp (gen) x) (privk b))-            (exp (gen) (mul x y-0)))))))-  (label 16)-  (parent 11)-  (unrealized (1 0) (2 0))-  (dead)-  (comment "empty cohort"))--(comment "Nothing left to do")--(defprotocol station-to-station-unflip diffie-hellman-  (defrole init-    (vars (x rndx) (h base) (a b name))-    (trace (send (exp (gen) x))-      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))-      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x)))-      (send (privk a)))-    (uniq-gen x))-  (defrole resp-    (vars (y rndx) (h base) (a b name))-    (trace (recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))-      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y)))-      (send (privk b)))-    (uniq-gen y))-  (defgenrule neqRl_indx-    (forall ((x indx)) (implies (fact neq x x) (false))))-  (defgenrule neqRl_strd-    (forall ((x strd)) (implies (fact neq x x) (false))))-  (defgenrule neqRl_mesg-    (forall ((x mesg)) (implies (fact neq x x) (false)))))--(defskeleton station-to-station-unflip-  (vars (a b name) (h base) (y rndx))-  (defstrand resp 3 (a a) (b b) (h h) (y y))-  (non-orig (privk a))-  (uniq-gen y)-  (traces-    ((recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))-      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y)))))-  (label 17)-  (unrealized (0 2))-  (origs)-  (comment "3 in cohort - 3 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b b-0 name) (y x rndx))-  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))-  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))-  (precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))-  (non-orig (privk a))-  (uniq-gen y x)-  (operation encryption-test (added-strand init 3)-    (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-      (exp (gen) (mul y x))) (0 2))-  (traces-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul y x)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul y x)))))-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))-            (exp (gen) (mul y x)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul y x))))))-  (label 18)-  (parent 17)-  (unrealized (1 1))-  (comment "2 in cohort - 2 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (b name) (h base) (y rndx))-  (defstrand resp 3 (a b) (b b) (h h) (y y))-  (non-orig (privk b))-  (uniq-gen y)-  (operation encryption-test (displaced 1 0 resp 2)-    (enc (enc (exp (gen) y) h (privk a)) (exp h y)) (0 2))-  (traces-    ((recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))-      (recv (enc (enc (exp (gen) y) h (privk b)) (exp h y)))))-  (label 19)-  (parent 17)-  (realized)-  (shape)-  (maps ((0) ((a b) (b b) (y y) (h h))))-  (origs))--(defskeleton station-to-station-unflip-  (vars (a b name) (h base) (y rndx))-  (defstrand resp 3 (a a) (b b) (h h) (y y))-  (deflistener (exp h y))-  (precedes ((0 1) (1 0)) ((1 1) (0 2)))-  (non-orig (privk a))-  (uniq-gen y)-  (operation encryption-test (added-listener (exp h y))-    (enc (enc (exp (gen) y) h (privk a)) (exp h y)) (0 2))-  (traces-    ((recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))-      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y))))-    ((recv (exp h y)) (send (exp h y))))-  (label 20)-  (parent 17)-  (unrealized (0 2) (1 0))-  (comment "1 in cohort - 1 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x y rndx))-  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))-  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))-  (precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))-  (non-orig (privk a))-  (uniq-gen x y)-  (operation encryption-test (displaced 2 0 resp 2)-    (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))-      (exp (gen) (mul x y))) (1 1))-  (traces-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))))-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y))))))-  (label 21)-  (parent 18)-  (realized)-  (shape)-  (maps ((0) ((a a) (b b) (y y) (h (exp (gen) x)))))-  (origs))--(defskeleton station-to-station-unflip-  (vars (a b b-0 name) (y x rndx))-  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))-  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))-  (deflistener (exp (gen) (mul y x)))-  (precedes ((0 1) (2 0)) ((1 0) (0 0)) ((1 2) (0 2)) ((2 1) (1 1)))-  (non-orig (privk a))-  (uniq-gen y x)-  (operation encryption-test (added-listener (exp (gen) (mul y x)))-    (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))-      (exp (gen) (mul y x))) (1 1))-  (traces-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul y x)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul y x)))))-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))-            (exp (gen) (mul y x)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul y x)))))-    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x)))))-  (label 22)-  (parent 18)-  (unrealized (2 0))-  (comment "2 in cohort - 2 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b name) (h base) (y rndx) (w expt))-  (defstrand resp 3 (a a) (b b) (h h) (y y))-  (deflistener (exp h y))-  (deflistener (cat (exp h (mul y (rec w))) w))-  (precedes ((0 1) (2 0)) ((1 1) (0 2)) ((2 1) (1 0)))-  (non-orig (privk a))-  (uniq-gen y)-  (precur (2 0))-  (operation nonce-test (added-listener (cat (exp h (mul y (rec w))) w))-    (exp h y) (1 0))-  (traces-    ((recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))-      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y))))-    ((recv (exp h y)) (send (exp h y)))-    ((recv (cat (exp h (mul y (rec w))) w))-      (send (cat (exp h (mul y (rec w))) w))))-  (label 23)-  (parent 20)-  (unrealized (0 2) (2 0))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b b-0 name) (y x rndx))-  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))-  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))-  (deflistener (exp (gen) (mul y x)))-  (deflistener (cat (exp (gen) y) x))-  (precedes ((0 1) (3 0)) ((1 0) (0 0)) ((1 2) (0 2)) ((2 1) (1 1))-    ((3 1) (2 0)))-  (non-orig (privk a))-  (uniq-gen y x)-  (operation nonce-test (added-listener (cat (exp (gen) y) x))-    (exp (gen) (mul y x)) (2 0))-  (traces-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul y x)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul y x)))))-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))-            (exp (gen) (mul y x)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul y x)))))-    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))-    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x))))-  (label 24)-  (parent 22)-  (unrealized (3 0))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b b-0 name) (y x rndx))-  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))-  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))-  (deflistener (exp (gen) (mul y x)))-  (deflistener (cat (exp (gen) x) y))-  (precedes ((0 1) (3 0)) ((1 0) (0 0)) ((1 2) (0 2)) ((2 1) (1 1))-    ((3 1) (2 0)))-  (non-orig (privk a))-  (uniq-gen y x)-  (operation nonce-test (added-listener (cat (exp (gen) x) y))-    (exp (gen) (mul y x)) (2 0))-  (traces-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul y x)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul y x)))))-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))-            (exp (gen) (mul y x)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul y x)))))-    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))-    ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y))))-  (label 25)-  (parent 22)-  (unrealized (3 0))-  (dead)-  (comment "empty cohort"))--(comment "Nothing left to do")--(defprotocol station-to-station-unflip diffie-hellman-  (defrole init-    (vars (x rndx) (h base) (a b name))-    (trace (send (exp (gen) x))-      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))-      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x)))-      (send (privk a)))-    (uniq-gen x))-  (defrole resp-    (vars (y rndx) (h base) (a b name))-    (trace (recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))-      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y)))-      (send (privk b)))-    (uniq-gen y))-  (defgenrule neqRl_indx-    (forall ((x indx)) (implies (fact neq x x) (false))))-  (defgenrule neqRl_strd-    (forall ((x strd)) (implies (fact neq x x) (false))))-  (defgenrule neqRl_mesg-    (forall ((x mesg)) (implies (fact neq x x) (false)))))--(defskeleton station-to-station-unflip-  (vars (a b name) (h base) (y rndx))-  (defstrand resp 3 (a a) (b b) (h h) (y y))-  (non-orig (privk a))-  (uniq-gen y)-  (facts (neq a b))-  (traces-    ((recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))-      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y)))))-  (label 26)-  (unrealized (0 2))-  (origs)-  (comment "2 in cohort - 2 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b b-0 name) (y x rndx))-  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))-  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))-  (precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))-  (non-orig (privk a))-  (uniq-gen y x)-  (facts (neq a b))-  (operation encryption-test (added-strand init 3)-    (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-      (exp (gen) (mul y x))) (0 2))-  (traces-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul y x)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul y x)))))-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))-            (exp (gen) (mul y x)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul y x))))))-  (label 27)-  (parent 26)-  (unrealized (1 1))-  (comment "2 in cohort - 2 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b name) (h base) (y rndx))-  (defstrand resp 3 (a a) (b b) (h h) (y y))-  (deflistener (exp h y))-  (precedes ((0 1) (1 0)) ((1 1) (0 2)))-  (non-orig (privk a))-  (uniq-gen y)-  (facts (neq a b))-  (operation encryption-test (added-listener (exp h y))-    (enc (enc (exp (gen) y) h (privk a)) (exp h y)) (0 2))-  (traces-    ((recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))-      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y))))-    ((recv (exp h y)) (send (exp h y))))-  (label 28)-  (parent 26)-  (unrealized (0 2) (1 0))-  (comment "1 in cohort - 1 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x y rndx))-  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))-  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))-  (precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))-  (non-orig (privk a))-  (uniq-gen x y)-  (facts (neq a b))-  (operation encryption-test (displaced 2 0 resp 2)-    (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))-      (exp (gen) (mul x y))) (1 1))-  (traces-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))))-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y))))))-  (label 29)-  (parent 27)-  (realized)-  (shape)-  (maps ((0) ((a a) (b b) (y y) (h (exp (gen) x)))))-  (origs))--(defskeleton station-to-station-unflip-  (vars (a b b-0 name) (y x rndx))-  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))-  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))-  (deflistener (exp (gen) (mul y x)))-  (precedes ((0 1) (2 0)) ((1 0) (0 0)) ((1 2) (0 2)) ((2 1) (1 1)))-  (non-orig (privk a))-  (uniq-gen y x)-  (facts (neq a b))-  (operation encryption-test (added-listener (exp (gen) (mul y x)))-    (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))-      (exp (gen) (mul y x))) (1 1))-  (traces-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul y x)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul y x)))))-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))-            (exp (gen) (mul y x)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul y x)))))-    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x)))))-  (label 30)-  (parent 27)-  (unrealized (2 0))-  (comment "2 in cohort - 2 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b name) (h base) (y rndx) (w expt))-  (defstrand resp 3 (a a) (b b) (h h) (y y))-  (deflistener (exp h y))-  (deflistener (cat (exp h (mul y (rec w))) w))-  (precedes ((0 1) (2 0)) ((1 1) (0 2)) ((2 1) (1 0)))-  (non-orig (privk a))-  (uniq-gen y)-  (precur (2 0))-  (facts (neq a b))-  (operation nonce-test (added-listener (cat (exp h (mul y (rec w))) w))-    (exp h y) (1 0))-  (traces-    ((recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))-      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y))))-    ((recv (exp h y)) (send (exp h y)))-    ((recv (cat (exp h (mul y (rec w))) w))-      (send (cat (exp h (mul y (rec w))) w))))-  (label 31)-  (parent 28)-  (unrealized (0 2) (2 0))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b b-0 name) (y x rndx))-  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))-  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))-  (deflistener (exp (gen) (mul y x)))-  (deflistener (cat (exp (gen) y) x))-  (precedes ((0 1) (3 0)) ((1 0) (0 0)) ((1 2) (0 2)) ((2 1) (1 1))-    ((3 1) (2 0)))-  (non-orig (privk a))-  (uniq-gen y x)-  (facts (neq a b))-  (operation nonce-test (added-listener (cat (exp (gen) y) x))-    (exp (gen) (mul y x)) (2 0))-  (traces-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul y x)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul y x)))))-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))-            (exp (gen) (mul y x)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul y x)))))-    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))-    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x))))-  (label 32)-  (parent 30)-  (unrealized (3 0))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b b-0 name) (y x rndx))-  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))-  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))-  (deflistener (exp (gen) (mul y x)))-  (deflistener (cat (exp (gen) x) y))-  (precedes ((0 1) (3 0)) ((1 0) (0 0)) ((1 2) (0 2)) ((2 1) (1 1))-    ((3 1) (2 0)))-  (non-orig (privk a))-  (uniq-gen y x)-  (facts (neq a b))-  (operation nonce-test (added-listener (cat (exp (gen) x) y))-    (exp (gen) (mul y x)) (2 0))-  (traces-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul y x)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul y x)))))-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))-            (exp (gen) (mul y x)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul y x)))))-    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))-    ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y))))-  (label 33)-  (parent 30)-  (unrealized (3 0))-  (dead)-  (comment "empty cohort"))--(comment "Nothing left to do")--(defprotocol station-to-station-unflip diffie-hellman-  (defrole init-    (vars (x rndx) (h base) (a b name))-    (trace (send (exp (gen) x))-      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))-      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x)))-      (send (privk a)))-    (uniq-gen x))-  (defrole resp-    (vars (y rndx) (h base) (a b name))-    (trace (recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))-      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y)))-      (send (privk b)))-    (uniq-gen y))-  (defgenrule neqRl_indx-    (forall ((x indx)) (implies (fact neq x x) (false))))-  (defgenrule neqRl_strd-    (forall ((x strd)) (implies (fact neq x x) (false))))-  (defgenrule neqRl_mesg-    (forall ((x mesg)) (implies (fact neq x x) (false)))))--(defskeleton station-to-station-unflip-  (vars (a b name) (h base) (x rndx))-  (defstrand init 3 (a a) (b b) (h h) (x x))-  (deflistener (exp h x))-  (non-orig (privk a) (privk b))-  (uniq-gen x)-  (traces-    ((send (exp (gen) x))-      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))-      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x))))-    ((recv (exp h x)) (send (exp h x))))-  (label 34)-  (unrealized (0 1) (1 0))-  (preskeleton)-  (origs)-  (comment "Not a skeleton"))--(defskeleton station-to-station-unflip-  (vars (a b name) (h base) (x rndx))-  (defstrand init 3 (a a) (b b) (h h) (x x))-  (deflistener (exp h x))-  (precedes ((0 0) (1 0)))-  (non-orig (privk a) (privk b))-  (uniq-gen x)-  (traces-    ((send (exp (gen) x))-      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))-      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x))))-    ((recv (exp h x)) (send (exp h x))))-  (label 35)-  (parent 34)-  (unrealized (0 1) (1 0))-  (origs)-  (comment "5 in cohort - 5 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x rndx))-  (defstrand init 3 (a a) (b b) (h (gen)) (x x))-  (deflistener (exp (gen) x))-  (precedes ((0 0) (1 0)))-  (non-orig (privk a) (privk b))-  (uniq-gen x)-  (operation nonce-test (displaced 2 0 init 1) (exp (gen) x-0) (1 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (gen)-          (enc (enc (gen) (exp (gen) x) (privk b)) (exp (gen) x))))-      (send (enc (enc (gen) (exp (gen) x) (privk a)) (exp (gen) x))))-    ((recv (exp (gen) x)) (send (exp (gen) x))))-  (label 36)-  (parent 35)-  (unrealized (0 1))-  (dead)-  (origs)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) (rec x))) (x x))-  (deflistener (gen))-  (precedes ((0 0) (1 0)))-  (non-orig (privk a) (privk b))-  (uniq-gen x)-  (operation nonce-test (contracted (h (exp (gen) (rec x)))) (gen)-    (1 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) (rec x))-          (enc (enc (exp (gen) (rec x)) (exp (gen) x) (privk b))-            (gen))))-      (send-        (enc (enc (exp (gen) (rec x)) (exp (gen) x) (privk a)) (gen))))-    ((recv (gen)) (send (gen))))-  (label 37)-  (parent 35)-  (unrealized (0 1))-  (dead)-  (origs)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x x-0 rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) x-0))) (x x))-  (deflistener (exp (gen) x-0))-  (defstrand init 1 (x x-0))-  (precedes ((0 0) (1 0)) ((2 0) (0 1)) ((2 0) (1 0)))-  (non-orig (privk a) (privk b))-  (uniq-gen x x-0)-  (operation nonce-test (added-strand init 1) (exp (gen) x-0) (1 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) (mul (rec x) x-0))-          (enc-            (enc (exp (gen) (mul (rec x) x-0)) (exp (gen) x) (privk b))-            (exp (gen) x-0))))-      (send-        (enc (enc (exp (gen) (mul (rec x) x-0)) (exp (gen) x) (privk a))-          (exp (gen) x-0))))-    ((recv (exp (gen) x-0)) (send (exp (gen) x-0)))-    ((send (exp (gen) x-0))))-  (label 38)-  (parent 35)-  (unrealized (0 1))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b b-0 name) (h base) (x y rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) y))) (x x))-  (deflistener (exp (gen) y))-  (defstrand resp 2 (b b-0) (h h) (y y))-  (precedes ((0 0) (1 0)) ((2 1) (0 1)) ((2 1) (1 0)))-  (non-orig (privk a) (privk b))-  (uniq-gen x y)-  (operation nonce-test (added-strand resp 2) (exp (gen) y) (1 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) (mul (rec x) y))-          (enc (enc (exp (gen) (mul (rec x) y)) (exp (gen) x) (privk b))-            (exp (gen) y))))-      (send-        (enc (enc (exp (gen) (mul (rec x) y)) (exp (gen) x) (privk a))-          (exp (gen) y)))) ((recv (exp (gen) y)) (send (exp (gen) y)))-    ((recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b-0)) (exp h y))))))-  (label 39)-  (parent 35)-  (unrealized (0 1))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b name) (h base) (x rndx) (w expt))-  (defstrand init 3 (a a) (b b) (h h) (x x))-  (deflistener (exp h x))-  (deflistener (cat (exp h (mul x (rec w))) w))-  (precedes ((0 0) (2 0)) ((2 1) (1 0)))-  (non-orig (privk a) (privk b))-  (uniq-gen x)-  (precur (2 0))-  (operation nonce-test (added-listener (cat (exp h (mul x (rec w))) w))-    (exp h x) (1 0))-  (traces-    ((send (exp (gen) x))-      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))-      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x))))-    ((recv (exp h x)) (send (exp h x)))-    ((recv (cat (exp h (mul x (rec w))) w))-      (send (cat (exp h (mul x (rec w))) w))))-  (label 40)-  (parent 35)-  (unrealized (0 1) (2 0))-  (comment "4 in cohort - 4 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b name) (w expt) (x rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) w)) (x x))-  (deflistener (exp (gen) (mul w x)))-  (deflistener (cat (exp (gen) x) w))-  (precedes ((0 0) (2 0)) ((2 1) (1 0)))-  (non-orig (privk a) (privk b))-  (uniq-gen x)-  (precur (2 0))-  (operation nonce-test (displaced 3 0 init 1) (exp (gen) x-0) (2 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) w)-          (enc (enc (exp (gen) w) (exp (gen) x) (privk b))-            (exp (gen) (mul w x)))))-      (send-        (enc (enc (exp (gen) w) (exp (gen) x) (privk a))-          (exp (gen) (mul w x)))))-    ((recv (exp (gen) (mul w x))) (send (exp (gen) (mul w x))))-    ((recv (cat (exp (gen) x) w)) (send (cat (exp (gen) x) w))))-  (label 41)-  (parent 40)-  (unrealized (0 1))-  (comment "1 in cohort - 1 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x rndx) (w expt))-  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) w))) (x x))-  (deflistener (exp (gen) w))-  (deflistener (cat (gen) w))-  (precedes ((0 0) (2 0)) ((2 1) (1 0)))-  (non-orig (privk a) (privk b))-  (uniq-gen x)-  (precur (2 0))-  (operation nonce-test (contracted (h (exp (gen) (mul (rec x) w))))-    (gen) (2 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) (mul (rec x) w))-          (enc (enc (exp (gen) (mul (rec x) w)) (exp (gen) x) (privk b))-            (exp (gen) w))))-      (send-        (enc (enc (exp (gen) (mul (rec x) w)) (exp (gen) x) (privk a))-          (exp (gen) w)))) ((recv (exp (gen) w)) (send (exp (gen) w)))-    ((recv (cat (gen) w)) (send (cat (gen) w))))-  (label 42)-  (parent 40)-  (unrealized (0 1))-  (comment "1 in cohort - 1 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x rndx) (w expt) (x-0 rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) w x-0)))-    (x x))-  (deflistener (exp (gen) (mul w x-0)))-  (deflistener (cat (exp (gen) x-0) w))-  (defstrand init 1 (x x-0))-  (precedes ((0 0) (2 0)) ((2 1) (1 0)) ((3 0) (0 1)) ((3 0) (2 0)))-  (non-orig (privk a) (privk b))-  (uniq-gen x x-0)-  (precur (2 0))-  (operation nonce-test (added-strand init 1) (exp (gen) x-0) (2 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) (mul (rec x) w x-0))-          (enc-            (enc (exp (gen) (mul (rec x) w x-0)) (exp (gen) x)-              (privk b)) (exp (gen) (mul w x-0)))))-      (send-        (enc-          (enc (exp (gen) (mul (rec x) w x-0)) (exp (gen) x) (privk a))-          (exp (gen) (mul w x-0)))))-    ((recv (exp (gen) (mul w x-0))) (send (exp (gen) (mul w x-0))))-    ((recv (cat (exp (gen) x-0) w)) (send (cat (exp (gen) x-0) w)))-    ((send (exp (gen) x-0))))-  (label 43)-  (parent 40)-  (unrealized (0 1))-  (comment "1 in cohort - 1 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b b-0 name) (h base) (x rndx) (w expt) (y rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) w y))) (x x))-  (deflistener (exp (gen) (mul w y)))-  (deflistener (cat (exp (gen) y) w))-  (defstrand resp 2 (b b-0) (h h) (y y))-  (precedes ((0 0) (2 0)) ((2 1) (1 0)) ((3 1) (0 1)) ((3 1) (2 0)))-  (non-orig (privk a) (privk b))-  (uniq-gen x y)-  (precur (2 0))-  (operation nonce-test (added-strand resp 2) (exp (gen) y) (2 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) (mul (rec x) w y))-          (enc-            (enc (exp (gen) (mul (rec x) w y)) (exp (gen) x) (privk b))-            (exp (gen) (mul w y)))))-      (send-        (enc (enc (exp (gen) (mul (rec x) w y)) (exp (gen) x) (privk a))-          (exp (gen) (mul w y)))))-    ((recv (exp (gen) (mul w y))) (send (exp (gen) (mul w y))))-    ((recv (cat (exp (gen) y) w)) (send (cat (exp (gen) y) w)))-    ((recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b-0)) (exp h y))))))-  (label 44)-  (parent 40)-  (unrealized (0 1))-  (comment "2 in cohort - 2 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x y rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))-  (deflistener (exp (gen) (mul x y)))-  (deflistener (cat (exp (gen) x) y))-  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y))-  (precedes ((0 0) (3 0)) ((2 1) (1 0)) ((3 1) (0 1)) ((3 1) (2 0)))-  (non-orig (privk a) (privk b))-  (uniq-gen x y)-  (precur (2 0))-  (operation encryption-test (added-strand resp 2)-    (enc (exp (gen) y) (exp (gen) x) (privk b)) (0 1))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))))-    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))-    ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y)))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))))-  (label 45)-  (parent 41)-  (unrealized (2 0))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x y rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))-  (deflistener (exp (gen) (mul x y)))-  (deflistener (cat (gen) (mul x y)))-  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y))-  (precedes ((0 0) (3 0)) ((2 1) (1 0)) ((3 1) (0 1)) ((3 1) (2 0)))-  (non-orig (privk a) (privk b))-  (uniq-gen x y)-  (precur (2 0))-  (operation encryption-test (added-strand resp 2)-    (enc (exp (gen) y) (exp (gen) x) (privk b)) (0 1))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))))-    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))-    ((recv (cat (gen) (mul x y))) (send (cat (gen) (mul x y))))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))))-  (label 46)-  (parent 42)-  (unrealized (1 0) (2 0))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x x-0 y rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))-  (deflistener (exp (gen) (mul x y)))-  (deflistener (cat (exp (gen) x-0) (mul x (rec x-0) y)))-  (defstrand init 1 (x x-0))-  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y))-  (precedes ((0 0) (4 0)) ((2 1) (1 0)) ((3 0) (0 1)) ((3 0) (2 0))-    ((4 1) (0 1)) ((4 1) (2 0)))-  (non-orig (privk a) (privk b))-  (uniq-gen x x-0 y)-  (precur (2 0))-  (operation encryption-test (added-strand resp 2)-    (enc (exp (gen) y) (exp (gen) x) (privk b)) (0 1))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))))-    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))-    ((recv (cat (exp (gen) x-0) (mul x (rec x-0) y)))-      (send (cat (exp (gen) x-0) (mul x (rec x-0) y))))-    ((send (exp (gen) x-0)))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))))-  (label 47)-  (parent 43)-  (unrealized (1 0) (2 0))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b name) (x y rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))-  (deflistener (exp (gen) (mul x y)))-  (deflistener (cat (exp (gen) y) x))-  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y))-  (precedes ((0 0) (3 0)) ((2 1) (1 0)) ((3 1) (0 1)) ((3 1) (2 0)))-  (non-orig (privk a) (privk b))-  (uniq-gen x y)-  (precur (2 0))-  (operation encryption-test (displaced 4 3 resp 2)-    (enc (exp (gen) y-0) (exp (gen) x) (privk b-0)) (0 1))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))))-    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))-    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))))-  (label 48)-  (parent 44)-  (unrealized (2 0))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b b-0 name) (h base) (x y y-0 rndx))-  (defstrand init 3 (a a) (b b) (h (exp (gen) y-0)) (x x))-  (deflistener (exp (gen) (mul x y-0)))-  (deflistener (cat (exp (gen) y) (mul x (rec y) y-0)))-  (defstrand resp 2 (b b-0) (h h) (y y))-  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y-0))-  (precedes ((0 0) (4 0)) ((2 1) (1 0)) ((3 1) (0 1)) ((3 1) (2 0))-    ((4 1) (0 1)) ((4 1) (2 0)))-  (non-orig (privk a) (privk b))-  (uniq-gen x y y-0)-  (precur (2 0))-  (operation encryption-test (added-strand resp 2)-    (enc (exp (gen) y-0) (exp (gen) x) (privk b)) (0 1))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y-0)-          (enc (enc (exp (gen) y-0) (exp (gen) x) (privk b))-            (exp (gen) (mul x y-0)))))-      (send-        (enc (enc (exp (gen) y-0) (exp (gen) x) (privk a))-          (exp (gen) (mul x y-0)))))-    ((recv (exp (gen) (mul x y-0))) (send (exp (gen) (mul x y-0))))-    ((recv (cat (exp (gen) y) (mul x (rec y) y-0)))-      (send (cat (exp (gen) y) (mul x (rec y) y-0))))-    ((recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b-0)) (exp h y)))))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y-0)-          (enc (enc (exp (gen) y-0) (exp (gen) x) (privk b))-            (exp (gen) (mul x y-0)))))))-  (label 49)-  (parent 44)-  (unrealized (1 0) (2 0))-  (dead)-  (comment "empty cohort"))--(comment "Nothing left to do")--(defprotocol station-to-station-unflip diffie-hellman-  (defrole init-    (vars (x rndx) (h base) (a b name))-    (trace (send (exp (gen) x))-      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))-      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x)))-      (send (privk a)))-    (uniq-gen x))-  (defrole resp-    (vars (y rndx) (h base) (a b name))-    (trace (recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))-      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y)))-      (send (privk b)))-    (uniq-gen y))-  (defgenrule neqRl_indx-    (forall ((x indx)) (implies (fact neq x x) (false))))-  (defgenrule neqRl_strd-    (forall ((x strd)) (implies (fact neq x x) (false))))-  (defgenrule neqRl_mesg-    (forall ((x mesg)) (implies (fact neq x x) (false)))))--(defskeleton station-to-station-unflip-  (vars (a b name) (h base) (y rndx))-  (defstrand resp 3 (a a) (b b) (h h) (y y))-  (deflistener (exp h y))-  (non-orig (privk a) (privk b))-  (uniq-gen y)-  (traces-    ((recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))-      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y))))-    ((recv (exp h y)) (send (exp h y))))-  (label 50)-  (unrealized (0 2) (1 0))-  (preskeleton)-  (origs)-  (comment "Not a skeleton"))--(defskeleton station-to-station-unflip-  (vars (a b name) (h base) (y rndx))-  (defstrand resp 3 (a a) (b b) (h h) (y y))-  (deflistener (exp h y))-  (precedes ((0 1) (1 0)))-  (non-orig (privk a) (privk b))-  (uniq-gen y)-  (traces-    ((recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))-      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y))))-    ((recv (exp h y)) (send (exp h y))))-  (label 51)-  (parent 50)-  (unrealized (0 2) (1 0))-  (origs)-  (comment "1 in cohort - 1 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b name) (h base) (y rndx) (w expt))-  (defstrand resp 3 (a a) (b b) (h h) (y y))-  (deflistener (exp h y))-  (deflistener (cat (exp h (mul y (rec w))) w))-  (precedes ((0 1) (2 0)) ((2 1) (1 0)))-  (non-orig (privk a) (privk b))-  (uniq-gen y)-  (precur (2 0))-  (operation nonce-test (added-listener (cat (exp h (mul y (rec w))) w))-    (exp h y) (1 0))-  (traces-    ((recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))-      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y))))-    ((recv (exp h y)) (send (exp h y)))-    ((recv (cat (exp h (mul y (rec w))) w))-      (send (cat (exp h (mul y (rec w))) w))))-  (label 52)-  (parent 51)-  (unrealized (0 2) (2 0))-  (dead)-  (comment "empty cohort"))--(comment "Nothing left to do")--(defprotocol station-to-station-unflip diffie-hellman-  (defrole init-    (vars (x rndx) (h base) (a b name))-    (trace (send (exp (gen) x))-      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))-      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x)))-      (send (privk a)))-    (uniq-gen x))-  (defrole resp-    (vars (y rndx) (h base) (a b name))-    (trace (recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))-      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y)))-      (send (privk b)))-    (uniq-gen y))-  (defgenrule neqRl_indx-    (forall ((x indx)) (implies (fact neq x x) (false))))-  (defgenrule neqRl_strd-    (forall ((x strd)) (implies (fact neq x x) (false))))-  (defgenrule neqRl_mesg-    (forall ((x mesg)) (implies (fact neq x x) (false)))))--(defskeleton station-to-station-unflip-  (vars (a b a-0 name) (x y rndx))-  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))-  (defstrand resp 4 (a a-0) (b b) (h (exp (gen) x)) (y y))-  (precedes ((0 0) (1 0)) ((1 1) (0 1)))-  (uniq-orig (privk a) (privk b))-  (uniq-gen x y)-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))) (send (privk a)))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))-          (exp (gen) (mul x y)))) (send (privk b))))-  (label 53)-  (unrealized (1 2))-  (origs ((privk b) (1 3)) ((privk a) (0 3)))-  (comment "3 in cohort - 3 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b name) (y x rndx))-  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))-  (defstrand resp 4 (a a) (b b) (h (exp (gen) x)) (y y))-  (precedes ((0 0) (1 0)) ((0 2) (1 2)) ((1 1) (0 1)))-  (uniq-orig (privk a) (privk b))-  (uniq-gen y x)-  (operation encryption-test (displaced 2 0 init 3)-    (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))-      (exp (gen) (mul y x))) (1 2))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul y x)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul y x)))) (send (privk a)))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul y x)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul y x)))) (send (privk b))))-  (label 54)-  (parent 53)-  (realized)-  (shape)-  (maps ((0 1) ((a a) (b b) (x x) (y y) (a-0 a))))-  (origs ((privk b) (1 3)) ((privk a) (0 3))))--(defskeleton station-to-station-unflip-  (vars (a b name) (x y rndx))-  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))-  (defstrand resp 4 (a b) (b b) (h (exp (gen) x)) (y y))-  (precedes ((0 0) (1 0)) ((1 1) (0 1)))-  (uniq-orig (privk a) (privk b))-  (uniq-gen x y)-  (operation encryption-test (displaced 2 1 resp 2)-    (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))-      (exp (gen) (mul x y))) (1 2))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))) (send (privk a)))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-          (exp (gen) (mul x y)))) (send (privk b))))-  (label 55)-  (parent 53)-  (realized)-  (shape)-  (maps ((0 1) ((a a) (b b) (x x) (y y) (a-0 b))))-  (origs ((privk b) (1 3)) ((privk a) (0 3))))--(defskeleton station-to-station-unflip-  (vars (a b a-0 name) (x y rndx))-  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))-  (defstrand resp 4 (a a-0) (b b) (h (exp (gen) x)) (y y))-  (deflistener (exp (gen) (mul x y)))-  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((1 1) (2 0)) ((2 1) (1 2)))-  (uniq-orig (privk a) (privk b))-  (uniq-gen x y)-  (operation encryption-test (added-listener (exp (gen) (mul x y)))-    (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))-      (exp (gen) (mul x y))) (1 2))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))) (send (privk a)))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))-          (exp (gen) (mul x y)))) (send (privk b)))-    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y)))))-  (label 56)-  (parent 53)-  (unrealized (2 0))-  (comment "2 in cohort - 2 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b a-0 name) (x y rndx))-  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))-  (defstrand resp 4 (a a-0) (b b) (h (exp (gen) x)) (y y))-  (deflistener (exp (gen) (mul x y)))-  (deflistener (cat (exp (gen) x) y))-  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((1 1) (3 0)) ((2 1) (1 2))-    ((3 1) (2 0)))-  (uniq-orig (privk a) (privk b))-  (uniq-gen x y)-  (operation nonce-test (added-listener (cat (exp (gen) x) y))-    (exp (gen) (mul x y)) (2 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))) (send (privk a)))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))-          (exp (gen) (mul x y)))) (send (privk b)))-    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))-    ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y))))-  (label 57)-  (parent 56)-  (unrealized (3 0))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b a-0 name) (x y rndx))-  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))-  (defstrand resp 4 (a a-0) (b b) (h (exp (gen) x)) (y y))-  (deflistener (exp (gen) (mul x y)))-  (deflistener (cat (exp (gen) y) x))-  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((1 1) (3 0)) ((2 1) (1 2))-    ((3 1) (2 0)))-  (uniq-orig (privk a) (privk b))-  (uniq-gen x y)-  (operation nonce-test (added-listener (cat (exp (gen) y) x))-    (exp (gen) (mul x y)) (2 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))) (send (privk a)))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))-          (exp (gen) (mul x y)))) (send (privk b)))-    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))-    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x))))-  (label 58)-  (parent 56)-  (unrealized (3 0))-  (dead)-  (comment "empty cohort"))--(comment "Nothing left to do")--(defprotocol station-to-station-unflip diffie-hellman-  (defrole init-    (vars (x rndx) (h base) (a b name))-    (trace (send (exp (gen) x))-      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))-      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x)))-      (send (privk a)))-    (uniq-gen x))-  (defrole resp-    (vars (y rndx) (h base) (a b name))-    (trace (recv h)-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))-      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y)))-      (send (privk b)))-    (uniq-gen y))-  (defgenrule neqRl_indx-    (forall ((x indx)) (implies (fact neq x x) (false))))-  (defgenrule neqRl_strd-    (forall ((x strd)) (implies (fact neq x x) (false))))-  (defgenrule neqRl_mesg-    (forall ((x mesg)) (implies (fact neq x x) (false)))))--(defskeleton station-to-station-unflip-  (vars (a b a-0 name) (x y rndx))-  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))-  (defstrand resp 4 (a a-0) (b b) (h (exp (gen) x)) (y y))-  (deflistener (exp (gen) (mul x y)))-  (precedes ((0 0) (1 0)) ((1 1) (0 1)))-  (uniq-orig (privk a) (privk b))-  (uniq-gen x y)-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))) (send (privk a)))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))-          (exp (gen) (mul x y)))) (send (privk b)))-    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y)))))-  (label 59)-  (unrealized (1 2) (2 0))-  (preskeleton)-  (origs ((privk b) (1 3)) ((privk a) (0 3)))-  (comment "Not a skeleton"))--(defskeleton station-to-station-unflip-  (vars (a b a-0 name) (x y rndx))-  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))-  (defstrand resp 4 (a a-0) (b b) (h (exp (gen) x)) (y y))-  (deflistener (exp (gen) (mul x y)))-  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((1 1) (2 0)))-  (uniq-orig (privk a) (privk b))-  (uniq-gen x y)-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))) (send (privk a)))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))-          (exp (gen) (mul x y)))) (send (privk b)))-    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y)))))-  (label 60)-  (parent 59)-  (unrealized (1 2) (2 0))-  (origs ((privk b) (1 3)) ((privk a) (0 3)))-  (comment "2 in cohort - 2 not yet seen"))--(defskeleton station-to-station-unflip-  (vars (a b a-0 name) (x y rndx))-  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))-  (defstrand resp 4 (a a-0) (b b) (h (exp (gen) x)) (y y))-  (deflistener (exp (gen) (mul x y)))-  (deflistener (cat (exp (gen) x) y))-  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((1 1) (3 0)) ((3 1) (2 0)))-  (uniq-orig (privk a) (privk b))-  (uniq-gen x y)-  (operation nonce-test (added-listener (cat (exp (gen) x) y))-    (exp (gen) (mul x y)) (2 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))) (send (privk a)))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))-          (exp (gen) (mul x y)))) (send (privk b)))-    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))-    ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y))))-  (label 61)-  (parent 60)-  (unrealized (1 2) (3 0))-  (dead)-  (comment "empty cohort"))--(defskeleton station-to-station-unflip-  (vars (a b a-0 name) (x y rndx))-  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))-  (defstrand resp 4 (a a-0) (b b) (h (exp (gen) x)) (y y))-  (deflistener (exp (gen) (mul x y)))-  (deflistener (cat (exp (gen) y) x))-  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((1 1) (3 0)) ((3 1) (2 0)))-  (uniq-orig (privk a) (privk b))-  (uniq-gen x y)-  (operation nonce-test (added-listener (cat (exp (gen) y) x))-    (exp (gen) (mul x y)) (2 0))-  (traces-    ((send (exp (gen) x))-      (recv-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (send-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))-          (exp (gen) (mul x y)))) (send (privk a)))-    ((recv (exp (gen) x))-      (send-        (cat (exp (gen) y)-          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))-            (exp (gen) (mul x y)))))-      (recv-        (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))-          (exp (gen) (mul x y)))) (send (privk b)))-    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))-    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x))))-  (label 62)-  (parent 60)+(comment "CPSA 4.4.3")+(comment "All input read from tst/sts_unflip.scm")++(defprotocol station-to-station-unflip diffie-hellman+  (defrole init+    (vars (x rndx) (h base) (a b name))+    (trace (send (exp (gen) x))+      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))+      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x)))+      (send (privk a)))+    (uniq-gen x))+  (defrole resp+    (vars (y rndx) (h base) (a b name))+    (trace (recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))+      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y)))+      (send (privk b)))+    (uniq-gen y))+  (defgenrule neqRl_indx+    (forall ((x indx)) (implies (fact neq x x) (false))))+  (defgenrule neqRl_strd+    (forall ((x strd)) (implies (fact neq x x) (false))))+  (defgenrule neqRl_mesg+    (forall ((x mesg)) (implies (fact neq x x) (false)))))++(defskeleton station-to-station-unflip+  (vars (a b name) (h base) (x rndx))+  (defstrand init 3 (a a) (b b) (h h) (x x))+  (non-orig (privk b))+  (uniq-gen x)+  (traces+    ((send (exp (gen) x))+      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))+      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x)))))+  (label 0)+  (unrealized (0 1))+  (origs)+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x y rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))+  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk b))+  (uniq-gen x y)+  (operation encryption-test (added-strand resp 2)+    (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+      (exp (gen) (mul x y))) (0 1))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))))+  (label 1)+  (parent 0)+  (realized)+  (shape)+  (maps ((0) ((a a) (b b) (x x) (h (exp (gen) y)))))+  (origs))++(defskeleton station-to-station-unflip+  (vars (a b name) (h base) (x rndx))+  (defstrand init 3 (a a) (b b) (h h) (x x))+  (deflistener (exp h x))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk b))+  (uniq-gen x)+  (operation encryption-test (added-listener (exp h x))+    (enc (enc h (exp (gen) x) (privk b)) (exp h x)) (0 1))+  (traces+    ((send (exp (gen) x))+      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))+      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x))))+    ((recv (exp h x)) (send (exp h x))))+  (label 2)+  (parent 0)+  (unrealized (0 1) (1 0))+  (comment "5 in cohort - 5 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x rndx))+  (defstrand init 3 (a a) (b b) (h (gen)) (x x))+  (deflistener (exp (gen) x))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk b))+  (uniq-gen x)+  (operation nonce-test (displaced 2 0 init 1) (exp (gen) x-0) (1 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (gen)+          (enc (enc (gen) (exp (gen) x) (privk b)) (exp (gen) x))))+      (send (enc (enc (gen) (exp (gen) x) (privk a)) (exp (gen) x))))+    ((recv (exp (gen) x)) (send (exp (gen) x))))+  (label 3)+  (parent 2)+  (unrealized (0 1))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) (rec x))) (x x))+  (deflistener (gen))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk b))+  (uniq-gen x)+  (operation nonce-test (contracted (h (exp (gen) (rec x)))) (gen)+    (1 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) (rec x))+          (enc (enc (exp (gen) (rec x)) (exp (gen) x) (privk b))+            (gen))))+      (send+        (enc (enc (exp (gen) (rec x)) (exp (gen) x) (privk a)) (gen))))+    ((recv (gen)) (send (gen))))+  (label 4)+  (parent 2)+  (unrealized (0 1))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x x-0 rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) x-0))) (x x))+  (deflistener (exp (gen) x-0))+  (defstrand init 1 (x x-0))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((2 0) (1 0)))+  (non-orig (privk b))+  (uniq-gen x x-0)+  (operation nonce-test (added-strand init 1) (exp (gen) x-0) (1 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) (mul (rec x) x-0))+          (enc+            (enc (exp (gen) (mul (rec x) x-0)) (exp (gen) x) (privk b))+            (exp (gen) x-0))))+      (send+        (enc (enc (exp (gen) (mul (rec x) x-0)) (exp (gen) x) (privk a))+          (exp (gen) x-0))))+    ((recv (exp (gen) x-0)) (send (exp (gen) x-0)))+    ((send (exp (gen) x-0))))+  (label 5)+  (parent 2)+  (unrealized (0 1))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (h base) (x y rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) y))) (x x))+  (deflistener (exp (gen) y))+  (defstrand resp 2 (b b-0) (h h) (y y))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((2 1) (1 0)))+  (non-orig (privk b))+  (uniq-gen x y)+  (operation nonce-test (added-strand resp 2) (exp (gen) y) (1 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) (mul (rec x) y))+          (enc (enc (exp (gen) (mul (rec x) y)) (exp (gen) x) (privk b))+            (exp (gen) y))))+      (send+        (enc (enc (exp (gen) (mul (rec x) y)) (exp (gen) x) (privk a))+          (exp (gen) y)))) ((recv (exp (gen) y)) (send (exp (gen) y)))+    ((recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b-0)) (exp h y))))))+  (label 6)+  (parent 2)+  (unrealized (0 1))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b name) (h base) (x rndx) (w expt))+  (defstrand init 3 (a a) (b b) (h h) (x x))+  (deflistener (exp h x))+  (deflistener (cat (exp h (mul x (rec w))) w))+  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)))+  (non-orig (privk b))+  (uniq-gen x)+  (precur (2 0))+  (operation nonce-test (added-listener (cat (exp h (mul x (rec w))) w))+    (exp h x) (1 0))+  (traces+    ((send (exp (gen) x))+      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))+      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x))))+    ((recv (exp h x)) (send (exp h x)))+    ((recv (cat (exp h (mul x (rec w))) w))+      (send (cat (exp h (mul x (rec w))) w))))+  (label 7)+  (parent 2)+  (unrealized (0 1) (2 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (w expt) (x rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) w)) (x x))+  (deflistener (exp (gen) (mul w x)))+  (deflistener (cat (exp (gen) x) w))+  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)))+  (non-orig (privk b))+  (uniq-gen x)+  (precur (2 0))+  (operation nonce-test (displaced 3 0 init 1) (exp (gen) x-0) (2 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) w)+          (enc (enc (exp (gen) w) (exp (gen) x) (privk b))+            (exp (gen) (mul w x)))))+      (send+        (enc (enc (exp (gen) w) (exp (gen) x) (privk a))+          (exp (gen) (mul w x)))))+    ((recv (exp (gen) (mul w x))) (send (exp (gen) (mul w x))))+    ((recv (cat (exp (gen) x) w)) (send (cat (exp (gen) x) w))))+  (label 8)+  (parent 7)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x rndx) (w expt))+  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) w))) (x x))+  (deflistener (exp (gen) w))+  (deflistener (cat (gen) w))+  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)))+  (non-orig (privk b))+  (uniq-gen x)+  (precur (2 0))+  (operation nonce-test (contracted (h (exp (gen) (mul (rec x) w))))+    (gen) (2 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) (mul (rec x) w))+          (enc (enc (exp (gen) (mul (rec x) w)) (exp (gen) x) (privk b))+            (exp (gen) w))))+      (send+        (enc (enc (exp (gen) (mul (rec x) w)) (exp (gen) x) (privk a))+          (exp (gen) w)))) ((recv (exp (gen) w)) (send (exp (gen) w)))+    ((recv (cat (gen) w)) (send (cat (gen) w))))+  (label 9)+  (parent 7)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x rndx) (w expt) (x-0 rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) w x-0)))+    (x x))+  (deflistener (exp (gen) (mul w x-0)))+  (deflistener (cat (exp (gen) x-0) w))+  (defstrand init 1 (x x-0))+  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 0) (2 0)))+  (non-orig (privk b))+  (uniq-gen x x-0)+  (precur (2 0))+  (operation nonce-test (added-strand init 1) (exp (gen) x-0) (2 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) (mul (rec x) w x-0))+          (enc+            (enc (exp (gen) (mul (rec x) w x-0)) (exp (gen) x)+              (privk b)) (exp (gen) (mul w x-0)))))+      (send+        (enc+          (enc (exp (gen) (mul (rec x) w x-0)) (exp (gen) x) (privk a))+          (exp (gen) (mul w x-0)))))+    ((recv (exp (gen) (mul w x-0))) (send (exp (gen) (mul w x-0))))+    ((recv (cat (exp (gen) x-0) w)) (send (cat (exp (gen) x-0) w)))+    ((send (exp (gen) x-0))))+  (label 10)+  (parent 7)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (h base) (x rndx) (w expt) (y rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) w y))) (x x))+  (deflistener (exp (gen) (mul w y)))+  (deflistener (cat (exp (gen) y) w))+  (defstrand resp 2 (b b-0) (h h) (y y))+  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0)))+  (non-orig (privk b))+  (uniq-gen x y)+  (precur (2 0))+  (operation nonce-test (added-strand resp 2) (exp (gen) y) (2 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) (mul (rec x) w y))+          (enc+            (enc (exp (gen) (mul (rec x) w y)) (exp (gen) x) (privk b))+            (exp (gen) (mul w y)))))+      (send+        (enc (enc (exp (gen) (mul (rec x) w y)) (exp (gen) x) (privk a))+          (exp (gen) (mul w y)))))+    ((recv (exp (gen) (mul w y))) (send (exp (gen) (mul w y))))+    ((recv (cat (exp (gen) y) w)) (send (cat (exp (gen) y) w)))+    ((recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b-0)) (exp h y))))))+  (label 11)+  (parent 7)+  (unrealized (0 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x y rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul x y)))+  (deflistener (cat (exp (gen) x) y))+  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y))+  (precedes ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0)))+  (non-orig (privk b))+  (uniq-gen x y)+  (precur (2 0))+  (operation encryption-test (added-strand resp 2)+    (enc (exp (gen) y) (exp (gen) x) (privk b)) (0 1))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))+    ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y)))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))))+  (label 12)+  (parent 8)+  (unrealized (2 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x y rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul x y)))+  (deflistener (cat (gen) (mul x y)))+  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y))+  (precedes ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0)))+  (non-orig (privk b))+  (uniq-gen x y)+  (precur (2 0))+  (operation encryption-test (added-strand resp 2)+    (enc (exp (gen) y) (exp (gen) x) (privk b)) (0 1))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))+    ((recv (cat (gen) (mul x y))) (send (cat (gen) (mul x y))))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))))+  (label 13)+  (parent 9)+  (unrealized (1 0) (2 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x x-0 y rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul x y)))+  (deflistener (cat (exp (gen) x-0) (mul x (rec x-0) y)))+  (defstrand init 1 (x x-0))+  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y))+  (precedes ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 0) (2 0))+    ((4 1) (2 0)))+  (non-orig (privk b))+  (uniq-gen x x-0 y)+  (precur (2 0))+  (operation encryption-test (added-strand resp 2)+    (enc (exp (gen) y) (exp (gen) x) (privk b)) (0 1))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))+    ((recv (cat (exp (gen) x-0) (mul x (rec x-0) y)))+      (send (cat (exp (gen) x-0) (mul x (rec x-0) y))))+    ((send (exp (gen) x-0)))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))))+  (label 14)+  (parent 10)+  (unrealized (1 0) (2 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x y rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul x y)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y))+  (precedes ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0)))+  (non-orig (privk b))+  (uniq-gen x y)+  (precur (2 0))+  (operation encryption-test (displaced 4 3 resp 2)+    (enc (exp (gen) y-0) (exp (gen) x) (privk b-0)) (0 1))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))))+  (label 15)+  (parent 11)+  (unrealized (2 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (h base) (x y y-0 rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) y-0)) (x x))+  (deflistener (exp (gen) (mul x y-0)))+  (deflistener (cat (exp (gen) y) (mul x (rec y) y-0)))+  (defstrand resp 2 (b b-0) (h h) (y y))+  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y-0))+  (precedes ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0))+    ((4 1) (2 0)))+  (non-orig (privk b))+  (uniq-gen x y y-0)+  (precur (2 0))+  (operation encryption-test (added-strand resp 2)+    (enc (exp (gen) y-0) (exp (gen) x) (privk b)) (0 1))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y-0)+          (enc (enc (exp (gen) y-0) (exp (gen) x) (privk b))+            (exp (gen) (mul x y-0)))))+      (send+        (enc (enc (exp (gen) y-0) (exp (gen) x) (privk a))+          (exp (gen) (mul x y-0)))))+    ((recv (exp (gen) (mul x y-0))) (send (exp (gen) (mul x y-0))))+    ((recv (cat (exp (gen) y) (mul x (rec y) y-0)))+      (send (cat (exp (gen) y) (mul x (rec y) y-0))))+    ((recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b-0)) (exp h y)))))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y-0)+          (enc (enc (exp (gen) y-0) (exp (gen) x) (privk b))+            (exp (gen) (mul x y-0)))))))+  (label 16)+  (parent 11)+  (unrealized (1 0) (2 0))+  (dead)+  (comment "empty cohort"))++(comment "Nothing left to do")++(defprotocol station-to-station-unflip diffie-hellman+  (defrole init+    (vars (x rndx) (h base) (a b name))+    (trace (send (exp (gen) x))+      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))+      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x)))+      (send (privk a)))+    (uniq-gen x))+  (defrole resp+    (vars (y rndx) (h base) (a b name))+    (trace (recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))+      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y)))+      (send (privk b)))+    (uniq-gen y))+  (defgenrule neqRl_indx+    (forall ((x indx)) (implies (fact neq x x) (false))))+  (defgenrule neqRl_strd+    (forall ((x strd)) (implies (fact neq x x) (false))))+  (defgenrule neqRl_mesg+    (forall ((x mesg)) (implies (fact neq x x) (false)))))++(defskeleton station-to-station-unflip+  (vars (a b name) (h base) (y rndx))+  (defstrand resp 3 (a a) (b b) (h h) (y y))+  (non-orig (privk a))+  (uniq-gen y)+  (traces+    ((recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))+      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y)))))+  (label 17)+  (unrealized (0 2))+  (origs)+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))+  (non-orig (privk a))+  (uniq-gen y x)+  (operation encryption-test (added-strand init 3)+    (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+      (exp (gen) (mul y x))) (0 2))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x))))))+  (label 18)+  (parent 17)+  (unrealized (1 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (b name) (h base) (y rndx))+  (defstrand resp 3 (a b) (b b) (h h) (y y))+  (non-orig (privk b))+  (uniq-gen y)+  (operation encryption-test (displaced 1 0 resp 2)+    (enc (enc (exp (gen) y) h (privk a)) (exp h y)) (0 2))+  (traces+    ((recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))+      (recv (enc (enc (exp (gen) y) h (privk b)) (exp h y)))))+  (label 19)+  (parent 17)+  (realized)+  (shape)+  (maps ((0) ((a b) (b b) (y y) (h h))))+  (origs))++(defskeleton station-to-station-unflip+  (vars (a b name) (h base) (y rndx))+  (defstrand resp 3 (a a) (b b) (h h) (y y))+  (deflistener (exp h y))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (privk a))+  (uniq-gen y)+  (operation encryption-test (added-listener (exp h y))+    (enc (enc (exp (gen) y) h (privk a)) (exp h y)) (0 2))+  (traces+    ((recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))+      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y))))+    ((recv (exp h y)) (send (exp h y))))+  (label 20)+  (parent 17)+  (unrealized (0 2) (1 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x y rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))+  (precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))+  (non-orig (privk a))+  (uniq-gen x y)+  (operation encryption-test (displaced 2 0 resp 2)+    (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+      (exp (gen) (mul x y))) (1 1))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y))))))+  (label 21)+  (parent 18)+  (realized)+  (shape)+  (maps ((0) ((a a) (b b) (y y) (h (exp (gen) x)))))+  (origs))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (precedes ((0 1) (2 0)) ((1 0) (0 0)) ((1 2) (0 2)) ((2 1) (1 1)))+  (non-orig (privk a))+  (uniq-gen y x)+  (operation encryption-test (added-listener (exp (gen) (mul y x)))+    (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+      (exp (gen) (mul y x))) (1 1))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x)))))+  (label 22)+  (parent 18)+  (unrealized (2 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (y rndx))+  (defstrand resp 3 (a a) (b b) (h (gen)) (y y))+  (deflistener (exp (gen) y))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (privk a))+  (uniq-gen y)+  (operation nonce-test (displaced 2 0 resp 2) (exp (gen) y-0) (1 0))+  (traces+    ((recv (gen))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (gen) (privk b)) (exp (gen) y))))+      (recv (enc (enc (exp (gen) y) (gen) (privk a)) (exp (gen) y))))+    ((recv (exp (gen) y)) (send (exp (gen) y))))+  (label 23)+  (parent 20)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (h base) (y rndx) (w expt))+  (defstrand resp 3 (a a) (b b) (h h) (y y))+  (deflistener (exp h y))+  (deflistener (cat (exp h (mul y (rec w))) w))+  (precedes ((0 1) (2 0)) ((1 1) (0 2)) ((2 1) (1 0)))+  (non-orig (privk a))+  (uniq-gen y)+  (precur (2 0))+  (operation nonce-test (added-listener (cat (exp h (mul y (rec w))) w))+    (exp h y) (1 0))+  (traces+    ((recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))+      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y))))+    ((recv (exp h y)) (send (exp h y)))+    ((recv (cat (exp h (mul y (rec w))) w))+      (send (cat (exp h (mul y (rec w))) w))))+  (label 24)+  (parent 20)+  (unrealized (0 2) (2 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (precedes ((0 1) (3 0)) ((1 0) (0 0)) ((1 2) (0 2)) ((2 1) (1 1))+    ((3 1) (2 0)))+  (non-orig (privk a))+  (uniq-gen y x)+  (operation nonce-test (added-listener (cat (exp (gen) y) x))+    (exp (gen) (mul y x)) (2 0))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x))))+  (label 25)+  (parent 22)+  (unrealized (3 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) x) y))+  (precedes ((0 1) (3 0)) ((1 0) (0 0)) ((1 2) (0 2)) ((2 1) (1 1))+    ((3 1) (2 0)))+  (non-orig (privk a))+  (uniq-gen y x)+  (operation nonce-test (added-listener (cat (exp (gen) x) y))+    (exp (gen) (mul y x)) (2 0))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y))))+  (label 26)+  (parent 22)+  (unrealized (3 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (b name) (y rndx))+  (defstrand resp 3 (a b) (b b) (h (gen)) (y y))+  (deflistener (exp (gen) y))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (privk b))+  (uniq-gen y)+  (operation encryption-test (displaced 2 0 resp 2)+    (enc (exp (gen) y) (gen) (privk a)) (0 2))+  (traces+    ((recv (gen))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (gen) (privk b)) (exp (gen) y))))+      (recv (enc (enc (exp (gen) y) (gen) (privk b)) (exp (gen) y))))+    ((recv (exp (gen) y)) (send (exp (gen) y))))+  (label 27)+  (parent 23)+  (realized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (w expt) (y rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) w)) (y y))+  (deflistener (exp (gen) (mul w y)))+  (deflistener (cat (exp (gen) y) w))+  (precedes ((0 1) (2 0)) ((1 1) (0 2)) ((2 1) (1 0)))+  (non-orig (privk a))+  (uniq-gen y)+  (precur (2 0))+  (operation nonce-test (displaced 3 0 resp 2) (exp (gen) y-0) (2 0))+  (traces+    ((recv (exp (gen) w))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) w) (privk b))+            (exp (gen) (mul w y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) w) (privk a))+          (exp (gen) (mul w y)))))+    ((recv (exp (gen) (mul w y))) (send (exp (gen) (mul w y))))+    ((recv (cat (exp (gen) y) w)) (send (cat (exp (gen) y) w))))+  (label 28)+  (parent 24)+  (unrealized (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (b name) (y rndx))+  (defstrand resp 3 (a b) (b b) (h (gen)) (y y))+  (non-orig (privk b))+  (uniq-gen y)+  (operation generalization deleted (1 0))+  (traces+    ((recv (gen))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (gen) (privk b)) (exp (gen) y))))+      (recv (enc (enc (exp (gen) y) (gen) (privk b)) (exp (gen) y)))))+  (label 29)+  (parent 27)+  (realized)+  (shape)+  (maps ((0) ((a b) (b b) (y y) (h (gen)))))+  (origs))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (precedes ((0 1) (2 0)) ((0 1) (3 1)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (0 2)))+  (non-orig (privk a))+  (uniq-gen y x)+  (precur (2 0))+  (operation encryption-test (added-strand init 3)+    (enc (exp (gen) y) (exp (gen) x) (privk a)) (0 2))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x))))))+  (label 30)+  (parent 28)+  (unrealized (2 0) (3 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (b name) (w expt) (y rndx))+  (defstrand resp 3 (a b) (b b) (h (exp (gen) w)) (y y))+  (deflistener (exp (gen) (mul w y)))+  (deflistener (cat (exp (gen) y) w))+  (precedes ((0 1) (2 0)) ((1 1) (0 2)) ((2 1) (1 0)))+  (non-orig (privk b))+  (uniq-gen y)+  (precur (2 0))+  (operation encryption-test (displaced 3 0 resp 2)+    (enc (exp (gen) y) (exp (gen) w) (privk a)) (0 2))+  (traces+    ((recv (exp (gen) w))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) w) (privk b))+            (exp (gen) (mul w y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) w) (privk b))+          (exp (gen) (mul w y)))))+    ((recv (exp (gen) (mul w y))) (send (exp (gen) (mul w y))))+    ((recv (cat (exp (gen) y) w)) (send (cat (exp (gen) y) w))))+  (label 31)+  (parent 28)+  (realized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x y rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul x y)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))+  (precedes ((0 1) (2 0)) ((0 1) (3 1)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (0 2)))+  (non-orig (privk a))+  (uniq-gen x y)+  (precur (2 0))+  (operation encryption-test (displaced 4 0 resp 2)+    (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+      (exp (gen) (mul x y))) (3 1))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y))))))+  (label 32)+  (parent 30)+  (unrealized (2 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (precedes ((0 1) (2 0)) ((0 1) (4 0)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (0 2)) ((4 1) (3 1)))+  (non-orig (privk a))+  (uniq-gen y x)+  (precur (2 0))+  (operation encryption-test (added-listener (exp (gen) (mul y x)))+    (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+      (exp (gen) (mul y x))) (3 1))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x)))))+  (label 33)+  (parent 30)+  (unrealized (2 0) (4 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (b name) (w expt) (y rndx))+  (defstrand resp 3 (a b) (b b) (h (exp (gen) w)) (y y))+  (deflistener (cat (exp (gen) y) w))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (privk b))+  (uniq-gen y)+  (precur (1 0))+  (operation generalization deleted (1 0))+  (traces+    ((recv (exp (gen) w))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) w) (privk b))+            (exp (gen) (mul w y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) w) (privk b))+          (exp (gen) (mul w y)))))+    ((recv (cat (exp (gen) y) w)) (send (cat (exp (gen) y) w))))+  (label 34)+  (parent 31)+  (realized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (precedes ((0 1) (2 0)) ((0 1) (5 0)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (0 2)) ((4 1) (3 1)) ((5 1) (4 0)))+  (non-orig (privk a))+  (uniq-gen y x)+  (precur (2 0))+  (operation nonce-test (added-listener (cat (exp (gen) y) x))+    (exp (gen) (mul y x)) (4 0))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x))))+  (label 35)+  (parent 33)+  (unrealized (2 0) (5 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) x) y))+  (precedes ((0 1) (2 0)) ((0 1) (5 0)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (0 2)) ((4 1) (3 1)) ((5 1) (4 0)))+  (non-orig (privk a))+  (uniq-gen y x)+  (precur (2 0))+  (operation nonce-test (added-listener (cat (exp (gen) x) y))+    (exp (gen) (mul y x)) (4 0))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y))))+  (label 36)+  (parent 33)+  (unrealized (2 0) (5 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (b name) (w expt) (y rndx))+  (defstrand resp 3 (a b) (b b) (h (exp (gen) w)) (y y))+  (non-orig (privk b))+  (uniq-gen y)+  (operation generalization deleted (1 0))+  (traces+    ((recv (exp (gen) w))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) w) (privk b))+            (exp (gen) (mul w y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) w) (privk b))+          (exp (gen) (mul w y))))))+  (label 37)+  (parent 34)+  (realized)+  (shape)+  (maps ((0) ((a b) (b b) (y y) (h (exp (gen) w)))))+  (origs))++(comment "Nothing left to do")++(defprotocol station-to-station-unflip diffie-hellman+  (defrole init+    (vars (x rndx) (h base) (a b name))+    (trace (send (exp (gen) x))+      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))+      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x)))+      (send (privk a)))+    (uniq-gen x))+  (defrole resp+    (vars (y rndx) (h base) (a b name))+    (trace (recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))+      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y)))+      (send (privk b)))+    (uniq-gen y))+  (defgenrule neqRl_indx+    (forall ((x indx)) (implies (fact neq x x) (false))))+  (defgenrule neqRl_strd+    (forall ((x strd)) (implies (fact neq x x) (false))))+  (defgenrule neqRl_mesg+    (forall ((x mesg)) (implies (fact neq x x) (false)))))++(defskeleton station-to-station-unflip+  (vars (a b name) (h base) (y rndx))+  (defstrand resp 3 (a a) (b b) (h h) (y y))+  (non-orig (privk a))+  (uniq-gen y)+  (facts (neq a b))+  (traces+    ((recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))+      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y)))))+  (label 38)+  (unrealized (0 2))+  (origs)+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))+  (non-orig (privk a))+  (uniq-gen y x)+  (facts (neq a b))+  (operation encryption-test (added-strand init 3)+    (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+      (exp (gen) (mul y x))) (0 2))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x))))))+  (label 39)+  (parent 38)+  (unrealized (1 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (h base) (y rndx))+  (defstrand resp 3 (a a) (b b) (h h) (y y))+  (deflistener (exp h y))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (privk a))+  (uniq-gen y)+  (facts (neq a b))+  (operation encryption-test (added-listener (exp h y))+    (enc (enc (exp (gen) y) h (privk a)) (exp h y)) (0 2))+  (traces+    ((recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))+      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y))))+    ((recv (exp h y)) (send (exp h y))))+  (label 40)+  (parent 38)+  (unrealized (0 2) (1 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x y rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))+  (precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))+  (non-orig (privk a))+  (uniq-gen x y)+  (facts (neq a b))+  (operation encryption-test (displaced 2 0 resp 2)+    (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+      (exp (gen) (mul x y))) (1 1))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y))))))+  (label 41)+  (parent 39)+  (realized)+  (shape)+  (maps ((0) ((a a) (b b) (y y) (h (exp (gen) x)))))+  (origs))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (precedes ((0 1) (2 0)) ((1 0) (0 0)) ((1 2) (0 2)) ((2 1) (1 1)))+  (non-orig (privk a))+  (uniq-gen y x)+  (facts (neq a b))+  (operation encryption-test (added-listener (exp (gen) (mul y x)))+    (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+      (exp (gen) (mul y x))) (1 1))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x)))))+  (label 42)+  (parent 39)+  (unrealized (2 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (y rndx))+  (defstrand resp 3 (a a) (b b) (h (gen)) (y y))+  (deflistener (exp (gen) y))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (privk a))+  (uniq-gen y)+  (facts (neq a b))+  (operation nonce-test (displaced 2 0 resp 2) (exp (gen) y-0) (1 0))+  (traces+    ((recv (gen))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (gen) (privk b)) (exp (gen) y))))+      (recv (enc (enc (exp (gen) y) (gen) (privk a)) (exp (gen) y))))+    ((recv (exp (gen) y)) (send (exp (gen) y))))+  (label 43)+  (parent 40)+  (unrealized (0 2))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b name) (h base) (y rndx) (w expt))+  (defstrand resp 3 (a a) (b b) (h h) (y y))+  (deflistener (exp h y))+  (deflistener (cat (exp h (mul y (rec w))) w))+  (precedes ((0 1) (2 0)) ((1 1) (0 2)) ((2 1) (1 0)))+  (non-orig (privk a))+  (uniq-gen y)+  (precur (2 0))+  (facts (neq a b))+  (operation nonce-test (added-listener (cat (exp h (mul y (rec w))) w))+    (exp h y) (1 0))+  (traces+    ((recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))+      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y))))+    ((recv (exp h y)) (send (exp h y)))+    ((recv (cat (exp h (mul y (rec w))) w))+      (send (cat (exp h (mul y (rec w))) w))))+  (label 44)+  (parent 40)+  (unrealized (0 2) (2 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (precedes ((0 1) (3 0)) ((1 0) (0 0)) ((1 2) (0 2)) ((2 1) (1 1))+    ((3 1) (2 0)))+  (non-orig (privk a))+  (uniq-gen y x)+  (facts (neq a b))+  (operation nonce-test (added-listener (cat (exp (gen) y) x))+    (exp (gen) (mul y x)) (2 0))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x))))+  (label 45)+  (parent 42)+  (unrealized (3 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) x) y))+  (precedes ((0 1) (3 0)) ((1 0) (0 0)) ((1 2) (0 2)) ((2 1) (1 1))+    ((3 1) (2 0)))+  (non-orig (privk a))+  (uniq-gen y x)+  (facts (neq a b))+  (operation nonce-test (added-listener (cat (exp (gen) x) y))+    (exp (gen) (mul y x)) (2 0))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y))))+  (label 46)+  (parent 42)+  (unrealized (3 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b name) (w expt) (y rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) w)) (y y))+  (deflistener (exp (gen) (mul w y)))+  (deflistener (cat (exp (gen) y) w))+  (precedes ((0 1) (2 0)) ((1 1) (0 2)) ((2 1) (1 0)))+  (non-orig (privk a))+  (uniq-gen y)+  (precur (2 0))+  (facts (neq a b))+  (operation nonce-test (displaced 3 0 resp 2) (exp (gen) y-0) (2 0))+  (traces+    ((recv (exp (gen) w))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) w) (privk b))+            (exp (gen) (mul w y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) w) (privk a))+          (exp (gen) (mul w y)))))+    ((recv (exp (gen) (mul w y))) (send (exp (gen) (mul w y))))+    ((recv (cat (exp (gen) y) w)) (send (cat (exp (gen) y) w))))+  (label 47)+  (parent 44)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (precedes ((0 1) (2 0)) ((0 1) (3 1)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (0 2)))+  (non-orig (privk a))+  (uniq-gen y x)+  (precur (2 0))+  (facts (neq a b))+  (operation encryption-test (added-strand init 3)+    (enc (exp (gen) y) (exp (gen) x) (privk a)) (0 2))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x))))))+  (label 48)+  (parent 47)+  (unrealized (2 0) (3 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x y rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul x y)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))+  (precedes ((0 1) (2 0)) ((0 1) (3 1)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (0 2)))+  (non-orig (privk a))+  (uniq-gen x y)+  (precur (2 0))+  (facts (neq a b))+  (operation encryption-test (displaced 4 0 resp 2)+    (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+      (exp (gen) (mul x y))) (3 1))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y))))))+  (label 49)+  (parent 48)+  (unrealized (2 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (precedes ((0 1) (2 0)) ((0 1) (4 0)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (0 2)) ((4 1) (3 1)))+  (non-orig (privk a))+  (uniq-gen y x)+  (precur (2 0))+  (facts (neq a b))+  (operation encryption-test (added-listener (exp (gen) (mul y x)))+    (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+      (exp (gen) (mul y x))) (3 1))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x)))))+  (label 50)+  (parent 48)+  (unrealized (2 0) (4 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (precedes ((0 1) (2 0)) ((0 1) (5 0)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (0 2)) ((4 1) (3 1)) ((5 1) (4 0)))+  (non-orig (privk a))+  (uniq-gen y x)+  (precur (2 0))+  (facts (neq a b))+  (operation nonce-test (added-listener (cat (exp (gen) y) x))+    (exp (gen) (mul y x)) (4 0))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x))))+  (label 51)+  (parent 50)+  (unrealized (2 0) (5 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) x) y))+  (precedes ((0 1) (2 0)) ((0 1) (5 0)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (0 2)) ((4 1) (3 1)) ((5 1) (4 0)))+  (non-orig (privk a))+  (uniq-gen y x)+  (precur (2 0))+  (facts (neq a b))+  (operation nonce-test (added-listener (cat (exp (gen) x) y))+    (exp (gen) (mul y x)) (4 0))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y))))+  (label 52)+  (parent 50)+  (unrealized (2 0) (5 0))+  (dead)+  (comment "empty cohort"))++(comment "Nothing left to do")++(defprotocol station-to-station-unflip diffie-hellman+  (defrole init+    (vars (x rndx) (h base) (a b name))+    (trace (send (exp (gen) x))+      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))+      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x)))+      (send (privk a)))+    (uniq-gen x))+  (defrole resp+    (vars (y rndx) (h base) (a b name))+    (trace (recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))+      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y)))+      (send (privk b)))+    (uniq-gen y))+  (defgenrule neqRl_indx+    (forall ((x indx)) (implies (fact neq x x) (false))))+  (defgenrule neqRl_strd+    (forall ((x strd)) (implies (fact neq x x) (false))))+  (defgenrule neqRl_mesg+    (forall ((x mesg)) (implies (fact neq x x) (false)))))++(defskeleton station-to-station-unflip+  (vars (a b name) (h base) (x rndx))+  (defstrand init 3 (a a) (b b) (h h) (x x))+  (deflistener (exp h x))+  (non-orig (privk a) (privk b))+  (uniq-gen x)+  (traces+    ((send (exp (gen) x))+      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))+      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x))))+    ((recv (exp h x)) (send (exp h x))))+  (label 53)+  (unrealized (0 1) (1 0))+  (preskeleton)+  (origs)+  (comment "Not a skeleton"))++(defskeleton station-to-station-unflip+  (vars (a b name) (h base) (x rndx))+  (defstrand init 3 (a a) (b b) (h h) (x x))+  (deflistener (exp h x))+  (precedes ((0 0) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen x)+  (traces+    ((send (exp (gen) x))+      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))+      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x))))+    ((recv (exp h x)) (send (exp h x))))+  (label 54)+  (parent 53)+  (unrealized (0 1) (1 0))+  (origs)+  (comment "5 in cohort - 5 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x rndx))+  (defstrand init 3 (a a) (b b) (h (gen)) (x x))+  (deflistener (exp (gen) x))+  (precedes ((0 0) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen x)+  (operation nonce-test (displaced 2 0 init 1) (exp (gen) x-0) (1 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (gen)+          (enc (enc (gen) (exp (gen) x) (privk b)) (exp (gen) x))))+      (send (enc (enc (gen) (exp (gen) x) (privk a)) (exp (gen) x))))+    ((recv (exp (gen) x)) (send (exp (gen) x))))+  (label 55)+  (parent 54)+  (unrealized (0 1))+  (dead)+  (origs)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) (rec x))) (x x))+  (deflistener (gen))+  (precedes ((0 0) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen x)+  (operation nonce-test (contracted (h (exp (gen) (rec x)))) (gen)+    (1 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) (rec x))+          (enc (enc (exp (gen) (rec x)) (exp (gen) x) (privk b))+            (gen))))+      (send+        (enc (enc (exp (gen) (rec x)) (exp (gen) x) (privk a)) (gen))))+    ((recv (gen)) (send (gen))))+  (label 56)+  (parent 54)+  (unrealized (0 1))+  (dead)+  (origs)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x x-0 rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) x-0))) (x x))+  (deflistener (exp (gen) x-0))+  (defstrand init 1 (x x-0))+  (precedes ((0 0) (1 0)) ((2 0) (0 1)) ((2 0) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen x x-0)+  (operation nonce-test (added-strand init 1) (exp (gen) x-0) (1 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) (mul (rec x) x-0))+          (enc+            (enc (exp (gen) (mul (rec x) x-0)) (exp (gen) x) (privk b))+            (exp (gen) x-0))))+      (send+        (enc (enc (exp (gen) (mul (rec x) x-0)) (exp (gen) x) (privk a))+          (exp (gen) x-0))))+    ((recv (exp (gen) x-0)) (send (exp (gen) x-0)))+    ((send (exp (gen) x-0))))+  (label 57)+  (parent 54)+  (unrealized (0 1))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (h base) (x y rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) y))) (x x))+  (deflistener (exp (gen) y))+  (defstrand resp 2 (b b-0) (h h) (y y))+  (precedes ((0 0) (1 0)) ((2 1) (0 1)) ((2 1) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen x y)+  (operation nonce-test (added-strand resp 2) (exp (gen) y) (1 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) (mul (rec x) y))+          (enc (enc (exp (gen) (mul (rec x) y)) (exp (gen) x) (privk b))+            (exp (gen) y))))+      (send+        (enc (enc (exp (gen) (mul (rec x) y)) (exp (gen) x) (privk a))+          (exp (gen) y)))) ((recv (exp (gen) y)) (send (exp (gen) y)))+    ((recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b-0)) (exp h y))))))+  (label 58)+  (parent 54)+  (unrealized (0 1))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b name) (h base) (x rndx) (w expt))+  (defstrand init 3 (a a) (b b) (h h) (x x))+  (deflistener (exp h x))+  (deflistener (cat (exp h (mul x (rec w))) w))+  (precedes ((0 0) (2 0)) ((2 1) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen x)+  (precur (2 0))+  (operation nonce-test (added-listener (cat (exp h (mul x (rec w))) w))+    (exp h x) (1 0))+  (traces+    ((send (exp (gen) x))+      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))+      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x))))+    ((recv (exp h x)) (send (exp h x)))+    ((recv (cat (exp h (mul x (rec w))) w))+      (send (cat (exp h (mul x (rec w))) w))))+  (label 59)+  (parent 54)+  (unrealized (0 1) (2 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (w expt) (x rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) w)) (x x))+  (deflistener (exp (gen) (mul w x)))+  (deflistener (cat (exp (gen) x) w))+  (precedes ((0 0) (2 0)) ((2 1) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen x)+  (precur (2 0))+  (operation nonce-test (displaced 3 0 init 1) (exp (gen) x-0) (2 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) w)+          (enc (enc (exp (gen) w) (exp (gen) x) (privk b))+            (exp (gen) (mul w x)))))+      (send+        (enc (enc (exp (gen) w) (exp (gen) x) (privk a))+          (exp (gen) (mul w x)))))+    ((recv (exp (gen) (mul w x))) (send (exp (gen) (mul w x))))+    ((recv (cat (exp (gen) x) w)) (send (cat (exp (gen) x) w))))+  (label 60)+  (parent 59)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x rndx) (w expt))+  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) w))) (x x))+  (deflistener (exp (gen) w))+  (deflistener (cat (gen) w))+  (precedes ((0 0) (2 0)) ((2 1) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen x)+  (precur (2 0))+  (operation nonce-test (contracted (h (exp (gen) (mul (rec x) w))))+    (gen) (2 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) (mul (rec x) w))+          (enc (enc (exp (gen) (mul (rec x) w)) (exp (gen) x) (privk b))+            (exp (gen) w))))+      (send+        (enc (enc (exp (gen) (mul (rec x) w)) (exp (gen) x) (privk a))+          (exp (gen) w)))) ((recv (exp (gen) w)) (send (exp (gen) w)))+    ((recv (cat (gen) w)) (send (cat (gen) w))))+  (label 61)+  (parent 59)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x rndx) (w expt) (x-0 rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) w x-0)))+    (x x))+  (deflistener (exp (gen) (mul w x-0)))+  (deflistener (cat (exp (gen) x-0) w))+  (defstrand init 1 (x x-0))+  (precedes ((0 0) (2 0)) ((2 1) (1 0)) ((3 0) (0 1)) ((3 0) (2 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen x x-0)+  (precur (2 0))+  (operation nonce-test (added-strand init 1) (exp (gen) x-0) (2 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) (mul (rec x) w x-0))+          (enc+            (enc (exp (gen) (mul (rec x) w x-0)) (exp (gen) x)+              (privk b)) (exp (gen) (mul w x-0)))))+      (send+        (enc+          (enc (exp (gen) (mul (rec x) w x-0)) (exp (gen) x) (privk a))+          (exp (gen) (mul w x-0)))))+    ((recv (exp (gen) (mul w x-0))) (send (exp (gen) (mul w x-0))))+    ((recv (cat (exp (gen) x-0) w)) (send (cat (exp (gen) x-0) w)))+    ((send (exp (gen) x-0))))+  (label 62)+  (parent 59)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (h base) (x rndx) (w expt) (y rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) (mul (rec x) w y))) (x x))+  (deflistener (exp (gen) (mul w y)))+  (deflistener (cat (exp (gen) y) w))+  (defstrand resp 2 (b b-0) (h h) (y y))+  (precedes ((0 0) (2 0)) ((2 1) (1 0)) ((3 1) (0 1)) ((3 1) (2 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen x y)+  (precur (2 0))+  (operation nonce-test (added-strand resp 2) (exp (gen) y) (2 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) (mul (rec x) w y))+          (enc+            (enc (exp (gen) (mul (rec x) w y)) (exp (gen) x) (privk b))+            (exp (gen) (mul w y)))))+      (send+        (enc (enc (exp (gen) (mul (rec x) w y)) (exp (gen) x) (privk a))+          (exp (gen) (mul w y)))))+    ((recv (exp (gen) (mul w y))) (send (exp (gen) (mul w y))))+    ((recv (cat (exp (gen) y) w)) (send (cat (exp (gen) y) w)))+    ((recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b-0)) (exp h y))))))+  (label 63)+  (parent 59)+  (unrealized (0 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x y rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul x y)))+  (deflistener (cat (exp (gen) x) y))+  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y))+  (precedes ((0 0) (3 0)) ((2 1) (1 0)) ((3 1) (0 1)) ((3 1) (2 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen x y)+  (precur (2 0))+  (operation encryption-test (added-strand resp 2)+    (enc (exp (gen) y) (exp (gen) x) (privk b)) (0 1))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))+    ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y)))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))))+  (label 64)+  (parent 60)+  (unrealized (2 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x y rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul x y)))+  (deflistener (cat (gen) (mul x y)))+  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y))+  (precedes ((0 0) (3 0)) ((2 1) (1 0)) ((3 1) (0 1)) ((3 1) (2 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen x y)+  (precur (2 0))+  (operation encryption-test (added-strand resp 2)+    (enc (exp (gen) y) (exp (gen) x) (privk b)) (0 1))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))+    ((recv (cat (gen) (mul x y))) (send (cat (gen) (mul x y))))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))))+  (label 65)+  (parent 61)+  (unrealized (1 0) (2 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x x-0 y rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul x y)))+  (deflistener (cat (exp (gen) x-0) (mul x (rec x-0) y)))+  (defstrand init 1 (x x-0))+  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y))+  (precedes ((0 0) (4 0)) ((2 1) (1 0)) ((3 0) (0 1)) ((3 0) (2 0))+    ((4 1) (0 1)) ((4 1) (2 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen x x-0 y)+  (precur (2 0))+  (operation encryption-test (added-strand resp 2)+    (enc (exp (gen) y) (exp (gen) x) (privk b)) (0 1))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))+    ((recv (cat (exp (gen) x-0) (mul x (rec x-0) y)))+      (send (cat (exp (gen) x-0) (mul x (rec x-0) y))))+    ((send (exp (gen) x-0)))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))))+  (label 66)+  (parent 62)+  (unrealized (1 0) (2 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x y rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul x y)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y))+  (precedes ((0 0) (3 0)) ((2 1) (1 0)) ((3 1) (0 1)) ((3 1) (2 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen x y)+  (precur (2 0))+  (operation encryption-test (displaced 4 3 resp 2)+    (enc (exp (gen) y-0) (exp (gen) x) (privk b-0)) (0 1))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))))+  (label 67)+  (parent 63)+  (unrealized (2 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (h base) (x y y-0 rndx))+  (defstrand init 3 (a a) (b b) (h (exp (gen) y-0)) (x x))+  (deflistener (exp (gen) (mul x y-0)))+  (deflistener (cat (exp (gen) y) (mul x (rec y) y-0)))+  (defstrand resp 2 (b b-0) (h h) (y y))+  (defstrand resp 2 (b b) (h (exp (gen) x)) (y y-0))+  (precedes ((0 0) (4 0)) ((2 1) (1 0)) ((3 1) (0 1)) ((3 1) (2 0))+    ((4 1) (0 1)) ((4 1) (2 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen x y y-0)+  (precur (2 0))+  (operation encryption-test (added-strand resp 2)+    (enc (exp (gen) y-0) (exp (gen) x) (privk b)) (0 1))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y-0)+          (enc (enc (exp (gen) y-0) (exp (gen) x) (privk b))+            (exp (gen) (mul x y-0)))))+      (send+        (enc (enc (exp (gen) y-0) (exp (gen) x) (privk a))+          (exp (gen) (mul x y-0)))))+    ((recv (exp (gen) (mul x y-0))) (send (exp (gen) (mul x y-0))))+    ((recv (cat (exp (gen) y) (mul x (rec y) y-0)))+      (send (cat (exp (gen) y) (mul x (rec y) y-0))))+    ((recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b-0)) (exp h y)))))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y-0)+          (enc (enc (exp (gen) y-0) (exp (gen) x) (privk b))+            (exp (gen) (mul x y-0)))))))+  (label 68)+  (parent 63)+  (unrealized (1 0) (2 0))+  (dead)+  (comment "empty cohort"))++(comment "Nothing left to do")++(defprotocol station-to-station-unflip diffie-hellman+  (defrole init+    (vars (x rndx) (h base) (a b name))+    (trace (send (exp (gen) x))+      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))+      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x)))+      (send (privk a)))+    (uniq-gen x))+  (defrole resp+    (vars (y rndx) (h base) (a b name))+    (trace (recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))+      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y)))+      (send (privk b)))+    (uniq-gen y))+  (defgenrule neqRl_indx+    (forall ((x indx)) (implies (fact neq x x) (false))))+  (defgenrule neqRl_strd+    (forall ((x strd)) (implies (fact neq x x) (false))))+  (defgenrule neqRl_mesg+    (forall ((x mesg)) (implies (fact neq x x) (false)))))++(defskeleton station-to-station-unflip+  (vars (a b name) (h base) (y rndx))+  (defstrand resp 3 (a a) (b b) (h h) (y y))+  (deflistener (exp h y))+  (non-orig (privk a) (privk b))+  (uniq-gen y)+  (traces+    ((recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))+      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y))))+    ((recv (exp h y)) (send (exp h y))))+  (label 69)+  (unrealized (0 2) (1 0))+  (preskeleton)+  (origs)+  (comment "Not a skeleton"))++(defskeleton station-to-station-unflip+  (vars (a b name) (h base) (y rndx))+  (defstrand resp 3 (a a) (b b) (h h) (y y))+  (deflistener (exp h y))+  (precedes ((0 1) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen y)+  (traces+    ((recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))+      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y))))+    ((recv (exp h y)) (send (exp h y))))+  (label 70)+  (parent 69)+  (unrealized (0 2) (1 0))+  (origs)+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (y rndx))+  (defstrand resp 3 (a a) (b b) (h (gen)) (y y))+  (deflistener (exp (gen) y))+  (precedes ((0 1) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen y)+  (operation nonce-test (displaced 2 0 resp 2) (exp (gen) y-0) (1 0))+  (traces+    ((recv (gen))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (gen) (privk b)) (exp (gen) y))))+      (recv (enc (enc (exp (gen) y) (gen) (privk a)) (exp (gen) y))))+    ((recv (exp (gen) y)) (send (exp (gen) y))))+  (label 71)+  (parent 70)+  (unrealized (0 2))+  (origs)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (h base) (y rndx) (w expt))+  (defstrand resp 3 (a a) (b b) (h h) (y y))+  (deflistener (exp h y))+  (deflistener (cat (exp h (mul y (rec w))) w))+  (precedes ((0 1) (2 0)) ((2 1) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen y)+  (precur (2 0))+  (operation nonce-test (added-listener (cat (exp h (mul y (rec w))) w))+    (exp h y) (1 0))+  (traces+    ((recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))+      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y))))+    ((recv (exp h y)) (send (exp h y)))+    ((recv (cat (exp h (mul y (rec w))) w))+      (send (cat (exp h (mul y (rec w))) w))))+  (label 72)+  (parent 70)+  (unrealized (0 2) (2 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (b name) (y rndx))+  (defstrand resp 3 (a b) (b b) (h (gen)) (y y))+  (deflistener (exp (gen) y))+  (precedes ((0 1) (1 0)))+  (non-orig (privk b))+  (uniq-gen y)+  (operation encryption-test (displaced 2 0 resp 2)+    (enc (exp (gen) y) (gen) (privk a)) (0 2))+  (traces+    ((recv (gen))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (gen) (privk b)) (exp (gen) y))))+      (recv (enc (enc (exp (gen) y) (gen) (privk b)) (exp (gen) y))))+    ((recv (exp (gen) y)) (send (exp (gen) y))))+  (label 73)+  (parent 71)+  (realized)+  (shape)+  (maps ((0 1) ((a b) (b b) (y y) (h (gen)))))+  (origs))++(defskeleton station-to-station-unflip+  (vars (a b name) (w expt) (y rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) w)) (y y))+  (deflistener (exp (gen) (mul w y)))+  (deflistener (cat (exp (gen) y) w))+  (precedes ((0 1) (2 0)) ((2 1) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen y)+  (precur (2 0))+  (operation nonce-test (displaced 3 0 resp 2) (exp (gen) y-0) (2 0))+  (traces+    ((recv (exp (gen) w))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) w) (privk b))+            (exp (gen) (mul w y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) w) (privk a))+          (exp (gen) (mul w y)))))+    ((recv (exp (gen) (mul w y))) (send (exp (gen) (mul w y))))+    ((recv (cat (exp (gen) y) w)) (send (cat (exp (gen) y) w))))+  (label 74)+  (parent 72)+  (unrealized (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (precedes ((0 1) (2 0)) ((0 1) (3 1)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (0 2)))+  (non-orig (privk a) (privk b))+  (uniq-gen y x)+  (precur (2 0))+  (operation encryption-test (added-strand init 3)+    (enc (exp (gen) y) (exp (gen) x) (privk a)) (0 2))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x))))))+  (label 75)+  (parent 74)+  (unrealized (2 0) (3 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (b name) (w expt) (y rndx))+  (defstrand resp 3 (a b) (b b) (h (exp (gen) w)) (y y))+  (deflistener (exp (gen) (mul w y)))+  (deflistener (cat (exp (gen) y) w))+  (precedes ((0 1) (2 0)) ((2 1) (1 0)))+  (non-orig (privk b))+  (uniq-gen y)+  (precur (2 0))+  (operation encryption-test (displaced 3 0 resp 2)+    (enc (exp (gen) y) (exp (gen) w) (privk a)) (0 2))+  (traces+    ((recv (exp (gen) w))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) w) (privk b))+            (exp (gen) (mul w y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) w) (privk b))+          (exp (gen) (mul w y)))))+    ((recv (exp (gen) (mul w y))) (send (exp (gen) (mul w y))))+    ((recv (cat (exp (gen) y) w)) (send (cat (exp (gen) y) w))))+  (label 76)+  (parent 74)+  (realized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (x y rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul x y)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b) (h (exp (gen) y)) (x x))+  (precedes ((0 1) (2 0)) ((0 1) (3 1)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (0 2)))+  (non-orig (privk a) (privk b))+  (uniq-gen x y)+  (precur (2 0))+  (operation encryption-test (displaced 4 0 resp 2)+    (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+      (exp (gen) (mul x y))) (3 1))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y))))))+  (label 77)+  (parent 75)+  (unrealized (2 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (precedes ((0 1) (2 0)) ((0 1) (4 0)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (0 2)) ((4 1) (3 1)))+  (non-orig (privk a) (privk b))+  (uniq-gen y x)+  (precur (2 0))+  (operation encryption-test (added-listener (exp (gen) (mul y x)))+    (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+      (exp (gen) (mul y x))) (3 1))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x)))))+  (label 78)+  (parent 75)+  (unrealized (2 0) (4 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (b name) (w expt) (y rndx))+  (defstrand resp 3 (a b) (b b) (h (exp (gen) w)) (y y))+  (deflistener (exp (gen) (mul w y)))+  (precedes ((0 1) (1 0)))+  (non-orig (privk b))+  (uniq-gen y)+  (operation generalization deleted (2 0))+  (traces+    ((recv (exp (gen) w))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) w) (privk b))+            (exp (gen) (mul w y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) w) (privk b))+          (exp (gen) (mul w y)))))+    ((recv (exp (gen) (mul w y))) (send (exp (gen) (mul w y)))))+  (label 79)+  (parent 76)+  (realized)+  (shape)+  (maps ((0 1) ((a b) (b b) (y y) (h (exp (gen) w)))))+  (origs))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (precedes ((0 1) (2 0)) ((0 1) (5 0)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (0 2)) ((4 1) (3 1)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen y x)+  (precur (2 0))+  (operation nonce-test (added-listener (cat (exp (gen) y) x))+    (exp (gen) (mul y x)) (4 0))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x))))+  (label 80)+  (parent 78)+  (unrealized (2 0) (5 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b b-0 name) (y x rndx))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) y) x))+  (defstrand init 3 (a a) (b b-0) (h (exp (gen) y)) (x x))+  (deflistener (exp (gen) (mul y x)))+  (deflistener (cat (exp (gen) x) y))+  (precedes ((0 1) (2 0)) ((0 1) (5 0)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (0 2)) ((4 1) (3 1)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b))+  (uniq-gen y x)+  (precur (2 0))+  (operation nonce-test (added-listener (cat (exp (gen) x) y))+    (exp (gen) (mul y x)) (4 0))+  (traces+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x)))+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b-0))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))))+    ((recv (exp (gen) (mul y x))) (send (exp (gen) (mul y x))))+    ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y))))+  (label 81)+  (parent 78)+  (unrealized (2 0) (5 0))+  (dead)+  (comment "empty cohort"))++(comment "Nothing left to do")++(defprotocol station-to-station-unflip diffie-hellman+  (defrole init+    (vars (x rndx) (h base) (a b name))+    (trace (send (exp (gen) x))+      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))+      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x)))+      (send (privk a)))+    (uniq-gen x))+  (defrole resp+    (vars (y rndx) (h base) (a b name))+    (trace (recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))+      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y)))+      (send (privk b)))+    (uniq-gen y))+  (defgenrule neqRl_indx+    (forall ((x indx)) (implies (fact neq x x) (false))))+  (defgenrule neqRl_strd+    (forall ((x strd)) (implies (fact neq x x) (false))))+  (defgenrule neqRl_mesg+    (forall ((x mesg)) (implies (fact neq x x) (false)))))++(defskeleton station-to-station-unflip+  (vars (a b a-0 name) (x y rndx))+  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))+  (defstrand resp 4 (a a-0) (b b) (h (exp (gen) x)) (y y))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (uniq-orig (privk a) (privk b))+  (uniq-gen x y)+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))) (send (privk a)))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))+          (exp (gen) (mul x y)))) (send (privk b))))+  (label 82)+  (unrealized (1 2))+  (origs ((privk b) (1 3)) ((privk a) (0 3)))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b name) (y x rndx))+  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))+  (defstrand resp 4 (a a) (b b) (h (exp (gen) x)) (y y))+  (precedes ((0 0) (1 0)) ((0 2) (1 2)) ((1 1) (0 1)))+  (uniq-orig (privk a) (privk b))+  (uniq-gen y x)+  (operation encryption-test (displaced 2 0 init 3)+    (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))+      (exp (gen) (mul y x))) (1 2))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))) (send (privk a)))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul y x)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul y x)))) (send (privk b))))+  (label 83)+  (parent 82)+  (realized)+  (shape)+  (maps ((0 1) ((a a) (b b) (x x) (y y) (a-0 a))))+  (origs ((privk b) (1 3)) ((privk a) (0 3))))++(defskeleton station-to-station-unflip+  (vars (a b name) (x y rndx))+  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))+  (defstrand resp 4 (a b) (b b) (h (exp (gen) x)) (y y))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (uniq-orig (privk a) (privk b))+  (uniq-gen x y)+  (operation encryption-test (displaced 2 1 resp 2)+    (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))+      (exp (gen) (mul x y))) (1 2))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))) (send (privk a)))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+          (exp (gen) (mul x y)))) (send (privk b))))+  (label 84)+  (parent 82)+  (realized)+  (shape)+  (maps ((0 1) ((a a) (b b) (x x) (y y) (a-0 b))))+  (origs ((privk b) (1 3)) ((privk a) (0 3))))++(defskeleton station-to-station-unflip+  (vars (a b a-0 name) (x y rndx))+  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))+  (defstrand resp 4 (a a-0) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul x y)))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((1 1) (2 0)) ((2 1) (1 2)))+  (uniq-orig (privk a) (privk b))+  (uniq-gen x y)+  (operation encryption-test (added-listener (exp (gen) (mul x y)))+    (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))+      (exp (gen) (mul x y))) (1 2))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))) (send (privk a)))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))+          (exp (gen) (mul x y)))) (send (privk b)))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y)))))+  (label 85)+  (parent 82)+  (unrealized (2 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b a-0 name) (x y rndx))+  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))+  (defstrand resp 4 (a a-0) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul x y)))+  (deflistener (cat (exp (gen) x) y))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((1 1) (3 0)) ((2 1) (1 2))+    ((3 1) (2 0)))+  (uniq-orig (privk a) (privk b))+  (uniq-gen x y)+  (operation nonce-test (added-listener (cat (exp (gen) x) y))+    (exp (gen) (mul x y)) (2 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))) (send (privk a)))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))+          (exp (gen) (mul x y)))) (send (privk b)))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))+    ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y))))+  (label 86)+  (parent 85)+  (unrealized (3 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b a-0 name) (x y rndx))+  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))+  (defstrand resp 4 (a a-0) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul x y)))+  (deflistener (cat (exp (gen) y) x))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((1 1) (3 0)) ((2 1) (1 2))+    ((3 1) (2 0)))+  (uniq-orig (privk a) (privk b))+  (uniq-gen x y)+  (operation nonce-test (added-listener (cat (exp (gen) y) x))+    (exp (gen) (mul x y)) (2 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))) (send (privk a)))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))+          (exp (gen) (mul x y)))) (send (privk b)))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x))))+  (label 87)+  (parent 85)+  (unrealized (3 0))+  (dead)+  (comment "empty cohort"))++(comment "Nothing left to do")++(defprotocol station-to-station-unflip diffie-hellman+  (defrole init+    (vars (x rndx) (h base) (a b name))+    (trace (send (exp (gen) x))+      (recv (cat h (enc (enc h (exp (gen) x) (privk b)) (exp h x))))+      (send (enc (enc h (exp (gen) x) (privk a)) (exp h x)))+      (send (privk a)))+    (uniq-gen x))+  (defrole resp+    (vars (y rndx) (h base) (a b name))+    (trace (recv h)+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) h (privk b)) (exp h y))))+      (recv (enc (enc (exp (gen) y) h (privk a)) (exp h y)))+      (send (privk b)))+    (uniq-gen y))+  (defgenrule neqRl_indx+    (forall ((x indx)) (implies (fact neq x x) (false))))+  (defgenrule neqRl_strd+    (forall ((x strd)) (implies (fact neq x x) (false))))+  (defgenrule neqRl_mesg+    (forall ((x mesg)) (implies (fact neq x x) (false)))))++(defskeleton station-to-station-unflip+  (vars (a b a-0 name) (x y rndx))+  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))+  (defstrand resp 4 (a a-0) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul x y)))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (uniq-orig (privk a) (privk b))+  (uniq-gen x y)+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))) (send (privk a)))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))+          (exp (gen) (mul x y)))) (send (privk b)))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y)))))+  (label 88)+  (unrealized (1 2) (2 0))+  (preskeleton)+  (origs ((privk b) (1 3)) ((privk a) (0 3)))+  (comment "Not a skeleton"))++(defskeleton station-to-station-unflip+  (vars (a b a-0 name) (x y rndx))+  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))+  (defstrand resp 4 (a a-0) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul x y)))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((1 1) (2 0)))+  (uniq-orig (privk a) (privk b))+  (uniq-gen x y)+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))) (send (privk a)))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))+          (exp (gen) (mul x y)))) (send (privk b)))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y)))))+  (label 89)+  (parent 88)+  (unrealized (1 2) (2 0))+  (origs ((privk b) (1 3)) ((privk a) (0 3)))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton station-to-station-unflip+  (vars (a b a-0 name) (x y rndx))+  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))+  (defstrand resp 4 (a a-0) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul x y)))+  (deflistener (cat (exp (gen) x) y))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((1 1) (3 0)) ((3 1) (2 0)))+  (uniq-orig (privk a) (privk b))+  (uniq-gen x y)+  (operation nonce-test (added-listener (cat (exp (gen) x) y))+    (exp (gen) (mul x y)) (2 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))) (send (privk a)))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))+          (exp (gen) (mul x y)))) (send (privk b)))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))+    ((recv (cat (exp (gen) x) y)) (send (cat (exp (gen) x) y))))+  (label 90)+  (parent 89)+  (unrealized (1 2) (3 0))+  (dead)+  (comment "empty cohort"))++(defskeleton station-to-station-unflip+  (vars (a b a-0 name) (x y rndx))+  (defstrand init 4 (a a) (b b) (h (exp (gen) y)) (x x))+  (defstrand resp 4 (a a-0) (b b) (h (exp (gen) x)) (y y))+  (deflistener (exp (gen) (mul x y)))+  (deflistener (cat (exp (gen) y) x))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((1 1) (3 0)) ((3 1) (2 0)))+  (uniq-orig (privk a) (privk b))+  (uniq-gen x y)+  (operation nonce-test (added-listener (cat (exp (gen) y) x))+    (exp (gen) (mul x y)) (2 0))+  (traces+    ((send (exp (gen) x))+      (recv+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (send+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a))+          (exp (gen) (mul x y)))) (send (privk a)))+    ((recv (exp (gen) x))+      (send+        (cat (exp (gen) y)+          (enc (enc (exp (gen) y) (exp (gen) x) (privk b))+            (exp (gen) (mul x y)))))+      (recv+        (enc (enc (exp (gen) y) (exp (gen) x) (privk a-0))+          (exp (gen) (mul x y)))) (send (privk b)))+    ((recv (exp (gen) (mul x y))) (send (exp (gen) (mul x y))))+    ((recv (cat (exp (gen) y) x)) (send (cat (exp (gen) y) x))))+  (label 91)+  (parent 89)   (unrealized (1 2) (3 0))   (dead)   (comment "empty cohort"))
tst/sts_weak.tst view
@@ -1,7 +1,7 @@ (herald "Station-to-station protocol:  Weakened version"   (algebra diffie-hellman)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/sts_weak.scm")  (defprotocol station-weak diffie-hellman
tst/subatomic-open-closed-test-genrule.tst view
@@ -1,6 +1,6 @@ (herald subatomic-open-closed-test-genrule (bound 40)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment   "All input read from tst/subatomic-open-closed-test-genrule.scm") (comment "Strand count bounded at 40")@@ -105,23 +105,23 @@   (defgenrule fact-dev-up-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-up" z (idx 3)) (p "dev-up" "lk" z lk)-          (p "dev-up" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-up" z (idx 3)) (p "dev-up" "ls" z ls)+          (p "dev-up" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule fact-dev-open-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-open" z (idx 3)) (p "dev-open" "lk" z lk)-          (p "dev-open" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-open" z (idx 3)) (p "dev-open" "ls" z ls)+          (p "dev-open" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule fact-dev-close-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-close" z (idx 3)) (p "dev-close" "lk" z lk)-          (p "dev-close" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-close" z (idx 3)) (p "dev-close" "ls" z ls)+          (p "dev-close" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule fact-dev-pass-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-pass" z (idx 2)) (p "dev-pass" "lk" z lk)-          (p "dev-pass" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-pass" z (idx 2)) (p "dev-pass" "ls" z ls)+          (p "dev-pass" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule trRl_dev-up-at-4     (forall ((z strd))       (implies (p "dev-up" z (idx 5)) (trans z (idx 4)))))@@ -147,51 +147,51 @@     (forall ((z strd))       (implies (p "dev-close" z (idx 4)) (trans z (idx 2)))))   (defgenrule eff-dev-up-3-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-up" z (idx 4)) (prec z (idx 3) z1 i))         (or (= z z1)           (and (p "dev-up" z (idx 5)) (prec z (idx 4) z1 i))))))   (defgenrule cau-dev-up-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-up" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-open-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-open" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-close-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-close" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-pass-1-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-pass" z (idx 2)) (prec z1 i z (idx 1)))         (or (= z z1) (prec z1 i z (idx 0))))))   (defgenrule gen-st-dev-open-1-    (forall ((z strd) (k skey) (o d name))+    (forall ((z strd) (d o name) (k skey))       (implies         (and (p "dev-open" z (idx 1)) (p "dev-open" "k" z k)           (p "dev-open" "o" z o) (p "dev-open" "d" z d))         (gen-st (cat "st-k" d o k)))))   (defgenrule gen-st-dev-open-0-    (forall ((z strd) (o d name))+    (forall ((z strd) (d o name))       (implies         (and (p "dev-open" z (idx 1)) (p "dev-open" "o" z o)           (p "dev-open" "d" z d)) (gen-st (cat "st" d o o)))))   (defgenrule gen-st-dev-close-0-    (forall ((z strd) (k skey) (o d name))+    (forall ((z strd) (d o name) (k skey))       (implies         (and (p "dev-close" z (idx 1)) (p "dev-close" "k" z k)           (p "dev-close" "o" z o) (p "dev-close" "d" z d))         (gen-st (cat "st-k" d o k)))))   (defgenrule gen-st-dev-pass-1-    (forall ((z strd) (k skey) (o d name))+    (forall ((z strd) (d o name) (k skey))       (implies         (and (p "dev-pass" z (idx 1)) (p "dev-pass" "k" z k)           (p "dev-pass" "o" z o) (p "dev-pass" "d" z d))         (gen-st (cat "st-k" d o k)))))   (defgenrule gen-st-dev-pass-0-    (forall ((z strd) (o d name))+    (forall ((z strd) (d o name))       (implies         (and (p "dev-pass" z (idx 1)) (p "dev-pass" "o" z o)           (p "dev-pass" "d" z d)) (gen-st (cat "st" d o o)))))@@ -476,23 +476,23 @@   (defgenrule fact-dev-up-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-up" z (idx 3)) (p "dev-up" "lk" z lk)-          (p "dev-up" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-up" z (idx 3)) (p "dev-up" "ls" z ls)+          (p "dev-up" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule fact-dev-open-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-open" z (idx 3)) (p "dev-open" "lk" z lk)-          (p "dev-open" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-open" z (idx 3)) (p "dev-open" "ls" z ls)+          (p "dev-open" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule fact-dev-close-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-close" z (idx 3)) (p "dev-close" "lk" z lk)-          (p "dev-close" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-close" z (idx 3)) (p "dev-close" "ls" z ls)+          (p "dev-close" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule fact-dev-pass-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-pass" z (idx 2)) (p "dev-pass" "lk" z lk)-          (p "dev-pass" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-pass" z (idx 2)) (p "dev-pass" "ls" z ls)+          (p "dev-pass" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule trRl_dev-up-at-4     (forall ((z strd))       (implies (p "dev-up" z (idx 5)) (trans z (idx 4)))))@@ -518,51 +518,51 @@     (forall ((z strd))       (implies (p "dev-close" z (idx 4)) (trans z (idx 2)))))   (defgenrule eff-dev-up-3-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-up" z (idx 4)) (prec z (idx 3) z1 i))         (or (= z z1)           (and (p "dev-up" z (idx 5)) (prec z (idx 4) z1 i))))))   (defgenrule cau-dev-up-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-up" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-open-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-open" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-close-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-close" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-pass-1-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-pass" z (idx 2)) (prec z1 i z (idx 1)))         (or (= z z1) (prec z1 i z (idx 0))))))   (defgenrule gen-st-dev-open-1-    (forall ((z strd) (k skey) (o d name))+    (forall ((z strd) (d o name) (k skey))       (implies         (and (p "dev-open" z (idx 1)) (p "dev-open" "k" z k)           (p "dev-open" "o" z o) (p "dev-open" "d" z d))         (gen-st (cat "st-k" d o k)))))   (defgenrule gen-st-dev-open-0-    (forall ((z strd) (o d name))+    (forall ((z strd) (d o name))       (implies         (and (p "dev-open" z (idx 1)) (p "dev-open" "o" z o)           (p "dev-open" "d" z d)) (gen-st (cat "st" d o o)))))   (defgenrule gen-st-dev-close-0-    (forall ((z strd) (k skey) (o d name))+    (forall ((z strd) (d o name) (k skey))       (implies         (and (p "dev-close" z (idx 1)) (p "dev-close" "k" z k)           (p "dev-close" "o" z o) (p "dev-close" "d" z d))         (gen-st (cat "st-k" d o k)))))   (defgenrule gen-st-dev-pass-1-    (forall ((z strd) (k skey) (o d name))+    (forall ((z strd) (d o name) (k skey))       (implies         (and (p "dev-pass" z (idx 1)) (p "dev-pass" "k" z k)           (p "dev-pass" "o" z o) (p "dev-pass" "d" z d))         (gen-st (cat "st-k" d o k)))))   (defgenrule gen-st-dev-pass-0-    (forall ((z strd) (o d name))+    (forall ((z strd) (d o name))       (implies         (and (p "dev-pass" z (idx 1)) (p "dev-pass" "o" z o)           (p "dev-pass" "d" z d)) (gen-st (cat "st" d o o)))))@@ -953,23 +953,23 @@   (defgenrule fact-dev-up-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-up" z (idx 3)) (p "dev-up" "lk" z lk)-          (p "dev-up" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-up" z (idx 3)) (p "dev-up" "ls" z ls)+          (p "dev-up" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule fact-dev-open-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-open" z (idx 3)) (p "dev-open" "lk" z lk)-          (p "dev-open" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-open" z (idx 3)) (p "dev-open" "ls" z ls)+          (p "dev-open" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule fact-dev-close-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-close" z (idx 3)) (p "dev-close" "lk" z lk)-          (p "dev-close" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-close" z (idx 3)) (p "dev-close" "ls" z ls)+          (p "dev-close" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule fact-dev-pass-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-pass" z (idx 2)) (p "dev-pass" "lk" z lk)-          (p "dev-pass" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-pass" z (idx 2)) (p "dev-pass" "ls" z ls)+          (p "dev-pass" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule trRl_dev-up-at-4     (forall ((z strd))       (implies (p "dev-up" z (idx 5)) (trans z (idx 4)))))@@ -995,51 +995,51 @@     (forall ((z strd))       (implies (p "dev-close" z (idx 4)) (trans z (idx 2)))))   (defgenrule eff-dev-up-3-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-up" z (idx 4)) (prec z (idx 3) z1 i))         (or (= z z1)           (and (p "dev-up" z (idx 5)) (prec z (idx 4) z1 i))))))   (defgenrule cau-dev-up-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-up" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-open-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-open" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-close-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-close" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-pass-1-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-pass" z (idx 2)) (prec z1 i z (idx 1)))         (or (= z z1) (prec z1 i z (idx 0))))))   (defgenrule gen-st-dev-open-1-    (forall ((z strd) (k skey) (o d name))+    (forall ((z strd) (d o name) (k skey))       (implies         (and (p "dev-open" z (idx 1)) (p "dev-open" "k" z k)           (p "dev-open" "o" z o) (p "dev-open" "d" z d))         (gen-st (cat "st-k" d o k)))))   (defgenrule gen-st-dev-open-0-    (forall ((z strd) (o d name))+    (forall ((z strd) (d o name))       (implies         (and (p "dev-open" z (idx 1)) (p "dev-open" "o" z o)           (p "dev-open" "d" z d)) (gen-st (cat "st" d o o)))))   (defgenrule gen-st-dev-close-0-    (forall ((z strd) (k skey) (o d name))+    (forall ((z strd) (d o name) (k skey))       (implies         (and (p "dev-close" z (idx 1)) (p "dev-close" "k" z k)           (p "dev-close" "o" z o) (p "dev-close" "d" z d))         (gen-st (cat "st-k" d o k)))))   (defgenrule gen-st-dev-pass-1-    (forall ((z strd) (k skey) (o d name))+    (forall ((z strd) (d o name) (k skey))       (implies         (and (p "dev-pass" z (idx 1)) (p "dev-pass" "k" z k)           (p "dev-pass" "o" z o) (p "dev-pass" "d" z d))         (gen-st (cat "st-k" d o k)))))   (defgenrule gen-st-dev-pass-0-    (forall ((z strd) (o d name))+    (forall ((z strd) (d o name))       (implies         (and (p "dev-pass" z (idx 1)) (p "dev-pass" "o" z o)           (p "dev-pass" "d" z d)) (gen-st (cat "st" d o o)))))
tst/subatomic-open-closed.tst view
@@ -1,6 +1,6 @@ (herald subatomic-open-closed (bound 40)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/subatomic-open-closed.scm") (comment "Strand count bounded at 40") @@ -104,23 +104,23 @@   (defgenrule fact-dev-up-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-up" z (idx 3)) (p "dev-up" "lk" z lk)-          (p "dev-up" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-up" z (idx 3)) (p "dev-up" "ls" z ls)+          (p "dev-up" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule fact-dev-open-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-open" z (idx 3)) (p "dev-open" "lk" z lk)-          (p "dev-open" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-open" z (idx 3)) (p "dev-open" "ls" z ls)+          (p "dev-open" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule fact-dev-close-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-close" z (idx 3)) (p "dev-close" "lk" z lk)-          (p "dev-close" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-close" z (idx 3)) (p "dev-close" "ls" z ls)+          (p "dev-close" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule fact-dev-pass-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-pass" z (idx 2)) (p "dev-pass" "lk" z lk)-          (p "dev-pass" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-pass" z (idx 2)) (p "dev-pass" "ls" z ls)+          (p "dev-pass" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule trRl_dev-up-at-4     (forall ((z strd))       (implies (p "dev-up" z (idx 5)) (trans z (idx 4)))))@@ -146,51 +146,51 @@     (forall ((z strd))       (implies (p "dev-close" z (idx 4)) (trans z (idx 2)))))   (defgenrule eff-dev-up-3-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-up" z (idx 4)) (prec z (idx 3) z1 i))         (or (= z z1)           (and (p "dev-up" z (idx 5)) (prec z (idx 4) z1 i))))))   (defgenrule cau-dev-up-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-up" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-open-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-open" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-close-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-close" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-pass-1-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-pass" z (idx 2)) (prec z1 i z (idx 1)))         (or (= z z1) (prec z1 i z (idx 0))))))   (defgenrule gen-st-dev-open-1-    (forall ((z strd) (k skey) (o d name))+    (forall ((z strd) (d o name) (k skey))       (implies         (and (p "dev-open" z (idx 1)) (p "dev-open" "k" z k)           (p "dev-open" "o" z o) (p "dev-open" "d" z d))         (gen-st (cat "st-k" d o k)))))   (defgenrule gen-st-dev-open-0-    (forall ((z strd) (o d name))+    (forall ((z strd) (d o name))       (implies         (and (p "dev-open" z (idx 1)) (p "dev-open" "o" z o)           (p "dev-open" "d" z d)) (gen-st (cat "st" d o o)))))   (defgenrule gen-st-dev-close-0-    (forall ((z strd) (k skey) (o d name))+    (forall ((z strd) (d o name) (k skey))       (implies         (and (p "dev-close" z (idx 1)) (p "dev-close" "k" z k)           (p "dev-close" "o" z o) (p "dev-close" "d" z d))         (gen-st (cat "st-k" d o k)))))   (defgenrule gen-st-dev-pass-1-    (forall ((z strd) (k skey) (o d name))+    (forall ((z strd) (d o name) (k skey))       (implies         (and (p "dev-pass" z (idx 1)) (p "dev-pass" "k" z k)           (p "dev-pass" "o" z o) (p "dev-pass" "d" z d))         (gen-st (cat "st-k" d o k)))))   (defgenrule gen-st-dev-pass-0-    (forall ((z strd) (o d name))+    (forall ((z strd) (d o name))       (implies         (and (p "dev-pass" z (idx 1)) (p "dev-pass" "o" z o)           (p "dev-pass" "d" z d)) (gen-st (cat "st" d o o))))))@@ -355,23 +355,23 @@   (defgenrule fact-dev-up-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-up" z (idx 3)) (p "dev-up" "lk" z lk)-          (p "dev-up" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-up" z (idx 3)) (p "dev-up" "ls" z ls)+          (p "dev-up" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule fact-dev-open-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-open" z (idx 3)) (p "dev-open" "lk" z lk)-          (p "dev-open" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-open" z (idx 3)) (p "dev-open" "ls" z ls)+          (p "dev-open" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule fact-dev-close-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-close" z (idx 3)) (p "dev-close" "lk" z lk)-          (p "dev-close" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-close" z (idx 3)) (p "dev-close" "ls" z ls)+          (p "dev-close" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule fact-dev-pass-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-pass" z (idx 2)) (p "dev-pass" "lk" z lk)-          (p "dev-pass" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-pass" z (idx 2)) (p "dev-pass" "ls" z ls)+          (p "dev-pass" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule trRl_dev-up-at-4     (forall ((z strd))       (implies (p "dev-up" z (idx 5)) (trans z (idx 4)))))@@ -397,51 +397,51 @@     (forall ((z strd))       (implies (p "dev-close" z (idx 4)) (trans z (idx 2)))))   (defgenrule eff-dev-up-3-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-up" z (idx 4)) (prec z (idx 3) z1 i))         (or (= z z1)           (and (p "dev-up" z (idx 5)) (prec z (idx 4) z1 i))))))   (defgenrule cau-dev-up-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-up" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-open-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-open" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-close-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-close" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-pass-1-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-pass" z (idx 2)) (prec z1 i z (idx 1)))         (or (= z z1) (prec z1 i z (idx 0))))))   (defgenrule gen-st-dev-open-1-    (forall ((z strd) (k skey) (o d name))+    (forall ((z strd) (d o name) (k skey))       (implies         (and (p "dev-open" z (idx 1)) (p "dev-open" "k" z k)           (p "dev-open" "o" z o) (p "dev-open" "d" z d))         (gen-st (cat "st-k" d o k)))))   (defgenrule gen-st-dev-open-0-    (forall ((z strd) (o d name))+    (forall ((z strd) (d o name))       (implies         (and (p "dev-open" z (idx 1)) (p "dev-open" "o" z o)           (p "dev-open" "d" z d)) (gen-st (cat "st" d o o)))))   (defgenrule gen-st-dev-close-0-    (forall ((z strd) (k skey) (o d name))+    (forall ((z strd) (d o name) (k skey))       (implies         (and (p "dev-close" z (idx 1)) (p "dev-close" "k" z k)           (p "dev-close" "o" z o) (p "dev-close" "d" z d))         (gen-st (cat "st-k" d o k)))))   (defgenrule gen-st-dev-pass-1-    (forall ((z strd) (k skey) (o d name))+    (forall ((z strd) (d o name) (k skey))       (implies         (and (p "dev-pass" z (idx 1)) (p "dev-pass" "k" z k)           (p "dev-pass" "o" z o) (p "dev-pass" "d" z d))         (gen-st (cat "st-k" d o k)))))   (defgenrule gen-st-dev-pass-0-    (forall ((z strd) (o d name))+    (forall ((z strd) (d o name))       (implies         (and (p "dev-pass" z (idx 1)) (p "dev-pass" "o" z o)           (p "dev-pass" "d" z d)) (gen-st (cat "st" d o o))))))@@ -712,23 +712,23 @@   (defgenrule fact-dev-up-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-up" z (idx 3)) (p "dev-up" "lk" z lk)-          (p "dev-up" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-up" z (idx 3)) (p "dev-up" "ls" z ls)+          (p "dev-up" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule fact-dev-open-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-open" z (idx 3)) (p "dev-open" "lk" z lk)-          (p "dev-open" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-open" z (idx 3)) (p "dev-open" "ls" z ls)+          (p "dev-open" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule fact-dev-close-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-close" z (idx 3)) (p "dev-close" "lk" z lk)-          (p "dev-close" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-close" z (idx 3)) (p "dev-close" "ls" z ls)+          (p "dev-close" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule fact-dev-pass-same-dev0     (forall ((z strd) (lk ls locn))       (implies-        (and (p "dev-pass" z (idx 2)) (p "dev-pass" "lk" z lk)-          (p "dev-pass" "ls" z ls)) (fact same-dev ls lk))))+        (and (p "dev-pass" z (idx 2)) (p "dev-pass" "ls" z ls)+          (p "dev-pass" "lk" z lk)) (fact same-dev ls lk))))   (defgenrule trRl_dev-up-at-4     (forall ((z strd))       (implies (p "dev-up" z (idx 5)) (trans z (idx 4)))))@@ -754,51 +754,51 @@     (forall ((z strd))       (implies (p "dev-close" z (idx 4)) (trans z (idx 2)))))   (defgenrule eff-dev-up-3-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-up" z (idx 4)) (prec z (idx 3) z1 i))         (or (= z z1)           (and (p "dev-up" z (idx 5)) (prec z (idx 4) z1 i))))))   (defgenrule cau-dev-up-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-up" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-open-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-open" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-close-2-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-close" z (idx 3)) (prec z1 i z (idx 2)))         (or (= z z1) (prec z1 i z (idx 1))))))   (defgenrule cau-dev-pass-1-    (forall ((z z1 strd) (i indx))+    (forall ((i indx) (z1 z strd))       (implies (and (p "dev-pass" z (idx 2)) (prec z1 i z (idx 1)))         (or (= z z1) (prec z1 i z (idx 0))))))   (defgenrule gen-st-dev-open-1-    (forall ((z strd) (k skey) (o d name))+    (forall ((z strd) (d o name) (k skey))       (implies         (and (p "dev-open" z (idx 1)) (p "dev-open" "k" z k)           (p "dev-open" "o" z o) (p "dev-open" "d" z d))         (gen-st (cat "st-k" d o k)))))   (defgenrule gen-st-dev-open-0-    (forall ((z strd) (o d name))+    (forall ((z strd) (d o name))       (implies         (and (p "dev-open" z (idx 1)) (p "dev-open" "o" z o)           (p "dev-open" "d" z d)) (gen-st (cat "st" d o o)))))   (defgenrule gen-st-dev-close-0-    (forall ((z strd) (k skey) (o d name))+    (forall ((z strd) (d o name) (k skey))       (implies         (and (p "dev-close" z (idx 1)) (p "dev-close" "k" z k)           (p "dev-close" "o" z o) (p "dev-close" "d" z d))         (gen-st (cat "st-k" d o k)))))   (defgenrule gen-st-dev-pass-1-    (forall ((z strd) (k skey) (o d name))+    (forall ((z strd) (d o name) (k skey))       (implies         (and (p "dev-pass" z (idx 1)) (p "dev-pass" "k" z k)           (p "dev-pass" "o" z o) (p "dev-pass" "d" z d))         (gen-st (cat "st-k" d o k)))))   (defgenrule gen-st-dev-pass-0-    (forall ((z strd) (o d name))+    (forall ((z strd) (d o name))       (implies         (and (p "dev-pass" z (idx 1)) (p "dev-pass" "o" z o)           (p "dev-pass" "d" z d)) (gen-st (cat "st" d o o))))))
tst/sync_locn_envelope.tst view
@@ -1,7 +1,7 @@ (herald "Envelope Protocol, location-based version" (check-nonces)   (bound 30) (limit 6000)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/sync_locn_envelope.scm") (comment "Step count limited to 6000") (comment "Strand count bounded at 30")
tst/targetterms1.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/targetterms1.scm")  (defprotocol targetterms basic
tst/targetterms2.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/targetterms2.scm")  (defprotocol targetterms2 basic
tst/targetterms6.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/targetterms6.scm")  (defprotocol targetterms6 basic
tst/targetterms8.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/targetterms8.scm")  (defprotocol targetterms8 basic
tst/thisthat.tst view
@@ -1,6 +1,6 @@ (herald "Needham-Schroeder Public-Key Protocol This-That Variant") -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/thisthat.scm")  (defprotocol thisthat basic
tst/tickle-unique.tst view
@@ -1,6 +1,6 @@ (herald tickle-unique) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/tickle-unique.scm")  (defprotocol tickle basic
tst/timestamping.tst view
@@ -1,6 +1,6 @@ (herald timestamping-service) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/timestamping.scm")  (defprotocol timestamping-service basic
tst/trust-anchor.tst view
@@ -1,7 +1,7 @@ (herald trust-anchor   (comment "Tests rule application on initial skeleton")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/trust-anchor.scm")  (defprotocol trust-anchor basic
tst/ugo.tst view
@@ -1,8 +1,8 @@ (herald uniq-gen-and-orig-example   (comment "Non-executable role examples")) -(comment "CPSA 4.4.2")-(comment "All input read from ugo.scm")+(comment "CPSA 4.4.3")+(comment "All input read from tst/ugo.scm")  (defprotocol uniq-gen-example basic   (defrole init
tst/uncarried_keys.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/uncarried_keys.scm")  (defprotocol uncarried-keys basic
tst/unilateral.tst view
@@ -1,6 +1,6 @@ (herald unilateral) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/unilateral.scm")  (defprotocol unilateral basic
tst/uniq-gen-test.tst view
@@ -1,7 +1,7 @@ (herald "Unique generation test protocols."   (comment "Skeletons 2, 4, and 7 should have no shapes.")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/uniq-gen-test.scm")  (defprotocol uniqgentest basic
tst/uo.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/uo.scm")  (defprotocol uniq-orig basic
tst/wang-hash.tst view
@@ -1,6 +1,6 @@ (herald "Wang's Fair Exchange Protocol" (bound 10)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/wang-hash.scm") (comment "Strand count bounded at 10") 
tst/wang-key-hash.tst view
@@ -1,6 +1,6 @@ (herald "Wang's Fair Exchange Protocol" (bound 10)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/wang-key-hash.scm") (comment "Strand count bounded at 10") 
tst/weird.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/weird.scm")  (defprotocol weird basic
tst/wide-mouth-frog-scyther.lsp view
@@ -1,5 +1,7 @@-(herald "Wide-Mouth Frog Protocol from Scyther"-  (comment "This protocol has an infinite number of shapes"))+(herald+ "Wide-Mouth Frog Protocol from Scyther"+ (bound 8)+ (comment "This protocol has an infinite number of shapes"))  (defprotocol wide-mouth-frog basic   (defrole init (vars (a b t name) (ta text) (k skey))
tst/wide-mouth-frog-scyther.tst view
@@ -1,8 +1,9 @@-(herald "Wide-Mouth Frog Protocol from Scyther"+(herald "Wide-Mouth Frog Protocol from Scyther" (bound 8)   (comment "This protocol has an infinite number of shapes")) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/wide-mouth-frog-scyther.lsp")+(comment "Strand count bounded at 8")  (defprotocol wide-mouth-frog basic   (defrole init
tst/wide-mouth-frog.lsp view
@@ -1,5 +1,6 @@ (herald "Wide-Mouth Frog Protocol"-  (comment "This protocol has an infinite number of shapes"))+	(comment "This protocol has an infinite number of shapes")+	(bound 8))  (defprotocol wide-mouth-frog basic   (defrole init (vars (a b t name) (ta text) (k skey))
tst/wide-mouth-frog.tst view
@@ -1,8 +1,9 @@ (herald "Wide-Mouth Frog Protocol"-  (comment "This protocol has an infinite number of shapes"))+  (comment "This protocol has an infinite number of shapes") (bound 8)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/wide-mouth-frog.lsp")+(comment "Strand count bounded at 8")  (defprotocol wide-mouth-frog basic   (defrole init
tst/wonthull.tst view
@@ -1,6 +1,6 @@ (herald wonthull (bound 9)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/wonthull.scm") (comment "Strand count bounded at 9") 
tst/wonthull2.tst view
@@ -1,6 +1,6 @@ (herald wonthull2 (bound 9)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/wonthull2.scm") (comment "Strand count bounded at 9") 
tst/wonthull3.tst view
@@ -1,4 +1,4 @@-(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/wonthull3.scm")  (defprotocol wonthull3 basic
tst/woolam.tst view
@@ -1,6 +1,6 @@ (herald "Woo-Lam Protocol") -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/woolam.scm")  (defprotocol woolam basic
tst/yahalom-6.3.6.tst view
@@ -5,7 +5,7 @@   (url "http://www.eecs.umich.edu/acal/swerve/docs/49-1.pdf")   (bound 15)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/yahalom-6.3.6.scm") (comment "Strand count bounded at 15") 
tst/yahalom.tst view
@@ -1,6 +1,6 @@ (herald "Yahalom Protocol Without Forwarding" (bound 15)) -(comment "CPSA 4.4.2")+(comment "CPSA 4.4.3") (comment "All input read from tst/yahalom.scm") (comment "Strand count bounded at 15")