cpsa-4.4.4: tst/epmo_acctnum_shapes.tst
(comment "CPSA 4.3.1")
(comment "Extracted shapes")
(herald "Electronic Purchase with Money Order Protocol Variant"
(bound 12) (limit 5000)
(comment "This version includes account numbers in exchanges"))
(comment "CPSA 2.3.1")
(comment "All input read from epmo_acctnum.scm")
(comment "Step count limited to 5000")
(comment "Strand count bounded at 12")
(defprotocol epmo_acctnum basic
(defrole bank
(vars (b c m name) (acctnum text) (hash name) (nc nm nb price text))
(trace (recv (enc c nc nm acctnum price (pubk b)))
(send
(cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b))
(enc nc nb (pubk c))))
(recv (enc (enc "hash" b m nb nm (pubk hash)) (privk m))))
(non-orig (privk hash))
(annotations b
(1
(forall ((pm name))
(implies
(and (authtransfer c acctnum b price pm nm)
(reqtransfer pm b price pm nm))
(dotransfer acctnum b price pm nm))))
(2
(and (says c (authtransfer c acctnum b price m nm))
(says m (reqtransfer m b price m nm))))))
(defrole customer
(vars (b c m hash name) (acctnum nb nc nm goods price text))
(trace (send (enc c nc goods (pubk m)))
(recv (enc nc nm m price (pubk c)))
(send (enc c nc nm acctnum price (pubk b)))
(recv
(cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b))
(enc nc nb (pubk c))))
(send
(cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b))
nb)))
(non-orig (privk b) (privk hash))
(uniq-orig nc)
(annotations c
(1
(says m
(implies
(exists ((acctnum2 text))
(dotransfer acctnum2 b price m nm)) (doship m goods c))))
(3
(says b
(forall ((pm name))
(implies
(and (authtransfer c acctnum b price m nm)
(reqtransfer pm b price pm nm))
(dotransfer acctnum b price pm nm)))))
(4 (authtransfer c acctnum b price m nm))))
(defrole merchant
(vars (b c m hash name) (nb nc nm goods price text))
(trace (recv (enc c nc goods (pubk m)))
(send (enc nc nm m price (pubk c)))
(recv
(cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b))
nb))
(send (enc (enc "hash" b m nb nm (pubk hash)) (privk m))))
(non-orig (privk hash))
(uniq-orig nm)
(annotations m
(1
(implies
(exists ((acctnum2 text)) (dotransfer acctnum2 b price m nm))
(doship m goods c)))
(2
(and
(says b
(forall ((pm name))
(exists ((acctnum2 text))
(implies
(and (authtransfer c acctnum2 b price m nm)
(reqtransfer pm b price pm nm))
(dotransfer acctnum2 b price pm nm)))))
(says c
(exists ((acctnum2 text))
(authtransfer c acctnum2 b price m nm)))))
(3 (and (reqtransfer m b price m nm) (doship m goods c))))))
(defskeleton epmo_acctnum
(vars (nm nc nb goods price text) (b m c hash name))
(defstrand merchant 4 (nb nb) (nc nc) (nm nm) (goods goods)
(price price) (b b) (c c) (m m) (hash hash))
(non-orig (privk b) (privk m) (privk c) (privk hash))
(uniq-orig nm nc nb)
(traces
((recv (enc c nc goods (pubk m)))
(send (enc nc nm m price (pubk c)))
(recv
(cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b))
nb))
(send (enc (enc "hash" b m nb nm (pubk hash)) (privk m)))))
(label 0)
(unrealized (0 2))
(origs (nm (0 1)))
(comment "1 in cohort - 1 not yet seen"))
(defskeleton epmo_acctnum
(vars (nm nc nb price acctnum goods text) (c hash b m name))
(defstrand merchant 4 (nb nb) (nc nc) (nm nm) (goods goods)
(price price) (b b) (c c) (m m) (hash hash))
(defstrand bank 2 (acctnum acctnum) (nc nc) (nm nm) (nb nb)
(price price) (b b) (c c) (hash hash))
(defstrand customer 5 (acctnum acctnum) (nb nb) (nc nc) (nm nm)
(goods goods) (price price) (b b) (c c) (m m) (hash hash))
(precedes ((0 1) (2 1)) ((1 1) (2 3)) ((2 0) (0 0)) ((2 2) (1 0))
((2 4) (0 2)))
(non-orig (privk c) (privk hash) (privk b) (privk m))
(uniq-orig nm nc nb)
(operation nonce-test (displaced 2 3 customer 5) nb (0 2)
(enc "hash" c nc nb nm price (pubk hash)) (enc nc nb (pubk c)))
(traces
((recv (enc c nc goods (pubk m)))
(send (enc nc nm m price (pubk c)))
(recv
(cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b))
nb))
(send (enc (enc "hash" b m nb nm (pubk hash)) (privk m))))
((recv (enc c nc nm acctnum price (pubk b)))
(send
(cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b))
(enc nc nb (pubk c)))))
((send (enc c nc goods (pubk m)))
(recv (enc nc nm m price (pubk c)))
(send (enc c nc nm acctnum price (pubk b)))
(recv
(cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b))
(enc nc nb (pubk c))))
(send
(cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b))
nb))))
(label 8)
(parent 0)
(realized)
(shape)
(maps
((0)
((b b) (m m) (c c) (nm nm) (nc nc) (nb nb) (hash hash)
(goods goods) (price price))))
(origs (nc (2 0)) (nm (0 1)) (nb (1 1))))
(comment "Nothing left to do")
(defprotocol epmo_acctnum basic
(defrole bank
(vars (b c m name) (acctnum text) (hash name) (nc nm nb price text))
(trace (recv (enc c nc nm acctnum price (pubk b)))
(send
(cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b))
(enc nc nb (pubk c))))
(recv (enc (enc "hash" b m nb nm (pubk hash)) (privk m))))
(non-orig (privk hash))
(annotations b
(1
(forall ((pm name))
(implies
(and (authtransfer c acctnum b price pm nm)
(reqtransfer pm b price pm nm))
(dotransfer acctnum b price pm nm))))
(2
(and (says c (authtransfer c acctnum b price m nm))
(says m (reqtransfer m b price m nm))))))
(defrole customer
(vars (b c m hash name) (acctnum nb nc nm goods price text))
(trace (send (enc c nc goods (pubk m)))
(recv (enc nc nm m price (pubk c)))
(send (enc c nc nm acctnum price (pubk b)))
(recv
(cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b))
(enc nc nb (pubk c))))
(send
(cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b))
nb)))
(non-orig (privk b) (privk hash))
(uniq-orig nc)
(annotations c
(1
(says m
(implies
(exists ((acctnum2 text))
(dotransfer acctnum2 b price m nm)) (doship m goods c))))
(3
(says b
(forall ((pm name))
(implies
(and (authtransfer c acctnum b price m nm)
(reqtransfer pm b price pm nm))
(dotransfer acctnum b price pm nm)))))
(4 (authtransfer c acctnum b price m nm))))
(defrole merchant
(vars (b c m hash name) (nb nc nm goods price text))
(trace (recv (enc c nc goods (pubk m)))
(send (enc nc nm m price (pubk c)))
(recv
(cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b))
nb))
(send (enc (enc "hash" b m nb nm (pubk hash)) (privk m))))
(non-orig (privk hash))
(uniq-orig nm)
(annotations m
(1
(implies
(exists ((acctnum2 text)) (dotransfer acctnum2 b price m nm))
(doship m goods c)))
(2
(and
(says b
(forall ((pm name))
(exists ((acctnum2 text))
(implies
(and (authtransfer c acctnum2 b price m nm)
(reqtransfer pm b price pm nm))
(dotransfer acctnum2 b price pm nm)))))
(says c
(exists ((acctnum2 text))
(authtransfer c acctnum2 b price m nm)))))
(3 (and (reqtransfer m b price m nm) (doship m goods c))))))
(defskeleton epmo_acctnum
(vars (nm nb nc acctnum price text) (b m c hash name))
(defstrand bank 3 (acctnum acctnum) (nc nc) (nm nm) (nb nb)
(price price) (b b) (c c) (m m) (hash hash))
(non-orig (privk b) (privk m) (privk c) (privk hash))
(uniq-orig nm nb nc)
(traces
((recv (enc c nc nm acctnum price (pubk b)))
(send
(cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b))
(enc nc nb (pubk c))))
(recv (enc (enc "hash" b m nb nm (pubk hash)) (privk m)))))
(label 4559)
(unrealized (0 2))
(origs (nb (0 1)))
(comment "1 in cohort - 1 not yet seen"))
(defskeleton epmo_acctnum
(vars (nm nb nc price acctnum goods text) (b m c hash name))
(defstrand bank 3 (acctnum acctnum) (nc nc) (nm nm) (nb nb)
(price price) (b b) (c c) (m m) (hash hash))
(defstrand merchant 4 (nb nb) (nc nc) (nm nm) (goods goods)
(price price) (b b) (c c) (m m) (hash hash))
(defstrand customer 5 (acctnum acctnum) (nb nb) (nc nc) (nm nm)
(goods goods) (price price) (b b) (c c) (m m) (hash hash))
(precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (1 0))
((2 2) (0 0)) ((2 4) (1 2)))
(non-orig (privk b) (privk m) (privk c) (privk hash))
(uniq-orig nm nb nc)
(operation nonce-test (contracted (acctnum-0 acctnum)) nm (0 0)
(enc nc nm m price (pubk c)) (enc c nc nm acctnum price (pubk b)))
(traces
((recv (enc c nc nm acctnum price (pubk b)))
(send
(cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b))
(enc nc nb (pubk c))))
(recv (enc (enc "hash" b m nb nm (pubk hash)) (privk m))))
((recv (enc c nc goods (pubk m)))
(send (enc nc nm m price (pubk c)))
(recv
(cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b))
nb))
(send (enc (enc "hash" b m nb nm (pubk hash)) (privk m))))
((send (enc c nc goods (pubk m)))
(recv (enc nc nm m price (pubk c)))
(send (enc c nc nm acctnum price (pubk b)))
(recv
(cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b))
(enc nc nb (pubk c))))
(send
(cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b))
nb))))
(label 4569)
(parent 4559)
(realized)
(shape)
(maps
((0)
((b b) (m m) (c c) (nm nm) (nb nb) (nc nc) (hash hash)
(acctnum acctnum) (price price))))
(origs (nc (2 0)) (nm (1 1)) (nb (0 1))))
(comment "Nothing left to do")