packages feed

cpsa (empty) → 2.0.0

raw patch · 152 files changed

+56434/−0 lines, 152 filesdep +basedep +containersdep +parallelsetup-changedbinary-added

Dependencies added: base, containers, parallel

Files

+ ChangeLog view
@@ -0,0 +1,879 @@+2010-03-04  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 2.0.0, the first release+	for the public.++2010-03-01  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/SExpr.hs (load): Load now returns one S-expression+	per call.++2010-02-19  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Loader.hs (loadPosBaseTerm): Added a missing check+	that ensures a non-originating term at given length is an atom.++	* doc/Make.hs (cpsa): Made *.sch the extension for problems+	that use Diffie-Hellman.++2010-02-15  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.5.5.++	* src/CPSA/Lib/Loader.hs:  Added better error messages for roles+	and preskeletons that are not well formed.++2010-02-13  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Basic/Algebra.hs:  Enforce a canonical form for terms+	so that term equality is just structural equality.++2010-02-08  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Cohort.hs (testNode): Changed order in which+	critical message are picked to look at encryption tests before+	nonce tests.++2010-02-05  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.5.4.++2010-02-04  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (origCheck): For pruning, added a check+	that insures that origination assumptions are honored by the+	homomorphisms associated with pruning.++2010-01-29  John D. Ramsdell  <ramsdell@mitre.org>++	* doc/cpsauser.html (Visualization): Added a comment that notes+	that cpsagraph draws dashed lines between nodes with terms that+	are equivalent, but not syntactically identical.++	* src/CPSA/Lib/Strand.hs (Preskel): Preskeletons retain a comment+	that is given in the input.++2010-01-21  John D. Ramsdell  <ramsdell@mitre.org>++	* doc/cpsa.mk (%.sch): Added a rule that runs CPSA with the+	Diffie-Hellman algebra for *.sch files.++	* tst/completeness-test.scm: Added new example++2010-01-07  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (copresentVertices): Fixed a bug, and now +	contractions with ordering codes works, when+	Cohort.useContractionsWithOrdering is True.++2010-01-06  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.5.3.++2009-12-21  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Cohort.hs (mgus): Enabled mgu filtering on+	contractions and regular augmentation.++2009-12-20  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Basic/Algebra.hs (moreGeneral): Original implementation+	failed to consider variables in the range of the more general+	substitution.++2009-12-17  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Graph/Preskeleton.hs (addEdge): In a skeleton diagram,+	an edge between nodes that do not agree on their message is+	displayed with a dashed line.++2009-11-16  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.5.2.++2009-11-10  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (precedesCheck): Added the requirement to+	pruning that ordering relations associated with the more+	general (pruned) strand are implied by the less general strand.++2009-10-31  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Protocol.hs (Role): Added support for delaying the+	inheritance of a role non-origination assumption by adding a+	length specification to role non-origination declarations.++2009-10-26  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.5.1.++2009-10-24  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Cohort.hs (specialization): Generalization no+	longer uses pruning.++2009-10-24  John D. Ramsdell  <ramsdell@mitre.org>++	* license.txt: Changed license to BSD.++2009-10-15  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.5.0.++2009-10-14  John D. Ramsdell  <ramsdell@mitre.org>++	* src/preskel.sh: Added a script to change defpreskeleton to+	defskeleton. ++	* src/CPSA/Lib/Loader.hs (loadSExpr): Changed defpreskeleton+	keyword to defskeleton.++2009-10-10  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Extra-Source-Files): Added files left out of a+	distribution so that the documentation compiles.++	* {doc,tst}/README: Added a doc and tst read me++2009-10-03  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (checkOrigs): Isomorphism orig check now+	uses matching.  Isomorphism checking now works in diffie-hellman.++2009-10-01  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Algebra.hs (encryptions): Encryptions that occur in+	other encryption are now required to be later in the list.++	* cpsa.cabal (Version): Tagged as version 1.4.9.++2009-09-30  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (roleOrigCheck): Role origination check+	is now omitted when the inheriting strand is too short to inherit+	a unique origination assumption.++2009-09-22  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Cohort.hs (useMguFilter): Turned off all mgu+	filtering for contractions and augmentations.++	* src/CPSA/Lib/Algebra.hs: Changed signature for unification and+	matching so as to pass through a variable generator for+	Diffie-Hellman.  Threaded the variable generator throughout the+	library as needed.++	* src/CPSA/Diffie-Hellman/Algebra.hs:  Added a module for+	analyzing protocols that use Diffie-Hellman.  Its unifier and+	matcher make use of fresh variable generation.+	+2009-09-16  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Cohort.hs (mgus): Added a filter that removes+	non-most general unifiers from a list of contractions after the+	list has been filtered to ensure each member solves the test.  For+	each role considered during augmentation, added a filter that+	removes non-most general unifiers from the list of augmentations+	after the list has been filtered to ensure each member solves the+	test.++2009-08-28  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Cohort.hs (testDestroyingContractions): Added a+	filter that removes non-most general unifiers from the generated+	list of potential contractions.++2009-08-18  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Displayer.hs (displayOpTerm, displayOpTerms): Terms+	in the operation field may contain variables not in the skeleton.+	Two functions were added for printing terms is the operation+	field.  These functions extend the display context as needed.++2009-08-05  John D. Ramsdell  <ramsdell@gootoo>++	* cpsa.cabal (Version): Tagged as version 1.4.8.++	* tst/{encsig.scm,sigenc.scm}: Added tests for labeled named akey+	operations.++2009-08-03  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Basic/Algebra.hs:  Added labeled named akey operations +	(pubk STRING ID) and (privk STRING ID).++2009-08-02  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Algebra.hs (lte):  Added more general substitution+	predicate to the algebra interface.++2009-07-24  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.4.7.++	* src/CPSA/Lib/Strand.hs (permutations): Reversed the order in+	which strands are matched, and found a big performance+	improvement. ++	* src/CPSA/Lib/Loader.hs (loadRole): Unused variables in a role+	are now silently dropped instead of causing an error message.++2009-07-21  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (permutations): Intertwined the+	computation of permutations with the substitutions that match+	traces.++2009-07-11  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.4.6.++2009-07-08  John D. Ramsdell  <ramsdell@mitre.org>++	* doc/cpsaprimer.tex (Section Advice): Added a description of how+	to use CPSA for protocol design and made other improvements.++2009-07-07  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Cohort.hs (maybeAug): Use a role's trace as a+	template instead of generating a fresh instance for that purpose.++2009-07-01  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Graph/LaTeXView.hs (latexView): ++2009-06-23  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Search.hs (solve): The top-level search loop is now+	implemented in the IO monad using tail recursive functions so as to+	ensure data is released when it should.++2009-06-21  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Search.hs (solve): Added no isomorphism checking+	mode (--noisochk).  In noisochk mode, isomorphism checks are+	avoided by not identifying duplicate skeletons and by not+	generalizing realized skeletons.++	* src/CPSA/Lib/Search.hs (Params): Collected runtime parameters+	into a record.++	* src/CPSA/Lib/Search.hs (dump): Dump no longer generalizes+	realized skeletons.  It just dumps them quickly.++2009-06-19  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (generalize): Perform variable separation+	last as it could take a long time.++2009-06-17  John D. Ramsdell  <ramsdell@mitre.org>++	* doc/cpsaprimer.tex: Updated the Needham-Schroeder example, added+	the collapsing operation, and fix other minor problems.++2009-06-14  John D. Ramsdell  <ramsdell@mitre.org>++	* doc/cpsadesign.tex: This document was rewritten.  It now assumes+	its reader have already read the CPSA specification+	(doc/cpsaspec.tex).  As a result, it focuses on implementation+	issues, and leaves correctness issues to the specification.++2009-06-11  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (instRnon,instRunique): Filter+	origination assumptions using the terms in the instance's trace.++	* src/CPSA/Lib/Strand.hs (separateVariable): Don't memoize subsets+	computation.  It causes memory problems when a large permutation+	is used infrequently.++2009-06-10  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.4.5.++2009-05-29  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (isomorphic): Don't memoize+	permutations--can cause excessive use of memory.++2009-05-28  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Entry.hs: Code common to several programs has been+	moved into the Entry module and shared.++2009-05-27  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/{Search.hs,Expand.hs}: CPSA now expands macros+	rather than using a preprocessor for the task.  The cpsapp program+	now just pretty prints its input.++	* src/CPSA/Pretty/Main.hs: The source for the cpsapp program has+	moved into another directory as it no longer macro expands its+	input.++	* doc/cpsa.mk: Makefile no longer has preprocessor support.++	* doc/cpsaoverview.tex: Add a short overview of CPSA.++	* src/CPSA/Annotations/Formulas.hs (keywords): "t" and "f" are no+	longer keywords in formulas.  Use (and) for truth and (or) for+	falsehood.++2009-05-22  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Macros/Main.hs (prettyPrint): Add -p option so that+	cpsapp pretty prints without macro expansion.++	* doc/cpsa.mk: Makefile now save preprocessor output.++2009-05-12  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.4.4.++	* cpsa.cabal (Flag par): Changed the default for the par flag to+	true so that CPSA is compiled with multiprocessor support by+	default.++2009-05-11  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/SExpr.hs (Tokens): Added strictness annotations+	that allows the reading of much larger input files and improves+	performance.++2009-05-10  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (collapse): Added the collapse operation+	which applies to a shape.  It attempts to unify pairs of strands+	and searches for shapes starting from the results.+	+	* src/CPSA/Shapes/Shapes.hs (shapes): Reduced memory requirements+	by use of shape notes and added support for output in which a+	shape is a descendent of a shape.++2009-05-09  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Search.hs (commentPreskel): Added a shape note to+	be used by the cpsashapes program.++2009-05-07  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (hull, enrich, prune): With the+	correction of the pruning algorithm, the preskeleton reduction+	rules are now applied in the order of hull, enrich, and then+	prune.++2009-05-05  John D. Ramsdell  <ramsdell@mitre.org>++	* doc/cpsaspec.tex: Added the sources to the CPSA document that+	specifies CPSA as a reduction system.++2009-05-04  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (pruneStrands): The pruning operation+	now uses a substitution that is idempotent for strands other than+	the pruned strand.++2009-04-29  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.4.3.++	* src/CPSA/Lib/Cohort.hs (specialization): The homomorphism check+	is applied to the preskeleton because it matches the strand+	mapping.  This fixes a bug that reject some valid generalizations.++2009-04-19  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Algebra.hs (Subst): A substitution is now required+	to be ordered.++	* src/CPSA/Basic/Algebra.hs (unifyChase): The exported version of+	a substitution no longer requires chasing to find the canonical+	representative of the equivalence class of variables determined to+	be equal.  This means there is a canonical representation of an+	external version of a substitution that is ordered.++	* src/CPSA/Basic/Algebra.hs (substitute): Corrected a bug in+	substitution associated with variables of sort mesg.  The+	correction effects tst/dy.scm only.++2009-04-18  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Basic/Algebra.hs (IdMap): Use Data.Map Id Term for+	substitutions instead of association lists. ++	* src/CPSA/Basic/Algebra.hs (loadVar): Removed sort "term" as a+	synonym for "mesg".++2009-04-14  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Basic/Algebra.hs (compose):  Corrected a bug in the+	code that removes the trivial bindings from s2 to form s4.  The+	fix changes the output for tst/dy.scm.++2009-03-30  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.4.2.++2009-03-27  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Search.hs (parMap): Added support for SMP+	parallelism.  To enable, configure with -fpar.++2009-03-22  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Printer.hs: Added a CPSA specific pretty printer+	and made it so that the roles in protocols are laid out using the+	group layout.++2009-03-03  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Pretty.hs (grp): Added support for the group layout+	and used it for the top-level lists.++2009-03-01  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Cohort.hs (unifyTerm): For contraction, the+	unifyOnPaths function does not check to see if its result has the+	desired properties and it turns out that sometimes it doesn't.+	Now unifyTerm repeats its operations until the desired properties+	hold.++	* src/CPSA/Lib/Cohort.hs (unifyPast): For augmentation, the+	original unifyPast failed to each to see if the final result has+	the desired properties, and it turns out that sometimes it+	doesn't.  Now unifyPast repeats its operations until the desired+	properties hold.++2009-02-23  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Loader.hs (loadInsts): Check for preskeletons+	with no strands.++2009-02-21  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Parameters/Main.hs,Flow.hs: Added a data flow analysis+	of roles.++2009-02-16  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.4.1.++	* doc/*: Update document to reflect changes.++2009-02-10  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Macros/*.hs: Added the macro preprocessor cpsapp.++2009-02-08  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Annotations/Annotations.hs (loadFormulas): Allow base+	terms as principals so as to allow keys as principals.++2009-01-03  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (changeLocations): Changed variable+	separation so that so that two candidates are generated for a+	location configuration, one that maps the changes to uniques, and+	the other does not.  This fixes a generalization bug.++2009-01-31  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Cohort.hs (solved): The cohort is now filtered so+	that every member is solved.++2009-01-03  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (changeLocations): When separating a+	uniquely originating base term, either the term or its clone is+	uniquely originating.++2008-12-28  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Basic/Algebra.hs (Symbol): Removed tag as a sort, and+	made tags constants of sort mesg.++2008-12-24  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Basic/Algebra.hs (matchVarRenaming): Use sets to+	improve injective test.++2008-12-09  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.4.0.++2008-12-08  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Search.hs (nextState): Added the --dfs command line+	option to allow the selection of depth first search.++	* src/CPSA/Graph/SVG.hs (kbutton): Duplicate nodes are now+	rendered in italic so as to make it easier to distinguish them+	from tree nodes.++	* src/CPSA/*/{Main.hs,Search.hs}: Added default option values to+	command line help message.++2008-12-03  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Basic/Algebra.hs: Allowed variable declaration forms to+	declare more than one variable of a given sort.++	* src/CPSA/Basic/Algebra.hs: Added the sort data, a second+	sort similar to sort text.  The second sort can be used to+	partition nonce-like data from ordinary text-like data.++	* src/CPSA/Basic/Algebra.hs: Changed the symbol used for the top+	sort from "term" to "mesg".++	* src/CPSA/Lib/SExpr.hs (isStr): The characters that make up a+	string are the ASCII printing characters omitting double quote and+	backslash.++2008-12-02  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Search.hs (nextState): Switched back to+	breadth-first-search and removed support for parallelism.+	Breadth-first-search makes it more likely shapes are printed in+	ill-fated runs.++	* src/CPSA/Graph/Main.hs (interp): Changed the default output+	format to expanded format.++2008-12-01  John D. Ramsdell  <ramsdell@mitre.org>+	+	* cpsa.cabal (Version): Tagged as version 1.3.2.++2008-11-30  John D. Ramsdell  <ramsdell@mitre.org>+	+	* src/CPSA/Lib/Strand.hs (roleOrigCheck): Added new well-formed+	preskeleton check.  Every uniquely originating role term mapped by+	an instance must be mapped to a term that originates on the+	instance's strand.++2008-11-19  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Search.hs (nextState): Switched to+	depth-first-search by adding freshly generated skeletons to the+	front of the to do list.++	* src/CPSA/Lib/Strand.hs (isomorphic): Added same number of+	variables in isomorphism check to speed it up.++	* src/CPSA/Lib/Algebra.hs: (matchVarRenaming) The special purpose+	renaming detector was eliminated in favor of using matching and+	predicate that decides if a match is one-to-one and+	variable-to-variable.++2008-11-16  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (deleteNode): Use the transitive closure+	of the communication ordering before deleting a node.  This change+	fixes a minimization bug.++2008-11-14  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.3.1.++	* src/CPSA/Lib/Cohort.hs (addListeners):  Listeners are now added+	only for the decryption keys of the top most encryptions in the+	escape set.  This fixes a bug caused by adding listeners for +	decryption keys of internal encryptions in the escape set.++	* src/CPSA/Lib/Algebra.hs (decryptionKey):  Changed the name from+	keysUsedBy to reflect the fact only the decryption key from the+	top most encryption is returned.++	* src/CPSA/Lib/Algebra.hs (protectors): Changed the name from+	decrypts to better reflect the purpose of the function.++2008-11-10  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Annotations/Annotations.hs (obligations): The alist key+	theorems was replaced with obligations as it lists the formulas+	one is obligated to show are theorems to show the protocol is+	sound.++2008-11-07  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.3.0.++	* doc/cpsauser.html:  Added cpsaannotations documentation.++2008-11-02  John D. Ramsdell  <ramsdell@mitre.org>++	* doc/cpsadesign.tex: Added a complete draft of the algorithm part+	of the design document.++2008-10-27  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (deleteNode): When deleting a strand,+	this function used to apply the inverse of the correct permutation+	to the prob field, but now applies the correct permutation.++2008-10-19  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Graph/Main.hs (options): Add --compact option to select+	the use of the compact output format.++2008-10-15  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Cohort.hs (targetTerms): Added term extraction from+	the escape set for use as targets for binding with the carried+	terms in an outbound when looking for a transforming node.  This+	change allows CPSA to find the flaw in the Dolev-Yao Example 1.3+	test case.++2008-10-14  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Cohort.hs (augmentations): Changed the augmentation+	algorithm to use foldCarriedTerms.++	* src/cpsacgi.py: Added expanded graph output to the CGI script.+	Added support for annotations.++2008-10-13  John D. Ramsdell  <ramsdell@mitre.org>++	* doc/cpsaprimer.tex: The CPSA Tutorial was renamed to the CPSA+	Primer.++2008-10-08  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (forgetAssumption): Fix a bug that allows+	assumption forgetting to work again.++2008-10-04  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Basic/Algebra.hs (loadEnc): When enc has more that two+	terms, a concatenation is added to all but the last term.++	* src/CPSA/Lib/Strand.hs (tryPerm): An isomorphism testing bug was+	fixed.  The permutation map was applied to the wrong ordering.++2008-10-03  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.2.3.++	* src/CPSA/Graph/ExpandedView.hs (header): The title generated for+	the expanded view now includes the name of the first protocol to+	be graphed.++	* src/CPSA/Lib/Search.hs (search): The comment generated for+	non-default strand bounded or step count limited runs contained+	an illegal character that has been removed.++	* src/CPSA/Basic/Algebra.hs (displaySubst): This function displays+	substitutions without requiring that the sort of every variable be+	known.  The function that infers enough sort information to+	perform the display was correct, thus fixing a reported bug.++2008-09-30  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Algebra.hs (Context): Changed the interface to+	contexts to allow them to be extended.  Also, eliminated+	displayEnv from the Context type class.  It can be written using+	other functions in the interface.++2008-09-26  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Cohort.hs (transformingNode): The fix on the 22th+	wasn't right, it unified on all outgoing terms.  The function now+	unifies an outgoing term only when it is a transforming node.+	+2008-09-24  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/*/*.hs:  Loading works with all monads.  With this+	change, there is no longer a need for using the flexible instances+	language extension.++2008-09-23  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.2.2.++2008-09-22  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Cabal-Version): Updated to use Cabal 1.2 section+	syntax.++	* src/CPSA/Lib/Cohort.hs (transformingNode): Changed the+	augmentation algorithm so that it continues looking for more+	transforming nodes farther down a trace after it finds one+	transforming node.++	* src/CPSA/Lib/Search.hs (par): Added HAVE_PAR preprocessor symbol+	which should be defined when Control.Parallel is available.++	* src/CPSA/*/*.hs:  A major code clean up was completed.+	+2008-09-17  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (Gist): Created a data structure designed+	to support only skeleton isomorphism checks, thus improving the+	performance and memory requirements associated with the check.++2008-09-15  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Annotations/*.hs: Added the cpsaannotations program+	that propagates annotations on protocols to annotations on+	realized skeletons.++2008-09-06  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Main.hs (main): Algebras export a name and the+	origin used to generate fresh variables.++2008-08-29  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (weakenOrderings): Corrected a bug by+	adding the strand succession edges before taking the transitive+	closure.++2008-08-25  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.2.1.++2008-08-23  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (weakenOrderings): Changed the weakening+	algorithm so as to use the transitive closure.  The result is all+	possible weakenings are considered, and a reported bug was fixed.++2008-08-19  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Graph/ExpandedView.hs (kdrawer): Added the definition+	of the marker for arrow heads so that arrow heads now appear in+	preskeleton drawings.++2008-08-18  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.2.0.++	* src/CPSA/Lib/Utilities.hs (permutations): Used permutations from+	Haskell 1.3 as a model, and ensured the identity permutation is+	the first one in the result.++	* doc/cpsatutorial.tex, doc/cpsauser.html: Changed the+	introductions to note that the search for shapes in the current+	implementation is known to be not complete.  See tst/dy.scm.++2008-08-11  John D. Ramsdell  <ramsdell@mitre.org>++	* tst/Makefile: Changed the file extensions to be consistent with+	the ones used in doc/cpsa.mk. ++	* src/CPSA/Basic/Loader.hs: Added tags as non-atomic terms, and+	removed tagged concatenation.++	* src/CPSA/Graph/ExpandedView.hs: Added support for the expanded+	view option (-x) in cpsagraph.++2008-08-04  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal: Added support for local installation.++	* doc/cpsa.mk: Added GNU Make rules for inclusion.++	* src/CPSA/Lib/Search.hs: Reorganized search loop so that+	S-expression printing is done outside the search code.++	* src/CPSA/Lib/Search.hs: Modified the abort dump routine so that+	it minimizes when it is asked to print a realized skeleton.++2008-07-31  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/*/Loader.hs: Ignore top-level S-expression of the form+	(comment S-EXP*) rather than signal an error so as to allow file+	level comments as S-expressions.++	* src/CPSA/*/*: Renamed cpsabasic to cpsa, as that program can now+	provide support for more than one algebra.++2008-07-28  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Algebra.hs: Added foldTerms to interface. It folds+	a function through a term applying it to each term that occurs in+	the term.++2008-07-26  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Algebra.hs: Added carriedPlaces and ancestors to+	the interface and moved existsOnAllPathsToTarget and+	foldOnAllPathsToTarget to CPSA.Lib.Cohort as they no longer need+	to be implemented by each algebra.++2008-07-25  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/*/*.hs: Reorganized the algebra interface so that as+	algebra exports an algebra specific protocol loader so as to allow+	CPSA to handle more than one algebra at a time.  Algebras are now+	linked into the program in CPSA.Lib.Main.++2008-07-24  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Search.hs: Added the --bound option to limit the+	number of strands in a skeleton.++2008-07-15  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (validateSubst): Changed the result of a+	failure to find a uniquely-originating atom to False rather than+	an signaling an error.  The addition of unique origination+	assumption forgetting makes this case no longer an error.++2008-06-16  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Basic/Main.hs (compose): Use algorithm from Handbook of+	Automated Reasoning, remembering to delete identity bindings.++2008-06-05  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as version 1.1.0.++	* doc/cpsadesign.tex: Added document status and other small+	improvements in preparation for release.++2008-05-27  John D. Ramsdell  <ramsdell@mitre.org>++	* doc/strands.mp: Placed strand macros in a separate file.++2008-05-23  John D. Ramsdell  <ramsdell@mitre.org>++	* src/httpd_allow_execmem.te: Added this SELinux refpolicy module+	so as to allow Haskell to run as a CGI script.++2008-05-22  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Displayer.hs (displayOperation): Changed the+	wording for the operation used to derive a skeleton.++2008-05-19  John D. Ramsdell  <ramsdell@mitre.org>++	* src/cpsa.{sh,py}: CGI scripts modified to work with SELinux.++2008-05-13  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Shapes/Main.hs: Added output margin option.++	* src/CPSA/Lib/Strand.hs (Method): Added a parameter to each+	minimization method.++2008-05-04  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Strand.hs (forgetAssumption): Added the+	origination assumption forgetting minimization operation.++2008-05-04  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Search.hs (options): Added output margin option.++2008-04-30  Joshua D. Guttman  <guttman@mitre.org>++	* src/CPSA/Basic/Main.hs: Re-enabled indeterminates ++2008-02-27  John D. Ramsdell  <ramsdell@mitre.org>++	* src/CPSA/Lib/Protocol.hs: Add a comment field in protocols and+	roles.++2008-02-20  John D. Ramsdell  <ramsdell@mitre.org>++	* cpsa.cabal (Version): Tagged as 1.0.0, the initial release.
+ Makefile view
@@ -0,0 +1,24 @@+# Haskell/Cabal Makefile+# Requires GNU Make+# The all target creates a default configuration if need be.++PACKAGE := $(wildcard *.cabal)+CONFIG	= dist/setup-config+SETUP	= runhaskell Setup.hs++all:	$(CONFIG)+	$(SETUP) build++Makefile:+	@echo make $@++$(PACKAGE):+	@echo make $@++$(CONFIG):	$(PACKAGE)+	$(SETUP) configure --ghc --user --prefix="${HOME}"++%:	force+	$(SETUP) $@++.PHONY:	all force
+ NEWS view
@@ -0,0 +1,378 @@+CPSA NEWS -- history of user-visible changes.++* Changes in version 2.0.0++** CPSA is an open source package++** Better support for Diffie-Hellman+Makefiles use the *.sch the extension for problems that use+Diffie-Hellman.+++* Changes in version 1.5.5++** Encryption tests solved before nonce tests+CPSA now solves encryption tests before it tries nonce tests.+Experiments have show this heuristic can lead to substantially smaller+derivation trees in some cases, but in a few cases, derivation trees+are slightly larger.++** Better error messages for ill-formed roles and preskeletons+CPSA generates a more informative message when a role or a preskeleton+is not well-formed.++* Changes in version 1.5.4++** Pruning bug fixed+A check that origination assumptions are honored by the homomorphisms+associated with pruning was added.  As a result, cases in which+erroneous pruning was performed have been eliminated.++** Comments in skeletons are preserved+The comment field in a skeleton given as input is included when it is+printed.++* Changes in version 1.5.3++** Skeleton diagrams improved+In a skeleton diagram, an edge between nodes that do not agree on+their message is displayed with a dashed line.++** Less general skeletons removed from cohort+During contraction and regular augmentation, some skeletons that are+less general than others are removed from consideration.  These+skeletons contribute nothing new.++* Changes in version 1.5.2++** Pruning bug fixed+Added the requirement to pruning that ordering relations associated+with the more general (pruned) strand are implied by the less general+strand.++** Role non-orig length specification added+Added support for delaying the inheritance of a role non-origination+assumption by adding a length specification to role non-origination+declarations.  The non-orig assumption is inherited when the strand+meets the length requirement.++* Changes in version 1.5.1++** Generalization bug fixed+CPSA no longer prunes while generalizing.++** Change license to BSD++* Changes in version 1.5.0++** Diffie-Hellman algebra added+This is an early access release of the Diffie-Hellman algebra.  Its+signature is described in the CPSA User Guide.  It has only been+tested on the example in tst/dh.lisp, and the output seems reasonable.++** Keyword defpreskeleton changed to defskeleton+Most often, the defpreskeleton form described a skeleton.  To reduce+confusion, form has been renamed.  The CPSA program still accepts the+old keyword.  A script that updates the keyword is in src/preskel.sh.++* Changes in version 1.4.9+This version is a bug fix and speed enhancement fix only.++** Obscure display bug fixed++** Role origination check bug fixed+The origination check is now omitted when the inheriting strand is too+short to inherit a unique origination assumption.++** Role origination check bug fixed++** Outer most encryptions preferred for encryption tests+When choosing among encryptions for critical messages, CPSA prefers+outer most encryptions over ones within another encryption. ++* Changes in version 1.4.8++** Support for key usage added+A name may be associated with more than one asymmetric key using the+binary form of pubk, where the first argument is a quoted constant.+For example, (pubk "sig" a) and (pubk "enc" a) can be used to describe+name a's public signature and encryption key.++** Progressive refinement technique described+The advice section of the CPSA Primer describes the progressive+refinement technique.++* Changes in version 1.4.7++** Unused role variables are silently ignored+Unused role variables used to cause an error.  This behavior+interfered with the practice of submitting output as input with small+modifications.++** Isomorphism check performance improved++** Added an overview section to the CPSA Specification++* Changes in version 1.4.6++** Added no isomorphism checking mode (--noisochk)+In noisochk mode, isomorphism checks are avoided by not identifying+duplicate skeletons and by not generalizing realized skeletons.+Isomorphism checks between two skeletons with a large number of+strands can take a long time, so for some problems, CPSA runs faster+in this mode.  Warning, in this mode, CPSA reports that each realized+skeleton is a shape even when it is not one.  In this way, the+cpsashapes program can be used to extract the realized skeletons from+the run.++** Added LaTeX output mode to cpsagraph+The cpsagraph program generates LaTeX source that places S-expressions+in verbatim environments and generates XY-pic diagrams of skeletons.+The XHTML output should always be preferred, however, LaTeX output is+useful when generating a report or a briefing on the results of using+CPSA.++** CPSA Primer updated+The example output has been updated to reflect recent changes,+numerous editorial improvements were made, and the advice section+has been augmented with some recently learned tricks.++** CPSA algorithm specified+At last.  The CPSA Specification contains a specification of all of+the parts of the CPSA algorithm.  In particular, a description of+the augmentation algorithm is in writing.++** CPSA Design rewritten+Most of the material that was once duplicated in both The CPSA+Specification and The CPSA Design has been purged from the design+document.  The document now assumes its reader have already read The+CPSA Specification.  As a result, it focuses solely on implementation+issues, and leaves correctness issues to the specification.++** Aborted output is no longer generalized+CPSA will abort when a strand bound or a step count is exceeded.+Since generalization involves isomorphism checks, the old abort+implementation could take a very long time to finish.++* Changes in version 1.4.5++** CPSA macros expanded by cpsa program+CPSA now expands macros rather than using a preprocessor for the task.+The cpsapp program now just pretty prints its input.++** Memory leak fixed+Permutations no longer memoized--can cause excessive use of memory.++** In rely/guarantee formulas, "t" and "f" are no longer keywords+Use (and) for truth and (or) for falsehood.++* Changes in version 1.4.4+This is a correctness critical update to CPSA.++** Shape search design error fixed.+The shape search algorithm includes a new shape collapsing operation+that allows CPSA to find shapes it used to miss.  The operation+includes the symbol "collapsed" followed by the two strands that were+merged.  The Otway-Rees example in tst/or.scm makes use of the new+operation.++** Pruning bug fixed.+The pruning operation now uses a substitution that is idempotent for+strands other than the pruned strand.++** Specification document added.+The sources to the CPSA document that specifies CPSA as a reduction+system are now included and can be used to build doc/cpsaspec.pdf.++** S-expression reader bug fixed.+The S-expression reader now reads much larger input files.  This means+cpsashapes can be used on larger files.++** Multiprocessor enabled CPSA built by default.+See the README for instructions on how to build CPSA when the parallel+libraries are missing.++* Changes in version 1.4.3++** Improved performance due to better substitution data structure.++** Corrected a bug in substitution associated with variables of sort mesg.+The fix changes the output for tst/dy.scm.++** Corrected a bug in substitution composition+The fix changes the output for tst/dy.scm.++** Corrected a bug that caused some valid generalizations to be rejected.++** Sort "term" is no longer a synonym for "mesg".++* Changes in version 1.4.2++** Fixed a contraction and an augmentation bug.++** The protocol specification checker cpsaparameters added.+The cpsaparameters program detects some specification errors by+performing a base term usage analysis.++** Parallel search available on SMPs.+Semi-explicit parallelism annotations were added to the CPSA search+routine.  Enable with -fpar during configuration.++** Pretty printer changed.+All lists in a defrole and a defpreskeleton are now broken whenever+one of them is.++** Preskeletons	with no strands are detected, and an error is signaled.++* Changes in version 1.4.1++** The macro preprocessor cpsapp added.+The preprocessor was added to ease the task of specifying protocols+with reoccurring message patterns. It can also be used to pretty print+cpsa input.++** Base terms allowed as principals in annotations.+Base terms as principals are now allowed so as to allow keys as+principals.++** Cohort filtering added.+The cohort is now filtered so that every member is solved.  The+filtering removes dead ends earlier in the computation.++** Fixed a minimization bug.+When separating a uniquely originating base term, either the term or+its clone is uniquely originating.++* Changes in version 1.4.0++** Variable declaration syntax changed.+More than one variable can be declared to be of a given sort in a+single declaration form.++** New sort added.+The sort data was added, a sort that is similar to sort text.  The new+sort can be used to partition nonce-like data from ordinary text-like+data.  See tst/epmo.scm for an example of its use.++** Sort symbol changed.+The symbol used for the top sort has been changed from term to mesg.++** Default output format for cpsagraph changed.+The default output format for cpsagraph is now the expanded format.++* Changes in version 1.3.2+This is a bug fix only release.++** Fixed a minimization bug.+Use the transitive closure of the communication ordering before+deleting a node.++** Added new well-formed preskeleton check.+Every uniquely originating role term mapped by in instance must be+mapped to a term that originates on the instance's strand.++* Changes in version 1.3.1+This is a bug fix only release.++** Bad listener augmentation bug fixed.+Listeners are now added only for the decryption keys of the top most+encryptions in the escape set.  This fixes a bug reported by Eric Bush.++* Changes in version 1.3.0+This release changes the external syntax and fixes bugs.++** Encryption syntax simplified.+To reduce clutter, when enc has more that two terms, a concatenation+is added to all but the last term.++** New name for document.+The CPSA Tutorial was renamed to the CPSA Primer.++** The cpsaannotations program has documentation.+Preliminary documentation is in the CPSA User Guide.++** A make system for Windows was added.+The file doc/Make.hs allows the use of Windows without Cygwin or MinGW.++** A strand augmentation bug was fixed.+This change allows CPSA to find the flaw in the Dolev-Yao Example 1.3+test case.++** Assumption forgetting works again.+This is a fix to a bug that was introduced in the previous release.++** Isomorphism bug fixed.+A strand permutation map was applied to the wrong ordering.++* Changes in version 1.2.3+This is a bug fix only release.++** Illegal comments no longer generated.+The comment generated for non-default strand bounded or step count+limited runs contained an illegal character that has been removed.+As a result, the graphing programs work again.++** A substitution printing failure has been fix.++** The augmentation bug fix in 1.2.2 had a problem that is now fixed.++** Role variables in protocols are printing in the order they were read.+In previous version, role variables were printed in reverse order.++** Better title generated for the expanded view.+The name of the first protocol is included in the title of the+generated XML document.++** Testing showed enabling multiprocess support gives no speedup. ++* Changes in version 1.2.2++** This release fixes a bug.+During augmentation, previously, when a role was searched for a+transforming edge, only the shortest instance was returned as a+candidate for augmentation.  Now all instances are returned.++** Multiprocessor support is available.+The README describes how to enable multiprocessor support.  This+feature is untested.++** Partial support for Rely-Guarantee annotations has been added.+The cpsaannotations program annotates shapes when given an annotated+protocol.  The is no documentation yet, but you can test it with:+$ (cd tst; make epmo-accounts-nums_annotations.xml)++* Changes in version 1.2.1++** This is a bug fix release. There are no user-visible changes.++* Changes in version 1.2.0++** Tags are now non-atomic terms in the Basic Crypto Algebra.++** The expanded view (-x) option is available as an output for cpsagraph.++** Support for local installation was added.++** A standard set of GNU Make rules was added.++** Comments as S-expressions may appear at the file level of input.++** The program cpsabasic was renamed to cpsa.++** The --bound option to cpsa limits the number of strands in a skeleton.++** The current shape search is known to be not complete. See tst/dy.scm.++* Changes in version 1.1.0++** Support for indeterminates was added to the Basic Crypto Algebra.+Variables of sort term, also called indeterminates, are now available+in the Basic Crypto Algebra.++** The CPSA Tutorial was added.++* Initial version released as version 1.0.0++Local variables:+mode:outline+End:
+ README view
@@ -0,0 +1,133 @@+CPSA: A Crptographic Protocol Shapes Analyzer++This program has been built and tested using the Glasgow Haskell+Compiler (GHC), version 6.10, which is available for Linux, Macs, and+Windows.  The instructions assume GHC has been installed on your+machine.++CPSA has been built and tested with GHC 6.8 too, but to handle its old+version of Cabal, configure with:++$ runghc Setup.hs configure -fold --ghc --user --prefix="${HOME}"++QUICK START (Linux)++: To build and install CPSA type:+$ make+$ make install++: To analyze a protocol in prob.scm type:+$ cpsa -o prob.txt prob.scm+$ cpsagraph -x -o prob.xml prob.txt+$ firefox -remote "openFile(`pwd`/prob.xml)"++: To view the user guide:+$ firefox -remote "openFile($HOME/share/cpsa-X.Y.Z/doc/cpsauser.html)"+: where X.Y.Z is the CPSA version number.++QUICK START (Mac)++: To build and install CPSA type:+$ make+$ make install++: To analyze a protocol in prob.scm type:+$ cpsa -o prob.txt prob.scm+$ cpsagraph -c -o prob.svg prob.txt+$ open prob.svg++: To view the user guide:+$ open $HOME/share/cpsa-X.Y.Z/doc/cpsauser.html+: where X.Y.Z is the CPSA version number.++QUICK START (Windows)++The software has been tested on a Windows system on which neither+MinGW or Cygwin has been installed.  Install GHC and then from a+command prompt type:++C:\...> runghc Setup.hs configure+C:\...> runghc Setup.hs build+C:\...> runghc Setup.hs install++If you do not have administrator privileges, configure with:++C:\...> runghc Setup.hs configure --user++The installed programs can be run from the command prompt or via a+batch file.  Alternatively, copy doc/Make.hs into the directory+containing your CPSA problem statements, and load it into a Haskell+interpreter.  Read the source for usage instructions.++MAKEFILE++The file $HOME/share/cpsa-X.Y.Z/doc/cpsa.mk contains useful GNU Make+rules for inclusion, where X.Y.Z is CPSA version number.++Alternatively, copy the file Make.hs in the same directory into the+directory containing your CPSA problem statements.  The source file+has usage instructions.++PARALLELISM++By default, CPSA is built so it can make use of multiple processors.+To make use of more than one processor, start CPSA with a runtime flag+that specifies the number of processors to be used, such as "+RTS -N4+-RTS".  The GHC documentation describes the -N option in detail.++If the Control.Parallel library is not installed, configure CPSA using:++$ runghc Setup.hs configure -f-par++DOCUMENTATION++To build the documentation, the file supp-pdf.tex must be installed.+It is part of the TexLive texmf ConTeXt package.  On Linux, the name+of the package is context or texlive-context.  The design document and+the specification document require the xy-pic package, which is+included in texlive-pictures.++The documentation includes a user guide as an XHTML document, and+three LaTeX documents.  The CPSA Primer provides the background+required to make effective use of the CPSA tool collection.  For those+interested in the implementation, The CPSA Specification formally+describes the implemented algorithm as a term reduction system.  The+CPSA Design describes implementation details and assumes The CPSA+Specification has been read.  The CPSA Design should be read if one is+interested in reading the Haskell source for the tool collection.++TEST SUITE++: To run the test suite type:+$ sh cpsatst.sh++Tests with the .scm extension are expected to complete without error,+tests with the .lsp extension are expected to fail, and tests with the+.lisp extension are not run.  New users should read tst/README, and+then browse the files it suggests while reading CPSA documentation.++Don't develop your protocols in the tst directory.  The Makefile is+optimized for testing the cpsa program, not analyzing protocols.++WEB CPSA++To make CPSA service available:++(1) Install the four programs into the CGI bin directory.++(2) Change directory to the src directory, make cpsacgi, and then copy+cpsacgi and cpsacgi.py into the CGI bin directory.++(3) Copy index.html, ../doc/cpsauser.html, and ../doc/cpsaprimer.pdf+into your choice of the web document directory.++(4) Make an examples directory in the web document directory.++(5) Copy ../tst/*.scm into the examples directory.++SELINUX++You must modify the default policy to allow unconfined executables to+make their heap memory executable, has CPSA is written in Haskell, and+its runtime puts executable code in its heap.  The policy module is in+src/httpd_allow_execmem.te.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ cpsa.cabal view
@@ -0,0 +1,149 @@+Name:			cpsa+Version:		2.0.0+Maintainer:		ramsdell@mitre.org+Cabal-Version:		>= 1.2+License:		BSD3+License-File:		license.txt+Synopsis:		Symbolic cryptographic protocol analyzer+Description:            The Cryptographic Protocol Shapes Analyzer+                        (CPSA) attempts to enumerate all essentially+                        different executions possible for a+                        cryptographic protocol.  We call them the+                        shapes of the protocol.  Naturally occurring+                        protocols have only finitely many, indeed very+                        few shapes.  Authentication and secrecy+                        properties are easy to determine from them, as+                        are attacks and anomalies.+Category:		Cryptography+Build-Type:		Simple+Data-Files:+  doc/index.html doc/cpsauser.html doc/cpsa.mk doc/Make.hs+  doc/cpsaprimer.pdf doc/cpsaoverview.pdf doc/ffgg.scm doc/ns.scm+  doc/or.scm doc/woolam.scm doc/yahalom.scm+-- In cabal 1.6, use this:+-- Data-Files:+--   index.html cpsauser.html cpsa.mk Make.hs cpsaprimer.pdf cpsaoverview.pdf+--   ffgg.scm ns.scm or.scm woolam.scm yahalom.scm+-- Data-Dir:	    	doc+Extra-Source-Files:+  Makefile ChangeLog README NEWS ghci cpsatst.sh doc/README+  doc/Makefile doc/macros.tex doc/cpsaprimer.tex doc/bcasyntax.tex+  doc/cpsaspec.tex doc/cpsadesign.tex doc/cpsaoverview.tex+  doc/cpsadiagrams.mp doc/strands.mp doc/cmstrands.mp doc/carriers.mp+  doc/termtree.mp doc/cpsa.bib doc/SDAG.lhs src/index.html+  src/cpsacgi.sh src/cpsacgi.py src/cpsa2svg.sh+  src/httpd_allow_execmem.te src/cpsaops.scm src/preskel.sh+  src/sexpr.pl tst/README tst/Makefile tst/Make.hs tst/checktst.sh+  tst/cpsagraphall.sh tst/cpsashapesall.sh tst/dass.lisp+  tst/completeness-test.scm tst/completeness-test.tst+  tst/missing-contraction.scm tst/missing-contraction.tst+  tst/dass-mod.lisp tst/dass_simple.scm tst/dass_simple.tst+  tst/denning-sacco.scm tst/denning-sacco.tst tst/dh.sch tst/dh.tst+  tst/ds-short.lisp tst/dy.lsp tst/dy.tst tst/epmo_acctnum.lsp+  tst/epmo_acctnum.tst tst/epmo.scm tst/encsig.scm tst/encsig.tst+  tst/epmo.tst tst/ffgg.scm tst/ffgg.tst tst/isoreject.scm+  tst/isoreject.tst tst/kelly1.scm tst/kelly1.tst tst/kelly64.lisp+  tst/kerb5.lisp tst/kerberos.scm tst/kerberos.tst+  tst/neuman-stubblebine-alt.lisp tst/neuman-stubblebine-reauth.lisp+  tst/neuman-stubblebine-reauth.lsp tst/neuman-stubblebine-reauth.tst+  tst/neuman-stubblebine.scm tst/neuman-stubblebine.tst tst/nsl3.scm+  tst/nsl3.tst tst/nsl4.lisp tst/nsl5i.lisp tst/nsl5.lisp+  tst/nslsk.scm tst/nslsk.tst tst/ns.scm tst/ns.tst tst/or.scm+  tst/or.tst tst/pca.lsp tst/pca.tst tst/tnsl5.lisp tst/updatetst.sh+  tst/sigenc.scm tst/sigenc.tst tst/weird.scm tst/weird.tst+  tst/wmf.lsp tst/wmf.tst tst/woolam.scm tst/woolam.tst+  tst/yahalom.scm tst/yahalom.tst tst/sorted_epmo_acctnum.scm+  tst/sorted_epmo_acctnum.tst tst/nsl4cm1.lsp tst/nsl4cm1.tst++-- Disable with -f-par option during configuration.++Flag Par+  Description:		Enable use of the parallel construct par+  Default:		True++-- Algebra implementations must import CPSA.Lib.CPSA.+-- Tools may additionally import CPSA.Lib.Entry.+-- No other modules in CPSA.Lib should be imported by applications.++Executable cpsa+  Main-Is:		CPSA/Lib/Main.hs+  Build-Depends:	base <= 4.2.0.0, containers+  GHC-Options:+    -Wall -fno-warn-name-shadowing -fwarn-unused-imports+  Hs-Source-Dirs:	src+  Other-Modules:+    Paths_cpsa CPSA.Lib.Vector CPSA.Lib.Utilities CPSA.Lib.Pretty+    CPSA.Lib.SExpr CPSA.Lib.Printer CPSA.Lib.Entry CPSA.Lib.Algebra+    CPSA.Lib.Protocol CPSA.Lib.Strand CPSA.Lib.Loader+    CPSA.Lib.Displayer CPSA.Lib.Cohort CPSA.Lib.Expand CPSA.Lib.CPSA+    CPSA.Basic.Algebra CPSA.DiffieHellman.Algebra+    CPSA.DiffieHellman.IntLinEq+  if flag(par)+    Cpp-Options: -DHAVE_PAR+    GHC-Options: -threaded+    Build-Depends: parallel++Executable cpsagraph+  Main-Is:		CPSA/Graph/Main.hs+  Build-Depends:	base <= 4.2.0.0, containers+  GHC-Options:+    -Wall -fno-warn-name-shadowing -fwarn-unused-imports+  Hs-Source-Dirs:	src+  Other-Modules:+    Paths_cpsa CPSA.Lib.Utilities CPSA.Lib.Pretty CPSA.Lib.SExpr+    CPSA.Lib.Printer CPSA.Lib.Entry CPSA.Lib.Algebra CPSA.Lib.Protocol+    CPSA.Lib.Strand CPSA.Lib.Loader CPSA.Lib.Displayer CPSA.Lib.Cohort+    CPSA.Lib.CPSA CPSA.Graph.XMLOutput CPSA.Graph.Config+    CPSA.Graph.SVG CPSA.Graph.Loader CPSA.Graph.Preskeleton+    CPSA.Graph.Layout CPSA.Graph.Tree CPSA.Graph.CompactView+    CPSA.Graph.ExpandedView CPSA.Graph.LaTeXView++Executable cpsashapes+  Main-Is:		CPSA/Shapes/Main.hs+  Build-Depends:	base <= 4.2.0.0, containers+  GHC-Options:+    -Wall -fno-warn-name-shadowing -fwarn-unused-imports+  Hs-Source-Dirs:	src+  Other-Modules:+    Paths_cpsa CPSA.Lib.Utilities CPSA.Lib.Pretty CPSA.Lib.SExpr+    CPSA.Lib.Printer CPSA.Lib.Entry CPSA.Lib.Algebra CPSA.Lib.Protocol+    CPSA.Lib.Strand CPSA.Lib.Loader CPSA.Lib.Displayer CPSA.Lib.Cohort+    CPSA.Lib.CPSA CPSA.Shapes.Shapes++Executable cpsaannotations+  Main-Is:		CPSA/Annotations/Main.hs+  Build-Depends:	base <= 4.2.0.0, containers+  GHC-Options:+    -Wall -fno-warn-name-shadowing -fwarn-unused-imports+  Hs-Source-Dirs:	src+  Other-Modules:+    Paths_cpsa CPSA.Lib.Utilities CPSA.Lib.Pretty CPSA.Lib.SExpr+    CPSA.Lib.Printer CPSA.Lib.Entry CPSA.Lib.Algebra CPSA.Lib.Protocol+    CPSA.Lib.Strand CPSA.Lib.Loader CPSA.Lib.Displayer CPSA.Lib.Cohort+    CPSA.Lib.CPSA CPSA.Annotations.Formulas+    CPSA.Annotations.Annotations CPSA.Basic.Algebra+    CPSA.DiffieHellman.Algebra CPSA.DiffieHellman.IntLinEq++Executable cpsaparameters+  Main-Is:		CPSA/Parameters/Main.hs+  Build-Depends:	base <= 4.2.0.0, containers+  GHC-Options:+    -Wall -fno-warn-name-shadowing -fwarn-unused-imports+  Hs-Source-Dirs:	src+  Other-Modules:+    Paths_cpsa CPSA.Lib.Utilities CPSA.Lib.Pretty CPSA.Lib.SExpr+    CPSA.Lib.Printer CPSA.Lib.Entry CPSA.Lib.Algebra CPSA.Lib.Protocol+    CPSA.Lib.Strand CPSA.Lib.Loader CPSA.Lib.Displayer CPSA.Lib.Cohort+    CPSA.Lib.CPSA CPSA.Parameters.Flow++Executable cpsapp+  Main-Is:		CPSA/Pretty/Main.hs+  Build-Depends:	base <= 4.2.0.0, containers+  GHC-Options:+    -Wall -fno-warn-name-shadowing -fwarn-unused-imports+  Hs-Source-Dirs:	src+  Other-Modules:+    Paths_cpsa CPSA.Lib.Utilities CPSA.Lib.Pretty CPSA.Lib.SExpr+    CPSA.Lib.Printer CPSA.Lib.Entry CPSA.Lib.Algebra CPSA.Lib.Protocol+    CPSA.Lib.Strand CPSA.Lib.Loader CPSA.Lib.Displayer CPSA.Lib.Cohort+    CPSA.Lib.CPSA
+ cpsatst.sh view
@@ -0,0 +1,15 @@+#! /bin/sh++# This script runs the test suite, and then reduces the data for+# inspection.  If make fails, something is very wrong.  If differences+# appear in the output, there might be a problem.++# These scripts in the tst directory might also serve as a template+# for your needs, but probably not.  Look at doc/cpsa.mk first.++# sh cpsashapesall.sh+# sh cpsagraphall.sh++cd tst+make clean+make
+ doc/Make.hs view
@@ -0,0 +1,297 @@+-- A simple, CPSA specific make system++module Make (cpsa, shapes, annos, cleanse, get, set,+             build, clean, roots) where++{- Place a copy of this source file in the directory used to store+CPSA problem statements, edit it to suit your needs, and load it into+a Haskell interpreter.++Normally, just the build and the clean command are used.  It's the+build command that you usually modify.++To analyze a problem in prob.scm, type:++*Make> cpsa "prob"++If successful, the analysis is in the file prob.xml, which can be+viewed with a standards-compliant browser.++To analyze a problem in prob.sch using the Diffie-Hellman algebra, type:++*Make> cpsa "prob"++For a shapes only version of the analysis, type:++*Make> shapes "prob"++If successful, the shapes are in the file prob_shapes.xml.++When the protocol is annotated with rely-guarantee formulas, type:++*Make> annos "prob"++If successful, the annotated shapes are in the file prob_annotations.xml.++To remove the files generated from source files, type:++*Make> cleanse "prob"++To see the command-line options used by CPSA, type:++*Make> get++To change the command-line options used by CPSA to "-b 15", type:++*Make> set "-b 15"++To analyze all source files in the directory, type:++*Make> build++To remove the files generated from source files in the directory, type:++*Make> clean++-}++import Control.Monad (mapM_)+import Data.List (sort)+import Data.IORef (IORef, newIORef, readIORef, writeIORef)+import System (ExitCode (..), system)+import System.IO (putStrLn)+import System.IO.Unsafe (unsafePerformIO)+import System.FilePath (FilePath, splitExtension)+import System.Directory (removeFile, doesFileExist, getModificationTime,+                         getCurrentDirectory, getDirectoryContents)++-- Flags for CPSA++initialCpsaFlags :: String+initialCpsaFlags = "+RTS -M512m -RTS"++-- A mutable location for CPSA flags+cpsaFlags :: IORef String+cpsaFlags = unsafePerformIO $ newIORef initialCpsaFlags++-- Get the CPSA flags+get :: IO String+get =+    readIORef cpsaFlags++-- Set the CPSA flags+set :: String -> IO ()+set flags =+    writeIORef cpsaFlags flags++-- Transformation rules++data Rule = Rule+    { prog :: String,           -- program to run+      inputExt :: String,       -- input file name extension+      outputExt :: String }     -- output file name extension++-- Graph Rule++graph :: FilePath -> IO ()+graph root =+    make graphRule root         -- make graph using given rule++graphRule :: Rule+graphRule =+    Rule { prog = "cpsagraph -x",+           inputExt = cpsaExt,+           outputExt = graphExt }++-- CPSA Rule++cpsa :: FilePath -> IO ()+cpsa root =+    do+      cpsaAll root+      shapes root+      graph root++cpsaAll :: FilePath -> IO ()+cpsaAll root =+    do+      exists <- doesFileExist (root ++ sourceDhExt)+      case exists of+        True -> cpsaDh root+        False -> cpsaBasic root++-- CPSA using Basic rule++cpsaBasic :: FilePath -> IO ()+cpsaBasic root =+    do+      flags <- get               -- get CPSA flags+      make (cpsaBasicRule flags) root -- make CPSA output using given rule++cpsaBasicRule :: String -> Rule+cpsaBasicRule flags =+    Rule { prog = "cpsa " ++ flags,+           inputExt = sourceBasicExt,+           outputExt = cpsaExt }++-- CPSA using Diffie-Hellman Rule++cpsaDh :: FilePath -> IO ()+cpsaDh root =+    do+      flags <- get               -- get CPSA flags+      make (cpsaDhRule flags) root -- make CPSA output using given rule++cpsaDhRule :: String -> Rule+cpsaDhRule flags =+    Rule { prog = "cpsa -a diffie-hellman " ++ flags,+           inputExt = sourceDhExt,+           outputExt = cpsaExt }++-- Shapes Rule++shapes :: FilePath -> IO ()+shapes root =+    do+      cpsaAll root              -- Run CPSA if need be+      make shapesRule root+      graph $ root ++ shapesRoot++shapesRule :: Rule+shapesRule =+    Rule { prog = "cpsashapes",+           inputExt = cpsaExt,+           outputExt = shapesRoot ++ cpsaExt }++-- Annotations Rule++annos :: FilePath -> IO ()+annos root =+    do+      cpsa root                 -- Run CPSA and make shapes+      make annosRule root+      graph $ root ++ annosRoot++annosRule :: Rule+annosRule =+    Rule { prog = "cpsaannotations",+           inputExt = shapesRoot ++ cpsaExt,+           outputExt = annosRoot ++ cpsaExt }++-- Clean generated files++cleanse :: FilePath -> IO ()+cleanse root =+    do+      rm $ root ++ cpsaExt+      rm $ root ++ graphExt+      rm $ root ++ shapesRoot ++ cpsaExt+      rm $ root ++ shapesRoot ++ graphExt+      rm $ root ++ annosRoot ++ cpsaExt+      rm $ root ++ annosRoot ++ graphExt++-- File Extensions++sourceBasicExt :: String+sourceBasicExt = ".scm"++-- Diffie-hellman source file+sourceDhExt :: String+sourceDhExt = ".sch"++cpsaExt :: String+cpsaExt = ".txt"++shapesRoot :: String+shapesRoot = "_shapes"++annosRoot :: String+annosRoot = "_annotations"++graphExt :: String+graphExt = ".xml"++-- Rule Interpreters++-- Make output for root using rule+make :: Rule -> FilePath -> IO ()+make rule root =+    do+      let input = root ++ inputExt rule+      let output = root ++ outputExt rule+      done <- made input output+      case done of+        True -> return ()       -- Nothing to do+        False -> run (prog rule) input output++-- See if an output file is up-to-date+made :: FilePath -> FilePath -> IO Bool+made input output =+    do+      src <- doesFileExist input+      dst <- doesFileExist output+      case src && dst of+        False -> return False+        True ->+            do+              src <- getModificationTime input+              dst <- getModificationTime output+              return $ src < dst++-- Run a program with input and output from files++-- Print the command before running it.  Delete the output when the+-- command fails.+run :: String -> FilePath -> FilePath -> IO ()+run prog input output =+    do+      let cmd = prog ++ " -o " ++ output ++ " " ++ input+      putStrLn cmd+      code <- system cmd+      case code of+        ExitSuccess -> return ()+        ExitFailure _ ->+            fail "Command failed"++-- Remove a file++-- Prints the command when there is a file to be deleted.+rm :: FilePath -> IO ()+rm output =+    do+      exists <- doesFileExist output+      case exists of+        False -> return ()      -- File doesn't exist+        True ->+            do                  -- Print command before removal+              putStrLn $ "rm " ++ output+              removeFile output++-- Return the roots of the CPSA source files in the current directory.++roots :: [String] -> IO [FilePath]+roots exts =+    do+      dir <- getCurrentDirectory+      files <- getDirectoryContents dir+      let roots = [ root |+                    file <- files,+                    let (root, ext) = splitExtension file,+                    elem ext exts ] -- Filter for source files+      return $ sort roots++-- Build the shapes for all the source files in the current directory.++build :: IO ()+build =+    do+      probs <- roots [sourceBasicExt, sourceDhExt]+      mapM_ cpsa probs++-- Clean files generated for all the source files in the current directory.++clean :: IO ()+clean =+    do+      probs <- roots [sourceBasicExt, sourceDhExt]+      mapM_ cleanse probs
+ doc/Makefile view
@@ -0,0 +1,59 @@+# A LaTeX/MetaPost makefile -- requires GNU Make++SHELL = /bin/sh++DESIGN = cpsadesign+PRIMER = cpsaprimer+SPEC = cpsaspec+OVERVIEW = cpsaoverview+BIB = cpsa++TEX_SRCS = macros.tex bcasyntax.tex++MP_SRCS	= cpsadiagrams.mp carriers.mp termtree.mp++%-0.mps:	%.mp+	mpost -tex=latex $*++%.bbl:	$(BIB).bib+	if test ! -f $*.aux; then pdflatex $*.tex; fi+	bibtex $*+	pdflatex $*.tex++%.ind:	%.idx+	makeindex $*++all:	$(DESIGN).pdf $(OVERVIEW).pdf $(PRIMER).pdf $(SPEC).pdf++$(DESIGN).pdf:	$(MP_SRCS:.mp=-0.mps) $(TEX_SRCS) \+		 $(DESIGN).tex $(DESIGN).bbl+	if test ! -f $(DESIGN).aux; then pdflatex $(DESIGN).tex; fi+	if test -f $(DESIGN).idx; then $(MAKE) $(DESIGN).ind; fi+	pdflatex $(DESIGN).tex++$(OVERVIEW).pdf: $(OVERVIEW).tex+	if test ! -f $(OVERVIEW).aux; then pdflatex $(OVERVIEW).tex; fi+	pdflatex $(OVERVIEW).tex++$(PRIMER).pdf:	$(MP_SRCS:.mp=-0.mps) $(TEX_SRCS) \+		 $(PRIMER).tex $(PRIMER).bbl+	if test ! -f $(PRIMER).aux; then pdflatex $(PRIMER).tex; fi+	if test -f $(PRIMER).idx; then $(MAKE) $(PRIMER).ind; fi+	pdflatex $(PRIMER).tex++$(SPEC).pdf:	$(MP_SRCS:.mp=-0.mps) $(TEX_SRCS) \+		 $(SPEC).tex $(SPEC).bbl+	if test ! -f $(SPEC).aux; then pdflatex $(SPEC).tex; fi+	if test -f $(SPEC).idx; then $(MAKE) $(SPEC).ind; fi+	pdflatex $(SPEC).tex++CLEAN_FILES := $(DESIGN).pdf $(OVERVIEW).pdf $(PRIMER).pdf $(SPEC).pdf \+	$(wildcard *.log *.aux *.toc *.mps *.mpx) \+	$(wildcard *.bbl *.blg *.ind *.idx *.ilg *.out)++clean:+	-rm $(CLEAN_FILES)++dist:	clean+	DIR=`pwd`; DIR=`basename $${DIR}`; \+	cd ..; tar czf $${DIR}.tar.gz $${DIR}
+ doc/README view
@@ -0,0 +1,35 @@+This directory contains CPSA documentation.++* cpsauser.html: The CPSA User Guide, a key reference document++* cpsaprimer.pdf: The CPSA Primer, an introduction to using CPSA++* cpsaoverview.pdf: Another attempt at a gentle introduction to CPSA++The remaining documents must be built.++* cpsaspec.pdf: The CPSA Specification, a formal specification of the algorithm++* cpsadesign.pdf: The CPSA Design, a description of implementation choices.++To build the documentation, the file supp-pdf.tex must be installed.+It is part of the TexLive texmf ConTeXt package.  On Linux, the name+of the package is context or texlive-context.  The design document and+the specification document require the xy-pic package, which is+included in texlive-pictures.++If you want to build the documentation from the sources, and you don't+have and want to install the cmarrows package for Metapost, comment+out the line in cpsadiagrams.mp that loads cmstrands.++diff -u -r1.4 cpsadiagrams.mp+--- doc/cpsadiagrams.mp	9 Oct 2009 19:33:53 -0000	1.4++++ doc/cpsadiagrams.mp	10 Oct 2009 11:59:38 -0000+@@ -13,7 +13,7 @@++ input strands;++-input cmstrands;		% Use CM arrows++% input cmstrands;		% Use CM arrows++ picture node; node = btex $\bullet$ etex;
+ doc/SDAG.lhs view
@@ -0,0 +1,317 @@+Strand Directed Acyclic Graphs++Run this with++  $ ghci SDAG.lhs++> module SDAG where++> import qualified Data.List as L+> import qualified Data.Set as S++The strands in a skeleton are represented by the natural numbers less+than the number of strands in the skeleton.  The strands in a+skeleton are describe by a list of integers, where each element of+the list gives the height of its strand.++> type Strands = [Int]          -- [Strand height]++A node is a pair of natural numbers.  The first number is the node's+strand, and the second is the position of the node within the strand.++> type Node = (Int, Int)        -- (Strand, Position)++Given a strand height list, the set of nodes are++> nodes :: Strands -> [Node]+> nodes heights =+>     [(s, p) | (s, n) <- zip [0..] hts, p <- nats n]+>     where hts = filter (0 <) heights -- remove non-positive heights++where nats n is the list of natural numbers less than n.++> nats :: Int -> [Int]+> nats n = take n [0..]++Thus for a skeleton with three strands, of height 2, 3, and 2, the+nodes are++  *SDAG> nodes [2,3,2]+  [(0,0),(0,1),(1,0),(1,1),(1,2),(2,0),(2,1)]++The edges in an SDAG represent the precedes relation.++> type Edge = (Node, Node)      -- Precedes relation++When (n0, n1) :: Edge, the message event at n0 precedes the one at n1.++The strand succession edges are++> successors :: Strands -> [Edge]+> successors heights =+>     [((s, p), (s, p + 1)) | (s, n) <- zip [0..] hts, p <- nats (n - 1)]+>     where hts = filter (0 <) heights -- remove non-positive heights++For a skeleton with three strands, of height 2, 3, and 2, the strand+succession edges are++  *SDAG> successors [2,3,2]+  [((0,0),(0,1)),((1,0),(1,1)),((1,1),(1,2)),((2,0),(2,1))]++A Strand Directed Acyclic Graph (SDAG) is a strand height list and a+set of edges.  It represents an acyclic graph.++> type SDAG = (Strands, [Edge])++The normalized form of a SDAG contains no strand succession edges or+elements in its transitive closure.++> normalize :: SDAG -> SDAG+> normalize (strands, precedes) =+>     if isAcyclic (adj sdag) ns then+>         sdag                  -- SDAG must be acyclic+>     else+>         error "SDAG has a cycle"+>     where+>       ns = nodes strands      -- Sort SDAG and remove duplicates+>       sdag = (strands, L.sort (L.nub prec))+>       prec = [(n0, n1) |+>               (n0, n1) <- precedes,+>               elem n0 ns,     -- Ensure n0 and n1 are in nodes+>               elem n1 ns,     -- Remove strand succession edges+>               not (sameStrands (n0, n1))]++> sameStrands :: Edge -> Bool+> sameStrands ((s0, _), (s1, _)) = s0 == s1++The adjacency list representation of an SDAG is used to map a node to+a list of its predecessors.  The adjacency list representation is+[[[Node]]], and lookup involves list indexing.  The representation of+an SDAG includes the strand succession edges.++> adj :: SDAG -> Node -> [Node]+> adj (strands, precedes) (s, p) =+>     [ strand s h | (s, h) <- zip [0..] strands ] !! s !! p+>     where+>       strand s h = [ entry (s, p) | p <- nats h ]+>       entry n = enrich n [ n0 | (n0, n1) <- precedes, n1 == n ]+>       -- add strand succession edges+>       enrich (s, p) ns+>           | p > 0 = (s, p - 1) : ns+>           | otherwise = ns++Is graph acyclic?++> isAcyclic :: Ord a => (a -> [a]) -> [a] -> Bool+> isAcyclic adj nodes =+>     all (not . backEdge numbering) (S.toList edges)+>     where+>       numbering = dfs adj (S.toList start)+>       -- Remove nodes that have non-zero indegree+>       start = S.difference (S.fromList nodes) (S.map fst edges)+>       edges = foldl f S.empty nodes+>       f edges src = foldl (g src) edges (adj src)+>       g src edges dst = S.insert (dst, src) edges++Compute a depth first search numbering of nodes using postorder.+With postorder, only back edges go from a lower number to a higher+one.  Assumes nodes, the set of nodes with indegree zero, is not empty.++> dfs :: Ord a => (a -> [a]) -> [a] -> [(a, Int)]+> dfs adj nodes =+>     alist+>     where+>       (_, alist, _) = foldl po (0, [], S.empty) nodes+>       po a@(num, alist, seen) node+>          | S.member node seen = a+>          | otherwise =+>              (num' + 1, (node, num') : alist', seen'')+>              where  -- Search is postorder because nodes at the end of+>                (num', alist', seen'') = -- edges are explored before+>                    foldl po (num, alist, seen') nodes' -- the node+>                seen' = S.insert node seen -- Insert node as soon as+>                nodes' = adj node          -- it's seen++Is edge a back edge, meaning a cycle has been found?  If an edge+contains a node that is not in the alist, it means it was not+visited during the depth first seach.  This can happen when there+is a strong component that has no edges from other strong+components to it.  We report this edge to be a back edge so as to+get the correct overall result.++> backEdge :: Eq a => [(a, Int)] -> (a, a) -> Bool+> backEdge alist (node, node') =+>     case (lookup node alist, lookup node' alist) of+>       (Just n, Just n') -> n >= n'+>       _ -> True++Compute the transitive reduction++> reduce :: SDAG -> SDAG+> reduce g@(strands, precedes) =+>     (strands, filter essential precedes)+>     where+>       essential (dst, src) =+>           loop dst (L.delete dst (adj g src)) [src]+>       loop _ [] _ = True        -- No other path found+>       loop dst (n : ns) seen+>           | n == dst = False    -- There is another path+>           | elem n seen = loop dst ns seen+>           | otherwise = loop dst (adj g n ++ ns) (n : seen)++Compute the transitive closure++> close :: SDAG -> SDAG+> close g@(strands, precedes) =+>     normalize (strands, loop prec False prec)+>     where+>       prec = successors strands ++ precedes+>       loop prec False [] = prec+>       loop prec True [] =+>           loop prec False prec -- restart loop+>       loop prec repeat ((n0, n1) : pairs) =+>           inner prec repeat pairs [(n, n1) | n <- adj g n0]+>       inner prec repeat pairs [] =+>           loop prec repeat pairs+>       inner prec repeat pairs (p : rest)+>           | elem p prec = inner prec repeat pairs rest+>           | otherwise = inner (p : prec) True pairs rest++Shorthands that check their arguments.++> r :: SDAG -> SDAG+> r = reduce . normalize++> c :: SDAG -> SDAG+> c = close . normalize++Is x a proper sublist of y?++> sublist :: Eq a => [a] -> [a] -> Bool+> sublist x y =+>     all (flip elem y) x &&    -- All x in y+>     any (flip notElem x) y    -- Some y not in x++The list of all sublists++> sublists :: [a] -> [[a]]+> sublists [] = [[]]+> sublists (x:xs) = sublists xs ++ map (x:) (sublists xs)++Compute all the SDAGs that are weaker than the given SDAG.++> w :: SDAG -> [SDAG]+> w sdag =+>     let (s, es) = c sdag in+>     L.nub [r |+>            es0 <- sublists es,+>            let r = reduce (s, es0),+>            let (_, es1) = close (s, snd r),+>            sublist es1 es]++Examples++  *SDAG> w ([2,2], [((0,0),(1, 1))])+  [([2,2],[])]++  *SDAG> w ([2,2], [((0,1),(1, 0))])+  [([2,2],[]),+   ([2,2],[((0,1),(1,1))]),+   ([2,2],[((0,0),(1,1))]),+   ([2,2],[((0,0),(1,0))]),+   ([2,2],[((0,0),(1,0)),((0,1),(1,1))])]++Compute the SDAGs in w x that are not weaker than a SDAG in w x.++> m :: SDAG -> [SDAG]+> m sdag =+>     map reduce (filter maximal sdags)+>     where+>       sdags = map close (w sdag) -- All weaker SDAGs+>       maximal sdag =          -- Is SDAG not weaker than some other+>           not (any (weaker sdag) sdags)+>       weaker (s0, es0) (s1, es1) =+>           s0 == s1 && sublist es0 es1++Examples++  *SDAG> m ([2,2], [((0,0),(1, 1))])+  [([2,2],[])]++  *SDAG> m ([2,2], [((0,1),(1, 0))])+  [([2,2],[((0,0),(1,0)),((0,1),(1,1))])]++Compute the SDAGs in w x that are not weaker than a SDAG in w x using+the implemented algorithm.++> m' :: SDAG -> [SDAG]+> m' sdag =+>     let (s, es) = c sdag in+>     L.nub [reduce (s, L.delete e es) | e <- snd (reduce sdag)]++Read and show for CPSA orderings++> data O = O [Edge]++> instance Show O where+>    showsPrec _ (O es) =+>         showString "(precedes" . showl es+>         where+>           showl [] = showChar ')'+>           showl (e : es) = showChar ' ' . shows (E e) . showl es++> instance Read O where+>     readsPrec _ s0 =+>         [(O ord, s3) |+>          ("(", s1) <- lex s0,+>          ("precedes", s2) <- lex s1,+>          (ord, s3) <- readl s2]+>         where+>           readl s0 = [([], s1) |+>                       (")", s1) <- lex s0] +++>                      [(e : es, s2) |+>                       (E e, s1) <- reads s0,+>                       (es, s2) <- readl s1]++A guess at the strand height list associated with some edges++> strands :: [Edge] -> Strands+> strands es =+>     [height s | s <- nats n]+>     where+>       n = 1 + foldl max 0 (map fst nodes)+>       nodes = L.nub (foldl (\ns (n0, n1) -> n0 : n1 : ns) [] es)+>       height s = 1 + foldl max 0 [p | (s', p) <- nodes, s' == s]++Read and show for edges++> data E = E Edge++> instance Show E where+>     showsPrec _ (E (n0, n1)) =+>         showChar '(' . shows (N n0) . showChar ' ' .+>                 shows (N n1) . showChar ')'++> instance Read E where+>     readsPrec _ s0 =+>         [(E (n0, n1), s4) |+>          ("(", s1) <- lex s0,+>          (N n0, s2) <- reads s1,+>          (N n1, s3) <- reads s2,+>          (")", s4) <- lex s3]++Read and show for nodes++> data N = N Node++> instance Show N where+>     showsPrec _ (N (s, p)) =+>         showChar '(' . shows s . showChar ' ' . shows p . showChar ')'++> instance Read N where+>     readsPrec _ s0 =+>         [(N (s, p), s4) |+>          ("(", s1) <- lex s0,+>          (s, s2) <- reads s1,+>          (p, s3) <- reads s2,+>          (")", s4) <- lex s3]
+ doc/bcasyntax.tex view
@@ -0,0 +1,82 @@+The complete syntax for the analyzer using the Basic Crypto Algebra is+shown in Table~\ref{tab:syntax}.  The start grammar symbol is+\textsc{file}, and the terminal grammar symbols are: \textsc{(, ),+  symbol, string, integer,} and the constants set in typewriter font.++The \textsc{prot-alist}, \textsc{role-alist}, and \textsc{skel-alist}+productions are Lisp style association lists, that is, lists of+key-value pairs, where every key is a symbol.  Key-value pairs with+unrecognized keys are ignored, and are available for use by other+tools.  On output, unrecognized key-value pairs are preserved when+printing protocols, but elided when printing skeletons.++\begin{table}+\newcommand{\sym}[1]{\textup{\texttt{#1}}}+\begin{center}\scshape+\begin{tabular}{rcl}+file&$\leftarrow$&form++\\form&$\leftarrow$&+$\mbox{comment}\mid\mbox{protocol}\mid\mbox{skeleton}$+\\ comment&$\leftarrow$&+(\sym{comment}~\ldots)+\\ protocol&$\leftarrow$&+(\sym{defprotocol} id alg role+ prot-alist)+\\ id&$\leftarrow$&symbol+\\ alg&$\leftarrow$&symbol+\\ role&$\leftarrow$&+(\sym{defrole} id vars trace role-alist)+\\ vars&$\leftarrow$&+(\sym{vars} decl$\ast$)+\\ decl&$\leftarrow$&+(id+ sort)+\\ sort&$\leftarrow$&+$\sym{text} \mid \sym{data} \mid \sym{name} \mid \sym{skey}+\mid \sym{akey}\mid\sym{mesg}$+\\ trace&$\leftarrow$&(\sym{trace} event+)+\\ event&$\leftarrow$&+$(\sym{send}\mbox{ term})\mid(\sym{recv}\mbox{ term})$+\\ term&$\leftarrow$&+$\mbox{id}\mid(\sym{pubk}\mbox{ id})+\mid(\sym{privk}\mbox{ id})+\mid(\sym{invk}\mbox{ id})$+\\ &$\mid$&$(\sym{ltk}\mbox{ id id})\mid\mbox{string}\mid(\sym{cat}\mbox{ term+})$+\\ &$\mid$&$(\sym{enc}\mbox{ term+ term})$+\\ role-alist&$\leftarrow$&$+(\sym{non-orig}\mbox{ ht-term}\ast)\mbox{ role-alist}$+\\ &$\mid$&$(\sym{uniq-orig}\mbox{ term}\ast)\mbox{ role-alist}\mid\ldots$+\\ ht-term&$\leftarrow$&term${}\mid{}$(integer term)+\\ prot-alist&$\leftarrow$&$\ldots$+\\ skeleton&$\leftarrow$&+(\sym{defskeleton} id vars+\\ &&\qquad strand+ skel-alist)+\\ strand&$\leftarrow$&+(\sym{defstrand} id integer maplet$\ast$)+\\ &$\mid$&(\sym{deflistener} term)+\\ maplet&$\leftarrow$&+(term term)+\\ skel-alist&$\leftarrow$&$(\sym{non-orig}\mbox{ term}\ast)\mbox{ skel-alist}$+\\ &$\mid$&$(\sym{uniq-orig}\mbox{ term}\ast)\mbox{ skel-alist}$+\\ &$\mid$&$(\sym{precedes}\mbox{ node-pair}\ast)\mbox{ skel-alist}\mid\ldots$+\\ node-pair&$\leftarrow$&+(node node)+\\ node&$\leftarrow$&+(integer integer)+\end{tabular}+\end{center}+\caption{{\cpsa} Syntax}\label{tab:syntax}+\end{table}++The contents of a file can be interpreted as a sequence of+S-expressions.  The S-expressions used are restricted so that most+dialects of Lisp can read them, and characters within symbols and+strings never need quoting.  Seven-bit \textsc{ascii} is used to+encode characters.  Every list is proper.  An S-expression atom is+either a \textsc{symbol}, an \textsc{integer}, or a \textsc{string}.+The characters that make up a symbol are the letters, the digits, and+the special characters in ``\verb|-*/<;=>;!?:$%_&~^+|''.  A symbol may+not begin with a digit or a sign followed by a digit.  The characters+that make up a string are the \textsc{ascii} printing characters+omitting double quote and backslash.  Double quotes delimit a string.+A comment\index{comments} begins with a semicolon, or is an+S-expression list at top-level that starts with the \texttt{comment}+symbol.
+ doc/carriers.mp view
@@ -0,0 +1,64 @@+filenametemplate "%j-%c.mps";++verbatimtex+\documentclass[12pt]{article}+\newcommand{\enc}[2]{\{\!|#1|\!\}_{#2}}+\begin{document}+etex++numeric base_width;+begingroup;+  path p; p = bbox(btex $\strut$ etex rotated 90);+  base_width = 1.3 xpart (lrcorner p - llcorner p);+endgroup;++input boxes;++beginfig(0);+  boxit.b1(btex $X_\top$ etex);+  boxit.b2(btex $\mathsf{text}$ etex rotated 90);+  boxit.b3(btex $\mathsf{data}$ etex rotated 90);+  boxit.b4(btex $\mathsf{name}$ etex rotated 90);+  boxit.b5(btex $\mathsf{akey}$ etex rotated 90);+  boxit.b6(btex $\mathsf{skey}$ etex rotated 90);+  boxit.b7(btex $\mathsf{tags}$ etex rotated 90);++  b4.s = origin;++  for i = 1 upto 6:+    b[i].sw=b[i+1].se;+    b[i].nw=b[i+1].ne;+  endfor;++  for i = 1 upto 7:+    b[i].e + (base_width, 0) = b[i].w;+  endfor;++  for i = 4 upto 6:+    drawboxed(b[i]);+  endfor;++  for i = 3 downto 2:+    drawboxed(b[i]);+  endfor;++  draw pic b[1];+  draw pic b[7];++  % Top of triangle contrained to force a right triange+  z1 = b4.n - b4.s + (b7.nw - b4.n) rotated 90;++  ypart z2 = ypart z3 = 0;+  z2 = whatever[b7.nw,z1];+  z3 = whatever[b1.ne,z1];++  draw z1--z2--z3--z1;++  label(btex \begin{tabular}{c}pairings\\[1ex]+    encryptions\end{tabular} etex, .5z1);+endfig;++verbatimtex+\end{document}+etex+bye;
+ doc/cmstrands.mp view
@@ -0,0 +1,24 @@+% CM strand arrows for documents++% Use the cmarrows package if you want double arrows for strand+% succession edges.++input cmarrows;++setup_cmarrows(+  arrow_name = "doublearrow";+  parameter_file = "cmr12.mf";+  macro_name = "drawdubarrow");++def drawsucc(expr p) =+  drawdubarrow p;+enddef;++setup_cmarrows(+  arrow_name = "texarrow";+  parameter_file = "cmr12.mf";+  macro_name = "drawtexarrow");++def drawmsg(expr p) =+  drawtexarrow p;+enddef;
+ doc/cpsa.bib view
@@ -0,0 +1,133 @@+@Book{Pierce91,+  author = {Benjamin C. Pierce},+  title = {Basic Category Theory for Computer Sicentists},+  publisher = {The {MIT} Press},+  year = 1991}++@Unpublished{DoghmiGuttmanThayer06a,+  author = 	 {Shaddin F. Doghmi and Joshua D.~Guttman and F. Javier+  Thayer},+  title = 	 {Searching for Shapes in Cryptographic Protocols (Extended Version)},+  note = 	 {\url{http://eprint.iacr.org/2006/435}},+  month = 	 nov,+  year = 	 2006}++@InProceedings{DoghmiGuttmanThayer07,+  author    = {Shaddin F. Doghmi and+               Joshua D. Guttman and+               F. Javier Thayer},+  title = 	 {Searching for Shapes in Cryptographic Protocols},+  booktitle = {Tools and Algorithms for Construction and+               Analysis of Systems {(TACAS)}},+  year = 	 2007,+  series = 	 {LNCS},+  number =	 4424,+  pages =	{523--538},+  month = 	 mar,+  publisher = {Springer},+  note = 	 {Extended version at \url{http://eprint.iacr.org/2006/435}}}++@InProceedings{Fay79,+  author = {M. Fay},+  title = {First-order Unification in an Equational Theory},+  booktitle = {Proc. 4th Workshop on Automated Deduction},+  year = 1979}++@Book{BaaderNipkow98,+  author = {Franz Baader and Tobias Nipkow},+  title = {Term Rewriting and All That},+  publisher = {Cambridge University Press},+  year = 1998}++@Book{Paulson91,+  author = {Laurence C. Paulson},+  title = {ML for the Working Programmer},+  publisher = {Cambridge University Press},+  year = 1991}++@Book{RobinsonVoronkov01,+  author = {Alan Robinson and Andrei Voronkov},+  title = {Handbook of Automated Reasoning},+  vol = 1,+  publisher = {The {MIT} Press},+  year = 2001}++@article{GoguenMeseguer92,+    author = "Joseph A. Goguen and Jose Meseguer",+    title = "Order-Sorted Algebra {I}: Equational Deduction for Multiple+Inheritance, Overloading, Exceptions and Partial Operations",+    journal = "Theoretical Computer Science",+    volume = "105",+    number = "2",+    pages = "217-273",+    year = "1992",+    url = "citeseer.ist.psu.edu/goguen92ordersorted.html" }++@inproceedings{Millen99,+    author = "Jonathan K. Millen",+    title = "A Necessarily Parallel Attack",+    booktitle = "Workshop on Formal Methods and Security Protocols,+Part of the Federated Logic Conference",+    address = "Trento, Italy",+    editor = "Nevin Heintze and Edmund Clarke",+    year = "1999",+    url = "citeseer.ist.psu.edu/millen99necessarily.html" }++@inproceedings{PavlovicMeadows06,+    author = "Dusko Pavlovic and Catherine Meadows",+    title = "Deriving Secrecy in Key Establishment Protocols",+    booktitle = "European Symposium on Research in Computer Security",+    month = sep,+    year = 2006,+    url = "http://www.kestrel.edu/home/people/pavlovic/security.html" }++@article{GansnerNorth00,+    author = "Emden R. Gansner and Stephen C. North",+    title = "An open graph visualization system and its applications to software engineering",+    journal = "Soft\-ware --- Prac\-tice and Experience",+    volume = "30",+    number = "11",+    pages = "1203--1233",+    year = "2000",+    url = "citeseer.ist.psu.edu/gansner99open.html" }++@Unpublished{Dijkstra82,+  author = 	 {Edsger W. Dijkstra},+  title = 	 {Why numbering should start at zero},+  note = 	 {\url{http://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html}},+  month = 	 aug,+  year = 	 1982}++@article{GuttmanThayer02,+  author    = {Joshua D. Guttman and+               F. Javier Thayer},+  title     = {Authentication tests and the structure of bundles},+  journal   = {Theor. Comput. Sci.},+  volume    = {283},+  number    = {2},+  year      = {2002},+  pages     = {333-380},+  ee        = {http://dx.doi.org/10.1016/S0304-3975(01)00139-6},+  bibsource = {DBLP, http://dblp.uni-trier.de}+}++@article{ThayerEtal99,+  author    = {F. Javier Thayer and+               Jonathan C. Herzog and+               Joshua D. Guttman},+  title     = {Strand Spaces: Proving Security Protocols Correct},+  journal   = {Journal of Computer Security},+  volume    = {7},+  number    = {1},+  year      = {1999},+  bibsource = {DBLP, http://dblp.uni-trier.de}+}++@article{DolevYao83,+    author = "Daniel Dolev and Andrew Yao",+    title = "On the security of public-key protocols",+    journal = "{IEEE} Transactions on Information Theory",+    volume = 29,+    pages = "198--208",+    year = 1983+}
+ doc/cpsa.mk view
@@ -0,0 +1,38 @@+# Makefile rules for CPSA++# Suggested CPSA flags include a memory use limit:+# CPSAFLAGS = +RTS -M512m -RTS++# Analyze protocols for shapes+%.txt:		%.scm+	$(CPSATIME) cpsa $(CPSAFLAGS) -o $@ $<++# Analyze protocols for shapes, but don't fail when CPSA does+%.txt:		%.lsp+	-$(CPSATIME) cpsa $(CPSAFLAGS) -o $@ $<++# Analyze protocols for shapes using Diffie-Hellman algebra+%.txt:		%.sch+	$(CPSATIME) cpsa -a diffie-hellman $(CPSAFLAGS) -o $@ $<++# Extract shapes+%_shapes.txt:	%.txt+	cpsashapes -o $@ $<++# Annotate shapes+%_annotations.txt:	%_shapes.txt+	cpsaannotations -o $@ $<++# Visualize output using the expanded format (default)+%.xml:		%.txt+	cpsagraph -o $@ $<++# Visualize output using the compact format+%.svg:		%.txt+	cpsagraph -c -o $@ $<++# Visualize output using the LaTeX format+%.tex:		%.txt+	cpsagraph -l -m 62 -o $@ $<++.PRECIOUS:	%.txt %_shapes.txt %_annotations.txt
+ doc/cpsadesign.tex view
@@ -0,0 +1,1131 @@+\documentclass[12pt]{report}+\usepackage{url}+\usepackage{amssymb}+\usepackage{graphicx}+\usepackage{makeidx}+\usepackage{amsthm}+\theoremstyle{definition}+\newtheorem{defn}{Definition}[chapter]+\newtheorem{thm}{Theorem}[chapter]+\newtheorem{lem}[thm]{Lemma}+\input{macros}++\makeindex++\title{CPSA Design}+\author{John D.~Ramsdell\qquad Joshua D.~Guttman\\ The MITRE Corporation}++\begin{document}+\maketitle+\cpsacopying++\tableofcontents++\chapter{Introduction}++The Cryptographic Protocol Shapes Analyzer ({\cpsa}) enumerates all+essentially different executions possible for a cryptographic+protocol.  We call them the \emph{shapes} of the protocol.  Naturally+occurring protocols have only finitely many, indeed very few shapes.+Authentication and secrecy properties are easy to determine from them,+as are attacks and anomalies.++The shapes analysis is performed within a pure Dolev-Yao model.  The+{\cpsa} program reads a sequence of problem descriptions, and prints+the steps it used to solve each problem.  For each input problem,+{\cpsa} is given some initial behavior, and it descovers what shapes+are compatible with it.  Normally, the initial behavior is from the+point of view of one participant.  The analysis reveals what the other+participants must have done, given the participant's view.  The search+is complete, i.e.\ every shape can in fact be found in a finite+number of steps.++A {\cpsa} release includes two other documents, The {\cpsa}+Specification and The {\cpsa} Primer.  The specification describes the+{\cpsa} algorithm in a form that is closely related to its+implementation.  Algorithm correctness proofs are given in the+specification formalism.++There are many design decisions that are not reflected in The {\cpsa}+Specification.  Including these decisions in the specification would+clutter the document and unnecessarily complicate proofs.  The purpose+of this document is to describe the key omitted design decisions.  It+assumes the specification has been thoroughly read.  Definitions are+not reproduced, so the specification should be accessible when reading+this document.  The {\cpsa} Primer provides an overview of {\cpsa},+and may be worth reading before this document is approached.++\section{Notation}\label{sec:notation}++Originally, the specification and the design were one and the same.+Everything was specified in the design formalism.  After the split,+the description of protocols and preskeletons diverged by omitting+details in the design formalism in what is used for the specification+formalism.  Appendix~A in The {\cpsa} Specification relates the two+formalisms.++The key difference between the two formalisms is the design formalism+more directly models the Haskell data structures used in the {\cpsa}+program.  An instance of a Haskell data structure is modeled as an+element in an order-sorted term algebra~\cite{GoguenMeseguer92}.  The+reduction systems in the specification translate to term reduction+systems in the design.++Zero-based indexing\index{zero-based indexing}\index{indexing,+  zero-based} is used though out this document and in the source code+it describes.  Within the document, a finite sequence is a function+from an initial segment of the natural numbers.  Angle brackets are+used for sequence construction and~$\append$ is used for sequence+concatenation.  Thus $$\seq{3,2}\append\seq{99} = \{0\mapsto 3,+1\mapsto 2, 2\mapsto 99\}.$$ The length of a sequence~$S$ is $|S|$.+The phrase ``for~$x\in S$'' is shorthand for ``for~$x$ in the range+of~$S$''.  The mapping of sequence~$S$ by function~$f$ is~$f\circ S$.+Some sets are represented by sequences with no duplicates, and~$f(S)$+is used for~$f\circ S$ after duplicates have been eliminated.++You might wonder why lowercase $k$ is used for skeletons rather than+blackboard bold $\mathbb{A}$.  The notation used in the design+document is motivated by the code, and~$k$ with and without decoration+somehow became associated with preskeletons, probably because $p$,+$r$, $t$, and $s$, were already in use.  Many other notational+conventions are directly inspired by the code.++In this document, lowercase Latin letters usually stand for terms, and+uppercase Latin letters stand for sequences or sets of terms.++\section{Document Status}++This version of the design describes the {\cpsa} implementation that+assumes the unification problem for the message algebra has one most+general unifier.  The Basic Crypto Algebra has this property.++\chapter{Messages}\label{cha:messages}++The formalism used in the design and the specification for message+algebras is the same, an order-sorted term algebra.  This chapter+describes the relation between terms and the external syntax used by+the {\cpsa} program for the Basic Crypto Algebra, and then describes+the interface between the algebra module and the rest of the program.++Table~\ref{tab:bca} presents a slightly modified signature for the+Basic Crypto Algebra.  It specifies a syntax for operations that+follows mathematical tradition, such as writing $K_A$ for+$\cn{pubk}(A)$.  Tag constants are quoted strings.  The sort of all+messages is \dom{mesg}, the sort symbol used by the {\cpsa} program.+The sort~$\top$ is used in the specification so that the carrier set+of all messages is~$\alg{A}_\top$, instead of $\alg{A}_{\dom{mesg}}$.++\begin{table}+\begin{center}+Base sort symbols: \dom{name}, \dom{text}, \dom{data}, \dom{skey},+\dom{akey}\\+Non-base sort symbol: \dom{mesg} \\[1ex]+Subsorts: \dom{name}, \dom{text}, \dom{data}, \dom{akey},+$\dom{skey}<\dom{mesg}$\\[1ex]+\begin{tabular}{@{}ll}+$\enc{\cdot}{(\cdot)}\colon\dom{mesg}\times\dom{mesg}\rightarrow\dom{mesg}$+&Encryption\\+$(\cdot,\cdot)\colon\dom{mesg}\times\dom{mesg}\rightarrow\dom{mesg}$+&Pairing\\+``\ldots''$\colon\dom{mesg}$& Tag constants\\+$K_{(\cdot)}\colon\dom{name}\rightarrow\dom{akey}$+&Public key of name\\+$(\cdot)^{-1}\colon\dom{akey}\rightarrow\dom{akey}$+&Inverse of asymmetric key\\+$\cn{ltk}\colon\dom{name}\times\dom{name}\rightarrow\dom{skey}$+& Long term shared key+\end{tabular}\\[1ex]+Axiom: $(x^{-1})^{-1}\approx x$ for $x\colon\dom{akey}$\\[1ex]+\caption{Basic Crypto Signature}\label{tab:bca}+\end{center}+\end{table}++For pairing, parentheses are omitted when the context permits, and+comma is right associative.  Pairing was once called concatenation,+hence the use of the symbol \texttt{cat} for pairing.++In the S-expression syntax used by the program, the simplest term is a+variable, which syntactically is a \textsc{symbol} as described in+Appendix~\ref{cha:bca syntax reference}.  Internally, each variable+has a sort, so the sort of each variable in the input must be declared+in a \texttt{vars} form, such as:+$$\texttt{(vars (t text) (n name) (k akey))}.$$++\begin{table}+$$\begin{array}{r@{}c@{}l}+\sembrack{\texttt{(pubk~}t\texttt{)}}&{}={}&K_{\sembrack{t}}\\+\sembrack{\texttt{(privk~}t\texttt{)}}&{}={}&K_{\sembrack{t}}^{-1}\\+\sembrack{\texttt{(invk~}t\texttt{)}}&{}={}&\sembrack{t}^{-1}\\+\sembrack{\texttt{(ltk~}t_0~t_1\texttt{)}}&{}={}&+\cn{ltk}(\sembrack{t_0},\sembrack{t_1})\\+\sembrack{\texttt{"}\ldots\texttt{"}}&{}={}&\mbox{``\ldots''}\\+\sembrack{\texttt{(enc~}t_0~\ldots~t_{n-1}~t_n\texttt{)}}&{}={}&+\enc{\sembrack{\texttt{(cat~}t_0~\ldots~t_{n-1}\texttt{)}}}{\sembrack{t_n}}\\+\sembrack{\texttt{(cat~}t\texttt{)}}&{}={}&\sembrack{t}\\+\sembrack{\texttt{(cat~}t_0~t_1~\ldots\texttt{)}}&{}={}&+(\sembrack{t_0},\sembrack{\texttt{(cat~}t_1~\ldots\texttt{)}})++\end{array}$$+\caption{S-expression Terms}\label{tab:trans}+\end{table}++The translation of S-expression terms is given in+Table~\ref{tab:trans}.  Figure~\ref{fig:ns responder} on+Page~\pageref{fig:ns responder} contains examples of \textsc{bca}+message terms.  Also see \textsc{term} in Table~\ref{tab:syntax},+Appendix~\ref{cha:bca syntax reference}.++The code that implements the Basic Crypto Algebra does not directly+implement an order-sorted algebra.  Instead, it implements a+many-sorted algebra and exports an order-sort algebra based on the+implementation.  Appendix~\ref{cha:bca} provides the complete details+of the implementation.++\section{Algebra Interface}++The details of each implementation of a {\cpsa} message algebra are+hidden by an interface.  This section presents the view of a term+algebra exposed by the interface.  Some aspects of the interface are+omitted from this discussion.  For example, each implementation of an+algebra must provide a means to read a term from an S-expression, and+write a term as an S-expression.  Also omitted are functions in the+interface that are specializations of a more general function added to+enhance performance.++Each algebra provides a predicate to determine if a term is a+variable, and another to determine if a term is an atom.  A fresh+variable generator is in the interface.  Given a generator state and a+term, it produces a clone of the term in which the variables have been+replaced with freshly generated ones.  It also returns the new+generator state.++\subsection{Equations}\label{sec:equations}++An algebra reports answers to unification and matching problems by+returning an order-sorted substitution or an error indicator.  A+different data structure is used for each problem, in this document+indicated by using~$\sigma$ for answers to the unification problem of+$\sigma(t_0)\equiv\sigma(t_1)$, and using~$\sigma_E$ for answers to the+matching problem of $\sigma_E(t_0)\equiv t_1$.  As the typical case is for+sets of equations to be solved, the unification and match functions+have been designed to allow an incremental approach to solving the+members of the set, by extending a substitution for one pair of+equated terms.  They have the following signatures:+$$\begin{array}{l}+\fn{unify}\colon+\mathcal{T}_\top(X)\times\mathcal{T}_\top(X)\times+(X\rightarrow\mathcal{T}_\top(X))\rightarrow+(X\rightarrow\mathcal{T}_\top(X))^?\\+\fn{match}\colon+\mathcal{T}_\top(X)\times\mathcal{T}_\top(Y)\times+(X\rightarrow\mathcal{T}_\top(Y))\rightarrow+(X\rightarrow\mathcal{T}_\top(Y))^?+\end{array}$$++For type~$T$, we write $T^?$ to describe the lifted type for~$T$ that+includes an error indicator.  In this formalism, sequences of length+less than two are used for the lifted type, and the error indicator is+the empty sequence.  In Haskell, the lifted type is+\index{maybe type}\texttt{Maybe~$T$}.++An answer to the matching problem is called an+\index{environment}\emph{environment}.  An environment differs from a+substitution produced as an answer to a unification problem in that it+may explicitly specify identity mappings, thus forbidding extensions+to the environment that conflicts with these mappings.  This+distinction is crucial for correctly answering matching problems by+iteratively extending an environment.++To support checks to see if terms are isomorphic via the match+function, the algebra interface includes the \emph{match variable+  renaming} predicate that tests an environment to see if it is a+one-to-one variable-to-variable order sorted substitution.++To support pruning, there is a function that given an environment and+a term, determines if there are variables in the term that are in the+domain of the environment.++\subsection{Term Internals}\label{sec:term internals}++The interface includes a function that returns the set of variables in+a term, and a function that returns the terms carried by a term.+Other subterms are accessed via position oriented+functions.  Recall that a position is a finite sequence of natural+numbers, and the message in~$t$ that occurs at~$p$, is+written~$t\termat p$.  The interface includes a data type for a+position that hides its implementation.  The interface also includes+the ancestors function $\fn{anc}(t,p)$ and the carried positions+function $\fn{carpos}(t,t')$ as defined in the specification.++Each algebra provides a way to obtain a set of positions at which a+subterm occurs within a term, and a way to replace the subterm at a+given position with another term.  These functions are used to+generalize by variable separation.++\begin{defn}[All Positions]\index{all positions}+Given a term~$t$, the set of positions at which~$t$ occurs in~$t'$ is+$\fn{allpos}(t,t')$, where+$$\fn{allpos}(t,t')=\left\{+\begin{array}{ll}+\{\seq{}\}&\mbox{if $t'\equiv t$, else}\\+\multicolumn{2}{l}{\{\seq{i}\append p \mid+p\in\fn{allpos}(t,t_i),i<n\}} \\+& \mbox{if $t'=f(t_0,\ldots,t_{n-1})$, else}\\+\{\}&\mbox{otherwise.}+\end{array}\right.$$+\end{defn}++\begin{defn}[Replace]\index{replace}+Given terms~$t$ and~$t'$, and position~$p$, the term that results from+replacing the term at~$p$ with~$t$ in~$t'$, is+$\fn{replace}(t,p,t')$, where+$$\begin{array}{l}+\fn{replace}(t,\seq{},t')=t;\\+\fn{replace}(t,\seq{i}\append p,f(t_0,\ldots,t_{n-1}))=+f(t'_0,\ldots,t'_{n-1})\mbox{ where}\\+t'_j=\left\{+\begin{array}{ll}+\fn{replace}(t,p,t_i)&\mbox{if $i=j$;}\\+t_j&\mbox{otherwise.}+\end{array}\right.+\end{array}$$+\end{defn}++\subsection{Encryptions and Derivations}\label{sec:encryptions}++Finally, the remaining functions in the interface are the ones that+expose the encryption oriented properties of terms.  The+\emph{decryption key} function returns the key used to decrypt a term+if it is an encryption, otherwise it returns an error indicator.  The+\emph{encryptions} function returns the set of encryption terms+carried by a term, each one paired with its encryption key.  The+penetrator derivable function from the section in the specification of+the same name is in the interface.  Given a derivable predicate that+has been specialized with a given set of supported terms and a set of+atoms to avoid, a target term, and a source term, the+\emph{protectors} function returns an error indicator if the target is+carried by the source outside of an encryption, where the derivable+predicate is used to determine if a decryption key can be used to+expose the target.  Otherwise, it returns a set of encryptions in the+source that carry the target and have underivable decryption keys.  If+two encryptions protect the target, only the outside one is returned.+The inside encryption is the one that is carried by the outside+encryption.  Pseudo code for the decryption key and the protectors+functions is in the specification.++\chapter{Protocols and Preskeletons}\label{cha:prots and preskels}++Terms over an order-sorted signature extended from a message signature+describe key data structures in the {\cpsa} program.  Given a message+signature that defines the sort \dom{mesg} and the atoms, the+additional sorts and operations are in the {\cpsa} Signature in+Table~\ref{tab:strands}.  The signature uses the sort $s~\dom{list}$+for sequences of terms of sort~$s$, and the sort $s~\dom{set}$ for+injective sequences of terms of sort~$s$.  The sorts used in the+signature are in Table~\ref{tab:sorts}.++\begin{table}+\begin{center}+Additional sort symbols: \dom{evt}, \dom{role},+\dom{maplet}, \dom{instance}, \\+\dom{node}, \dom{ordering}, and \dom{preskel} \\[1ex]+$\begin{array}{rl}+\outbnd\colon\dom{mesg}\rightarrow\dom{evt}\hspace{2\arraycolsep}+\inbnd\colon\dom{mesg}\rightarrow\dom{evt}&+\cn{r}\colon\dom{evt}\dom{list}\times\dom{atom}\dom{set}\times+\dom{atom}\dom{set}\rightarrow\dom{role}\\+\cn{m}\colon\dom{mesg}\times\dom{mesg}\rightarrow\dom{maplet}&+\cn{i}\colon\dom{role}\times\dom{nat}\times\dom{maplet}\dom{set}+\rightarrow\dom{instance}\\+\cn{n}\colon\dom{nat}\times\dom{nat}\rightarrow\dom{node}+&\cn{o}\colon\dom{node}\times\dom{node}\rightarrow\dom{ordering}+\end{array}$\\+$\cn{k}\colon\dom{role}\dom{set}\times+\dom{instance}\dom{list}\times+\dom{ordering}\dom{set}\times\dom{atom}\dom{set}\times+\dom{atom}\dom{set}\rightarrow\dom{preskel}$\\[1ex]+\end{center}+\caption{{\cpsa} Signature}\label{tab:strands}+\end{table}++Some of the terms over a {\cpsa} signature are not+\index{well-formed}well-formed, and omitted from interpretation.  The+text describing a term of a sort includes the conditions for it being+well-formed.++In what follows, the external syntax for protocols is presented, and+later, its translation into terms over a {\cpsa} signature.  For+preskeletons, the internal representation is presented first, followed+by its external syntax.++\begin{table}+\begin{center}+\begin{tabular}{rl}+\dom{mesg}& the sort of all messages (implementation of $\top$)\\+\dom{evt}& a transmission or reception event\\+\dom{trace}& a sequence of events used in a role\\+\dom{role}& a trace, a non-originating set, and a uniquely-originating+set\\+\dom{protocol}& a set of roles\\+\dom{nat}& a natural number\\+\dom{maplet}& a map from a role variable to a preskeleton term\\+\dom{instance}& a strand's trace and inheritance as instantiated from a role\\+\dom{node}& a pair of numbers, a strand identifier and a strand position\\+\dom{ordering}&a causal ordering between a pair of nodes\\+\dom{preskel}& a preskeleton+\end{tabular}+\caption{Protocol and Preskeleton Sorts}\label{tab:sorts}+\end{center}+\end{table}++\section{Protocols}++A protocol defines the patterns of allowed behavior for+non-adversarial participants, called the \emph{regular} participants.+The behavior of each regular participant is an instance of a protocol+template, called a role.  Figure~\ref{fig:ns roles} displays the roles+that make up the Needham-Schroeder protocol.++\begin{figure}+\begin{center}+\includegraphics{cpsadiagrams-0.mps}\hfil+\includegraphics{cpsadiagrams-1.mps}+\caption{Needham-Schroeder Initiator and Responder Roles}+\label{fig:ns roles}+\end{center}+\end{figure}++In S-expression syntax, a protocol is a named set of roles and is+defined by the \texttt{defprotocol} form.  See \textsc{protocol} in+Table~\ref{tab:syntax}, Appendix~\ref{cha:bca syntax reference}.+\begin{center}+\begin{tabular}{l}+\verb|(defprotocol ns basic|\\+\verb|  (defrole init| \ldots\texttt{)}\\+\verb|  (defrole resp| \ldots\texttt{))}+\end{tabular}+\end{center}++The name of this protocol (\textsc{id}) is \texttt{ns}, and the second+identifier (\textsc{alg}) names the message algebra in use.  The+identifier for the Basic Crypto Algebra is \texttt{basic}.++During the reading process, the appropriate algebra is implicitly+bound to the internal representation of a protocol and many data+structures derived from it.  The protocol name is used at read time to+bind it with its usages, and for output and error messages, but is+otherwise unused and thus omitted from the design specification. The+internal representation of a \index{protocol}protocol is simply a set+of roles---as a term of sort \dom{role~set} in Table~\ref{tab:strands}.++The S-expression syntax for a role has a name, a declared set of+variables, and a trace that provides a template for the behavior of+its instances.  A trace is a non-empty sequence of+events\index{event}, either a message transmission or a reception.  An+outbound\index{outbound} term is \texttt{(send $t$)} and an+inbound\index{inbound} message with term~$t$ is \texttt{(recv $t$)}.+The translations of events are $\outbnd\sembrack{t}$ and+$\inbnd\sembrack{t}$ respectively, where~$\sembrack{t}$ is the+translation of the S-expression~$t$ into an term of sort~\dom{mesg} in+Table~\ref{tab:strands}.  Needham-Schroeder responder's role in+S-expression syntax is in Figure~\ref{fig:ns responder}.++\begin{figure}+\begin{quote}+\begin{verbatim}+(defrole resp (vars (b a name) (n2 n1 text))+  (trace (recv (enc n1 a (pubk b)))+         (send (enc n1 n2 (pubk a)))+         (recv (enc n2 (pubk b)))))+\end{verbatim}+\end{quote}+\caption{Needham-Schroeder Responder Role}+\label{fig:ns responder}+\end{figure}++Some atoms in a role have special properties.  The atoms+listed in the \texttt{non-orig} form are assumed to be+non-originating, and those in the \texttt{uniq-orig} form are assumed+to be uniquely originating.  The implications of these assumption is+as in the specification.++Internally, \index{role}role~$\cn{r}(C,N,U)$ has a trace~$C$, and two+sets of atoms,~$N$ and~$U$.  The atoms in~$N$ are assumed to be+non-originating, and the atoms in~$U$ are assumed to be uniquely+originating.  As with protocols, the name is used during input and+output, but omitted from this specification.++A role is \index{well-formed role}well-formed if it satisfies the+conditions listed for a role in the specification.  A protocol is+well-formed if no variable occurs in more than one role.  The external+syntax used by {\cpsa} uses variable renaming to create the illusion+that the same variable may occur in two roles.  In the external+syntax, two roles may share the same identifier.++Associated with each protocol is an implicit set of roles.  For each+term~$t$ in its algebra, there is a \label{def:listener+  role}\index{listener role}\index{role!listener}\emph{listener role}+of the form~$\fn{lsn}(t) = \cn{r}(\seq{\inbnd t,\outbnd t}, \seq{},+\seq{})$.  A listener role is used to assert that a term is not a+secret.  In the implementation, the only difference between a listener+role and non-listener roles is its name is the empty string, a fact+used when printing.++\section{Preskeletons}++The other key {\cpsa} data structure is a preskeleton---see the~\cn{k}+operator in Table~\ref{tab:strands}.  A preskeleton is used to encode+classes of protocol executions, including its shapes, the answers+produced by {\cpsa}.  One component of a preskeleton is its protocol,+and one component is a set of strands.  There are more components, but+the set's representation is presented next.++As in the specification, a sequence of instances represents a set of+strands.  The instance\index{instance} $\cn{i}(r,h,E)$ contains a+role~$r$, a positive number~$h$ called its height, the length of the+trace associated with the instance, and an+environment\index{environment}~$E$, a term of sort \dom{maplet}+\dom{set}.++The environment~$E$ is well-formed if it represents the order-sorted+substitution~$\sigma_E$ such that for every maplet $\cn{m}(x,y)$,+$\sigma_E x=y$.  Note that~$x$ is always a variable, unlike its analog+in the external syntax.  An instance is well-formed if its role is+well-formed, its environment is well-formed, and its height is not+greater that the length of its role's trace.++The set of strands in a preskeleton is represented by a sequence of+instances.  The identity of a strand\index{strand} is its position in+the sequence, which is where the description of its trace is located.+The \index{node}node $\cn{n}(s,p)$ is associated with the event+at position~$p$ in strand~$s$'s trace.  In other words, if~$I$ is+a sequence of instances, the event at $\cn{n}(s,p)$,+\label{def:evt}written~$\fn{evt}(I,\cn{n}(s,p))$, is $\sigma_E(C(p))$, where+$I(s)=\cn{i}(\cn{r}(C,N,U),h,E)$ and~$p<h\leq|C|$.  A node+associated with an inbound term is a \index{reception+  node}\emph{reception node}, and a node associated with an outbound+term is a \index{transmission node}\emph{transmission node}.  The term+stripped of its direction is written~$\fn{msg}(I,\cn{n}(s,p))$.  The+set of nodes in sequence~$I$ is $\{\cn{n}(s,p) \mid s<|I|,+I(s)=\cn{i}(r,h,E), p < h\}$.++The preskeleton\index{preskeleton}~$\cn{k}(P,I,O,N,U)$ contains a+protocol~$P$, a non-empty sequence of instances~$I$, a set of+communication orderings~$O$, a set of non-originating+terms\index{non-originating term}~$N$, and a set of uniquely+originating terms~$U$.  The node+ordering\index{ordering}\index{communication ordering} $o(n_0, n_1)$+asserts that~$n_0$ precedes~$n_1$, that the event at~$n_0$ is+outbound, the event at~$n_1$ is inbound, and~$n_0$ and~$n_1$+are on different strands.  The atoms in~$N$ are assumed to be+non-originating, and the atoms in~$U$ are assumed to be uniquely+originating.++Members of the set of communication orderings~$O$ relate nodes in+differing strands.  There is an implied ordering of nodes within the+same strand.  Strand succession orderings of the form+$\cn{o}(\cn{n}(s, p-1), \cn{n}(s, p))$, where $0 < p < h$ and~$h$ is+the height of strand~$s$ are implicit, and must not be in~$O$.+\index{strand succession orderings}++\index{graph!preskeleton}\index{preskeleton graph}+Associated with each preskeleton~$k$ is a graph.  The vertices of the+graph are the nodes of the instance sequence~$I$, and the edges are+the reverse of the both communication ordering~$O$ and the implied+strand succession orderings.  The edges are reversed because events in+a node's past are of interest when analyzing a node.  When the graph+is acyclic, the transitive asymmetric relation~$\kprec{k}$ of~$k$ is the+transitive closure of the graph, and $n_0\kprec{k} n_1$ asserts that the+message event at~$n_0$ precedes the one at~$n_1$.  (A preskeleton with+a graph that contains cycles is not well-formed.)++To be well-formed\index{well-formed preskeleton}, in addition to the+requirements on communication orderings listed above, a preskeleton+must satisfy the same conditions listed for a preskeleton in the+specification.++\begin{figure}+\begin{center}+\includegraphics{cpsadiagrams-4.mps}+\caption{Needham-Schroeder Shape ($K^{-1}_A$ uncompromised, $N_2$ fresh)}+\label{fig:ns shape}+\end{center}+\end{figure}++\begin{figure}+\begin{center}+With $A,A',A'',B,B',B'',C\colon+\dom{name},N_1,N_1',N_1'',N_2,N_2',N_2''\colon\dom{text}$:+\end{center}+$$+\begin{array}{r@{}c@{}l}+\fn{resp}&{}={}&\cn{r}(\fn{resp}_t, \seq{},\seq{})+\mbox{ where}\\+\fn{resp}_t&{}={}&\seq{+\inbnd\enc{N_1,A}{K_B},+\outbnd\enc{N_1,N_2}{K_A},+\inbnd\enc{N_2}{K_B}}+\end{array}+$$++$$+\begin{array}{r@{}c@{}l}+\fn{init}&{}={}&\cn{r}(\fn{init}_t, \seq{},\seq{})+\mbox{ where}\\+\fn{init}_t&{}={}&\seq{+\outbnd\enc{N_1',A'}{K_{B'}},+\inbnd\enc{N_1',N_2'}{K_{A'}},+\outbnd\enc{N_2'}{K_{B'}}}+\end{array}+$$++$$\begin{array}{r@{}c@{}l}+\multicolumn{3}{l}{\cn{k}(\seq{\fn{resp},\fn{init}},+I, O,\seq{K_{A''}^{-1}},\seq{N_2''})\mbox{ where}}\\+I&{}={}&\langle\cn{i}(\fn{resp}, 3, E),+\cn{i}(\fn{init}, 3, E')\rangle\\+E&{}={}&\seq{\cn{m}(A,A''),\cn{m}(B,B''),+\cn{m}(N_1,N_1''), \cn{m}(N_2,N_2'')}\\+E'&{}={}&\seq{\cn{m}(A',A''),\cn{m}(B',C),+\cn{m}(N_1',N_1''), \cn{m}(N_2',N_2'')}\\+O&{}={}&\seq{\cn{o}(\cn{n}(0,1),\cn{n}(1,1)),+\cn{o}(\cn{n}(1,2),\cn{n}(0,2))}+\end{array}$$+\caption{Needham-Schroeder Preskeleton}\label{fig:ns}+\end{figure}++A Needham-Schroeder shape in traditional Strand Space notation is in+Figure~\ref{fig:ns shape}, and its representation using order-sorted+terms is given in Figure~\ref{fig:ns}.++\subsection{Preskeleton S-Expression Syntax}++The \texttt{defskeleton} form in Table~\ref{tab:syntax},+Appendix~\ref{cha:bca syntax reference} is used to specify a+preskeleton in S-expression syntax.  (With the exception of the+initial problem statement, a preskeleton is always a skeleton.)+On output, a preskeleton Referring to+Table~\ref{tab:syntax}, the \textsc{id} in the preskeleton form names+a protocol.  It refers to the most recent protocol definition of that+name which precedes the preskeleton form in the input.  The+\textsc{id} in the \texttt{defstrand} form names a role.  The integer+in the strand form gives the height of the strand.  The sequence of+pairs of terms in the strand form specify an environment used to+construct the events in a strand from its role's trace.  The+first term is interpreted using the role's variables and the second+term uses the preskeleton's variables.  The environment used to+produce the strand's trace is derived by matching the second term+using the first term as a pattern.  The \texttt{deflistener} form+creates an instance of a listener role for the given term.++The \texttt{precedes} form specifies members of the node relation.+The first integer in a node identifies the strand using the order in+which strands are defined in the \texttt{defskeleton} form.++\begin{figure}+\begin{quote}+\begin{verbatim}+(defskeleton ns (vars (n2 n1 text) (a b b-0 name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b-0))+  (precedes ((0 1) (1 1)) ((1 2) (0 2)))+  (non-orig (privk a))+  (uniq-orig n2))+\end{verbatim}+\end{quote}+\caption{Needham-Schroeder \texttt{defskeleton}}\label{fig:defns}+\end{figure}++A variable may occur in more then one role within a protocol.  The+reader performs a renaming so as to ensure these occurrences do not+overlap.  Furthermore, the maplets used to specify a strand need not+specify how to map every role variable.  The reader inserts missing+mappings, and renames every preskeleton variable that also occurs in a+role of its protocol.  The sort of every preskeleton variable that+occurs in the \texttt{non-orig} or \texttt{uniq-orig} list or in a+maplet must be declared, using the \texttt{vars} form.++Needham-Schroeder shape in S-expression syntax is displayed in+Figure~\ref{fig:defns}.  The effect of reader renaming is shown in+Figure~\ref{fig:ns} by adding primes to variables.++The \textsc{prot-alist}, \textsc{role-alist}, and \textsc{skel-alist}+productions in Table~\ref{tab:syntax} are Lisp style association lists,+that is, lists of key-value pairs, where every key is a symbol.+Key-value pairs with unrecognized keys are ignored, and are available+for use by other tools.  On output, unrecognized key-value pairs are+preserved when printing protocols, but elided when printing+preskeletons.++See the {\cpsa} Primer for more examples of {\cpsa} external syntax.++\chapter{Reductions}\label{cha:reductions}++This chapter describes the implementation-oriented refinements made to+support reduction that are considered too detailed to be included in+the specification.++In the {\cpsa} implementation and the design formalism, every+preskeleton includes a link to its protocol.  Two preskeletons are not+related by a homomorphism unless they specify the same protocol.++For each preskeleton~$k$, the implementation maintains an+\index{origination map} \emph{origination map}, $\orig(k,t)$.  It maps+each of the preskeleton's uniquely originating terms to the set of+nodes at which it originates.  For hulled preskeletons, the range of+this map must contain singleton sets or the empty set.  The+origination map returns an error indicator when given a term not assumed+to be uniquely originating, a feature used to check the+implementation's consistency.++Each preskeleton contains the state of a variable generator.  It's+used to ensure a source of fresh variables for any preskeleton derived+from it.++\section{Preskeleton Reductions}\label{sec:preskeleton reductions}++Given a well-formed preskeleton, an attempt is made to convert it into+a set of skeletons.  This section describes a few implementation+details omitted from the specification.++The implementation uses sequences to represent some sets.  The+function \index{nub}\fn{nub} removes duplicates from a sequence.++\subsection{Substitution}++The function~$\ops{S}_\sigma$ applies the order-sorted substitution~$\sigma$+to a preskeleton.+$$+\begin{array}{r@{}c@{}l}+\ops{S}_\sigma(\cn{k}(P, I, O, N, U))&{}={}&+\cn{k}(P, \ops{S}_\sigma\circ I, O, \fn{nub}(\sigma\circ N),+\fn{nub}(\sigma\circ U))\\+\ops{S}_\sigma(\cn{i}(r,h,E))&{}={}&\cn{i}(r, h, \ops{S}_\sigma\circ E)\\+\ops{S}_\sigma(\cn{m}(x,y))&{}={}&\cn{m}(x,\sigma(y))+\end{array}+$$++The substitution is permitted as long as it preserves the nodes at+which each uniquely originating term originates.  In other words, the+substitution is permitted only if for each uniquely originating+term~$t$ in~$k$, $\orig(k,t)\subseteq\orig(k', \sigma(t))$, where+$k'=\ops{S}_\sigma(k)$.  The implicit homomorphism is+$(\idphi,\sigma)$, where~$\idphi$ is the identity strand map for~$k$.++\subsection{Compression}++The function~$\ops{C}_{s,s'}$ compresses~$s$ into~$s'$ in a preskeleton.+$$+\begin{array}{r@{}c@{}l}+\ops{C}_{s,s'}(\cn{k}(P, I, O, N, U))&{}={}&+\cn{k}(P, I\dagger s, \ops{C}_{\phi}\circ O, N, U)\\+\ops{C}_\phi(\cn{o}(n_0, n_1))&{}={}+&\cn{o}(\ops{C}_\phi(n_0), \ops{C}_\phi(n_1))\\+\ops{C}_\phi(\cn{n}(s, p))&{}={}&\cn{n}(\phi(s), p)\\+\phi(j)=\phi_{s,s'}(j)&{}={}&\left\{+\begin{array}{ll}+\phi_s(s')&\mbox{if $j=s$}\\+\phi_s(j)&\mbox{otherwise}+\end{array}\right.\\+\phi_s(j)&{}={}&\left\{+\begin{array}{ll}+j-1&\mbox{if $j>s$}\\+j&\mbox{otherwise}+\end{array}\right.\\+(I\dagger s)(j)&{}={}&\left\{+\begin{array}{ll}+I(j+1)&\mbox{if $j\geq s$}\\+I(j)&\mbox{otherwise}+\end{array}\right.+\end{array}+$$ where the trace of~$I(s)$ is a prefix of the trace of~$I(s')$.+Although not shown, orderings of the form+$\cn{o}(\cn{n}(s,p),\cn{n}(s,p'))$ are removed from the ordering when+$p<p'$, so they do not cause the output preskeleton to fail to be+well-formed.  The implicit homomorphism is+$(\phi_{s,s'},\idsigma)$, where~$\idsigma$ is the identity substitution.++\subsection{Transitive Reduction}++The function~$\ops{R}$ performs a transitive reduction on a preskeleton's+node relation.  The transitive reduction\index{transitive reduction}+of an ordering is the minimal ordering such that both orderings have+the same transitive closure.  Here, communication orderings implied by+transitive closure are removed.++The transitive reduction of a skeleton is isomorphic to the skeleton.+The reduction is performed to speed up the code that checks for+isomorphisms.  When two skeletons are transitively reduced, and+isomorphic, they have the same number of communication orderings.++In the implementation, transitive reduction is the last operation+applied to a preskeleton during the process of converting a+preskeleton into a pruned skeleton.  Isomorphism testing is only+performed on pruned skeletons.++\section{Augmentation}++The function~$\ops{A}_{i,n}$ augments a preskeleton with a new strand.+It appends the instance~$i$ to the sequence of instances, adds a node+ordering, and adds atoms as specified by the role.  The function+orders the last node in the strand before some node in the+preskeleton.++$$+\begin{array}{r@{}c@{}l}+\ops{A}_{i,n}(\cn{k}(P, I, O, N, U))&{}={}&+\cn{k}(P, I\append\langle i\rangle,+\langle \cn{o}(\cn{n}(|I|,h-1),n)+\rangle \append O,N_1, U_1)\\+i&{}={}&\cn{i}(\cn{r}(C,N_0,U_0),h,E)\\+N_1&{}={}&\fn{nub}(N\append\sigma_e\circ N_0)\\+U_1&{}={}&\fn{nub}(U\append\sigma_e\circ U_0)+\end{array}+$$ Although not shown, elements in~$N_1$ that contain a variable that+does not occur in some event in the constructed preskeleton+are dropped, as are elements in~$U_1$ that are not carried in some+event in the constructed preskeleton.  As with the preskeleton+reductions in Section~\ref{sec:preskeleton reductions}, it is+straightforward to derive the homomorphism associated with a+successful augmentation.++\section{Generalization}\label{sec:generalization}++The generalization process is the only part of the algorithm that+requires non-isomorphic homomorphisms to be explicitly represented.+To make this possible, every preskeleton contains two additional+fields not yet described, a link to the point-of-view skeleton, and a+{\pov} strand map.  The {\pov} strand map is the second component of+the homomorphism from the point-of-view skeleton to the preskeleton.+The first component can be generated via matching using the+point-of-view skeleton.++The {\pov} strand map is maintained by every reduction applied to a+preskeleton.  The compression reduction is the only one that+requires careful thought.++\chapter{Search Strategy}\label{cha:search}++The top-level loop maintains two sequences of skeletons, a to do list,+and a set of skeletons that have already been seen.  When the to do+list is empty, the loop exits.++For each problem statement, {\cpsa} attempts the convert the+preskeleton into a skeleton.  If the conversion fails, an error is+signaled.  Otherwise, a search is started with the skeleton as the+{\pov} skeleton of Section~\ref{sec:generalization}.  The top-level loop+starts with the {\pov} skeleton as the single member of the to do+list and the seen set.++The following steps constitute one iteration of the top-level loop.+The first skeleton on the to do list is removed and is the subject of+the iteration.  If the skeleton is unrealized, contraction and+augmentation are used to compute its cohort.  Otherwise, generalization+reductions are tried in an effort to make one generalization step.+The generated skeletons are the subject's children.  Each child that+is isomorphic to a member of the seen set is dropped.  The other+children are added to the seen set and to the end of the to do list.+The final step in the iteration is to print the subject skeleton.++When the subject in unrealized, the test node is selected as follows.+The strands are considered in reverse order, and the first unrealized+node in one of the strands is used as the test node.  The program+happens to try atoms for critical messages before it tries+encryptions, but the overall results should be independent of the+algorithms used to select test nodes and critical messages, an assertion+that requires justification.  The encryptions considered as critical+messages are obtained using the \emph{encryptions} function in the+algebra interface.++\chapter{Visualization}\label{cha:viz}++This section describes the Causally Intuitive Preskeleton Layout+algorithm used to generate visualizations of preskeletons.  The+algorithm is simple to implement and explain, and because it is+designed for preskeletons, it produces better results than is+available from generic graph layout algorithms, such as the ones used+by Graphviz~\cite{GansnerNorth00}.++The preskeleton is prepared by performing a transitive reduction on+its ordering relation.  Communication edges implied by transitive+closure are removed.  The result is called a Hasse diagram.++The Hasse diagram is created by considering each communication edge.+If there is a path from its source to its destination that does not+traverse the edge, the edge is deleted.++To simplify the task, each strand is laid out vertically with early+nodes above later ones.  The strands are horizontally placed in the+same order as they appear in the preskeleton.  The spacing between+successive nodes on a strand is the same, as is the horizontal spacing+between strands.  The vertical position of a node is called its rank.++Within this framework, the simplest layout algorithm is to use the+position of the node in its strand as its rank.  When using this+layout strategy, the only difficultly occurs when a node ordering+arrow crosses over a node in an unrelated strand.  To avoid ambiguity,+arrows that cross strands are curved.++When using position based ranking, the result often contains upward+sloping arrows.  Within a strand, no node that is after a node is+above the node, but with upward sloping arrows, this property no+longer holds.  The motivation for the Causally Intuitive Preskeleton+Layout algorithm is that eliminating upward sloping arrows makes+causal relations easier to grasp.++The layout algorithm has two phases.  The first phase stretches+strands so as to eliminate upwardly sloping arrows, and the second+phase compresses them so as to eliminate some unnecessary stretching.+Without phase two, some nodes early in a strand appear to be oddly+separated from others in the strand.++Each phase starts with a to do list containing every node in the+preskeleton.  For each node in the to do list, if conditions are met,+it updates the current node ranking and adds nodes to the to do list.+The phase is finished when the to do list is empty.++Phase I starts with the position based ranking~$r(s,p)=p$.  Let~$P(n)$+be the set the predecessors of node~$n$, excluding the nodes on the+strand of~$n$.  Let~$P_r(n)=\{r(n')\mid n'\in P(n)\}$ be the ranks+of~$P(n)$.  The stretch rule is considered for each element in the+to do list.++The stretch rule applies to node~$n_1$ if $r(n_1)<h$, where+$h=\max(\{r(n_1)\}\cup P_r(n_1))$.  In that case, the ranking is updated+so that $r(n_1)=h$, and the linearize rule is applied to the next strand+node if it exists.++The linearize rule applies to node~$n_1$ if $r(n_1)\leq r(n_0)$,+where~$n_0$ is the previous strand node.  In that case, the ranking is+updated so that $r(n_1)=r(n_0)+1$, the to do list is augmented with+elements in~$S(n_1)$, and the linearize rule is applied to the next+strand node if it exists, where~$S(n)$ is the set the successors of+node~$n$, excluding the nodes on the strand of~$n$.++In phase II, the compress rule is considered for each element in the+to do list.  It applies to node~$n_1$ with a next strand node of~$n_2$+if $r(n_1)<h$, where $h=\min(\{r(n_2)-1)\}\cup S_r(n_1))$ and~$S_r(n)$+is the ranks of~$S(n)$.  In that case, the ranking is updated so that+$r(n_1)=h$, and the to do list is augmented with elements in~$P(n_1)$+and the previous strand node of~$n_1$ if it exists.++\chapter*{Acknowledgement}++Carolyn Talcott provided valuable feedback on drafts of this document.++\appendix++\chapter{Basic Crypto Algebra Syntax Reference}\label{cha:bca syntax reference}++\input{bcasyntax}++\chapter{The Basic Crypto Many-Sorted Algebra}\label{cha:bca}++The implementation uses a many-sorted algebra.  The many-sorted+message algebra described here is a reduction of the order-sorted+message algebra in Table~\ref{tab:bca} using the method described+in~\cite[Section~4]{GoguenMeseguer92}.  The order-sorted message+signature is reproduced in Table~\ref{tab:order-sorted} in a form that+uses prefix notation for every term formed using an operator.  In the+related many-sorted signature in Table~\ref{tab:many-sorted}, the+inclusion function\index{inclusion function} symbols are \cn{text},+\cn{data}, \cn{name}, \cn{skey}, and \cn{akey}.  Section~4 of the+paper describes the sense in which algebras that model the many-sorted+signature are essentially the same as the ones that model the+order-sorted message signature.++\begin{table}+\begin{center}+Base sort symbols: \dom{name}, \dom{text}, \dom{data}, \dom{skey},+\dom{akey}\\+Non-base sort symbol: \dom{mesg} \\[1ex]+Subsorts: \dom{name}, \dom{text}, \dom{data}, \dom{akey},+$\dom{skey}<\dom{mesg}$\\[1ex]+$\cn{pubk}\colon\dom{name}\rightarrow\dom{akey}\quad+\cn{invk}\colon\dom{akey}\rightarrow\dom{akey}\quad+\cn{ltk}\colon\dom{name}\times\dom{name}\rightarrow\dom{skey}$\\+$\cn{enc}\colon\dom{mesg}+\times\dom{mesg}\rightarrow\dom{mesg}\quad+\cn{cat}\colon\dom{mesg}+\times\dom{mesg}\rightarrow\dom{mesg}\quad C_i\colon\dom{mesg}$\\[1ex]+Axiom: $\cn{invk}(\cn{invk}(x))\approx x$ for $x\colon\dom{akey}$\\+\caption{Basic Crypto Order-Sorted Signature}\label{tab:order-sorted}+\end{center}+\end{table}++Terms are constructed from a set $I$ of identifiers\index{identifiers}+and a set of functions symbols.  The symbols of arity one are+\cn{text}, \cn{data}, \cn{name}, \cn{skey}, \cn{akey}, \cn{pubk}, and+\cn{invk}.  The symbols of arity two are \cn{ltk}, \cn{cat}, and+\cn{enc}.  The signature is given in Table~\ref{tab:many-sorted}.+Grammar rules define the terms used by this algebra.++\begin{table}+\begin{center}+Sort symbols: \dom{name}, \dom{text}, \dom{data},+\dom{skey}, \dom{akey}, and \dom{mesg}\\[1ex]+$\cn{pubk}\colon\dom{name}\rightarrow\dom{akey}\quad+\cn{invk}\colon\dom{akey}\rightarrow\dom{akey}\quad+\cn{ltk}\colon\dom{name}\times\dom{name}\rightarrow\dom{skey}$\\+$\cn{enc}\colon\dom{mesg}+\times\dom{mesg}\rightarrow\dom{mesg}\quad+\cn{cat}\colon\dom{mesg}+\times\dom{mesg}\rightarrow\dom{mesg}\quad C_i\colon\dom{mesg}$\\+$\cn{name}\colon\dom{name}\rightarrow\dom{mesg}\quad+\cn{text}\colon\dom{text}\rightarrow\dom{mesg}\quad+\cn{data}\colon\dom{data}\rightarrow\dom{mesg}$\\+$\cn{skey}\colon\dom{skey}\rightarrow\dom{mesg}\quad+\cn{akey}\colon\dom{skey}\rightarrow\dom{mesg}$\\[1ex]+Axiom: $\cn{invk}(\cn{invk}(x))\approx x$ for $x\colon\dom{akey}$\\+\caption{Basic Crypto Many-Sorted Signature}\label{tab:many-sorted}+\end{center}+\end{table}++The set of asymmetric keys $K$ is defined as follows.+$$ K \leftarrow I \mid \cn{pubk}(I) \mid \cn{invk}(I) \mid+\cn{invk}(\cn{pubk}(I)) $$ The key $\cn{invk}(x)$ is the inverse of+the asymmetric key~$x$, and $\cn{pubk}(x)$ is principal $x$'s public+key.++Each occurrence of an identifier in a term is associated with a sort+symbol.  The context in which an identifier occurs determines the+sort.  The sort symbols are \dom{text}, \dom{data}, \dom{name},+\dom{akey}, \dom{skey}, and \dom{mesg}, where a name refers to a+principal.  An identifier occurrence in an asymmetric key of the form+$\cn{pubk}(x)$ has sort \dom{name}, otherwise it has sort \dom{akey}.++The set of atoms $B$ is defined as follows.+$$ B \leftarrow \cn{text}(I) \mid \cn{data}(I) \mid \cn{name}(I) \mid+\cn{skey}(I)\mid \cn{skey}(\cn{ltk}(I, I)) \mid \cn{akey}(K) $$ The+atom $\cn{skey}(\cn{ltk}(x, y))$ is a symmetric, long term key+shared between two principals~$x$, and~$y$.  The occurrence of $x$ in+$\cn{text}(x)$ has sort \dom{text}, sort \dom{data} for+$\cn{data}(x)$, sort \dom{name} for $\cn{name}(x)$, and sort+\dom{skey} for $\cn{skey}(x)$.  The occurrences of $x$ and $y$ in+$\cn{skey}(\cn{ltk}(x,y))$ both have sort \dom{name}.++The set of terms $T$ is defined as follows.+$$ T \leftarrow I \mid B \mid Q \mid \cn{cat}(T, T) \mid \cn{enc}(T,+T)$$ where $Q$ is the set of tags, represented by quoted string+literals.  The second argument in \cn{enc} is a term for a key.  A+term of the form $x$ is called an indeterminate, and the identifier+occurrence has sort~\dom{mesg}.++The terms of interest are \index{well-formed term}well-formed.  A term+is \emph{well-formed} if every occurrence of each identifier has the+same sort.  An example of a non-well-formed term is+$\cn{cat}(x,\cn{akey}(x))$ because the identifier $x$ occurs with two+sorts, \dom{mesg} and \dom{akey}.  A pair of well-formed terms are+\emph{compatible}\index{compatible terms} if every identifier that+occurs in both terms occurs with the same sort.++A term is a variable if it specifies an identifier and its sort.+$$ V \leftarrow I \mid \cn{text}(I)  \mid \cn{data}(I) \mid \cn{name}(I) \mid+\cn{skey}(I)\mid \cn{akey}(I) $$ When a term is well-formed, the same+variable is associated every occurrence of an identifier in a term.++\begin{figure}+$$+\begin{array}{l}+\cn{unify}(\ell, t, t') = \cn{unify\_aux}(\ell,\cn{chase}(\ell, t),+\cn{chase}(\ell, t'))+\\+\\\cn{chase}(\ell, x)=+\\ \qquad\mbox{let }t=\cn{lookup}(x,\ell)\mbox{ in}+\\ \qquad \mbox{if }x = t\mbox{ then }x+\mbox{ else }\cn{chase}(\ell, t)+\\\cn{chase}(\ell, \cn{invk}(t))=\cn{chase\_invk}(\ell, t)\hfill(!)+\\\cn{chase}(\ell, t)=t+\\+\\\cn{chase\_invk}(\ell, x)=\hfill(!)+\\ \qquad\mbox{let }t=\cn{lookup}(x,\ell)\mbox{ in}\hfill(!)+\\ \qquad \mbox{if }x = t\mbox{ then }\cn{invk}(x)+\mbox{ else }\cn{chase\_invk}(\ell, t)\hfill(!)+\\\cn{chase\_invk}(\ell, \cn{invk}(t))=\cn{chase}(\ell, t)\hfill(!)+\\\cn{chase\_invk}(\ell, t)=\cn{invk}(t)\hfill(!)+\\+\\\cn{lookup}(x,\seq{})=x+\\\cn{lookup}(x,(y,t)\cons\ell)=+\mbox{if }x=y\mbox{ then }t\mbox{ else }+\cn{lookup}(x, \ell)+\\+\\\cn{unify\_aux}(\ell,x,x) =\ell+\\\cn{unify\_aux}(\ell,x,t) =\mbox{if }\cn{occurs}(x, t)\mbox{ then raise failure else }+(x,t)\cons\ell+\\\cn{unify\_aux}(\ell,t,x) =\cn{unify\_aux}(\ell,x,t)+\\\cn{unify\_aux}(\ell,\cn{invk}(x),\cn{pubk}(y)) =+\cn{unify\_aux}(\ell, x, \cn{invk}(\cn{pubk}(y)))\hfill(!)+\\\cn{unify\_aux}(\ell,\cn{pubk}(x),\cn{invk}(y)) =+\cn{unify\_aux}(\ell, y, \cn{invk}(\cn{pubk}(x)))\hfill(!)+\\\cn{unify\_aux}(\ell,f(t,\ldots),f(t',\ldots)) =+\cn{unify\_list}(\ell,\seq{t,\ldots},\seq{t',\ldots})+\\\cn{unify\_aux}(\ell,t,t') =\mbox{raise failure}+\\+\\\cn{unify\_list}(\ell,\seq{},\seq{}) =\ell+\\\cn{unify\_list}(\ell,t\cons u,t'\cons u') =+\cn{unify\_list}(\cn{unify}(\ell,t,t'), u, u')+\\\cn{unify\_list}(\ell,u,u') =\mbox{raise failure}+\end{array}+$$+\caption{Unifier}\label{fig:unifier}+\end{figure}++There are efficient ways of implementing unification for this algebra+because there are efficient ways for implementing for unification in+equational theories representable by a convergent term rewrite+system~\cite{Fay79}. As long as terms are compatible, substitutions+produced by unifiers map an identifier that occurs with a given sort to a+term of the same sort.  Depending on the sort symbol, a substitution is+limited to the following forms:+$$+\begin{array}{cllll}+\dom{mesg}&I\mapsto I&I\mapsto B+&I\mapsto\cn{cat}(T,T)&I\mapsto\cn{enc}(T,T)\ldots\\+\dom{akey}&I\mapsto I&I\mapsto\cn{pubk}(I)+&I\mapsto\cn{invk}(I)&I\mapsto\cn{invk}(\cn{pubk}(I))\\+\dom{skey}&I\mapsto I&I\mapsto\cn{ltk}(I, I)\\+\dom{text}&I\mapsto I\\+\dom{data}&I\mapsto I\\+\dom{name}&I\mapsto I+\end{array}+$$++The current implementation uses an algorithm for unification without+equations described by Laurence Paulson~\cite[Page~381]{Paulson91}+with modifications to the unification functions as shown in+Figure~\ref{fig:unifier}, where $e\cons\ell$ means+$\seq{e}\append\ell$.  The function \cn{unify} calls \cn{unify\_aux}+in the unmodified version.++\begin{figure}+$$+\begin{array}{l}+\cn{match}(\ell,x,t) =+\\\qquad\mbox{if }\lnot\cn{bound}(x, \ell)\mbox{ then }(x,t)\cons\ell+\\\qquad\mbox{else if } \cn{lookup}(x,\ell)= t\mbox{ then }\ell+\\\qquad\mbox{else raise failure}+\\\cn{match}(\ell,\cn{invk}(x),\cn{pubk}(y)) =+\cn{match}(\ell, x, \cn{invk}(\cn{pubk}(y)))\hfill(!)+\\\cn{match}(\ell,f(t,\ldots),f(t',\ldots)) =+\cn{match\_list}(\ell,\seq{t,\ldots},\seq{t',\ldots})+\\\cn{match}(\ell,t,t') =\mbox{raise failure}+\\+\\\cn{bound}(x,\seq{})=\cn{false}+\\\cn{bound}(x,(y,t)\cons\ell)=+x=y\mbox{ or }\cn{bound}(x, \ell)+\\+\\\cn{match\_list}(\ell,\seq{},\seq{}) =\ell+\\\cn{match\_list}(\ell,t\cons u,t'\cons u') =+\cn{match\_list}(\cn{match}(\ell,t,t'), u, u')+\\\cn{match\_list}(\ell,u,u') =\mbox{raise failure}+\end{array}+$$+\caption{Matcher}\label{fig:matcher}+\end{figure}++\bibliography{cpsa}+\bibliographystyle{plain}++\printindex++\end{document}
+ doc/cpsadiagrams.mp view
@@ -0,0 +1,205 @@+filenametemplate "%j-%c.mps";++verbatimtex+\documentclass[12pt]{article}+\newcommand{\enc}[2]{\{\!|#1|\!\}_{#2}}+\begin{document}+etex++input boxes;++pair w; w = (4in, 0);		% Width of diagram++alpha = .45;			% Row offset ratio for messages+beta = .85;		        % Row offset ratio for shortened arrows++input strands;++input cmstrands;		% Use CM arrows++picture node; node = btex $\bullet$ etex;++% The height of a downarrow is the unit of length for a strand+% succession edge.++numeric delta;+begingroup;+  path p; p = bbox(btex $\downarrow$ etex);+  delta = ypart(ulcorner p - llcorner p);+endgroup;++% The width of a leftarrow is the unit of length for a directed term+% symbol.++numeric dir_width;+begingroup;+  path p; p = bbox(btex $\leftarrow$ etex);+  dir_width = xpart (lrcorner p - llcorner p);+endgroup;++% Needham-Schroeder Protocol++% Initiator role++beginfig(0);+  % Backbone+  strand.a(3, origin, delta, btex $\mathstrut\mathit{init}$ etex, node);++  % Messages+  outbnd.a(1, dir_width, btex $\enc{N_1, A}{K_B}$ etex);+  inbnd.a(2, dir_width, btex $\enc{N_1, N_2}{K_A}$ etex);+  outbnd.a(3, dir_width, btex $\enc{N_2}{K_B}$ etex);+endfig;++% Responder role++beginfig(1);+  % Backbone+  strand.a(3, origin, delta, btex $\mathstrut\mathit{resp}$ etex, node);++  % Messages+  inbnd.a(1, dir_width, btex $\enc{N_1, A}{K_B}$ etex);+  outbnd.a(2, dir_width, btex $\enc{N_1, N_2}{K_A}$ etex);+  inbnd.a(3, dir_width, btex $\enc{N_2}{K_B}$ etex);+endfig;++% Intended run++beginfig(2);+  % Strand for principal A+  strand.a(3, origin, delta, btex $\mathstrut\mathit{init}$ etex, node);++  % Strand for principal B+  strand.b(3, .5w, delta, btex $\mathstrut\mathit{resp}$ etex, node);++  % Messages and arrows+  label.top(btex $\enc{N_1, A}{K_B}$ etex, .5[a1.e, b1.w]);+  drawmsg(a1.e -- b1.w);+  label.top(btex $\enc{N_1, N_2}{K_A}$ etex, .5[a2.e, b2.w]);+  drawmsg(b2.w -- a2.e);+  label.top(btex $\enc{N_2}{K_B}$ etex, .5[a3.e, b3.w]);+  drawmsg(a3.e -- b3.w);+endfig;++% Penetrated run++beginfig(3);+  % Strand for principal B+  boxstrand.b(3, w, btex $\mathstrut B$ etex, node);+  draw pic b3;++  % Strand for principal P+  boxstrand.p(4, .5w, btex $\mathstrut P$ etex, node);+  draw pic p4;++  spacestrand.p(3, delta);+  draw pic p3;++  % Strand for principal A+  boxstrand.a(3, p3.c - p4.c, btex $\mathstrut A$ etex, node);+  draw pic a3;++  spacestrand.a(2, delta);+  draw pic a2;++  ypart b2.c = ypart a2.c;+  draw pic b2;++  spacestrand.b(1, delta);+  draw pic b1;++  ypart p2.c = ypart b1.c;+  draw pic p2;++  spacestrand.p(1, delta);+  draw pic p1;++  ypart a1.c = ypart p1.c;+  draw pic a1;++  drawsucc(a1.s -- a2.n);+  drawsucc(a2.s -- a3.n);+  drawsucc(p1.s -- p2.n);+  drawsucc(p2.s -- p3.n);+  drawsucc(p3.s -- p4.n);+  drawsucc(b1.s -- b2.n);+  drawsucc(b2.s -- b3.n);++  label.top(btex $\enc{N_1, A}{K_P}$ etex, .5[a1.e, p1.w]);+  drawmsg(a1.e -- p1.w);+  label.top(btex $\enc{N_1, A}{K_B}$ etex, .5[p2.e, b1.w]);+  drawmsg(p2.e -- b1.w);+  label.top(btex $\enc{N_1, N_2}{K_A}$ etex, .75[b2.w, a2.e]);+  drawmsg(b2.w -- a2.e);+  label.top(btex $\enc{N_2}{K_P}$ etex, .5[a3.e, p3.w]);+  drawmsg(a3.e -- p3.w);+  label.top(btex $\enc{N_2}{K_B}$ etex, .5[p4.e, b3.w]);+  drawmsg(p4.e -- b3.w);+endfig;++% Shape with $K^{-1}_A$ uncompromised, $N_2$ fresh++beginfig(4);+  % Strand for principal A+  strand.a(3, origin, delta, btex $\mathstrut\mathit{init}$ etex, node);++  % Strand for principal B+  strand.b(3, w, delta, btex $\mathstrut\mathit{resp}$ etex, node);++  % Centered ordering symbols+  boxit.o1(btex \phantom{$\prec$} etex); o1.c = .5[a1.c, b1.c];+  boxit.o2(btex $\succ$ etex); o2.c = .5[a2.c, b2.c];+  boxit.o3(btex $\prec$ etex); o3.c = .5[a3.c, b3.c];++  for i = 1 upto 3:+    draw pic o[i];+  endfor;++  % Messages and arrows+  label.top(btex $\enc{N_1, A}{K_C}$ etex, alpha[a1.e, o1.w]);+  drawmsg(a1.e -- beta[a1.e,o1.w]); % Shortened arrow+  label.top(btex $\enc{N_1, A}{K_B}$ etex, alpha[b1.w, o1.e]);+  drawmsg(beta[b1.w,o1.e] -- b1.w); % Shortened arrow+  label.top(btex $\enc{N_1, N_2}{K_A}$ etex, alpha[a2.e, o2.w]);+  drawmsg(o2.w -- a2.e);+  label.top(btex $\enc{N_1, N_2}{K_A}$ etex, alpha[b2.w, o2.e]);+  drawmsg(b2.w -- o2.e);+  label.top(btex $\enc{N_2}{K_C}$ etex, alpha[a3.e, o3.w]);+  drawmsg(a3.e -- o3.w);+  label.top(btex $\enc{N_2}{K_B}$ etex, alpha[b3.w, o3.e]);+  drawmsg(o3.e -- b3.w);+endfig;++beginfig(5);+  % Strand for principal A+  strand.a(3, origin, delta, btex $\mathstrut\mathit{init}$ etex, node);++  % Strand for principal B+  strand.b(2, w + a2.c, delta, btex $\mathstrut\mathit{resp}$ etex, node);++  % Centered ordering symbols+  boxit.o1(btex $\prec$ etex); o1.c = .5[a1.c, b1.c];+  boxit.o2(btex $\succ$ etex); o2.c = .5[a2.c, b2.c];++  for i = 1 upto 2:+    draw pic o[i];+  endfor;++  % Messages and arrows+  label.top(btex $\enc{N_1, A}{K_B}$ etex, alpha[a1.e, o1.w]);+  drawmsg(a1.e -- o1.w);+  label.top(btex $\enc{N_1, A}{K_B}$ etex, alpha[b1.w, o1.e]);+  drawmsg(o1.e -- b1.w);+  label.top(btex $\enc{N_1, N_2}{K_A}$ etex, alpha[a2.e, o2.w]);+  drawmsg(o2.w -- a2.e);+  label.top(btex $\enc{N_1, N_2}{K_A}$ etex, alpha[b2.w, o2.e]);+  drawmsg(b2.w -- o2.e);+  label.top(btex $\enc{N_2}{K_B}$ etex,+    alpha[a3.e, (xpart o2.w, ypart a3.c)]);+  drawmsg(a3.e -- (beta * xpart o2.w, ypart a3.c));+endfig;++verbatimtex+\end{document}+etex+bye;
+ doc/cpsaoverview.pdf view

binary file changed (absent → 75334 bytes)

+ doc/cpsaoverview.tex view
@@ -0,0 +1,326 @@+\documentclass[12pt]{article}+\usepackage{alltt}++\newcommand{\cpsacopying}{\begingroup+  \renewcommand{\thefootnote}{}\footnotetext{{\copyright} 2009 The+    MITRE Corporation.  Permission to copy without fee all or part of+    this material is granted provided that the copies are not made or+    distributed for direct commercial advantage, this copyright notice+    and the title of the publication and its date appear, and notice+    in given that copying is by permission of The MITRE+    Corporation.}\endgroup}++\newcommand{\nterm}[1]{\ensuremath{\langle\mathit{#1}\rangle}}+\newcommand{\nterms}[1]{\ensuremath{\nterm{#1}^\ast}}+\newcommand{\ntermp}[1]{\ensuremath{\nterm{#1}^+}}+\newcommand{\ntermo}[1]{#1$^?$}++\title{CPSA Overview}+\author{John D.~Ramsdell\qquad Joshua D.~Guttman\\ The MITRE Corporation}++\begin{document}+\maketitle+\cpsacopying++Enclosed is a brief overview of CPSA, along with a description of+CPSA's support for the rely-guarantee method.  The message terms+\nterm{term} used by CPSA are a straightforward representation of+terms using Lisp-style, prefix notation.++A subset of the terms are called {\em atoms}. Atoms belong to the {\em+  base sorts} \texttt{name, text, data, skey, akey}.  Syntactically,+atomic terms may be either symbols (i.e., identifiers) or+atomic-sorted function applications such as \texttt{(pubk~a)}.  Even+though an atom as a term may have terms within it, a receiver of an+atom is not allowed to extract terms that occur in it.  This reflects+the fact that the reception of the atom \texttt{(invk~k)}, the inverse+of some asymmetric key~\texttt{k}, does not allow the receiver to+construct~\texttt{k}.++Non-atomic terms are constructed by applications of encryption+(\texttt{enc}) and pairing (\texttt{cat}), where $n$-ary concatenation+is parsed right-associatively.  The second argument of an encryption+is the key. Encryption may also be written in an $n$-ary form where+the last argument is the key and the arguments preceding it are+implicitly concatenated.++A term carries one of its subterms if the possession of the right set+of keys allows the extraction of the subterm.  The carries relation is+the least relation such that (1)~$t$ carries~$t$, (2)~\texttt{(enc+  $t_0$ $t_1$)} carries~$t$ if~$t_0$ carries~$t$, and (3)~\texttt{(cat+  $t_0$ $t_1$)} carries~$t$ if~$t_0$ or~$t_1$ carries~$t$.  Note that+\texttt{(enc $t_0$ $t_1$)} does not carry~$t_1$ unless (anomalously)~$t_0$+carries~$t_1$.++\section{Protocols}++A protocol is a set of roles.+\begin{quote}+\begin{alltt}+(defprotocol \nterm{sym} basic \ntermp{role})+\end{alltt}+\end{quote}+The symbol \nterm{sym} names the protocol.  The symbol \texttt{basic}+identifies the term algebra used to specify messages in roles.++A role has the form:+\begin{quote}+\begin{alltt}+(defrole \nterm{sym} (vars \nterms{decl})+\quad (trace \ntermp{event})+\quad \ntermo{(non-orig \nterms{non})}+\quad \ntermo{(uniq-orig \nterms{atom})}+\quad \nterm{annos})++\nterm{non} ::= \nterm{atom} | (\nterm{height} \nterm{atom})+\end{alltt}+\end{quote}+Non-terminal \nterm{sym} is an S-expression symbol that names the+role.  A \nterm{decl} is a list of variable symbols followed by a sort+symbol.  The \texttt{trace} is a sequence of message events, each+indicating a message to be transmitted or received.  The syntax used+for a message event \nterm{event} has+one of two forms, \texttt{(send \nterm{term})} or \texttt{(recv+  \nterm{term})}.  The length of a role is the length of its trace,+and must be positive.  The remaining components of a role will be+described later.++A term originates in a trace if it is carried in some event+and the first event in which it is carried is a sending term.+A term is acquired by a trace if it first occurs in a receiving term+and is also carried by that term.++\section{Executions}++An execution of a protocol may involve any number of strands, each+conveying either regular or adversarial behavior.  Thus, each strand+is an instance of some role.  For CPSA input and output, a strand is+specified by the following form:+\begin{quote}+\begin{alltt}+(defstrand \nterm{sym} \nterm{int} \nterms{maplet})+\end{alltt}+\end{quote}+The symbol names the role, \nterm{int} is the height which must be+positive and no greater than the role's length, and the remainder+determines a substitution from role variables to terms.+\begin{quote}+\begin{alltt}+\nterm{maplet} ::= (\nterm{sym} \nterm{term})+\end{alltt}+\end{quote}+The trace associated with the specified behavior is the result of+truncating the role's trace so it agrees with the height, and applying+the substitution \texttt{(\nterms{maplet})}.++A strand's behavior includes inherited origination assumptions.  When+a role assumes atom~$a$ is uniquely originating using the+\texttt{uniq-orig} form, applying the substitution+\texttt{(\nterms{maplet})} to $a$ produces an inherited uniquely+originating atom.  Role atoms assumed to be non-originating using the+\texttt{non-orig} form are inherited similarly.  For a non-originating+assumption, a strand height may be associated with an atom.  In this+case, a non-originating assumption is inherited by strands that meet+or exceed the height constraint.  Note that the definition of a+uniquely originating atom and a non-originating atom in an execution+is still to come.++A strand in an execution is identified by a natural number.  To+describe an execution, the behavior of each participant is listed+sequentially, and position of the \texttt{defstrand} form in the list+determines the strand's identifier.  Zero-based indexing is used,+so zero identifies the first strand.++A messaging event in an execution occurs at a node, which is a pair of+natural numbers.  The first number is the strand's identifier.  The+second number is the position of an event in the trace of the+strand, once again using zero-based indexing.  Thus node \texttt{(1~1)}+in+\begin{quote}+\begin{alltt}+(defstrand r1 3 (a b) (b a))+(defstrand r2 2 (x a) (y a) (z b))+\end{alltt}+\end{quote}+names the last event in the last strand.  The term is the+result of instantiating the second event in role \texttt{r2}'s+trace using the substitution \texttt{((x a) (y a) (z b))}.++Message exchanges are part of an execution.  Each exchange is+described by a pair of nodes.  The first node must name a sending+term, and the second node must name a receiving term.  In an+execution, the two terms are the same.  Furthermore, for each+receiving term in a strand's trace, there is a unique node that+transmits its term.  In other words, all message receptions are+explained by transmissions within the execution.++In an execution, a \emph{uniquely originating atom} originates in the+trace of exactly one strand.  An inherited uniquely originating atom+must originate in the trace of its strand.  CPSA uses uniquely+originating atoms to model freshly generated nonces used in many+protocols.++A \emph{non-originating atom} is carried by no trace of any strand in+an execution, and it or its inverse is the key of an encryption in one+of those traces.  The inherited non-origination atoms must satisfy+this property too.++Strands in executions represent both adversarial and non-adversarial+behaviors.  A strand that is an instance of a protocol role is+non-adversarial, and is called regular.  A strand that represents+adversarial behavior is called a penetrator strand.++The roles that define adversary behavior codify the basic abilities+that make up the Dolev-Yao model.  They include transmitting an atom+such as a name or a key; transmitting a tag; transmitting an encrypted+message after receiving its plain text and the key; and transmitting a+plain text after receiving ciphertext and its decryption key.  The+adversary can also concatenate two messages, or separate the pieces of+a concatenated message.  Since a penetrator strand that encrypts or+decrypts must receive the key as one of its inputs, keys used by the+adversary---compromised keys---have always been transmitted by some+strand. The basic adversary roles are built into CPSA.++\section{Skeletons}++CPSA never directly represents adversarial behavior.  Instead, a+skeleton is used.  A skeleton represents regular behavior that might+make up part of an execution. A skeleton is specified in CPSA output using a+\texttt{defskeleton} form.+\begin{quote}+\begin{alltt}+(defskeleton \nterm{sym} (vars \nterms{decl})+\quad \ntermp{defstrand}+\quad \ntermo{(precedes \nterms{pair})}+\quad \ntermo{(non-orig \nterms{atom})}+\quad \ntermo{(uniq-orig \nterms{atom})})+\end{alltt}+\end{quote}+The symbol names the protocol used by its participants.  The regular+strands are specified as they are in an execution.  The precedes form+defines a binary relation on nodes (\texttt{\nterm{pair} ::=+  (\nterm{node} \nterm{node})}).  As in an execution, the first node+names a sending term and the second term names a receiving term.+Unlike an execution, the pair of nodes in the relation need not agree+on their message term.  Two nodes are related if the sending event+precedes the reception reception event, as an execution it represents+may include events in between.++The final two additional components of a skeleton are a set of+non-originating atoms, and a set of uniquely originating atoms.  To be+a skeleton, each uniquely originating atom must originate in at+most one strand in the skeleton, and each non-originating atom must+never be carried by some event in the skeleton and every+variable that occurs in the atom must occur in some event.+Furthermore, for each uniquely originating atom that originates in the+skeleton, the node relation must ensure that reception nodes that+carry the atom follow the node of its origination.++One special skeleton is associated with each execution.  It summarizes+the regular behavior of the execution.  It is derived from the+execution by enriching its node relation to contain all node orderings+implied by transitive closure, deleting all strands and nodes that+refer to penetrator behavior, and then performing the transitive+reduction on the resulting node relation.  The set of uniquely+originating atoms is the set of terms that originate on exactly one+strand in the execution, and are carried in a term of a regular+strand.  The set of non-originating atoms is the union of two sets.+One set contains each term that is used as an encryption or decryption+key in some term in the execution, but is not carried by any term.+The other set contains the terms specified by non-origination+assumptions in roles.  If a realized skeleton instance maps all of the+variables that occur in one of its non-originating role terms, the+mapped term is a member of the skeleton's set of non-originating+terms.  A skeleton is \emph{realized} if it summarizes the behavior of+some execution.++\subsection{Preskeletons}++Preskeletons are used to pose problems for CPSA to solve.  A+preskeleton is similar to a skeleton except atoms assumed to uniquely+originate may originate in more than one strand, and the node relation+need not ensure that reception nodes that carry the atom follow some+node of origination.  Experience has shown that it is more natural to+specify some problems in a form that doesn't satisfy all the+properties of a skeleton.  If CPSA cannot immediately convert its+input into a skeleton, an error is signal.  With the exception of the+restatement of the original problem, all preskeletons printed by CPSA+are skeletons.  A problem statement is called a \emph{scenario}, and+the converted skeleton is called the \emph{scenario skeleton}.++\subsection{Shapes}++Given a scenario skeleton, CPSA determines whether there is an execution+containing the strands in the skeleton, and satisfying its+origination assumptions.  Usually an execution contains additional+regular strands, as well as adversary behavior.  A major part of what+CPSA does is to find all additional regular strands that are necessary+to extend the scenario to an execution---a realized skeleton.  If a+realized skeleton is most-general, in the sense that there is no other+realized skeleton that can be instantiated to it by merging nodes or+atoms, then it is called a {\em shape}. CPSA finds all shapes for a+scenario.++\section{Listeners}++In addition to the roles specified in a protocol, for each term~$t$, a+regular strand may be an instance of a so-called {\em listener} role+with the trace \texttt{(recv~$t$) (send~$t$)}.  There are no+non-originating or uniquely originating atoms associated with a+listener role.  Listener behavior is specified with:+\begin{quote}+\begin{alltt}+(deflistener \nterm{term})+\end{alltt}+\end{quote}++A listener strand is used in a skeleton to assert that a term~$t$ is+derivable by the adversary, unprotected by encryption.  Hence it is used+to test for compromise of a term.  The term is protected if the+resulting skeleton is unrealizable.  Otherwise, CPSA will find a shape+that shows how the adversary accesses~$t$.++\section{Annotations}++To be analyzed, each role in a protocol must include an+\texttt{annotations} form, as defined in Table~\ref{tab:anno}.  The+\nterm{term} just after the \texttt{annotations} symbol is a role atom+that, when instantiated, is the principal associated with the strand in+the shape.  A principal may be a key.++\begin{table}+\begingroup\ttfamily+\begin{tabular}{rcl}+\nterm{annos}&$::=$+&(annotations \nterm{term} (\nterm{int} \nterm{form})$^\ast$)+\\ \nterm{form}&$::=$&(\nterm{sym} \nterms{fterm}) | (not \nterm{form})+\\ &|& (and \nterms{form}) | (or \nterms{form})+\\ &|& (implies \nterms{form} \nterm{form})+\\ &|& (iff \nterm{form} \nterm{form})+\\ &|& (says \nterm{term} \nterm{form})+\\ &|& (forall (\nterms{decl}) \nterm{form})+\\ &|& (exists (\nterms{decl}) \nterm{form})+\\ \nterm{fterm}&$::=$&\nterm{term} | (\nterm{sym} \nterms{fterm})+\end{tabular}+\endgroup+\caption{Annotation Syntax}\label{tab:anno}+\end{table}++What follows is sequences of pairs.  The integer gives the position of+the event in the trace that is annotated by the formula, using+zero-based indexing.  Thus, each formula is associated with a node.+Nodes for which no formula is specified are implicitly defined to be+the trivial formula \texttt{(and)} for truth.  Use \texttt{(or)} for+falsehood.++The language of formulas is first-order logic extended with a modal+``says'' operator. Formula terms may include function symbols that are not+part of a protocol's message signature.++On output, each shape contains an \texttt{annotations} form and an+\texttt{obligations} form. The annotations form presents every+non-trivial formula derived from the protocol. The obligations form+presents every non-trivial formula that must be true if the shape is+sound.++\end{document}
+ doc/cpsaprimer.pdf view

binary file changed (absent → 177853 bytes)

+ doc/cpsaprimer.tex view
@@ -0,0 +1,1149 @@+\documentclass[12pt]{article}+\usepackage{url}+\usepackage{amssymb}+\usepackage{alltt}+\usepackage{graphicx}+\usepackage{makeidx}+\input{macros}++\makeindex++\title{CPSA Primer}+\author{John D.~Ramsdell\qquad Joshua D.~Guttman\\ The MITRE Corporation}++\begin{document}+\maketitle+\cpsacopying++\begin{sloppypar}+Analyzing a cryptographic protocol means finding out what security+properties---essentially, authentication and secrecy properties---are+true in all its possible executions.  Protocol analysis is hard+because an adversary can often manipulate the regular, law-abiding+participants.  The adversary may be able to manipulate the regular+participants into an unexpected execution, breaking a secrecy or+authentication property that the protocol was intended to ensure.+\end{sloppypar}++% Until bugs are fixed, comment this out:+\iffalse+{\cpsa}, The Cryptographic Protocol Shapes Analyzer, is a software+tool.  Given a protocol definition and some assumptions about+executions, it produces descriptions of all possible executions of the+protocol compatible with the assumptions.  Naturally, there are+infinitely many possible executions of a useful protocol, since+different participants can run it with varying parameters, and the+participants can run it repeatedly.+\else+{\cpsa}, The Cryptographic Protocol Shapes Analyzer, is a software+tool.  Given a protocol definition and some assumptions about+executions, it attempts to produce descriptions of all possible+executions of the protocol compatible with the assumptions.+Naturally, there are infinitely many possible executions of a useful+protocol, since different participants can run it with varying+parameters, and the participants can run it repeatedly.+\fi++However, for many naturally occurring protocols, there are only+finitely many of these runs that are essentially different.  Indeed,+there are frequently very few, often just one or two, even in cases+where the protocol is flawed.  We call these essentially different+executions the \emph{shapes} of the protocol.  Authentication and+secrecy properties are easy to ``read off'' from the shapes, as are+attacks and anomalies.++The purpose of this document is to provide the background required to+make effective use of a {\cpsa} software distribution.  In particular,+the advice in Section~\ref{sec:advice} is essential reading.++The {\cpsa} program reads a sequence of problem descriptions, and+prints the steps it used to solve each problem.  Each input problem+contains some initial behavior, together with assumptions about some+uncompromised keys and freshly chosen values.  {\cpsa} discovers what+shapes are compatible with this problem description.  Normally, the+initial behavior is a local run of one participant, so that the+problem is to see what possible executions exist from that+participant's ``point of view.''  The analysis reveals what the other+participants must have done, given the first participant's view.++% When bugs are fixed, fix this too.+The shapes analysis is performed within a pure Dolev-Yao+model~\cite{DolevYao83}.  {\cpsa}'s search is based on a high-level+algorithm shown to be complete, i.e.\@ every shape can in fact be+found in a finite number of steps~\cite{DoghmiGuttmanThayer07}.+{\cpsa}'s search has not been shown to be complete, a deficiency we+are committed to repair.++\section{Overview}++A {\cpsa} release includes several programs, an analyzer, and various+tools used to interpret the results.  The analyzer, \texttt{cpsa},+provides support for several algebras, one of which is the Basic+Crypto Algebra.  Programs that assist in the interpretation of results+are \texttt{cpsashape} and \texttt{cpsagraph}.  The analyzer prints+the steps it used to solve each problem.  The \texttt{cpsashapes}+program extracts the shapes discovered by an analyzer run.  The+\texttt{cpsagraph} program graphs both forms of output using Scalable+Vector Graphics~(\textsc{svg}).  A standards-compliant browser such as+FireFox or Safari displays the generated diagrams.++The expected work flow follows.  An analysis problem is entered using+an ordinary text editor, preferably one with support for Lisp syntax.+Problem statement errors in the input are detected by running the+analyzer.  Many error reports are of the form that allow editors such+as Emacs to move its cursor to location of the problem.++There are two classes of problem statement errors: syntax and semantic+errors.  Correcting syntax errors is straightforward, but correcting+semantic errors requires an understanding of the core data structures.+Section~\ref{sec:semantic errors} describes their correction.++Once the problem statement errors have been eliminated, the analyzer+should produce useful output as a text document.  The text document+contains each step used to derive a shape from a problem statement.+It is common to filter the output using the \texttt{cpsashapes}+program, and look only at the computed shapes associated with each+problem statement.++The \texttt{cpsagraph} program is applied to the output to produce a+more readable, hyperlinked \textsc{xml} document that can be displayed+in a standards-compliant web browser.  The {\cpsa} User Guide contains+the up-to-date description of \texttt{cpsagraph} generated documents.+The guide is also the place to find command-line usage information for+all programs in a release.  The user guide is an \textsc{xhtml}+document delivered with the software.++The \texttt{cpsa} program uses S-expressions for both input and+output.  S-expression is an abbreviation for a Symbolic Expression of+Lisp fame, and is described in Appendix~\ref{sec:syntax reference}.++The input consists of two forms: protocol definitions and initial+behavior descriptions.  The exact details of both forms depend on the+message algebra specified by the protocol.  Protocols that specify+\texttt{basic} as their algebra get an implementation of the Basic+Crypto Algebra~(\textsc{bca}) described in the next section.  A+complete grammar for \texttt{cpsa} input with \textsc{bca} protocols+is displayed in Table~\ref{tab:syntax} on Page~\pageref{tab:syntax}.++\section{BCA Messages}++Each message exchanged in a protocol is represented by a term.  Terms+represent atomic values such text objects, principal names, and+asymmetric and symmetric keys.  They also represent values composed+from other values via encryption and concatenation.++A sort system is used to classify terms. A {\cpsa} message algebra is+an order-sorted algebra~\cite{GoguenMeseguer92} with restrictions,+hence the use of the word sort instead of type.  Other aspects of+{\cpsa}'s use of order-sorted algebras is beyond the scope of this+paper.++The sorts that correspond to the atomic values are the base+sorts---for \textsc{bca} they are \fn{text}, \fn{data}, \fn{name},+\fn{akey}, and \fn{skey}.  The non-base sort is+\fn{mesg}.  Every term is of sort~\fn{mesg}, and every one of the+other sorts is a subsort of~\fn{mesg}.\index{sort}++The simplest term is a variable, which syntactically is a+\textsc{symbol} as described in Appendix~\ref{sec:syntax reference}.+Internally, each variable has a sort, so the sort of each variable in+the input must be declared in a \texttt{vars} form, such as:+$$\texttt{(vars (t text) (n name) (k akey))}.$$++Asymmetric keys come in pairs related by the \texttt{invk}+\index{operator}operator.  If~$t$ is a term of sort~\fn{akey}, so is+$\texttt{(invk~}t\texttt{)}$.  Furthermore,+$\texttt{(invk~(invk~}t\texttt{))}$ is equated with~$t$.  A name can+be used to identify an asymmetric key pair using the \texttt{pubk} and+\texttt{privk} operators, as in \texttt{(pubk~n)} and+\texttt{(privk~n)}---the latter is interpreted as+\texttt{(invk~(pubk~n))}.  A name may be associated with more than one+key using the binary form of \texttt{pubk}, where the first argument+is a quoted constant, as in+\texttt{(pubk~"sig"~n)} and+\texttt{(pubk~"enc"~n)}.+Two names can be used to identify a long+term symmetric key with the \texttt{ltk} operator.++Terms formed from base sorted variables, and the operators+\texttt{invk}, \texttt{pubk}, \texttt{privk}, and \texttt{ltk} are+called atoms, because each one represents an atomic value.  A key+property of an atom is that the receiver of an atom carried in a+message term cannot decompose the atom into parts.  For example, the+reception of a message that consists of the atom \texttt{(invk~k)}+does not allow its receiver to deduce~\texttt{k}.  Within this+document, S-expression syntax will often, for the sake of readability,+be replaced by the traditional notation for terms.  Thus+\texttt{(invk~k)} will be written as $K^{-1}$, and \texttt{(pubk~n)}+as $K_{N}$.++The terms in this algebra are freely generated from the atoms,+tags, encryption, and concatenation.  A tag is a quoted constant.+Given~$t$, the term to be protected, and key term~$k$, the encryption+of~$t$ using~$k$ is~$\enc{t}{k}$ in traditional notation and+\texttt{(enc $t$ $k$)} in S-expression syntax.  The term represents+asymmetric encryption when the key is of sort \dom{akey}, otherwise it+represents symmetric encryption.  The concatenation of terms~$t$+and~$t'$ is~$t,t'$ in traditional infix notation and \texttt{(cat $t$+  $t'$)} in S-expression syntax.  The comma operator is right+associative and \texttt{(cat $a$ $b$ $c$ $d$)} is equivalent to+\texttt{(cat $a$ (cat $b$ (cat $c$ $d$)))}.  Finally, \texttt{(enc $a$+  $b$ $c$ $d$ $k$)} is equivalent to \texttt{(enc (cat $a$ $b$ $c$+  $d$) $k$)}.  Figure~\ref{fig:ns responder} on Page~\pageref{fig:ns+  responder} contains examples of \textsc{bca} message terms.  Also+see \textsc{term} in Table~\ref{tab:syntax}, Appendix~\ref{sec:syntax+  reference}.++A message term \emph{carries}\index{carries} a subterm of the message+if the possession of the right set of keys allows the extraction of+the subterm.  The carries relation is the least relation such that+(1)~$t$ carries~$t$, (2)~$\enc{t_0}{t_1}$ carries~$t$ if~$t_0$+carries~$t$, and (3)~$t_0,t_1$ carries~$t$ if~$t_0$ or~$t_1$+carries~$t$.  As noted above, the message~$k^{-1}$ does not carry~$k$.+Also,~$\enc{t}{k}$ does not carry~$k$ unless (anomalously)~$t$+carries~$k$.++\begin{figure}+\begin{center}+\includegraphics{cpsadiagrams-0.mps}\hfil+\includegraphics{cpsadiagrams-1.mps}+\caption{Needham-Schroeder Initiator and Responder Roles}+\label{fig:ns roles}+\end{center}+\end{figure}++\section{Protocols}++A \index{protocol}\emph{protocol} defines the patterns of allowed+behavior for non-adversarial participants.  In other words, the+behavior of each participant must be an instance of some protocol+template, called a \index{role}\emph{role.}  Figure~\ref{fig:ns roles}+displays the roles that make up the Needham-Schroeder protocol.++In S-expression syntax, a protocol is a named set of roles and is+defined by the \texttt{defprotocol} form.  See \textsc{protocol} in+Table~\ref{tab:syntax}, Appendix~\ref{sec:syntax reference}.+\begin{center}+\begin{tabular}{l}+\verb|(defprotocol ns basic|\\+\verb|  (defrole init| \ldots\texttt{)}\\+\verb|  (defrole resp| \ldots\texttt{))}+\end{tabular}+\end{center}++The name of this protocol (\textsc{id}) is \texttt{ns}, and the second+identifier (\textsc{alg}) names the message algebra in use.  The+identifier for the Basic Crypto Algebra is \texttt{basic}.++A role has a name, a declared set of variables, and a trace that+provides a template for the behavior of its instances.  A trace is a+non-empty sequence of message events, either a message reception or a+transmission.  An inbound\index{inbound} message with term~$t$+is~$\inbnd t$ in text and \texttt{(recv $t$)} in S-expression syntax.+An outbound\index{outbound} term is~$\outbnd t$ in text and+\texttt{(send $t$)} in S-expression syntax.  The Needham-Schroeder+responder's role in S-expression syntax is in Figure~\ref{fig:ns+  responder}.++% A linear representation of the Needham-Schroeder responder's trace+% follows.+% $$\fn{resp}_t=\inbnd\enc{N_1, A}{K_B}\Rightarrow \outbnd\enc{N_1,+%  N_2}{K_A}\Rightarrow\inbnd \enc{N_2}{K_B}$$++\begin{figure}+\begin{quote}+\begin{verbatim}+(defrole resp (vars (b a name) (n2 n1 text))+  (trace (recv (enc n1 a (pubk b)))+         (send (enc n1 n2 (pubk a)))+         (recv (enc n2 (pubk b)))))+\end{verbatim}+\end{quote}+\caption{Needham-Schroeder Responder Role}+\label{fig:ns responder}+\end{figure}++Zero-based indexing\index{zero-based indexing}\index{indexing,+  zero-based} is used though out this document and in the source code+it describes.  Within the document, a finite sequence is a function+from an initial segment of the natural numbers.  Angle brackets are+used for sequence construction.  Thus $\seq{3,2,99} = \{0\mapsto 3,+1\mapsto 2, 2\mapsto 99\}$, and the responder's trace is+$\seq{\inbnd\enc{N_1, A}{K_B}, \outbnd\enc{N_1,+    N_2}{K_A},\inbnd\enc{N_2}{K_B}}.$ The length of a sequence~$x$ is+$|x|$.  \nocite{Dijkstra82}++A term \emph{originates}\index{origination} in a trace if it is+carried in some event and the first term in which it is+carried is an outbound term.  A term is+\emph{acquired}\index{acquired} by a trace if it first occurs in an+inbound term and is also carried by that term.++Some atoms in a role have special properties.  An atom may be+declared to be non-originating with the \texttt{non-orig} form and+uniquely originating with the \texttt{uniq-orig} form.  The+declarations make assertions about instances of a role, assertions+that will be defined after role instantiation is explained.++Every variable that occurs in each term declared to be non-originating+must occur in some term in the trace, and the term must not be carried+by any term in the trace.  Each term declared to be+uniquely originating must originate in the trace.  Each variable of+sort \fn{mesg} must be acquired in the trace.++\section{Executions}++A protocol analysis problem is specified by a skeleton.  Some+background information is presented before details of a problem+specification is given.++A skeleton describes a set of executions of a protocol.  They+specify the local behavior of participants and their interactions via+message-passing.  A definition of an execution is presented for the+case in which protocols declare no terms to be non-originating or+uniquely originating, and then is later amended.  The executions are a+representation of the strand space notion of bundle.++A strand\index{strand} represents a principal executing a single local+session of a protocol role.  The sequence of events that+describes the session is patterned after a prefix of its role's trace.+In the context of a protocol, a strand's trace is represented by an+\emph{instance}\index{instance}, a triple consisting of a role name, a+height, and a map from role variables to terms.  The length of the+described sequence is the instance's \emph{height}\index{height}, and+must be positive and no greater than the length of the associated+role's trace.  The map is the instance's+\index{environment}\emph{environment.}  The domain of the map is the+set of variables that occur in the events in the prefix of the+role's trace of the same length as the instance's height.  \iffalse An+instance is in $I=R\times\nat\times(X\rightarrow T)$.  \fi++An example of an instance of the Needham-Schroeder responder role+is:+\begin{center}+\texttt{(defstrand resp 2 (b a) (a b) (n1 n1) (n2 n2))}+\end{center}+The trace associated with this instance is:+$$\seq{\inbnd\enc{N_1, B}{K_A}, \outbnd\enc{N_1,+N_2}{K_B}}.$$++The \emph{position}\index{position} of a event in the+instance's trace is its index in the sequence, and in this example,+the position of $\inbnd\enc{N_1, B}{K_A}$ is zero.++In addition to a protocol, a component of an execution is a collection+of local sessions.  An instance cannot be used to identify one+session, because two principals may engage in the same pattern of+message passing.  Instead, a sequence of instances is used as a+component of an execution, and a \emph{strand} is represented by an+index that selects an instance from the sequence.  In other words,+each principal executing a local session is represented by a natural+number less than the length of the sequence of instances, and its+behavior is described by the instance found using its representation.++A \emph{node}\index{node} is a pair of natural numbers that identifies+an event within a sequence of instances.  The first integer is+the strand, and the second is the position of the event within+the strand's trace.  A node with an inbound term is a reception+node\index{reception node}, and one with an outbound term is a+\index{transmission node}transmission node.  Given a sequence~$i$, its+nodes are: $$\{(s,p)\mid s<|i|, p<\cn{height}(i(s))\}.$$++The remaining component of an execution is a binary relation between+transmission nodes and reception nodes, where each pair of nodes in+the relation agree on their message term.  The relation specifies+message transmissions between strands.  The nodes of the graph+associated with an execution are the nodes in the sequence of+instances, and the edges include the ones in the relation.+Additionally, the following strand succession edges\index{strand+  succession edges} are included: $$\{((s,p), (s, p+1))\mid s<|i|,+p+1<\cn{height}(i(s))\}.$$ Executions with cyclic graphs are omitted+from consideration, because they violate causality.  Relation~$R$ on+set~$S$ is \emph{asymmetric}\index{asymmetric relation} iff+$x\mathbin{R}y$ implies not $y\mathbin{R}x$ for all distinct $x,y \in+S$.  The transitive asymmetric relation~$\prec$ is the transitive+closure of the graph's edges, and $n_0\prec n_1$ asserts that the+message event at~$n_0$ precedes the one at~$n_1$.++The node relation of an execution satisfies one additional property.+For each reception node in its sequence, there exists a unique+transmission node, related to it by the communication ordering.  In+other words, the relation must be a function.  Informally, this+property ensures that every message reception is accounted for by the+activity of a principal that is part of the execution.+Figure~\ref{fig:ns intended} shows the intended execution of the+Needham-Schroeder Protocol.  The node graph of an execution is a+bundle.++A set of runs of the protocol is associated with each execution.  A+variable is associated with an execution if the variable occurs in the+range of an environment in some instance.  To derive a run from an+execution, a substitution that maps each variable associated with the+execution to a ground term is applied to the execution.  {\cpsa}+message algebras do not contain the constants required to name all the+ground terms.  For most sorts, the identity of a particular ground+term is irrelevant to the analysis.  Message tags are the only+exception to this rule.  For this reason, {\cpsa} message algebras are+free algebras, but not initial algebras.++Strands in executions represent both adversarial and non-adversarial+behaviors.  A strand that is an instance of a protocol role is+non-adversarial, and is called \index{regular}\emph{regular.}  A+strand that represents adversarial behavior is called a+\emph{penetrator}\index{penetrator} strand.++\begin{figure}+\begin{center}+\includegraphics{cpsadiagrams-2.mps}+\end{center}+\begin{quote}+\begin{verbatim}+(vars (n1 n2 text) (a b name))+(defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+(defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+(precedes ((0 0) (1 0)) ((1 1) (0 1)) ((0 2) (1 2)))+\end{verbatim}+\end{quote}+\caption{Needham-Schroeder Intended Run}+\label{fig:ns intended}+\end{figure}++The roles that define adversary behavior codify the basic abilities+that make up the Dolev-Yao model.  They include transmitting an atom+such as a name or a key; transmitting a tag; transmitting an encrypted+message after receiving its plain text and the key; and transmitting a+plain text after receiving ciphertext and its decryption key.  The+adversary can also concatenate two messages, or separate the pieces of+a concatenated message.  Since a penetrator strand that encrypts or+decrypts must receive the key as one of its inputs, keys used by the+adversary---compromised keys---have always been transmitted by some+participant.++Figure~\ref{fig:ns penetrated} shows a penetrated execution of the+Needham-Schroeder Protocol.  Strand space theory would decompose the+penetrator behavior into multiple strands; instead the description of+the penetrator has been simplified by the use of an artificially+constructed role~\fn{pen}.++A \index{non-origination}\emph{non-originating term} is an atom+that is carried by no message, and it or its inverse is the key of an+encryption in some message.  Each non-originating term is a key that+is not compromised, as the penetrator has no access to the key.++A \index{unique origination}\emph{uniquely originating term} is an+atom that originates on exactly one strand in the execution.  The+correct behavior of some protocols depends on the fact that its+executions include only ones in which some terms are uniquely+originating---each term's provenance is one node.  Implementations of+these protocols can ensure unique origination of a term by freshly+generating a nonce for the component of the message it represents.++Occasionally, protocol roles designate some terms to be+non-originating or uniquely originating.  Consider the prefix of the+trace of a role associated with some instance.  When a uniquely+originating role term is carried in the prefix, the instance's+environment maps it to a term that must originate in the instance's+strand.  Furthermore, when the variables in a non-originating role+term occur in the prefix, the instance's environment maps that term to+one that must not be carried by any message term in the execution.+The mapping of a non-originating role term can be conditioned on the+height of the instance.  A role non-origination assumption of the form+\texttt{(3 a)} asserts that \texttt{a} will not be mapped into an+instance unless its height is at least three.+Section~\ref{sec:advice} provides advice on when to add+non-origination or unique origination assumptions to roles.++\begin{figure}+\begin{center}+\includegraphics{cpsadiagrams-3.mps}+\caption{Needham-Schroeder Penetrated}+\label{fig:ns penetrated}+\end{center}+\end{figure}++\section{Skeletons}\index{skeleton}++A \emph{skeleton} represents regular behavior that might make up part+of an execution.  The components of a skeleton are similar to an+execution.  The components of a skeleton include a protocol, a+sequence of instances, and a binary relation between transmission+nodes and reception nodes within the sequence.  Unlike an execution,+the strands in a skeleton specify only regular behavior.  Furthermore,+the pair of nodes in the relation need not agree on their message+term.  Two nodes are related if the transmitting node precedes the+reception node, as an execution it represents may include nodes+between the related transmission and reception nodes.++The final two additional components of a skeleton are a set of+non-originating terms, and a set of uniquely originating terms.  To be+a skeleton, each uniquely originating term must originate in at most+one strand in the skeleton, and each non-originating term must never+be carried by some event in the skeleton and every variable+that occurs in the term must occur in some event.+Furthermore, for each uniquely originating term that originates in the+skeleton, the node relation must ensure that reception nodes that+carry the term follow the node of its origination.+Figure~\ref{fig:skeleton} shows the components in the S-expression+representation of a skeleton.++\begin{figure}+\begin{quote}+\begin{alltt}+(defskeleton \textsc{protocol} \textsc{variables}+   \ldots                ; Instance sequence+   (precedes \ldots)     ; Node orderings+   (non-orig \ldots)     ; Non-originating terms+   (uniq-orig \ldots))   ; Uniquely originating terms+\end{alltt}+\end{quote}+\caption{Components of Skeletons}\label{fig:skeleton}+\end{figure}++Two skeletons are equivalent if there is a permutation of the strands+in one skeleton that when applied to its sequence and its node+relation, produces the other skeleton.  Two skeletons are also+equivalent if they differ only by a systematic, sort-preserving+renaming of their variables, excluding variables that occur in the+domains of environments---the role variables.  The trace of a strand+is used for the comparison, so role names need not match.++A skeleton is normalized by performing a transitive reduction on its+node relation.  The transitive reduction\index{transitive reduction}+of an ordering is the minimal ordering such that both orderings have+the same transitive closure.  Here, communication orderings implied by+transitive closure are removed.  Two skeletons are equivalent if their+normalized forms are equivalent.++One special skeleton is associated with each execution.  It summarizes+the regular behavior of the execution.  It is derived from the+execution by enriching its node relation to contain all node orderings+implied by transitive closure, deleting all strands and nodes that+refer to penetrator behavior, and then performing the transitive+reduction on the resulting node relation.  The set of uniquely+originating terms is the set of terms that originate on exactly one+strand in the execution, and are carried in a term of a regular+strand.  The set of non-originating terms is the union of two sets.+One set contains each term that is used as an encryption or decryption+key in some term in the execution, but is not carried by any term.+The other set contains the terms specified by non-origination+assumptions in roles.  If a realized skeleton instance maps all of the+variables that occur in one of its non-originating role terms, the+mapped term is a member of the skeleton's set of non-originating+terms.  A skeleton is \emph{realized}\index{realized skeleton} if it+summarizes the behavior of some execution.++Skeletons are a central concept in the {\cpsa} algorithm because they+capture the notion that the details of penetrator behavior are+irrelevant to the analysis.  From the perspective of regular behavior,+all that is needed is a description of the messages that can be+derived by the penetrator at a given reception node of a regular+strand.  In a realized skeleton, some combination of penetrator+behavior and regular behavior derives the message at every reception+node.  The skeleton's node relation specifies the transmission nodes+that provide messages available to the penetrator for message+derivations.  The rules for message derivation are algebra specific.+If the message derivation rules imply a message at a reception node in a+skeleton is derivable, the node is~\emph{realized.}++A skeleton with an unrealized node might be related to another+skeleton with additional regular behavior that makes the original node+realized.  A skeleton with additional regular behavior is called a+refinement.++A skeleton~$A$ structurally refines~$B$ if the transitive closure of the+graph associated with~$B$ is a subgraph of the one associated+with~$A$, the event at corresponding nodes agree, the set of+uniquely originating terms of~$B$ is a subset of the ones in~$A$, the+set of non-originating terms of~$B$ is a subset of the ones in~$A$,+and a uniquely originating term that originates in~$B$ originates at+the corresponding node in~$A$.++A skeleton~$A$ message refines~$B$ if~$A$ and~$B$ agree on all but the+terms in the range of each strand's environment and its+non-originating and uniquely originating terms, and there is a+substitution that maps each term in~$B$ to its related term in~$A$.+Similar to structural refinement, a uniquely originating term that+originates in~$B$ originates at the same node in the image of~$B$.++A skeleton~$A$ refines\index{refinement}~$B$ if~$A$ is equivalent to a+skeleton that structurally or message refines~$B$.\footnote{A+  skeleton~$A$ refines~$B$ if there is a homomorphism from~$B$ to~$A$+  as defined in~\cite{DoghmiGuttmanThayer07}.  The implementation+  avoids the complexities of directly representing homomorphisms by+  composing structural and message refinement with equivalence checks,+  as is done in this chapter.}  Each skeleton describes the realized+skeletons that refine it.  A skeleton is \emph{dead} if no realized+skeleton refines it.  A diagram of a skeleton is in Figure~\ref{fig:ns+  shape}.++\begin{figure}+\begin{center}+\includegraphics{cpsadiagrams-4.mps}+\caption{Needham-Schroeder Shape ($K^{-1}_A$ uncompromised, $N_2$ fresh)}+\label{fig:ns shape}+\end{center}+\end{figure}++The {\cpsa} algorithm computes realized skeletons from unrealized+skeletons by identifying an unrealized node, and computing the+skeletons that refine the unrealized skeleton by making the target+node realized.++\section{Listeners}\index{listeners}++In addition to the roles specified in a protocol, for each term~$t$, a+regular strand may be an instance of the listener role with the trace+$\fn{lsn}(t) = \seq{\inbnd t, \outbnd t}$.  There are no non-originating or+uniquely originating terms associated with a listener role.++A listener strand is used in a skeleton to assert that an atom~$t$ is+available on its own to the adversary, unprotected by encryption.  For+example, to test if the protocol keeps a term~$t$ from the adversary,+one adds a strand that listens for~$t$.  The term is protected if the+resulting skeleton is dead.  Otherwise, the {\cpsa} analyzer program+will find a refined realized skeleton that shows how the adversary+accesses~$t$.++A listener instance in S-expression syntax follows.  See+\textsc{strand} in Table~\ref{tab:syntax}, Appendix~\ref{sec:syntax+  reference}.+\begin{center}+\texttt{(deflistener }\textsc{term}\texttt{)}+\end{center}+The {\cpsa} programs generate the associated listener role and hide+it on output.  Listener role names are absent in all forms of output,+one indication that a strand is an instance of a listener role.++\section{Authentication Tests}\label{sec:authentication tests}+\index{nonce test}\index{encryption test}++Authentication tests guide the search for skeletons that refine one+with an unrealized node into ones in which it is realized.  There are+two types of authentication tests, nonce and encryption tests.  In+both cases, an unrealized node is selected, called the \index{test+  node}\emph{test node.}  A term carried by the inbound message at the+test node is identified as the \index{critical term}\emph{critical+  term.}  A critical term is one that occurs in a message+context, the construction of which cannot be explained by the regular+behavior in the current skeleton or by penetrator behavior.  An+authentication test determines the additional regular behavior+required to refine a skeleton into ones in which the test node is+realized.++The critical term in a nonce test is a uniquely originating term, the+nonce.  It is freshly generated by one regular participant in each run+of the protocol.  A nonce is unguessable by both regular and+adversarial participants except when it is received in an unprotected+context.++A reception node's \index{outbound predecessors}\emph{outbound+  predecessors} is the set of messages sent by transmission nodes that+precede the reception node, as given by the transitive closure of its+skeleton's node ordering relation.  Suppose every occurrence of the+nonce in the outbound predecessors of the test node is within a+context protected by encryption, but the critical term in the test+node occurs outside of all of those encryptions.  Clearly, another+participant was able to decrypt one of the test node's outbound+predecessors.  The set of encryptions that protects a critical term+in a test node's outbound predecessors is called its \index{escape+  set}\emph{escape set.}++There are three ways to refine a skeleton to account for the+decryption: regular augmentation, listener augmentation, and+contraction.  For regular augmentation, an instance of a protocol role+is added to the skeleton.  The final transmission node of the strand+is called a \emph{transforming node.}  The strand is selected for+augmentation because relative to the test node's outbound+predecessors, the transforming node's message shows the strand+performed the decryption.++The penetrator can expose the critical term if it has access to any+of the decryption keys used to protect it in the escape set.  For+listener augmentation, an instance of a listener role listening to one+decryption key used to protect the critical term is added, and the+skeleton's communication ordering relation is updated to record the+fact that the listener's transmission node precedes the test node.  If+the resulting skeleton is not dead, the decryption can be explained by+penetrator behavior.++For a contraction, a message refining substitution is found that+equates two or more atoms.  Sometimes, the key used to protect the+critical term can be equated with one used in previous messages,+thus vacuously explaining the decryption of the critical term.++The critical term in an encryption test is an encryption.  When the+encryption key is unavailable, the encryption is unguessable.+Whenever the unavailability of the encryption key can be established,+the methods used to refine skeletons with nonce tests apply.+Additionally, an instance of a listener role listening for the+critical term's encryption key is added.  If the resulting skeleton+is not dead, the encryption can be explained by penetrator behavior.++\section{Generalization}++Repeated use of authentication tests either produce realized skeletons+or show that a skeleton is dead.  The next step in the algorithm is to+make each realized skeleton into a shape, using the process of+generalization.++Realized skeleton~$A$ \emph{generalizes}\index{generalization}+realized skeleton~$B$ if~$A$ refines the origin problem specification,+and $B$ refines~$A$.  Furthermore,~$A$ may not combine strands in~$B$.+The \emph{shape}\index{shape} associated with a realized skeleton is+its maximally generalized realized skeleton.  The shapes of a protocol+capture all the essentially different executions possible for the+protocol consistent with the initial behavior specification.+Figure~\ref{fig:ns shape} shows the shape associated with the+Needham-Schroeder Protocol from the point of view of a responder+strand.++A different fixed set of operations is used to transform a realized+skeleton into a shape: deletion, weakening, separation, and+forgetting.  If an operation succeeds, it produces a more general+realized skeleton, one that is not equivalent to the starting+skeleton.  If no operations succeeds, the skeleton is a shape.++For deletion, a node and all nodes that follow it in a strand are+deleted, and the resulting skeleton is checked to see if it+generalized the starting skeleton.  The operation is tried for each+node in the starting skeleton until there is a success.++If deletion fails, a skeleton is weakened by deleting one element of+the communication ordering, then checking the result to see if it+generalized the starting skeleton.  The operation is tried for each+communication ordering in the starting skeleton until there is a success.++If weakening fails, origination assumption forgetting is tried by+deleting each term in the non-originating set that is not+specified by a role.  This is followed by deleting each term in the+uniquely originating set that is not specified by a role.++If origination assumption forgetting fails, variable separation is+tried.  Sometimes a more general skeleton can be found by replacing+some occurrences of one variable by a fresh variable.  To separate a+variable, the collection of places at which the variable occurs in the+range of all environments is generated, and a fresh variable is+substituted for the variable at a subset of these places.  All+possibilities are tried until a more general skeleton is found.++Sometimes a shape is derived from another shape by collapsing two+strands in a shape.  Collapsing might produce an unrealized skeleton,+so authentication tests apply.++\section{Skeletons}\index{skeleton}\label{sec:skeletons}++With this background, the \texttt{defskeleton} form in+Table~\ref{tab:syntax}, Appendix~\ref{sec:syntax reference} is+explained.  The key object in {\cpsa} input and output is a skeleton,+but an object with weaker properties is allowed for the initial+problem statement.  A \index{preskeleton}\emph{preskeleton} is a+skeleton except that terms in the uniquely originating set may+originate in more than one strand.  Furthermore, the node relation of+a preskeleton need not imply that a node that carries a uniquely+originating term is after the node of its origination.  A preskeleton+that cannot be immediately converted into a skeleton is erroneous, and+an error message is issued.++Referring to \textsc{skeleton} in Table~\ref{tab:syntax}, the+\textsc{id} in the skeleton form names a protocol.  It refers to+the most recent protocol definition of that name which precedes the+skeleton form.  The \textsc{id} in the strand form names a role.+The integer in the strand form gives the height of the strand.  The+sequence of pairs of terms in the strand form specify an environment+used to construct the messages in a strand from its role's trace.  The+first term is interpreted using the role's variables and the second+term uses the skeleton's variables.  The environment used to+produce the strand's trace is derived by matching the second term+using the first term as a pattern.++The \texttt{precedes} form specifies members of the node relation.+The first integer in a node identifies the strand using the order in+which strands are defined in the \texttt{defskeleton} form.++A variable may occur in more then one role within a protocol.  The+reader performs a renaming so as to ensure these occurrences do not+overlap.  Furthermore, the maplets used to specify a strand need not+specify how to map every role variable.  The reader inserts missing+mappings, and renames every skeleton variable that also occurs in a+role of its protocol.  The sort of every skeleton variable that+occurs in the \texttt{non-orig} or \texttt{uniq-orig} list or in a+maplet must be declared, using the \texttt{vars} form.++The \textsc{prot-alist}, \textsc{role-alist}, and \textsc{skel-alist}+productions are Lisp style association lists, that is, lists of+key-value pairs, where every key is a symbol.  Key-value pairs with+unrecognized keys are ignored, and are available for use by other+tools.  On output, unrecognized key-value pairs are preserved when+printing protocols, but elided when printing skeletons, with the+exception of the \texttt{comment} key.++\subsection{Semantic Errors in the Input}\label{sec:semantic errors}++The error messages generated for syntax errors are informative,+however the ones generated for semantic errors are less so.  A role+might be rejected because it is not \index{well-formed+  role}well-formed.  A role is not well-formed if (1) there is a term+declared to be uniquely originating that does not originate in the+trace, (2) there is a term declared to be non-originating that is+carried by some term in the trace, a variable occurs in the term that+does not occur in the trace, or the declaration of the term included a+height, and a variable occurs in the term that does not occur in the+prefix of the trace of the given height, or (3) a variable of sort+\dom{mesg} is not acquired in the trace.  The error message might not+indicate which condition caused the rejection.++Similarly, a skeleton might be rejected because it is not+\index{well-formed skeleton}well-formed.  A skeleton is not+well-formed if (1) the first node in a node pair refers to an inbound+term, or the second node refers to an outbound term, (2) the node+ordering contains cycles, (3) a term declared to be uniquely+originating, is not carried by any term, (4) an instance maps a+uniquely originating role term to a term that does not originate in+the instance's strand, or (5) a term declared to be non-originating is+carried by a term in some strand, or a variable occurs in the term+that does not occur in any strand.  Once again, the error message might+not indicate which condition caused the rejection.++\subsection{Needham-Schroeder Input}++\begin{sloppypar}+This section contains the verbatim input of the running example used+throughout this paper.  The use of an editor that pretty-prints+S-expressions is recommended.+\end{sloppypar}++\begin{flushleft}+\texttt{;;; Hey Emacs, use -*- mode:scheme -*-}+\end{flushleft}++An S-expression version of Figure~\ref{fig:ns roles} follows.++\begin{verbatim}+(defprotocol ns basic+  (defrole init+    (vars (a b name) (n1 n2 text))+    (trace+     (send (enc n1 a (pubk b)))+     (recv (enc n1 n2 (pubk a)))+     (send (enc n2 (pubk b)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace+     (recv (enc n1 a (pubk b)))+     (send (enc n1 n2 (pubk a)))+     (recv (enc n2 (pubk b))))))+\end{verbatim}++The protocol is analyzed from the point of view of a complete run of+one instance of an initiator role.++\begin{verbatim}+(defskeleton ns+  (vars (a b name) (n1 text))+  (defstrand init 3 (a a) (b b) (n1 n1))+  (non-orig (privk b) (privk a))+  (uniq-orig n1))+\end{verbatim}++\section{Output}\label{sec:output}++The {\cpsa} output format has been designed so that it can be reused+as input.  All skeletons in the output are normalized skeletons,+with the possible exception of an initial preskeleton, the one used to+state a problem.  If an initial preskeleton cannot be converted into a+skeleton, an error is immediately signaled.++For each skeleton, a {\cpsa} analyzer computes a set of skeletons that+refine it using a fixed set of operations based on authentication+tests.  The immediate descendants of a skeleton is called its+\index{cohort}\emph{cohort.}  A member of the cohort that is+equivalent to a previously seen skeleton is replaced by that skeleton.+Thus the skeletons in an analysis form a directed acyclic graph.  All+but one skeleton has a single parent, and one skeleton can be a member+of several cohorts.++The operations above either produce realized skeletons or show that a+skeleton is dead.  The next step in the algorithm is to make each+realized skeleton into a shape, using the process of generalization.+Although the set of shapes is in some sense the answer to the problem,+an understanding of the operations used to generate the shapes can be+very informative.  The remainder of this section describes the+annotations in the output that allow for an understanding of each step+of the analysis.++On output, key-value pairs are added to each skeleton's association+list, \textsc{skel-alist}.  Every skeleton in the output is labeled+with a unique identifier with+\index{label}\texttt{(label~}\textsc{integer}\texttt{)}.  A skeleton+has \texttt{(parent~}\textsc{integer}\texttt{)} if it is a member of+the cohort of the identified parent.  A skeleton has+\texttt{(seen~}\textsc{integer+}\texttt{)} when members of its cohort+are equivalent to previously seen skeletons.  A skeleton lists its+unrealized nodes with+\texttt{(unrealized~}\textsc{node$\ast$}\texttt{)}.  The traces+associated with each strand is given by the+\texttt{(traces~}\ldots\texttt{)} form.++\begin{figure}+\begin{verbatim}+(defskeleton ns+  (vars (n1 n2 n2-0 text) (a b name))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (defstrand resp 2 (n2 n2-0) (n1 n1) (b b) (a a))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk a) (privk b))+  (uniq-orig n1)+  (operation nonce-test (added-strand resp 2) n1 (0 1)+    (enc n1 a (pubk b)))+  (traces+    ((send (enc n1 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b))))+    ((recv (enc n1 a (pubk b)))+      (send (enc n1 n2-0 (pubk a)))))+  (label 1)+  (parent 0)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))+\end{verbatim}+\caption{Annotated {\cpsa} Output}\label{fig:output}+\end{figure}++Figure~\ref{fig:output} shows a skeleton generated during an analysis+of the Needham-Schroeder Protocol from the point of view of an+initiator strand.  It is labeled as~1.  It's parent is labeled~0.  It+has one child, and that child has not been seen before.  It is+unrealized.++\label{sec:operation}+\begin{sloppypar}+The operation used to derive a skeleton is recorded with+\index{operation}\texttt{(operation~}\textsc{test kind term node+  term$\ast$}\texttt{)}, where \textsc{test} is the authentication+test \texttt{encryption-test} or \texttt{nonce-test}, \textsc{kind} is+\texttt{(added-strand} \textsc{id} \textsc{integer}\texttt{)},+\texttt{(contracted} \textsc{maplet$\ast$}\texttt{)}, or+\texttt{(added-listener} \textsc{term}\texttt{)}, \textsc{term} is the+critical term, \textsc{node} in the test node, and the remaining terms+specify the escape set. When the operation kind is added strand, the+instance's role name and height are provided. For kind added-listener,+a term is provided. For kind contracted, the substitution is+provided. When a substitution refers to a variable not in the+skeleton, its name is unpredictable. For generalization, the operation+is recorded as+\texttt{(operation~generalization~}\textsc{method}\texttt{)}, where+\textsc{method} is one of \texttt{deleted} \textsc{node},+\texttt{weakened} \textsc{node-pair}, \texttt{separated}+\textsc{term}, or \texttt{forgot} \textsc{term}.  Shapes can be+collapsed leading to new shapes.  For shape collapsing, the operation+is recorded as \texttt{(operation~collapsed} \textsc{integer}+\textsc{integer}\texttt{)}, where the two \textsc{integer}s identify+the strands merged.+\end{sloppypar}++The skeleton in Figure~\ref{fig:output} was generated as a result of a+nonce test, by augmenting the starting skeleton with a responder+strand of length two.  The critical term is \texttt{n1}, the test+node is \texttt{(0~1)}, and the escape set has one element.++When the operation kind is added strand, it is possible that the+number of strands in the skeleton and its parent are the same.  In+this case, {\cpsa} has found a way to produce a more concise+representation of the skeleton by merging two strands.++\subsection{Needham-Schroeder Output}++% Use --margin=60 to generate output++This section contains the verbatim output of the running example used+throughout this paper.  A run starts by displaying the program's+version number.++\begin{flushleft}+\texttt{(comment "CPSA {\version}")}\\+\texttt{(comment "All input read")}+\end{flushleft}++An S-expression version of Figure~\ref{fig:ns roles} follows.++\begin{verbatim}+(defprotocol ns basic+  (defrole init+    (vars (a b name) (n1 n2 text))+    (trace (send (enc n1 a (pubk b)))+      (recv (enc n1 n2 (pubk a))) (send (enc n2 (pubk b)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace (recv (enc n1 a (pubk b)))+      (send (enc n1 n2 (pubk a)))+      (recv (enc n2 (pubk b))))))+\end{verbatim}++The protocol is analyzed from the point of view of a complete run of+one instance of an initiator role.++\begin{verbatim}+(defskeleton ns+  (vars (n1 n2 text) (a b name))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (non-orig (privk a) (privk b))+  (uniq-orig n1)+  (traces+    ((send (enc n1 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b)))))+  (label 0)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))+\end{verbatim}++A nonce test justifies adding an instance of part of a reponder role.++\begin{verbatim}+(defskeleton ns+  (vars (n1 n2 n2-0 text) (a b name))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (defstrand resp 2 (n2 n2-0) (n1 n1) (b b) (a a))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk a) (privk b))+  (uniq-orig n1)+  (operation nonce-test (added-strand resp 2) n1 (0 1)+    (enc n1 a (pubk b)))+  (traces+    ((send (enc n1 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b))))+    ((recv (enc n1 a (pubk b)))+      (send (enc n1 n2-0 (pubk a)))))+  (label 1)+  (parent 0)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))+\end{verbatim}++A nonce test justifies a contraction that produces the one and only+shape.  The shape is also displayed in Figure~\ref{fig:ns init pov}.++\begin{figure}+\begin{center}+\includegraphics{cpsadiagrams-5.mps}+\caption{Needham-Schroeder Shape (Initiator Point of View)}+\label{fig:ns init pov}+\end{center}+\end{figure}++\begin{verbatim}+(defskeleton ns+  (vars (n1 n2 text) (a b name))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (defstrand resp 2 (n2 n2) (n1 n1) (b b) (a a))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk a) (privk b))+  (uniq-orig n1)+  (operation nonce-test (contracted (n2-0 n2)) n1 (0 1)+    (enc n1 n2 (pubk a)) (enc n1 a (pubk b)))+  (traces+    ((send (enc n1 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b))))+    ((recv (enc n1 a (pubk b)))+      (send (enc n1 n2 (pubk a)))))+  (label 2)+  (parent 1)+  (unrealized)+  (shape))+\end{verbatim}++The following phrase means {\cpsa} is finished with this problem---its+exhausted its to do list.++\begin{verbatim}+(comment "Nothing left to do")+\end{verbatim}++\section{Advice}\label{sec:advice}++This section contains advice derived from using {\cpsa}.  When+specifying {\cpsa} input, one must decide when to specify terms as+uniquely originating or non-originating in a role, and when to+specifying them in the initial skeleton.  If a flesh value is+generated by all programs that implement a role in a protocol, the+term that represents the fresh value should be assumed to be uniquely+originating in the role.  Otherwise, unique origination assumptions+should be specified in the initial skeleton.++Adding non-origination assumptions to a role can lead to an+excessively weak protocol analysis, i.e.\ an analysis relative to an+unrealistically narrow assumption.  Placing non-origination+assumptions in the initial skeleton is preferred whenever possible.++The Basic Crypto Algebra has two text-like sorts, \dom{text} and+\dom{data}.  For some protocols, message fields that carry uniquely+originating data cannot be carried by other text-like fields.  To+ensure {\cpsa} does not explore skeletons in which uniquely+originating data is carried in fields with predictable values, the+convention is to use the sort \dom{data} for uniquely originating+data, and sort \dom{text} for the other fields.++Protocols that make use of \index{hashing}hashing can be handled by+encoding the results of a hash function as an asymmetric encryption in+which no participant has access to the decryption key.  To use this+encoding in a role, encrypt the term to be hashed with an otherwise+unused asymmetric key, and declare its inverse to be non-originating.+Include an otherwise unused tag within the encryption so+as to ensure an encryption representing a hashed term cannot be+confused with an ordinary encryption.  Carefully check each role using+this encoding and make sure the decryption key is never used.++When looking at the output, try extracting the shapes first.  If the+shapes only version of the output does not answer your questions, try+studying the output that contains intermediate skeletons.++When {\cpsa} generates an unexpected intermediate skeleton, study its+operation field (see Page~\ref{sec:operation}).  Usually, the+unexpected intermediate skeletons of interest have been generated as a+result of an authentication test.  Section~\ref{sec:authentication+  tests} explains how to interpret an operation field for an+authentication test.++When using {\cpsa} for protocol design, focus on authentication tests.+For each iteration of the design, search for the most informative+unexpected intermediate skeleton.  That skeleton is likely to suggest+a  missing origination assumption, or the redesign of some message+term included in the operation field.++There are situations in which origination assumptions are not+justified for initial segments of runs of a protocol, but are required+to show that complete runs of the protocol have certain expected+shapes.  In this case, the progressive refinement analysis technique+is used.  The initial segments of runs are analyzed with only the+origination assumptions justified initially.  A shape associated with+a partial run may justify additional origination assumptions.  For+example, a strand in a partial run may send its next message only+after a trust decision is made, and the implication of the decision is+that the strand infers that some key is uncompromised.  In this+case, the shape with the new origination assumption and additional+regular behavior is supplied as input to {\cpsa}, thereby refining the+original problem.++As there is no guarantee that {\cpsa} is bug free, you may come upon+input that causes non-termination.  As a result, whenever you run the+program unattended, you should limit its memory usage.  To get output+that can be visualized, specify a step count and/or a strand bound so+that {\cpsa} has the chance to abort the run in a fashion that+generates graphable output.  Of course, sending us input that causes+erroneous behavior will help us improve {\cpsa}.++\section*{Acknowledgement}++Jonathan K.\@ Millen provided valuable feedback as our first {\cpsa}+user and on a draft of this document.++\appendix++\section{BCA Syntax Reference}\label{sec:syntax reference}++\input{bcasyntax}++\bibliography{cpsa}+\bibliographystyle{plain}++\printindex++\end{document}
+ doc/cpsaspec.tex view
@@ -0,0 +1,2950 @@+\documentclass[12pt]{article}+\usepackage{amssymb}+\usepackage{url}+\usepackage{graphicx}+\usepackage[matrix,arrow,curve]{xy}+\usepackage{makeidx}+\usepackage{amsthm}+% Include this for a hyperlinked version of the document+% \usepackage{hyperref}++\theoremstyle{definition}+\newtheorem{defn}{Definition}[section]+\newtheorem{thm}{Theorem}[section]+\newtheorem{lem}[thm]{Lemma}+\newtheorem{cor}{Corollary}+\input{macros}++% This environment is used for comments about this draft.+\newenvironment{note}{\itshape\par\noindent}{}++\makeindex++\title{The CPSA Specification:\\+A Reduction System for Searching for Shapes in Cryptographic Protocols}+\author{John D.~Ramsdell\quad Joshua D.~Guttman\quad Paul D.~Rowe\\+The MITRE Corporation}++\begin{document}+\maketitle+\cpsacopying++\begin{note}+This is a draft and many of the theorems lack proofs.  The draft has+an index and a table of contents at its end.  Hopefully, the final+paper will support an abstract of the following form.+\end{note}++\begin{abstract}+We describe a term reduction system that enumerates all essentially+different executions possible for a cryptographic protocol.  We call+them the \emph{shapes} of the protocol.  Naturally occurring protocols+have only finitely many, indeed very few shapes.  Authentication and+secrecy properties are easy to determine from them, as are attacks and+anomalies.  Our Cryptographic Protocols Shapes Analyzer ({\cpsa})+program is a direct implementation of the reduction system described+within, and the form of the reduction system is partially determined+by the implementation.++The reduction system is a purely syntactic description of an abstract+version of the algorithm published previously.  Order-sorted term+algebras are used for message algebras, and allow us to extend the+algorithm to algebras with an associative-commutative operation.+During the process of refining the description of the algorithm, we+found a significant simplification of the algorithm and that+elaborating some abstractions required great care.++This paper describes the reduction system and shows it possesses+desired correctness properties.  In particular, its search is+\emph{complete} meaning when analyzing a protocol starting with+some initial behavior, every shape can be found in a finite number of+steps.+\end{abstract}++\begin{note}+Background material should be here.+\end{note}++Initial attempts at implementing the Cryptographic Protocols Shapes+Analyzer ({\cpsa}) algorithm in~\cite{DoghmiGuttmanThayer07} revealed+that the strand space framework required extensions and modifications+to specify the design and implementation of a {\cpsa} program.  The+first step was to capture the essence of a strand space algebra in the+order-sorted algebra framework.  The second step was to choose data+structures, and the third step was to specify operations on the data+structures that produce the desired results.++When using strand space theory, one normally hypothesizes the+existence of a single global strand space.  This is a very reasonable+assumption for theoretical analysis, but from the point view of an+implementer, it turns out that it is better to assume there are many+local strand spaces and the design specification task is to describe+the relations between these local spaces.  Our reformulation of strand+space notation provides an implementation oriented way of describing+the concept of a local strand space, and a direct link between from+algorithm specification to the data structures used in the+implementation.++In this specification, each reduction step in the search algorithm+relates a term to a set of terms.  The correctness properties of the+algorithm justify a reduction step by placing restrictions on the+relations relative to their respective local strand spaces.  The fact+that an efficient implementation is available is due in part to the+fact the reduction system is confluent, thus greatly reducing the+search space.++\begin{note}+The sections that follow should described here.+\end{note}++In what follows, a finite sequence is a function from an initial+segment of the natural numbers.  The length of a sequence~$f$+is~$|f|$, $f_0\append f_1$ is the concatenation of sequences~$f_0$+and~$f_1$, and sequence~$f=\seq{f(0),\ldots,f(n-1)}$ for $n=|f|$.+If~$S$ is a set, then~$S^\ast$ is the set of finite sequences of~$S$,+and~$S^+$ is the non-empty finite sequences of~$S$.  \index{sequence}++Section~\ref{sec:skeletons} will define the terms ``skeleton'' and+``pruned skeleton''.  Starting in Section~\ref{sec:auth tests}, all+skeletons are pruned, so ``skeleton'' is used for pruned skeletons.++\section{Overview}\label{sec:overview}++An implementation-oriented view of strand spaces and bundles+\cite{ThayerEtal99} follows.  In this paper, a run of a protocol is+viewed as an exchange of messages by a finite set of local sessions of+the protocol.  Consider the class of $\Sigma,\Gamma$-algebras,+algebras over signature~$\Sigma$ that satisfy+equations~$\Gamma$~\cite[Chapter~3]{BaaderNipkow98}.  A message is an+element of~$\alg{M}_{\Sigma,\Gamma}(X)$, a free+$\Sigma,\Gamma$-algebra generated by set~$X$.++Each local session is called a \emph{strand}, and is an element of the+strand set~$\Theta$.  The behavior of a participant, its \emph{trace},+is a sequence of messaging events.  An \emph{event} is either a+message transmission or a reception.  Outbound message+$t\in\alg{M}_{\Sigma,\Gamma}(X)$ is written as~$\outbnd t$, and+inbound message~$t$ is written as~$\inbnd t$.  A \emph{strand space}+over algebra~$\alg{M}_{\Sigma,\Gamma}(X)$ is the strand set~$\Theta$+together with a trace mapping $\fn{tr}\colon\Theta\to+(\pm\alg{M}_{\Sigma,\Gamma}(X))^+$.  In a strand space, the elements+of the generator set~$X$ denote atomic message elements, such as keys+and text data, and not composite messages, such as encryptions and+pairs.  Later in this paper, strand sets~$\Theta$ will be initial+segments of the natural numbers, so a trace mapping will be a+sequence.++Message events occur at nodes in a strand space.  For each strand~$s$,+there is a node for every message in~$\fn{tr}(s)$.  The \emph{nodes}+of strand space $(\Theta,\fn{tr})$ are $\{(s,p)\mid s\in\Theta, 0\leq+p < |\fn{tr}(s)|\}$, and the event at a node is+$\fn{evt}(s,p)=\fn{tr}(s)(p)$.  The relation~$\Rightarrow$ defined by+$\{(s,p-1)\Rightarrow(s,p)\mid s\in\Theta, 0<p<|\fn{tr}(s)|\}$ is+called the \emph{strand succession relation}.++A \emph{bundle} in strand space $(\Theta,\fn{tr})$ is a finite+directed acyclic graph $\bundle(\Theta,\fn{tr},\to)$, where the+vertices are the nodes of $(\Theta,\fn{tr})$, and an edge represents+communication~($\rightarrow$) or strand succession~($\Rightarrow$).+For communication, if $n_0\rightarrow n_1$, then there is a+message~$t$ such that~$\fn{evt}(n_0)=\outbnd t$+and~$\fn{evt}(n_1)=\inbnd t$.  For each reception node~$n_1$, there is+a unique transmission node~$n_0$ with $n_0\rightarrow n_1$.++In a run of a protocol, the behavior of each strand is constrained by+a role in a protocol.  Adversarial strands are constrained by+roles as are non-adversarial strands.+A role is a sequence of message transmission+and reception terms that serves as a template for its strands.  Let+$\alg{A}_{\Sigma,\Gamma}(Y)$ be a $\Sigma,\Gamma$-term algebra+generated by variable set~$Y$.  A \emph{role} is a trace in+$(\pm\alg{A}_{\Sigma,\Gamma}(Y))^+$.  A \emph{protocol} is a set of+roles.++A strand space $(\Theta,\fn{tr})$ \emph{respects protocol}~$P$ if+there is a role mapping $\fn{rl}\colon\Theta\to P$ with the following+properties.  For each strand~$s$, $|\fn{tr}(s)|\leq|\fn{rl}(s)|$, and+there is a $\Sigma$-homomorphism+$\sigma\colon\alg{A}_{\Sigma,\Gamma}(Y)\rightarrow\alg{M}_{\Sigma,\Gamma}(X)$+such that $\sigma(\fn{rl}(s)(p))=\fn{tr}(s)(p)$ for all $0\leq+p<|\fn{tr}(s)|$.  A bundle $\bundle(\Theta,\fn{tr},\to)$ is a+\emph{run of protocol}~$P$ if $(\Theta,\fn{tr})$ respects+protocol~$P$.++In what follows, $\alg{M}_{\Sigma,\Gamma}(X)$ is replaced by term algebra+$\alg{A}_{\Sigma,\Gamma}(Z)$, where $|Z|=|X|$, so that the two+algebras are isomorphic.++Now, on to the refinement of the definitions in this section.  The+next section adds structure to message algebras using a sort system.+Later on, Definition~\ref{def:role} adds information to a role+and Definition~\ref{def:bundle} refines the notion of a run of a+protocol using the additional information.++\section{Messages}\label{sec:messages}++The {\cpsa} program implements a message algebra as an order-sorted term+algebra~\cite{GoguenMeseguer92}.  The signature of one of the+implemented algebras is given in Figure~\ref{fig:bcs}.+Sort~\dom{mesg} is the sort of all messages, the elements of the+algebras in the previous section.++The use of order-sorted algebras is a partial solution to the+following problem.  When a strand receives the+pair~$\cn{pair}(t_0,t_1)$, it can extract both~$t_0$, and~$t_1$.  When+a strand receives the encryption~$\cn{enc}(t_0,t_1)$, it can+extract~$t_0$ if it has the decryption key associated with~$t_1$.  And+if a strand receives the asymmetric key $\cn{invk}(t)$, it can never+extract~$t$.  How does the {\cpsa} program distinguish these cases?+It classifies a term by its sort and the position at which it occurs+within another term.  The sort system used to classify terms is+presented first.++Following~\cite{GoguenMeseguer92}, the set of messages used by {\cpsa}+is specified by an order-sorted signature $(S, \leq, \Sigma)$, where+$(S,\leq)$ is a partially ordered set of sort symbols, and~$\Sigma$ is+an $S^\ast\times S$-sorted family $\{\Sigma_{w,s}\mid w\in S^\ast,+s\in S\}$ of operation (or function) symbols.  The operations satisfy+the following monotonicity condition,+$f\in\Sigma_{w,s}\cap\Sigma_{w',s'}$ and $w\leq w'$ imply $s\leq s'$,+where $w\leq w'$ iff $|w|=|w'|$ and $w(i)\leq w'(i)$ for $i<|w|$.  A+variable set~$X$,\index{variable set} is an $S$-sorted+family~$X=\{X_s\mid s\in S\}$ of disjoint sets of symbols.  No symbol+is both a variable and an operation.  When $S$ and $\leq$ are clear,+we write~$\Sigma$ for $(S,\leq,\Sigma)$.++\begin{defn}[Regular Signature]\index{regular signature}+An order-sorted signature~$\Sigma$ is \emph{regular} iff given+$f\in\Sigma_{w',s'}$ and given $w''\leq w'$ in~$S^\ast$, there is a+least $(w,s)\in S^\ast\times S$ such that $w''\leq w$ and+$f\in\Sigma_{w,s}$.+\end{defn}++\begin{defn}[Order-Sorted Algebra]+Let~$(S,\leq,\Sigma)$ be an order-sorted signature.  Then an+$(S,\leq,\Sigma)$-\emph{algebra}~\alg{A} is a family $\{\alg{A}_s\mid+s\in S\}$ of sets called the \emph{carriers} of~\alg{A}, together with+a function $\alg{A}_f:\alg{A}_w\to\alg{A}_s$ for each+$f\in\Sigma_{w,s}$ where $\alg{A}_w=\alg{A}_{w(0)}\times\cdots\times+\alg{A}_{w(n-1)}$, where $n=|w|$.  Moreover,+\begin{enumerate}+\item $s\leq s'$ in~$S$ implies $\alg{A}_s\subseteq\alg{A}_{s'}$ and+\item $f\in\Sigma_{w,s}\cap\Sigma_{w',s'}$ and $w\leq+  w'$ imply $\alg{A}_f:\alg{A}_{w}\to\alg{A}_{s}$ equals+  $\alg{A}_f:\alg{A}_{w'}\to\alg{A}_{s'}$ on $\alg{A}_{w}$.+\end{enumerate}+\end{defn}++\begin{defn}[Order-Sorted Terms]+The order-sorted $\Sigma$-terms $\terms_\Sigma(X)$ generated by+variable set~$X$ is the least family $\{\terms_{\Sigma,s}(X)\mid+s\in S\}$ such that+\begin{enumerate}+\item $\Sigma_{\seq{},s}\subseteq\terms_{\Sigma,s}(X)$+and $X_s\subseteq\terms_{\Sigma,s}(X)$ for $s\in S$;+\item $\terms_{\Sigma,s'}(X)\subseteq\terms_{\Sigma,s}(X)$+  if $s'\leq s$;+\item if $f\in\Sigma_{w,s}$ and $t_i\in\terms_{\Sigma,w(i)}(X)$+  for $i<|w|$, then $f(t_0,\ldots,t_{|w|-1})\in+  \terms_{\Sigma,s}(X)$.+\end{enumerate}+\end{defn}++In~\cite{GoguenMeseguer92}, it is proved that $\terms_\Sigma(X)$+is an order-sorted algebra and when~$\Sigma$ is regular, each term has+a least sort.++An \emph{equation} is a triple $(X,t,t')$, written $t\approx t'$,+where~$X$ is a variable set and $t,t'$ are in $\terms_\Sigma(X)$ and+have the same least sort.  See~\cite{GoguenMeseguer92} on how to relax+the sort restriction.  The review of order-sorted algebras ends here.++\begin{defn}[Encryption Signature]+A regular order-sorted signature is an \emph{encryption signature} if+it contains a distinguished sort symbol~$\top$, the sort of all+messages, and a binary encryption operation $\cn{enc}$ defined so that+the least sort of every term of the form $\cn{enc}(t_0,t_1)$+is~$\top$.+\end{defn}++\begin{defn}[Strand Space Signature]+A \emph{strand space signature}~$(\Sigma, B)$ is an encryption+signature~$\Sigma$, and a non-empty subset~$B$ of sort symbols+in~$\Sigma$ such that $s\in B$ implies $s<\top$.  Each member of~$B$+is called a \emph{base sort}.  Every operation in~$\Sigma$ with a base+sorted result must have base sorted arguments.+\end{defn}++\begin{defn}[Strand Space Equations]+Equations in~$\Gamma$ for strand space signature $(\Sigma,B)$ are+\emph{strand space equations} if the least sort of the terms that+define each equation in~$\Gamma$ is a base sort in~$B$.+\end{defn}++The unification type\index{unification type} of~$\Gamma$+w.r.t.\ signature~$\Sigma$ is \emph{unitary}\index{unitary unification+  type} if every problem has a minimal complete set of unifiers that+has at most one element~\cite[Chapter~8,+  Section~3.1]{RobinsonVoronkov01}.++\begin{defn}[Strand Space Algebra]\label{def:algebra}+Given strand space signature~$(\Sigma,B)$ and strand space+equations~$\Gamma$, a \emph{strand space+  algebra}~$\alg{A}_{\Sigma,B,\Gamma}(X)$ is the quotient of+$\terms_\Sigma(X)$ by the equivalence relation on $\terms_\Sigma(X)$+derived from the equations in~$\Gamma$, where the unification type+of~$\Gamma$ w.r.t.\ signature~$\Sigma$ is unitary.+\end{defn}++\begin{figure}+\begin{center}+Base sort symbols: \dom{name}, \dom{text}, \dom{data}, \dom{skey},+\dom{akey}\\+Non-base sort symbol: \dom{mesg} (implementation of $\top$) \\[1ex]+Subsorts: \dom{name}, \dom{text}, \dom{data}, \dom{akey},+$\dom{skey}<\dom{mesg}$\\[1ex]+\begin{tabular}{@{}ll}+$\cn{enc}\colon\dom{mesg}\times\dom{mesg}\rightarrow\dom{mesg}$+&Encryption\\+$\cn{pair}\colon\dom{mesg}\times\dom{mesg}\rightarrow\dom{mesg}$+&Pairing\\+$C_i\colon\dom{mesg}$& Tag constants ($i\in\nat$)\\+$\cn{pubk}\colon\dom{name}\rightarrow\dom{akey}$+&Public key of name\\+$\cn{invk}\colon\dom{akey}\rightarrow\dom{akey}$+&Inverse of asymmetric key\\+$\cn{ltk}\colon\dom{name}\times\dom{name}\rightarrow\dom{skey}$+& Long term shared key+\end{tabular}\\[1ex]+Equation: $\cn{invk}(\cn{invk}(x))\approx x$ for $x\colon\dom{akey}$+\end{center}+\caption{Basic Crypto Signature and Equation}\label{fig:bcs}+\end{figure}++\begin{figure}+\begin{center}+\includegraphics{carriers-0.mps}\\+Carrier set of sort \dom{mesg}\\+$X_\top$: variables of sort \dom{mesg}+\caption{Basic Crypto Carrier Sets}+\label{fig:bc carrier sets}+\end{center}+\end{figure}++\begin{figure}+\begin{center}+\begin{tabular}{lll}+New base sorts:+&\dom{base}, $\dom{expn} <\dom{mesg}$\\+New operations:+&$\cn{gen}\colon\dom{base}$+&Generator\\+&$\cn{exp}\colon\dom{base}\times\dom{expn}\to\dom{base}$+&Exponentiation\\+&$\cn{mul}\colon\dom{expn}\times\dom{expn}\to\dom{expn}$+&Multiplication\\+&$\cn{one}\colon\dom{expn}$+&Unit\\+&$\cn{rec}\colon\dom{expn}\to\dom{expn}$+&Reciprocal\\+New equations:&$\cn{exp}(\cn{exp}(g,x),y)\approx\cn{exp}(g,\cn{mul}(x,y))$\\+&$\cn{exp}(g,\cn{one})\approx g$\\+&$\cn{mul}(x,y)\approx\cn{mul}(y,x)$&Commutativity \\+&$\cn{mul}(x,\cn{mul}(y,z))\approx\cn{mul}(\cn{mul}(x,y),z)$& Associativity\\+&$\cn{mul}(x,\cn{one})\approx x$&Identity\\+&$\cn{mul}(x,\cn{rec}(x))\approx \cn{one}$&Cancellation+\end{tabular}+\end{center}+\caption{Additions for Diffie-Hellman Key Exchange}\label{fig:dhke}+\end{figure}++In the remainder, the strand space signature and equations are fixed,+and its algebras are written as~$\alg{A}(X)$ and as~$\alg{A}$ when the+variable set~$X$ is available from the context, and the term algebras+as $\terms(X)$ and~$\terms$ respectively.  Relation $\equiv$ is the+equivalence relation on~$\terms_\top$ derived from the equations+in~$\Gamma$, and the equivalence class $[t]$ is $\{t'\mid t\equiv+t'\}$.  At times we conflate a term with the equivalence class of+which it is a member to simplify the presentation.  Given a sort~$s$,+$t\colon s$ asserts that $[t]\in\alg{A}_s$, and $t\colon S$ asserts+that for some~$s\in S$,~$t\colon s$.  Term~$t$ is a+\index{message}\emph{message} if $[t]\in\alg{A}_\top$.  Message~$t$ is+an \index{atom}\emph{atom} iff~$t\colon B$.  The message+$\cn{enc}(t_0,t_1)$ is written $\enc{t_0}{t_1}$.++In the Basic Crypto algebra, sort \dom{mesg} implements sort~$\top$,+and all of its other sorts are base sorts.  A term of the form+$\cn{invk}(t)$ is an atom.  Figure~\ref{fig:bc carrier sets} shows the+classification of terms in the Basic Crypto algebra.  In text, we use+comma as a right associative binary operation for pairing and $K_a$+for $\cn{pubk}(a)$, as in the caption of Figure~\ref{fig:term tree}.++\begin{thm}[Encryption Freely Generated]\label{thm:encryption}+Suppose $t,t_0,t_1\in\terms_\top$ and $\enc{t_0}{t_1}\equiv t$.  Then+there exists $t'_0,t'_1$ such that $t=\enc{t'_0}{t'_1}$, $t_0\equiv+t'_0$, and~$t_1\equiv t'_1$.+\end{thm}+\begin{proof}+Consider $\terms^0_\top(X)\subseteq \terms_\top(X)$, where+$\terms^0_\top(X)=\Sigma_{\seq{},\top}\cup X_\top\cup\bigcup_{s\in+  B}\terms_s(X)$.  Observe that the encryption operation does not+occur in $\terms^0_\top(X)$ and that $\terms^0_\top(X)$ freely+generates $\terms_\top(X)$. Thus $\alg{A}^0_\top(X)=\{[t]\mid t\in+\terms^0_\top(X)\}$ freely generates $\alg{A}_\top(X)$.  No equation+applies to messages in $\alg{A}_\top(X)\setminus\alg{A}^0_\top(X)$ and+so induction on term formation gives the result.+\end{proof}++Figure~\ref{fig:bc carrier sets} shows the carrier sets for the Basic+Crypto Algebra.++\begin{defn}[Position]+A \emph{position}~$p$ is a finite sequence of natural numbers.  The+message in~$t$ that \emph{occurs at}~$p$, written~$t\termat p$, is:+$$\begin{array}{l}+t\termat\seq{}=t;\\+f(t_0,\ldots,t_{|w|-1})\termat\seq{i}\append p=+t_i\termat p\mbox{ if }f\in\Sigma_{w,s}\mbox{ and }i<|w|.+\end{array}$$+A variable~$x\in X$ \emph{occurs in} $t\in\terms_\top(X)$ if+$x=t\termat p$ for some~$p$.+Variable~$x$ \emph{occurs in} $t\in\alg{A}_\top(X)$ if it+occurs in every member of t.+\end{defn}++Some positions within a message are distinguished.  A position~$p$+\emph{traverses a key edge} in~$t$ if $t\termat p_0=\enc{t_0}{t_1}$+and $p=p_0\append\seq{1}\append p_1$.  A position~$p$ \emph{traverses+  an atom edge} in~$t$ if $t\termat p_0=f(t_0,\ldots,t_{|w|-1})$ is an+atom and $p=p_0\append\seq{i}\append p_1$, where $f\in\Sigma_{w,s}$+and $i<|w|$.  A position is a \emph{carried position}\index{carried+  position} in~$t$ if it traverses no key or atom edge in~$t$.  In+Figure~\ref{fig:term tree}, variable~$x$ occurs at two carried+positions, but~$a$ occurs at no carried positions.++\begin{figure}+\begin{center}+\includegraphics{termtree-0.mps}+\end{center}+\vspace{-2ex}+\caption{Tree for $\enc{x}{K_a},\enc{\enc{x}{K_a}}{K_b}$}\label{fig:term tree}+\end{figure}++The concept of an accessible term is used in Definition~\ref{def:used}.++\begin{defn}[Accessible]\label{def:accessible}+Message~$t_0$ is \emph{accessible in}~$t_1$, written~$t_0\ll t_1$,+if~$t_0$ occurs at a position in~$t_1$ that traverses no atom edge.+\end{defn}++A carried term is one that can be extracted from a message reception+given the right set of decryption keys.++\begin{defn}[Carries]\label{def:carries}+Message~$t_0$ \emph{carries}~$t_1$, written~$t_1\sqsubseteq t_0$,+if~$t_1$ occurs at a carried position in~$t_0$.+\end{defn}++Carried positions respect equality modulo the equations.++\begin{defn}[Carried Positions]+\label{def:carried positions}+\index{carried positions}+Given a term~$t$, the set of positions at which~$t'$ carries~$t$ is+$\fn{carpos}(t,t')$, where+$$\fn{carpos}(t,t')=\left\{+\begin{array}{ll}+\{\seq{}\}&\mbox{if $t'\equiv t$, else}\\+\multicolumn{2}{l}{\{\seq{0}\append p \mid+p\in\fn{carpos}(t,t_0)\}}\\+& \mbox{if $t'=\enc{t_0}{t_1}$, else}\\+\multicolumn{2}{l}{\{\seq{i}\append p \mid+p\in\fn{carpos}(t,t_i),i<n\}} \\+& \mbox{if $t'=f(t_0,\ldots,t_{n-1})$ and}\\+&\mbox{$t'$ is not an atom, else}\\+\{\}&\mbox{otherwise.}+\end{array}\right.$$+\end{defn}+Note that $\fn{carpos}(x,\cn{invk}(\cn{invk}(x)))=\{\seq{}\}$, not+$\{\seq{}, \seq{0,0}\}$, and~$t'$ carries~$t$ iff $\fn{carpos}(t,t')$+is non-empty.++\begin{thm}\label{thm:carpos}+For all $t_0,t_1,t'_0,t'_1\in\terms_\top(X)$, $t_0\equiv t_1$ and+$t'_0\equiv t'_1$ implies $\fn{carpos}(t_0,t'_0)=+\fn{carpos}(t_1,t'_1)$.+\end{thm}++\begin{proof}+When $t'_0$ and $t'_1$ are atoms, the result is obvious.  Otherwise,+Theorem~\ref{thm:encryption} applies.+\end{proof}++The key insight discovered while implementing strand space algebras is+that ordinary order-sorted algebras with restricted signatures,+coupled with the \fn{carpos} function, captures the essence of strand+space algebras required to implement the {\cpsa} algorithm.+Section~\ref{sec:cow} will explain why the details of the \fn{carpos}+function are important, and why an implementation of the carries+relation does not suffice.++\begin{defn}[Strand Space with Asymmetric Encryption]+A strand space algebra $\alg{A}_{\Sigma,B,\Gamma}(X)$ with asymmetric+encryption has a signature with a distinguished base sort+symbol~$\cn{akey}$, an+operation~$\cn{invk}\colon\cn{akey}\to\cn{akey}$, and~$\Gamma$+contains the equation $\cn{invk}(\cn{invk}(x))\approx x$ for+$x\colon\dom{akey}$.+\end{defn}++\begin{defn}[Inverse Key]+For a strand space with asymmetric encryption, the decryption key of+encryption~$\enc{t_0}{t_1}$ is~$\fn{inv}(t_1)$, where+$$\fn{inv}(t) =\left\{+\begin{array}{ll}+\cn{invk}(t)&\mbox{if $t\colon\dom{akey}$;}\\+\mbox{undefined}&\mbox{if $t$ is a variable of sort $\top$;}\\+t&\mbox{otherwise.}+\end{array}\right.$$+\end{defn}++\index{substitutions} Both unification and matching are used to solve+equations.  First, a few more definitions from~\cite{GoguenMeseguer92}+and~\cite{RobinsonVoronkov01}.  Given two $S$-sorted variable sets~$X$+and~$Y$, an \emph{order-sorted substitution} is an $S$-sorted+map~$\sigma\colon X\rightarrow\alg{A}(Y)$ such that $\sigma(x)\neq x$+for only finite many elements of~$X$.  For a substitution~$\sigma$,+the \index{domain of substitution}\emph{domain} is the set of+variables $\fn{Dom}(\sigma)=\{x\mid \sigma(x)\neq x\}$ and the+\index{range of substitution}\emph{range} is the set of terms+$\fn{Ran}(\sigma)=\{\sigma(x)\mid x\in\fn{Dom}(\sigma)\}$.+Substitution~$\sigma_0$ is \index{more general substitution}\emph{more+  general than}~$\sigma_1$, written~$\sigma_0\unlhd\sigma_1$, if there+exists a substitution~$\sigma_2$ such that+$\sigma_1(x)\equiv\sigma_2(\sigma_0(x))$ for $x\in X$, the variable+set that generates the term algebra.  It is possible to have+$\sigma_0\unlhd\sigma_1$ and $\sigma_1\unlhd\sigma_0$.  In this case,+$\sigma_1=\sigma_2\circ\sigma_0$ and $\sigma_0=\sigma_2'\circ+\sigma_0$ where $\sigma_2$ and~$\sigma_2'$ are renamings.  That is,+$Dom(\sigma_2)=Ran(\sigma_2)$ and likewise for~$\sigma_2'$.  In this+case we say that $\sigma_0$ and $\sigma_1$ are renamings of each+other.  Given an $S$-sorted map~$\varphi\colon+X\rightarrow\alg{A}(Y)$, the unique order-sorted+$\Sigma$-homomorphism\index{homomorphism!order-sorted}+$\varphi^\ast\colon\alg{A}(X)\rightarrow\alg{A}(Y)$ induced+by~$\varphi$ is also denoted~$\varphi$.++The algorithms used to solve unification and matching problems+typically solve many equations at once.  To facilitate this+requirement, algebras provide functions with the following signatures.+\index{unify}\index{match}+$$\begin{array}{l}+\fn{unify}\colon+\mathcal{T}_\top(X)\times\mathcal{T}_\top(X)\times+(X\rightarrow\mathcal{T}_\top(X))\rightarrow+(X\rightarrow\mathcal{T}_\top(X))^\ast\\+\fn{match}\colon+\mathcal{T}_\top(X)\times\mathcal{T}_\top(Y)\times+(X\rightarrow\mathcal{T}_\top(Y))\rightarrow+(X\rightarrow\mathcal{T}_\top(Y))^\ast+\end{array}$$++Suppose $\sigma_0$ has the property that $\sigma_0(t_i)\equiv+\sigma_0(t_i')$ for~$i < n$.  Then $\sigma_1(t_i)\equiv \sigma_1(t_i')$+for~$i \leq n$ if $\sigma_1\in\fn{unify}(t_n,t'_n,\sigma_0)$.  The+$\fn{unify}$ function has this property:+$$\fn{unify}(t_0,t_1,\sigma_0)=\{\comp{\sigma_1}{\sigma_0}\mid+\sigma_1\in\fn{unify}(\sigma_0(t_0),\sigma_0(t_1),\idsigma)\},$$+where~$\idsigma$ is the identity substitution.  Furthermore, it must+produce a minimal complete set of unifiers.++\begin{lem}[Order of Unification]\label{lem:unification}+Suppose that the underlying message algebra has single most general unifiers+for any two unifiable terms.  Suppose also that+$\fn{unify}(t_0,t_1,\idsigma)=\{\sigma_0\}$ and that+$\fn{unify}(s_0,s_1,\idsigma)=\{\sigma_1\}$.  Then+$\fn{unify}(s_0,s_1,\sigma_0)\cong \fn{unify}(t_0,t_1,\sigma_1)$.+That is, when one side exists so does the other, and the two+substitutions will be renamings of each other.+\end{lem}++A proof of this result can be found for example in~\cite{BaaderNipkow98}.+By a simple induction, given any system of equations,+$E=\{t_1\eqq t_1',\ldots,t_n\eqq t_n'\}$, we may solve them in+any order and we will end up with the same substitution (up to+renaming).++This justifies more general definitions that will be used later.+Let $A_0$ be a set of terms which you would like to jointly unify.+That is, $A_0$ represents the equations $\{t_i\eqq t_j\mid t_i,t_j\in A_0\}$.+Then we may define+$\fn{Unif}(A_0,\sigma)=\fn{unify}(t_{n-1},t_n,\fn{unify}(\dots ,\fn{unify}(t_0,t_1,\sigma)\dots)).$+By Lemma~\ref{lem:unification} this definition does not depend on the order+of the terms $t_0,\dots,t_n$.  The result will be the same up to renaming+for any ordering of the terms.+It then follows by further induction that+$\fn{Unif}(A_1,\fn{Unif}(A_0,\sigma))\cong \fn{Unif}(A_0,\fn{Unif}(A_1,\sigma))$.+This justifies the more general definition+$$U(A_0,\dots,A_n;\sigma)=\fn{Unif}(A_n,\fn{Unif}(\dots ,\fn{Unif}(A_0,\sigma)\dots)).$$+Again we could have defined it in terms of any order of the+sets $A_0,\dots,A_n$.  The result might be a different substitution+but it would be a renaming of the one defined.++\iffalse+When solving a system of equations $E=\{t_1\eqq t_1',\ldots,t_n\eqq+t_n'\}$, we rely on the fact that the order is which the equations are+solved is irrelevant in the following sense.  Let $\mcsu(E)$ be a+minimal complete set of unifiers that solves~$E$,+i.e.\ $\sigma\in\mcsu(E)$ and $t\eqq t'\in E$ implies $\sigma(t)\equiv+\sigma(t')$.  Let $E=E_0\uplus E_1$ be a partition of~$E$, and+let~$S=\{\sigma_1\circ\sigma_0\mid\sigma_0\in\mcsu(E_0)\land+\sigma_1\in\mcsu(\sigma_0(E_1))\}$.  Then~$S$ is a complete set of+unifiers that solve~$E$.+\fi++\subsection*{Discussion}++The message algebra that appears in strand space+papers~\cite{ThayerEtal99,GuttmanThayer02} was not implemented because+there is no syntactic method that can be used to determine if an+encryption denotes symmetric or asymmetric encryption.  The signature+in Figure~\ref{fig:bcs} resolves this problem.++The OSA conjecture of this paper is that the results in every strand+space paper would remain unchanged if it used algebras from+Definition~\ref{def:algebra} as long as unification in the algebra+produces at most one most general unifier.  Notice there is no+prohibition on constants being atoms in the definition of a strand+space algebra in this paper, in contrast with the algebras defined in+other papers.++Readers of this paper are encouraged to consider other algebras, such+as those that contain an Abelian group and modular exponentiation.+Such algebras allow the analysis of Diffie-Hellman Key Exchange, for+example.  See Figure~\ref{fig:dhke}.++Some strand space papers defined the word occurs to mean carried by.+This document uses it to assert a message is within another message.++\section{Data Structures}\label{sec:data structures}++The data structures used in the implementation are modeled as elements+in an order-sorted term algebra.  The signature for the algebra is the+extension of a strand space signature shown in+Table~\ref{tab:strands}.  In this specification, it is assumed the+strand space signature uses the sort symbol \dom{mesg} to implement+sort~$\top$.++\begin{table}+\begin{center}+Additional sort symbols: \dom{atom}, \dom{evt}, \dom{role}, \dom{maplet},\\+\dom{instance}, \dom{node}, \dom{ordering}, and \dom{preskel} \\[1ex]+Subsorts: for each $s\in B, s\leq\dom{atom} < \dom{mesg}$\\[1ex]+$\begin{array}{rl}+\outbnd\colon\dom{mesg}\rightarrow\dom{evt}\hspace{2\arraycolsep}+\inbnd\colon\dom{mesg}\rightarrow\dom{evt}&+\cn{r}\colon\dom{evt}\dom{list}\times\dom{atom}\dom{set}\times+\dom{atom}\dom{set}\rightarrow\dom{role}\\+\cn{m}\colon\dom{mesg}\times\dom{mesg}\rightarrow\dom{maplet}&+\cn{i}\colon\dom{role}\times\dom{nat}\times\dom{maplet}\dom{set}+\rightarrow\dom{instance}\\+\cn{n}\colon\dom{nat}\times\dom{nat}\rightarrow\dom{node}+&\cn{o}\colon\dom{node}\times\dom{node}\rightarrow\dom{ordering}+\end{array}$\\+$\cn{k}\colon\dom{role}\dom{set}\times+\dom{instance}\dom{list}\times+\dom{ordering}\dom{set}\times\dom{atom}\dom{set}\times+\dom{atom}\dom{set}\rightarrow\dom{preskel}$\\[1ex]+\begin{tabular}{rl}+\dom{mesg}& the sort of all messages (implementation of $\top$)\\+\dom{atom}& the sort of all base sorted messages\\+\dom{evt}& a transmission or reception event\\+\dom{trace}& a sequence of events used in a role\\+\dom{role}& a trace, a non-originating set, and a uniquely-originating+set\\+\dom{protocol}& a set of roles\\+\dom{nat}& a natural number\\+\dom{maplet}& a map from a role variable to a preskeleton term\\+\dom{instance}& a strand's trace and inheritance as instantiated from a role\\+\dom{node}& a pair of numbers, a strand identifier and a strand position\\+\dom{ordering}&a causal ordering between a pair of nodes\\+\dom{preskel}& a preskeleton+\end{tabular}+\end{center}+\caption{{\cpsa} Signature}\label{tab:strands}+\end{table}++Every element of the sort \dom{atom} is intended to be an element of+some base sort.  Furthermore, elements of the other sorts added by a+{\cpsa} signature correctly model an implementation when there are no+variables of those sorts.  As a result, the algebras that model an+implementation are {\cpsa} algebras.++\begin{defn}[{\cpsa} Algebra]\label{def:cpsa algebra}+\index{CPSA@{\cpsa} algebra} Consider the class of+$\Sigma,\Gamma$-algebras, algebras over {\cpsa} signature~$\Sigma$+that satisfy equations~$\Gamma$.  Algebra~$\alg{C}(X)$ is a+\emph{{\cpsa} algebra} if it is a free $\Sigma,\Gamma$-algebra+generated by variable set~$X$, and the variable set~$X$ has the+following property.  For sort~$s$, $X_s$ is empty when~$s$ is+\dom{atom}, \dom{evt}, \dom{role}, \dom{maplet}, \dom{instance},+\dom{node}, \dom{ordering}, and \dom{preskel}.+\end{defn}++Section~\ref{sec:protocols} on protocols defines events (\dom{evt}),+traces (\dom{env} \dom{list}), and roles (\dom{role}).+Section~\ref{sec:executions} on executions defines instances+(\dom{instance}) and role substitutions (\dom{maplet} \dom{set}).+Section~\ref{sec:skeletons} on skeletons defines, nodes (\dom{node}),+node orderings (\dom{ordering} \dom{set}), and preskeletons+(\dom{preskel}).++\section{Algorithms as Term Reduction Systems}\label{sec:algorithms}++Algorithms in this paper are specified as abstract+reduction systems~\cite[Chapter~2]{BaaderNipkow98}.  A reduction+system is a pair $(A,\to)$, where reduction~$\to$ is a binary relation+$\mathord{\to}\subseteq A\times A$.  Element $x\in A$ is a+\emph{normal form} if there is no~$y$ such that $x\to y$.  The+transitive closure of~$\to$ is~$\to^+$.  The reflexive transitive+closure of~$\to$ is~$\to^\ast$.  A reduction is confluent if+$x\to^\ast y_0$ and $x\to^\ast y_1$ implies there is a~$z$ such that+$y_0\to^\ast z$ and $y_1\to^\ast z$.  A reduction is terminating if+there are no infinite descending chains.  A reduction is convergent if+it is confluent and terminating.++Let $\alg{K}$ be $\alg{A}_{\dom{preskel}}(X)$.  Algorithms are+specified as reduction systems of the form $(\alg{K},\to)$, which are+then used to specify a related setwise reduction system of the form+$(\pow{\alg{K}},\mathord\twoheadrightarrow)$.  Setwise reduction+systems are the ones with the interesting normal forms and confluence+properties.  In a setwise reduction system, reduction rewrites one+element of a set to a set of elements.++\begin{defn}[Setwise Reduction System]+The \emph{setwise reduction system} of binary relation+$\rightsquigarrow\subseteq\alg{K}\times\pow{\alg{K}}$ is a reduction+system $(\pow{\alg{K}},\twoheadrightarrow)$, where for each+$K_0\in\pow{\alg{K}}$, $K_0\twoheadrightarrow K_1$ if for some $k_0\in+K_0$, $k_0\rightsquigarrow K_2$, $K_1=K_2\cup (K_0\setminus\{k_0\})$,+and $K_1\neq K_0$.+\end{defn}++The {\cpsa} algorithm will be specified as a setwise term reduction+system, where the initial problem is given a singleton+in~$\pow{\alg{K}}$, and the answers computed by an implementation of+the algorithm are a normal form of the setwise reduction+relation~$\twoheadrightarrow_k$ defined in Section~\ref{sec:skeleton+  reduction}.++In what follows the relation $k\rightsquigarrow K$ is defined in terms+of $\to\subseteq\alg{K}\times\alg{K}$ by specifying+$\{k\}\twoheadrightarrow K$ using~$\to$, so the $\rightsquigarrow$+relation is not explicitly defined.++We regard sets of preskeletons as factored by isomorphism, where each+set has at most one representative of the equivalence class of+isomorphic preskeletons.  The definition of isomorphic preskeletons+is given in Definition~\ref{def:homomorphism}.++\section{Protocols}\label{sec:protocols}++A protocol defines the patterns of allowed behavior for each+participant in an execution of the protocol.  Protocol participants+send and receive messages.++\begin{defn}[Event]+An \emph{event} is either a message transmission or a reception.+Formally, an event is a pair~$(d,t)$ with $t\in\alg{A}_{\top}$ and~$d$+one of the symbols~$\outbnd$ or~$\inbnd$.  A positive+message~$\outbnd t$ is \index{outbound}\emph{outbound}, and a negative+message~$\inbnd t$ is \index{inbound}\emph{inbound.}+\end{defn}++In a {\cpsa} algebra, an event is a term of sort \dom{evt}.++\begin{defn}[Trace]+A \emph{trace} is a non-empty sequence of events, an+element of $(\pm\alg{A}_{\top})^+$+\end{defn}++In a {\cpsa} algebra, a trace is a term of sort \dom{evt} \dom{list}.++\begin{defn}[Originates]+A message \emph{originates} in a trace if it is carried by some+event and the first event in which it is carried is outbound.+\end{defn}++\begin{defn}[Acquired]+A variable is \emph{acquired} by a trace if it first occurs in an+inbound message and is also carried by that message.+\end{defn}++The next definition describes syntactic constraints on+``uniquely-originating'' and ``non-originating'' atoms.  The meaning+of these adjectives is not revealed until Definition~\ref{def:bundle}.++\begin{defn}[Role]\label{def:role}+A \emph{role}~$r$ consists of a trace~$\fn{rtrace}(r)$, a set of+non-originating atoms~$\fn{rnon}(r)$, and a set of uniquely+originating atoms~$\fn{runique}(r)$.  The variable set~$\fn{rvar}(r)$+of the role is the set of variables that occur in~$\fn{rtrace}(r)$.+The following properties hold.+\begin{enumerate}+\item Each uniquely originating atom originates in the trace.+\item Each non-originating atom is not carried by any event in the+  trace, and each variable that occurs in the atom occurs in the+  trace.+\item Every non-base sorted variable is acquired by the trace.+\end{enumerate}+\end{defn}++In a {\cpsa} algebra, a role is a term of the form~$\cn{r}(C,N,U)$,+where+$$\begin{array}{r@{}c@{}l}+\fn{rtrace}(\cn{r}(C,N,U))&{}={}&C,\\+\fn{rnon}(\cn{r}(C,N,U))&{}={}&N,\\+\fn{runique}(\cn{r}(C,N,U))&{}={}&U.+\end{array}$$++\begin{defn}[Protocol]+A \emph{protocol} is a set of roles with pairwise disjoint variable sets.+\end{defn}++\subsection*{Discussion}++The refinement of strand space protocols is mostly just a change in+representation for the same information.  The change is motivated by+the way protocols are used.  In this refinement, a protocol is defined+without reference to the concept of a strand, a node, or a strand+space.++In~\cite{DoghmiGuttmanThayer07}, a protocol is a triple+$(\Pi,\fn{strand\_non},\fn{strand\_unique})$, where~$\Pi$ is a finite+set of strands, \fn{strand\_non} and \fn{strand\_unique} map a strand+to a set of atoms, and the mappings have properties analogous to the+ones in the Definition~\ref{def:role}, the definition of a role.  The+set of roles is $\{r\mid s\in\Pi, \fn{rtrace}(r)=\fn{tr}(s),+\fn{runique}(r)=\fn{strand\_unique}(s), \fn{rnon}(r)=+\fn{strand\_non}(s)\}$.++In~\cite{DoghmiGuttmanThayer07}, non-originating messages were assumed+to be keys of the form~$K$ or~$K^{-1}$, thereby excluding long term+shared symmetric keys of the form $\cn{ltk}(A,B)$.  The definition of+role allows symmetric keys to be assumed to be non-originating.++\section{Executions}\label{sec:executions}++Executions of a protocol are formalized by a bundle, which is+described in this section.  A key difference in this approach to+formalizing strand spaces is that the parameters used to instantiate a+strand's trace from a role are preserved, so as to support role+origination assumptions.++\begin{defn}[Instance]+An \emph{instance}~$i$ consists of a role $\fn{role}(i)$, a positive+number $\fn{height}(i)$, and an order-sorted substitution+$\fn{subst}(i)$.  Let~$r$,~$h$, and~$\sigma$ be the role, height, and+substitution for a given instance~$i$.  Let $C|_h$ be the prefix of+sequence~$C$ of length~$h$.  The following properties hold.+\begin{enumerate}+\item The height of an instance cannot exceed the length of it's+  role's trace.+\item $\fn{Dom}(\sigma)$ is the set of variables that occur in+  $\fn{rtrace}(r)|_h$.+\item No variable in an instance's role may occur in+  $\fn{Ran}(\sigma)$.+\end{enumerate}+\end{defn}++In a {\cpsa} algebra, an instance is a term of the form~$\cn{i}(r,h,M)$+where+$$\begin{array}{r@{}c@{}l}+\fn{role}(\cn{i}(r,h,M))&{}={}&r,\\+\fn{height}(\cn{i}(r,h,M))&{}={}&h,\\+\fn{subst}(\cn{i}(r,h,M))&{}={}&\sigma+\end{array}$$+and $\sigma(x)=y$ for each $\cn{m}(x,y)\in M$.++\begin{defn}[Trace of Instance]+The trace of an instance~$i$, $\fn{trace}(i)$, is a sequence of+length $\fn{height}(i)$ such that for $\sigma=\fn{subst}(i)$ and all+$j<\fn{height}(i)$,+$\fn{trace}(i)(j)=\sigma(\fn{rtrace}(\fn{role}(i))(j))$.+\end{defn}++For every instance~$i$, the definitions imply that the set of+variables that occur in $\fn{trace}(i)$ is a subset of the set of+variables that occur in $\fn{Ran}(\fn{subst}(i))$.  The Diffie-Hellman+algebra provides an example in which the subset relation is proper.+Consider a role with a trace of $\seq{\cn{exp}(x,\cn{mul}(y,z))}$.+The definitions allow an instance of the role with height one and+substitution $\{x\mapsto a, y\mapsto\cn{mul}(b,d),+z\mapsto\cn{mul}(c,\cn{rec}(d))\}$, giving the instance a trace of+$\seq{\cn{exp}(a,\cn{mul}(b,c))}$.++\begin{defn}[Instance Origination Assumptions]+Let $\sigma=\fn{subst}(i)$ for an instance~$i$.  Instance~$i$ inherits+the non-origination assumption~$\sigma(t)$+if~$t\in\fn{rnon}(\fn{role}(i))$, and the variables in~$t$ are in+$\fn{Dom}(\sigma)$.  Instance~$i$ inherits+the unique origination assumption~$\sigma(t)$+if~$t\in\fn{runique}(\fn{role}(i))$, and~$\sigma(t)$ is carried in+an event in $\fn{trace}(i)$.+\end{defn}++\begin{defn}[Strand Space~\protect{\cite[Definition~2.2]{ThayerEtal99}}]+A \emph{strand space} over algebra~$\alg{A}_{\top}$ is a set~$\Theta$+together with a trace mapping $\fn{tr}\colon\Theta\to+(\pm\alg{A}_{\top})^+$.+\end{defn}++In this document, a strand set~$\Theta$ is an initial segment of the+natural numbers, so a trace mapping is a sequence.  Thus a strand+space is the trace sequence $\fn{tr}:((\pm\alg{A}_{\top})^+)^+$, and+its strand set is the domain of $\fn{tr}$.++A finite sequence of instances~$I$ is a \emph{protocol respecting+  strand space}.  The strand space of~$I$ is $\fn{tr}=\fn{trace}\circ+I$.  By construction, the trace of each strand is an instance of a+role.++The variable set $\fn{var}(I)$ is the set of variables that occur in+the range of the substitution of its instances.  In what follows,+definitions are simplified by assuming the variable set associated+with an instance sequence is disjoint from the set of variables that+occur in its roles.++\begin{defn}[Strand Space Nodes]+The set of \emph{nodes} of~$I$ is $\fn{nodes}(I)=\{(s,p)\mid s<|I|,+p<\fn{height}(I(s))\}$.  The event at a given node is+$\fn{evt}(I,(s,p))=\fn{trace}(I(s))(p)$.  A node is \emph{transmitting}+if its event is outbound, otherwise it is \emph{receiving}.+The message at a node is written $\fn{msg}(I,n)$.+\end{defn}++\begin{defn}[Strand Succession]+The \emph{strand succession relation}~$\Rightarrow$ is+$\{(s,p)\Rightarrow(s,p+1)\mid s<|I|, p<\fn{height}(I(s))-1\}$.+\end{defn}++\begin{defn}[Bundle]\label{def:bundle}+A \emph{protocol respecting bundle} $\bundle(I,\to)$ is a directed+acyclic graph, where the vertices are the nodes of~$I$, and an edge+represents communication~($\rightarrow$) or strand+succession~($\Rightarrow$).  For communication, $n_0\rightarrow n_1$+only if there is a message~$t$ such that~$\fn{evt}(I,n_0)=\outbnd t$+and~$\fn{evt}(I,n_1)=\inbnd t$.  For each reception node~$n_1$, there+is a unique transmission node~$n_0$ with $n_0\rightarrow n_1$.+Finally, each inherited uniquely originating atom originates on its+trace and on no other, and no event in a trace carries an inherited+non-originating atom.+\end{defn}++Notice that no non-base sorted variables may occur in the trace of an+instance in a bundle.++\begin{defn}[Causal Order]+Each acyclic graph has a transitive asymmetric relation~$\prec$ on its+vertices.  The relation specifies the causal ordering of nodes in a+bundle.  Relation~$R$ on set~$S$ is \index{asymmetric+  relation}\emph{asymmetric} iff $x\mathbin{R}y$ implies not+$y\mathbin{R}x$ for all distinct $x,y \in S$.+\end{defn}++\begin{defn}[Unique Origination]+An atom uniquely originates in a execution if it originates on exactly+one trace.+\end{defn}++\begin{defn}[Non-Originating]+An atom is non-originating in an execution if the atom occurs in some+trace but is not carried by any trace.+\end{defn}++\subsection*{Discussion}++Strand space papers use the word positive to describe an outbound+message or a transmitting node, and the word negative to describe an+inbound message or a receiving node.  The adjectives used in this+paper were selected because they are mnemonic.++\section{Skeletons}\label{sec:skeletons}++Strands in executions represent both adversarial and non-adversarial+behaviors.  A strand that represents adversarial behavior is called a+\index{penetrator strand}\emph{penetrator} strand.  The roles+available to a penetrator are determined by the message signature.+For the Basic Crypto Signature in Figure~\ref{fig:bcs}, the traces of+the roles are in Figure~\ref{fig:pen}.  Penetrator roles make no+origination assumptions.++\begin{figure}+$$\begin{array}{l}+\fn{base}(t)=\seq{\outbnd t},\mbox{ where $t$ is an atom}\\+\fn{tag}(t)=\seq{\outbnd t},\mbox{ where $t$ is a tag}\\+\fn{cat}(t_0,t_1)=\seq{\inbnd t_0,\inbnd t_1, \outbnd(t_0,+  t_1)}\\+\fn{sep}(t_0,t_1)=\seq{\inbnd(t_0, t_1),\outbnd+    t_0,\outbnd t_1}\\+\fn{enc}(t_0,t_1)=\seq{\inbnd t_0,\inbnd t_1,+\outbnd\enc{t_0}{t_1}}\\+\fn{dec}(t_0,t_1)=\seq{\inbnd\enc{t_0}{t_1},+\inbnd t_2,\outbnd t_0},\mbox{ where $t_2=\fn{inv}(t_1)$}+\end{array}$$+\caption{Penetrator Traces}\label{fig:pen}+\end{figure}++A non-adversarial strand is called \index{regular strand}+\emph{regular}.  A typical protocol contains a small finite+set of roles used by regular strand.  In addition, a regular strand+may be an instance of a listener role.  For a given message~$t$, a+listener's trace is~$\seq{\inbnd t,\outbnd t}$.  A listener strand is+used to assert that a message is not a secret and is available from+the penetrator.\index{listener strand}++The {\cpsa} program uses a skeleton to represent the regular behavior+that might make up part of an execution.++\begin{defn}[Preskeleton]+A \emph{preskeleton}~$k$ consists of instance sequence+$\fn{insts}(k)$, a transitive asymmetric node ordering~$\kprec{k}$, a+set of uniquely originating atoms $\fn{unique}(k)$, and a set of+non-originating atoms $\fn{non}(k)$.  The following properties hold.+\begin{enumerate}+\item The relation~$\kprec{k}$ includes strand succession~($\Rightarrow$).+\item Each atom in $\fn{unique}(k)$ is carried in the trace of some+  instance in $\fn{insts}(k)$.+\item Every inherited unique origination assumption is in+  $\fn{unique}(k)$, and each inherited atom originates on the+  inheriting strand.+\item Each atom in $\fn{non}(k)$ is not carried by an event in the+  trace of some instance in $\fn{insts}(k)$, and each of+  variable that occurs in the atom occurs in some trace.+\item Every inherited non-origination assumption is in $\fn{non}(k)$.+\end{enumerate}+\end{defn}++The set $\alg{K}(X)$ is the set of preskeletons~$k$ such that+$\fn{var}(\fn{insts}(k))\subseteq X$, written~$\alg{K}$ when the+variable set~$X$ is available from the context.  To simplify notation,+let $\fn{ht}(k,s)=\fn{height}(\fn{inst}(k)(s))$.++In a {\cpsa} algebra, a preskeleton is a term of the+form~$\cn{k}(P,I,O,N,U)$ where+$$\begin{array}{r@{}c@{}l}+\fn{insts}(\cn{k}(P,I,O,N,U))&{}={}&I,\\+\fn{non}(\cn{k}(P,I,O,N,U))&{}={}&N,\\+\fn{unique}(\cn{k}(P,I,O,N,U))&{}={}&U.+\end{array}$$+The implementation of a preskeleton keeps track of its protocol as a+set of roles, $P$, but we ignore the protocol here as well as the fact+in a well formed preskeleton, the role of every instance is an element+of~$P$.  The implementation of a preskeleton node ordering is not so+obvious.  For preskeleton~$k$, only a subset of~$\kprec{k}$ is+explicit: $\cn{o}(n_0,n_1)\in O$ if $n_0\kprec{k}n_1$,~$n_0$ and~$n_1$+are on different strands,~$n_0$ is transmitting, and~$n_1$ is+receiving.++To ease the task of isomorphism testing (Section~\ref{sec:preskeleton+  reduction}) and generalization by weakening+(Section~\ref{generalization}), the implementations normalizes a+preskeleton by performing the transitive reduction on~$O$.  The+transitive reduction of a relation is the minimal relation such that+both have the same transitive closure.++\begin{defn}[Hulled Preskeleton]+A preskeleton~$k$ is a \emph{hulled preskeleton} if each atom in+$\fn{unique}(k)$ originates in at most one trace.+\end{defn}++Let $\orig(k,t)$ be the set of nodes at which~$t$ originates in~$k$,+and~$\acqu(k,t)$ be the set of nodes at which~$t$ is acquired in~$k$.++\begin{defn}[Skeleton]+A preskeleton~$k$ is a \emph{skeleton} if each atom in+$\fn{unique}(k)$ originates in at most one trace, and the node of+origination precedes each node that acquires the atom, i.e.\@ for+every~$t\in\fn{unique}(k)$, $n_0\in\orig(k,t)$ and $n_1\in\acqu(k,t)$+implies~$n_0\kprec{k}n_1$.+\end{defn}++\begin{defn}[Preskeleton Homomorphism]\label{def:homomorphism}+\index{homomorphism!preskeleton}+There is a \emph{preskeleton homomorphism} from~$k_0$ to~$k_1$,+written~$k_0\homomorphism{\phi,\sigma}k_1$, if~$\phi$ and~$\sigma$ are+structure-preserving maps with the following properties:+\begin{enumerate}+\item $\phi$ maps strands of~$k_0$ into those of~$k_1$, and nodes as+$\phi((s,p))=(\phi(s),p)$;+\item $\sigma$ is a $\Sigma$-homo\-morph\-ism;+\item $n\in\fn{nodes}(k_0)$ implies $\sigma(\fn{evt}(\fn{insts}(k_0),n))\equiv+  \fn{evt}(\fn{insts}(k_1),\phi(n))$;+\item $n_0\kprec{k_0}n_1$ implies $\phi(n_0)\kprec{k_1}\phi(n_1)$;+\item $\sigma(\fn{non}(k_0)) \subseteq \fn{non}(k_1)$;+\item $\sigma(\fn{unique}(k_0)) \subseteq \fn{unique}(k_1)$;+\item $t\in \fn{unique}(k_0)$ implies+  $\phi(\orig(k_0,t))\subseteq\orig(k_1,\sigma(t))$.+\end{enumerate}+A homomorphism is \index{homomorphism!strandwise injective}\emph{strandwise+  injective} if its strand map is injective.  Two preskeletons are+isomorphic if they are related by strandwise injective homomorphism in+both directions.+\end{defn}++The last condition ensures that if $t\in unique(k_0)$ originates+at $(s,p)$ then when we apply $\sigma$ to the strand $s$, $\sigma(t)$+neither originates nor is acquired at $(\sigma(s),j)$ for $j<p$+($\sigma(t)$ can never originate or be acquired later).  In other words,+$\sigma$ alone will either satisfy or violate the last clause.++\begin{defn}[Homomorphism Composition]\label{def:composition}+Let $k_0\homomorphism{\psi_0}k_1\homomorphism{\psi_1}k_2$ where+$\psi_0 = (\phi_0,\sigma_0)$ and $\psi_1=(\phi_1,\sigma_1).$  Then the+composition  of $\psi_0$ and $\psi_1$ is defined as+$\psi_1\circ\psi_0 = (\phi_1\circ\phi_0,\sigma_1\circ\sigma_0)$+where $k_0\homomorphism{\psi_1\circ\psi_0}k_2$.+\end{defn}++Since homomorphisms may arbitrarily add some structure such as adding terms+to $unique$ and $non$, it is possible to have+$k_0\homomorphism{\phi,\sigma}k_1$ and $k_0\homomorphism{\phi,\sigma}k_2$+with $k_1\ne k_2$.+For example $k_1$ and $k_2$ could be identical except that $non(k_1)\subsetneq+non(k_2)$.  We would like to be able to talk about the image of $k_0$+under $(\phi,\sigma)$.++\begin{defn}[Image of Homomorphism]\label{def:image}+Preskeleton $k_1$ is the \emph{image of $k_0$ under $\psi=(\phi,\sigma)$}+written $\psi(k_0)=k_1$ iff+\begin{enumerate}+\item $k_0\homomorphism{\phi,\sigma}k_1$+\item $\kprec{k_1}=\phi(\kprec{k_0})^*$+\item $\fn{unique}(k_1)=\sigma(\fn{unique}(k_0))$+\item $\fn{non}(k_1)=\sigma(\fn{non}(k_0))$+\item $\fn{ht}(k_1,\phi(s))=\max \{\fn{ht}(k_0, s')\mid \phi(s')=\phi(s)\}$+ for $s<|\fn{inst}(k_0)|$+\item $\phi$ is surjective+\end{enumerate}+\end{defn}++This definition guarantees that the image does not contain extra strands or+nodes, and that it only contains ordering relations and origination assumptions+necessary for $\psi$ to be a homomorphism.  Whenever there is a skeleton $k_1$+such that $k_0\homomorphism{\psi}k_1$, then $\psi(k_0)$ is well-defined, and+we can view $\psi(k_0)$ as being included into $k_1$.  That is,+$k_0\homomorphism{\psi}\psi(k_0)\homomorphism{\idphi,\idsigma}k_1$.++Given $(\idphi,\sigma)$, it is still possible for $(\idphi,\sigma)(k_0)$ not+to exist because $\sigma$ may violate the last clause of+Definition~\ref{def:homomorphism}.  However, if there is some $\phi$+for which $(\phi,\sigma)(k_0)$ is well-defined, then $(\idphi,\sigma)(k_0)$+is also well-defined.++\begin{lem}\label{lem:decompose}+If $k_0\homomorphism{\phi,\sigma}k_1$, then there is a preskeleton $k$ such+that $k_0\homomorphism{\phi_{id},\sigma}k\homomorphism{\phi,\sigma_{id}}k_1$.+\end{lem}++\begin{proof}+Let $k=(\idphi,\sigma)(k_0)$.  Then the+homomorphism $k\homomorphism{\phi,\sigma_{id}}k_1$ is well-defined which the+reader can easily check by verifying each of the seven clauses of+Definition~\ref{def:homomorphism}.+\end{proof}++\begin{cor}\label{cor:commute}+If $k_0\homomorphism{\phi,\sigma_{id}}k_1\homomorphism{\phi_{id},\sigma}k_2,$+then there is a preskeleton $k$ such that+$k_0\homomorphism{\phi_{id},\sigma}k\homomorphism{\phi,\sigma_{id}}k_2$.+\end{cor}++\begin{proof}+We can compose the two homomorphisms to see that+$k_0\homomorphism{\phi,\sigma}k_2$.  We then apply the previous lemma to find $k$.+\end{proof}++\begin{note}+The following definition is frivolous as it is not used anywhere.+We're just trying out definitions to explore links to category theory.+\end{note}++\begin{defn}[{\cpsa} Category]\label{def:cpsa category}+\index{CPSA@{\cpsa} category}+Let $\alg{C}(X)$ be a {\cpsa} algebra+generated by~$X$ (see Definition~\ref{def:cpsa algebra}), and+$\alg{K}(X)$ be  a free+algebra defined by the carrier set for sort \dom{preskel}+in~$\alg{C}(X)$.  In a {\cpsa} category+\begin{enumerate}+\item $\alg{K}(X)$ is an object, for each variable set~$X$,+\item the set of arrows is $(\nat\to\nat)\times+(\alg{A}_\top(X)\to\alg{A}_\top(Y))$, where the second component is a+  homomorphism of the message algebra,+\item Definition~\ref{def:homomorphism} defines the domain and the+  codomain of each arrow,+\item component function composition defines arrow composition, and+\item component identity functions define the arrow identity.+\end{enumerate}+\end{defn}++\begin{defn}[Pruned Skeleton]+A skeleton~$k$ has a set of \emph{redundant strands}~$S$ if there is a+substitution~$\sigma$ that is a renaming for every variable in the+trace of a strand not in~$S$, a strand mapping~$\phi$ such that $s\in+S$ implies there is some $s'\notin S$ such that $\phi(s)=\phi(s')$+and the height of~$s$ is no greater than the height of~$s'$, a+skeleton~$k'$ such that $k\homomorphism{\phi,\sigma}k'$ where+$k'=(\phi,\sigma)(k)$, and a+homomorphism $k'\homomorphism{\phi',\sigma'}k$ such that+$\sigma\circ\sigma'=\idsigma$ and $\phi\circ\phi'=\idphi$.  A+skeleton~$k$ is \emph{pruned} if it contains no redundant strands.+\end{defn}++\begin{note}+Suggestion from Carolyn Talcott:  Define pruned skeleton as the result+of deleting redundant set of strands.  Then prove that we can use+homomorphisms with the right properties to perform this `deletion'.+\end{note}++The concept of an execution skeleton is introduced to relate a skeleton+that contains only regular strands with its executions.  An execution+skeleton may include penetrator strands.++\begin{defn}[Used]\label{def:used}+Message~$t_0$ is \emph{used in}~$t_1$+if~$t_0$ or $\fn{inv}(t_0)$ is accessible in $t_1$ and~$t_0$ is not+carried by~$t_1$.+\end{defn}+The accessibility of a term is defined in+Definition~\ref{def:accessible}.++\begin{defn}[Execution Skeleton]\label{def:execution skeleton}+The \emph{execution skeleton}~$k$ of bundle~{\bundle}+over instances~$I$ has the following properties.+\begin{enumerate}+\item $\fn{insts}(k)=I$.+\item $\kprec{k} = \prec$.+\item $\fn{unique}(k)$ is the set of atoms that originate uniquely+  in~{\bundle}.+\item $\fn{non}(k)$ is the set of atoms used in the traces of~$I$.+\end{enumerate}+\end{defn}++\begin{defn}[Skeleton Compatible Executions]+A bundle~{\bundle} is \emph{compatible} with skeleton~$k$ if+there is a homomorphism from~$k$ to the execution skeleton+of~{\bundle}.+\end{defn}++\begin{defn}[Realized Skeleton]+A bundle~{\bundle} \emph{realizes} skeleton~$k$ if~$\bundle$ is+compatible with~$k$, and the structure preserving map $(\phi,\sigma)$+has the property that~$\sigma$ is a bijection,~$\phi$ is a+bijection between the strands in~$k$ and the regular strands in the+bundle's execution skeleton, and~$\phi$ preserves the height of the+strands it maps.+\end{defn}++A bundle models a realized skeleton if it realizes it.  A+bundle~{\bundle} models a preskeleton~$k_0$ if there is a realized+skeleton~$k_1$ such that $k_0\homomorphism{\phi,\sigma} k_1$+and~{\bundle} models~$k_1$.++\subsection*{Discussion}++In the refinement of strand space theory, there is no global strand+space on which all analysis is based.  Instead, each skeleton and+execution defines its own strand space, and homomorphisms establish+relations between them.  The definition of a protocol depends on no+strand space.++The definitions in this section are the obvious refinements that+result from using finite ordered strand spaces.  In the {\cpsa}+program, pruned skeletons are used for skeletons in the implementation+of the {\cpsa} algorithm in~\cite{DoghmiGuttmanThayer07}.+In~\cite{DoghmiGuttmanThayer07}, skeletons were not required to+respect origination, but that was just an oversight.++\section{Reductions on Preskeletons}\label{sec:preskeleton reduction}++This section describes the algorithm used to transform a preskeleton+into a skeleton as a setwise term reduction system+$(\alg{K},\twoheadrightarrow)$.  Recall that the relation+$k\rightsquigarrow K$ in Section~\ref{sec:algorithms} is defined in+terms of $\to\subseteq\alg{K}\times\alg{K}$ by specifying+$\{k\}\twoheadrightarrow K$ using~$\to$.++If a preskeleton $k$ is not a skeleton, then it is either because+some $t\in unique(k)$ actually originates at more than one node,+or because for some $t\in unique(k)$, there is a node $n_1\in\acqu(k,t)$,+and a node $n_0\in\orig(k,t)$ such that $n_0\nprec_k n_1$.+These obstructions are resolved via identifying strands and+enriching node orderings respectively.  We show that we can always+resolve the first obstruction before resolving the second obstruction.+Moreover, if the first obstruction is resolvable, then there is a+canonical resolution (although there may be non-canonical choices+to reach it).  We call this canonical resolution a pre-hull.  Then+if the second obstruction is also resolvable, it also has a canonical+resolution.  This canonical resolution is a skeleton which we call+a hull.  We begin by giving the definitions of pre-hull and of hull.++\begin{defn}+Given a preskeleton $k$, a \emph{pre-hull} of $k$ is a hulled preskeleton+$k_0$ together with a homomorphism $k\homomorphism{\psi_0}k_0$ such that+for any homomorphism $k\homomorphism{\psi_1}k_1$ to a hulled preskeleton,+there is a unique homomorphism $k_0\homomorphism{\psi}k_1$ such that+$\psi_1=\psi\circ\psi_0$++$$\xymatrix@C=3em{+k\ar@{|->}[r]^{\psi_0} \ar@{|->}[rd]_{\psi_1} &+k_0 \ar@{|->}[d]^{\psi}\\+&k_1}$$+\end{defn}++A preskeleton $k$ may not have a pre-hull, but if it does, then the definition+implies that it is unique up to isomorphism.  Also, every hulled preskeleton+is its own pre-hull where $\psi_0$ is the identity homomorphism.++\begin{defn}+Given a preskeleton $k$, a \emph{hull} of $k$ is a skeleton+$k_0$ together with a homomorphism $k\homomorphism{\psi_0}k_0$ such that+for any homomorphism $k\homomorphism{\psi_1}k_1$ to a skeleton,+there is a unique homomorphism $k_0\homomorphism{\psi}k_1$ such that+$\psi_1=\psi\circ\psi_0$++$$\xymatrix@C=3em{+k\ar@{|->}[r]^{\psi_0} \ar@{|->}[rd]_{\psi_1} &+k_0 \ar@{|->}[d]^{\psi}\\+&k_1}$$+\end{defn}++Just like pre-hulls, a preskeleton may not have a hull, but if it does, then+it is unique up to isomorphism.  Also, every skeleton is its own hull+where $\psi_0$ is the identity homomorphism.++We next show how to take advantage of unification in the+$\Sigma$-algebra to provide a sort of unification of strands.  Before unifying+two strands, we will unify their traces.++\begin{defn}[Trace Unification]\label{def:trace-unification}+Let $k$ be a preskeleton which contains strands~$s$ and~$s'$.  We+say that substitution $\sigma$ \emph{unifies the messages of~$s$+and~$s'$} iff $\sigma(evt(k,(s,p))) \equiv \sigma(evt(k,(s',p)))$+for every $p < height(s)$.  We say that homomorphism+$k\homomorphism{\phi,\sigma}k_0$ \emph{unifies the traces of~$s$+and~$s'$} iff $\sigma$ unifies the messages of~$s$ and~$s'$.+We say that the traces of $s$ and $s'$ are+\emph{unifiable} if there is a $(\phi,\sigma)$ which unifies them.+\end{defn}++Thus, if $(\phi,\sigma)$ unifies the traces of~$s$ and~$s'$,+not only does $\sigma$ unify the messages+but also $t\in \fn{unique}(k_0)$ implies+$\phi(\orig(k_0,t))\subseteq\orig(k_1,\sigma(t))$ by Clause 7 in the+definition of a homomorphism (Definition~\ref{def:homomorphism}).+In fact, as we already saw, it is generally possible for $\sigma$+to unify the messages, without respecting Clause 7. In this case,+$\sigma$ unifies the messages of~$s$ and~$s'$, but the traces+of~$s$ and~$s'$ are not unifiable.  By pairing+$\sigma$ with $\phi$, trace unification only allows homomorphisms+with substitutions $\sigma$ which do not violate Clause 7.++By recalling the discussion which follows Definition~\ref{def:image},+we can see that if $(\phi,\sigma)$ unifies the traces of~$s$ and~$s'$,+then so does $(\idphi,\sigma)$.  Furthermore, if $(\idphi,\sigma)$ unifies+the traces of~$s$ and~$s'$, then so does $(\idphi,\sigma')$ where+$\sigma'$ unifies the messages of~$s$ and~$s'$, and+$\sigma'\unlhd\sigma$.  We can view this another way.  Let $\sigma$+be the most general unifier of the messages of~$s$ and~$s'$.  If $(\idphi,\sigma)$+does not unify the traces, then the traces are not unifiable.++\begin{defn}[Substitution Reduction]+Preskeleton~$k_0$ reduces to preskeleton~$k_1$ by the+substitution~$\sigma$, written~$k_0\reduction{\ops{S}_\sigma}k_1$, iff+$k_1=\psi(k_0)$ where $\psi=(\idphi,\sigma)$.+\end{defn}++The next lemma states that if $k$ is a skeleton in which the traces of+two strands~$s$ and~$s'$ are unifiable, then there is a kind of most+general trace unifier.  Since this most general trace unifier will+turn out to always have the form $(\idphi,\sigma)$, we can use the+corresponding $\ops{S}_{\sigma}$ as a way of implementing this trace+unification.++\begin{lem}\label{lem:substitution}+Let $k$ be a preskeleton which contains strands $s$ and $s'$.  Suppose the+traces of $s$ and $s'$ are unifiable.  Then there is a preskeleton $k_0$ and+a homomorphism $k\homomorphism{\psi_0}k_0$ which unifies the traces+of $s$ and $s'$ such that for every+homomorphism $k\homomorphism{\psi_1}k_1$ which+unifies the traces of $s$ and $s'$, there is a unique homomorphism+$k_0\homomorphism{\psi}k_1$ so that $\psi_1=\psi\circ\psi_0$.++$$\xymatrix@C=3em{+k\ar@{|->}[r]^{\psi_0} \ar@{|->}[rd]_{\psi_1} &+k_0 \ar@{|->}[d]^{\psi}\\+&k_1}$$+\end{lem}++\begin{proof}+Since the traces of $s$ and $s'$ are unifiable by some $(\hat{\phi},\hat{\sigma})$,+we know that $(\idphi,\hat{\sigma})$ also unifies the traces.  Furthermore,+there is a most general unifier $\sigma_0$ which unifies the messages+of~$s$ and~$s'$.  Since+$\sigma_0\unlhd\hat{\sigma}$ we know that $(\idphi,\sigma_0)$ also unifies+the traces.  Let $\psi_0=(\idphi,\sigma_0)$ and let $k_0=\psi_0(k).$+We show that this is the preskeleton and homomorphism we want.++The homomorphism $\psi_0$ unifies the traces of $s$ and $s'$ by construction.+Now let $k\homomorphism{\psi_1}k_1$ with $\psi_1=(\phi_1,\sigma_1)$,+be a homomorphism which unifies the traces of~$s$ and~$s'$.   Since+$\sigma_0$ is the most general unifier of the messages of~$s$ and~$s'$,+there is a unique+$\sigma$ such that $\sigma_1=\sigma\circ\sigma_0$.  Then by letting+$\psi=(\phi_1,\sigma)$ we see that $\psi\circ\psi_0 = (\phi_1,\sigma)+\circ (\phi_{id},\sigma_0) = (\phi_1,\sigma\circ\sigma_0) =+(\phi_1,\sigma_1) = \psi_1$.  It is clear that $\phi_1$ is the unique+node map that will work, and we already noted that $\sigma$ must also+be unique.+\end{proof}++We can find the $k_0$ of Lemma~\ref{lem:substitution} (when it exists)+by finding the most general $\sigma_0$ which+simultaneously unifies the corresponding messages in the traces of~$s$+and~$s'$ and applying the reduction $\ops{S}_{\sigma_0}$ to $k$.  This+reduction will fail if the traces of~$s$ and~$s'$ are not unifiable, and+it will succeed otherwise.  Furthermore, Lemma~\ref{lem:substitution}+guarantees that there is at most a single $k_0$ such that+$k\reduction{\ops{S}_{\sigma_0}}k_0$ where $\sigma_0$ is the most general+unifier of the messages of strands~$s$ and~$s'$.++\begin{defn}[Strand Unification]\label{def:strand-unification}+Let $k$ be a preskeleton with strands $s$ and $s'$.+ We say that a homomorphism $\psi=(\phi,\sigma)$ \emph{unifies+the strands} $s$ and $s'$ iff $\phi(s)=\phi(s')$.+We say the strands $s$ and $s'$ are \emph{unifiable}+if there is a homomorphism which unifies them.+\end{defn}++Note that if $\psi$ unifies two strands, then $\psi$ unifies their traces,+but the converse is not true in general.  Thus, unification of two strands+can be broken into two steps.  First we unify their traces, then we unify+the strands in a very simple way.  We already saw that the first step can+be performed in a most general way, as codified by Lemma~\ref{lem:substitution}.+We now want to provide a similar notion for the second step.++Suppose the trace of strand~$s$ is a prefix of the trace of+strand~$s'$ in preskeleton~$k_0$.  In other words, $(\idphi,\idsigma)$+unifies the traces of~$s$ and~$s'$.  This would be the case, for example,+if $k_0$ was the result of unifying the traces of~$s$ and~$s'$ in some+other preskeleton.+In that case, there is a+$\psi$ which unifies the strands~$s$ and~$s'$, namely+$\psi=(\phi_{s,s'},\idsigma)$ where+$$\begin{array}{r@{}c@{}l}+\phi_{s,s'}(j)&{}={}&\left\{+\begin{array}{ll}+\phi_s(s')&\mbox{if $j=s$}\\+\phi_s(j)&\mbox{otherwise}+\end{array}\right.\\+\phi_s(j)&{}={}&\left\{+\begin{array}{ll}+j-1&\mbox{if $j>s$}\\+j&\mbox{otherwise.}+\end{array}\right.+\end{array}+$$++\begin{defn}[Compression Reduction]+Preskeleton~$k_0$ reduces to preskeleton~$k_1$ by compressing the+strand~$s$ into~$s'$, written $k_0\reduction{\ops{C}_{s,s'}}k_1$,+iff $\psi(k_0)=k_1$, with $\psi=(\phi_{s,s'},\idsigma)$.+\end{defn}++The compression reduction $\ops{C}_{s,s'}$ can only be performed on+$k_0$ if $(\idphi,\idsigma)$ unifies the traces of~$s$ and~$s'$, because+otherwise $(\phi_{s,s'},\idsigma)(k_0)$ is not well-defined.  We generally+use this reduction when unifying strands after having unified their+traces.  This reduction is used to implement a kind of most general+unification of two strands once their traces have been unified.++\begin{lem}\label{lem:compression}+Let $k$ be a preskeleton in which $(\idphi,\idsigma)$ unifies the traces+of two strands $s$ and $s'$, and suppose+the strands~$s$ and~$s'$ are unifiable.  Then+there is a preskeleton $k_0$ and a homomorphism $k\homomorphism{\psi_0}k_0$+which unifies the strands $s$ and $s'$ such that for every+homomorphism $k\homomorphism{\psi_0}k_0$ which unifies the+strands $s$ and $s'$, there is a unique homomorphism+$k_0\homomorphism{\psi}k_1$ so that $\psi_1=\psi\circ\psi_0$.++$$\xymatrix@C=3em{+k\ar@{|->}[r]^{\psi_0} \ar@{|->}[rd]_{\psi_1} &+k_0 \ar@{|->}[d]^{\psi}\\+&k_1}$$+\end{lem}++\begin{proof}+Let $\psi_0=(\phi_{s,s'},\sigma_{id})$, and $\psi_0(k)=k_0$. We will+show that this is the preskeleton and homomorphism we want.++By the definition of $\phi_{s,s'}$ we see that $\psi_0$ unifies the+strands $s$ and $s'$.  Let $k\homomorphism{\psi_1}k_1$ with+$\psi_1=(\phi_1,\sigma_1)$ be any homomorphism+which unifies the strands $s$ and $s'$. We+let $\psi=(\phi,\sigma_1)$ where $\phi$ is a node map we still need to define.+Since $\phi_{s,s'}$ maps onto the strands of $k_0$, $\phi$ is completely+determined by where it sends $\phi_{s,s'}(j)$.  But in order for+$\psi_1=\psi\circ\psi_0$ we are forced to define+$\phi(\phi_{s,s'}(j))=\phi_1(j)$.  We can do this because $\phi_{s,s'}$+does not identify any strands except for $s$ and $s'$, and because $\phi_1$+also identifies $s$ and $s'$.  Using this $\phi$, it is clear that+$\psi_1=\psi\circ\psi_0$.  To see that $\psi$ is unique, we note that we+had no choice for either the substitution $\sigma_1$ or the node map+$\phi$.+\end{proof}++We can find the $k_0$ of Lemma~\ref{lem:compression} (when it exists)+by applying $\ops{C}_{s,s'}$ to $k$.  This reduction will fail if+the strands~$s$ and~$s'$ are not unifiable or if the trace of~$s$ is+not a prefix of the trace of~$s'$, and it will succeed otherwise.+Moreover, Lemma~\ref{lem:compression} guarantees that there is at most+a single $k_0$ such that $k\reduction{\ops{C}_{s,s'}}k_0$.++The substitution and compression reductions are used to unify two+strands in two separate steps.  When two strands are unifiable, then+their traces are also unifiable.  We may thus use Lemma~\ref{lem:substitution}+to unify their traces in a most general way.  This will cause the trace+of one of the strands to be a prefix of the other, thereby enabling+compression.  The resulting preskeleton is the most general one which+unifies the two strands, as we show in the following lemma.++\begin{lem}\label{lem:hulling}+Let $k$ be a preskeleton containing strands $s$ and $s'$+which are unifiable.+Then there is a preskeleton $k_0$ and a homomorphism+$k\homomorphism{\psi_0}k_0$ which unifies $s$ and $s'$ such that+for every homomorphism $k\homomorphism{\psi_1}k_1$ which unifies+$s$ and $s'$, there is a unique homomorphism+$k_0\homomorphism{\psi}k_1$ so that $\psi_1=\psi\circ\psi_0$.++$$\xymatrix@C=3em{+k\ar@{|->}[r]^{\psi_0} \ar@{|->}[rd]_{\psi_1} &+k_0 \ar@{|->}[d]^{\psi}\\+&k_1}$$+\end{lem}++\begin{proof}+Since the strands $s$ and $s'$ are unifiable, their traces are also+unifiable.  Thus, by Lemma~\ref{lem:substitution}, we can find a+preskeleton $k_0'$ and a homomorphism $k\homomorphism{\psi_0'}k_0'$+so that any homomorphism from $k$ which unifies the traces of $s$ and $s'$+factors through $\psi_0'$.  The preskeleton $k_0'$ now satisfies+the hypotheses of Lemma~\ref{lem:compression}, so we can find a+preskeleton $k_0''$ and a homomorphism+$k_0'\homomorphism{\psi_0''}k_0''$ so that any homomorphism from+$k_0'$ which unifies $s$ and $s'$ factors through $\psi_0''$.+Let $\psi_0=\psi_0''\circ\psi_0'=(\phi_{s,s'},\sigma)$ where+$\sigma$ is the mgu of the traces of $s$ and $s'$, and let $k_0=k_0''$.+It remains to show that this $\psi_0$ and $k_0$ have the desired+properties.++First, it is clear that $\psi_0$ unifies $s$ and $s'$.  Now let+$k\homomorphism{\psi_1}k_1$ be an arbitrary homomorphism which unifies+$s$ and $s'$.  By Lemma~\ref{lem:substitution}, $\psi_1$ factors uniquely+through $\psi_0'$ as $\psi'\circ\psi_0'$.  Moreover, $\psi'$ is a+homomorphism from $k_0'$ which unifies $s$ and $s'$, thus by+Lemma~\ref{lem:compression}, $\psi'$ factors uniquely through+$\psi_0''$ as $\psi'=\psi''\circ\psi_0''$.  Thus $\psi_1$ factors+uniquely through $\psi_0=\psi_0''\circ\psi_0'$ as desired.++$$\xymatrix@C=3em{+k\ar@{|->}[r]^{\psi_0'} \ar@{|->}[rrdd]_{\psi_1} &+k_0' \ar@{|->}[rdd]^{\psi'} \ar@{|->}[r]^{\psi_0''} &+k_0 \ar@{|->}[dd]^{\psi}\\+& &\\+& &k_1}$$+\end{proof}++We thus now have a canonical way of unifying two strands when they+are unifiable.++\begin{lem}\label{lem:unify-commute}+Let $k$ be a preskeleton containing strands $s_0,s_0',s_1,s_1'$+(not necessarily all distinct) such that the pairs of strands+$(s_0,s_0')$ and $(s_1,s_1')$ are simultaneously unifiable.  Let+$k_0$ be the result of first unifying $s_0$~and~$s_0'$ and then+$s_1$~and~$s_1'$ according to Lemma~\ref{lem:hulling}.  Let+$k_1$ be the result of first unifying $s_1$~and~$s_1'$ and then+$s_0$~and~$s_0'$ also according to Lemma~\ref{lem:hulling}.+Then $k_0$ and $k_1$ are isomorphic.+\end{lem}++\begin{proof}+We can repeatedly apply Lemma~\ref{lem:hulling} to obtain the+following diagram.++$$+\xymatrix@C=3em{+& k\ar@{|->}[ld]_{\psi_0'}+	 \ar@{|->}[rd]^{\psi_1'} &\\+k_0'\ar@{|->}[d]_{\psi_0} %\ar@{|->}[rrd]+& &+k_1'\ar@{|->}[d]^{\psi_1} %\ar@{|->}[lld]+\\+k_0\ar@{|->}[rr]^{\psi_2} & & k_1\ar@{|->}[ll]^{\psi_2'}+}$$++The preskeleton $k_0'$ is the result of unifying strands $s_0$~and~$s_0'$+of $k$ in a most general way, and $k_0$ is the result of unifying+strands $\psi_0'(s_1)$~and~$\psi_0'(s_1')$ of $k_0'$ in a most general+way.  Similarly, $k_1'$ is the result of unifying strands $s_1$~and~$s_1'$+of $k$ in a most general way, and $k_1$ is the result of unifying+strands $\psi_1'(s_0)$~and~$\psi_1'(s_0')$ of $k_1'$ in a most general way.++We can infer the homomorphism $k_0\homomorphism{\psi_2}k_1$ and+$k_1\homomorphism{\psi_2'}k_0$ from Lemma~\ref{lem:hulling}+as the unique homomorphisms which make the diagram commute.  By the+uniqueness of these arrows we can infer that $\psi_2\circ\psi_2'=id_{k_1}$+and that $\psi_2'\circ\psi_2=id_{k_0}$.  Thus $\psi_2$~and~$\psi_2'$ are+isomorphisms and they are inverses of each other.  Thus $k_0$ and $k_1$+are isomorphic.+\end{proof}++Lemma~\ref{lem:unify-commute} implies that if we want to simultaneously+unify several sets of strands which are simultaneously unifiable,+any order of pairwise strand unification+will result in a skeleton which is isomorphic to the result of every+other order.  However, given a preskeleton $k$ which is not a hulled+preskeleton, we do not want to unify \emph{every} pair of strands+which are unifiable.  We only want to unify those pairs of strands+which demonstrate that for some $t\in unique(k)$, $\orig(k,t)$ has+more than one node.  For this purpose we use another reduction+which is built out of~$\ops{S}_{\sigma}$ and~$\ops{C}_{s,s'}$.++Recall that the relation $k\rightsquigarrow K$ in+Section~\ref{sec:algorithms} is defined in terms of+$\to\subseteq\alg{K}\times\alg{K}$ by specifying+$\{k\}\twoheadrightarrow K$ using~$\to$.++\begin{defn}[Hulling Reduction]\label{def:hulling}+Preskeleton $k_0$ reduces to preskeleton $k_1$ by hulling strands~$s$+and~$s'$, written $k_0\reduction{\ops{H}_{s,s'}}k_1$, iff there is+some $t\in unique(k_0)$ and there are distinct strands~$s$ and~$s'$+such that $\{(s,p),(s',p')\}\subseteq\orig(k_0,t)$, and the+strands~$s$ and~$s'$ are unifiable, and $k_1$ is the preskeleton+guaranteed by Lemma~\ref{lem:hulling}.  For the setwise hulling+relation, $\{k_0\}\setreduction{\ops{H}_{s,s'}}\{k_1\mid+k_0\reduction{\ops{H}_{s,s'}}k_1\}$, when $k_0$ has a message in+$\fn{unique}(k_0)$ that originates on both~$s$ and~$s'$.+\end{defn}++This hulling reduction $\ops{H}_{s,s'}$ implements the+``most general strand unifier" $\psi_0$ from Lemma~\ref{lem:hulling}+when it exists, but it is only applicable when+$s$~and~$s'$ originate the same $t\in unique(k)$.+By the proof of Lemma~\ref{lem:hulling},+$k_0\reduction{\ops{H}_{s,s'}}k_1$, iff there is a (unique) preskeleton $k$ such+that $k_0\reduction{\ops{S}_{\sigma}}k\reduction{\ops{C}_{s,s'}}k_1$,+where $\sigma$ is the most general unifier of the messages of~$s$+and~$s'$.++Given a preskeleton $k$ which is not a hulled preskeleton,+it is possible that simultaneously unifying+all pairs of strands $s$~and~$s'$ which both originate some+$t\in unique(k)$ will not produce a hulled preskeleton.  The unification+process may introduce more points of origination of terms which are+meant to be uniquely originating.  However, the next lemma shows that+repeatedly resolving these obstructions will yield a pre-hull.++\begin{lem}\label{lem:prehull-exist}+Suppose that there is a homomorphism from $k$ into a hulled+preskeleton.  Then $k$ has a pre-hull.+\end{lem}++\begin{proof}+If $k$ is not a hulled preskeleton, then it has (possibly several)+pairs of strands $s$~and~$s'$ which each originate the same term+$t\in unique(k)$.  All of these pairs are simultaneously unifiable+since the homomorphism from $k$ into a hulled preskeleton which is+assumed to exist performs that unification.  Therefore by+Lemmas~\ref{lem:hulling} and~\ref{lem:unify-commute}, we may+unify these pairs $s$~and~$s'$ in any order in a most general way+to find a homomorphism $k\homomorphism{\psi_0}k_0$ which simultaneously+unifies all the pairs $s$~and~$s'$, such that for any homomorphism+$k\homomorphism{\psi_1}k_1$ which unifies these pairs there is a unique+$k_0\homomorphism{\psi}k_1$ such that $\psi_1=\psi\circ\psi_0$.++By the properties of $\psi_0$ and $k_0$, if $k_0$ is a hulled+preskeleton it is the pre-hull of $k$.  If not, then $k_0$+again satisfies the hypothesis of this lemma, so we can repeat the+process of the above paragraph.  Since each iteration reduces the+number of strands, this process will eventually terminate.  By+the properties of the resulting preskeleton at each step, it will+terminate with the pre-hull.+\end{proof}++\begin{lem}\label{lem:prehull-compute}+If a preskeleton $k$ has a pre-hull, then repeated applications+of $\ops{H}_{s,s'}$ will terminate in the pre-hull of $k$.+\end{lem}++\begin{proof}+For every pair of strands $s$~and~$s'$ which are eventually unified+in the pre-hull, there is a sequence of hulling reductions which+causes $s$~and~$s'$ to originate the same term which should+be uniquely originating.  Furthermore, by Lemma~\ref{lem:unify-commute}+this obstruction is introduced by the end of every reordering of such+a sequence, although it may be introduced earlier.  Thus, we may apply+the hulling reductions in any order, and we will eventually unify the+same sets of strands.  Again by Lemma~\ref{lem:unify-commute},+the preskeletons resulting from each order of hulling reductions will+all be isomorphic.  Since Lemma~\ref{lem:prehull-exist} shows that+at least one such order results in the pre-hull, every order will+result in the pre-hull.+\end{proof}++\begin{defn}[Order Enrichment]+Suppose hulled preskeleton~$k_0$ is not a skeleton.  Hulled+preskeleton~$k_0$ reduces to skeleton~$k_1$ by order enrichment, written+$k_0\reduction{\ops{O}}k_1$, iff~$k_1$ is the result of adding node+orderings implied by origination.  That is,+\begin{enumerate}+\item $\kprec{k_1}= (\kprec{k_0}\cup\{n_0,n_1\mid n_0\in\orig(k_0,t)\land+n_1\in\acqu(k_0,t)\})^\ast$,+\item $\fn{ht}(k_1,s)=+\fn{ht}(k_0,s)$ for $s<|\fn{inst}(k_0)|$,+\item $\fn{unique}(k_1)=\fn{unique}(k_0)$, and+\item $\fn{non}(k_1)=\fn{non}(k_0)$.+\end{enumerate}+There is a homomorphism from~$k_0$ to~$k_1$ that is an embedding.  For+the setwise order enrichment reduction,+$\{k_0\}\setreduction{\ops{O}}\{k_1\mid k_0\reduction{\ops{O}}k_1\}$+when $k_0$ is a hulled preskeleton that is not a skeleton.+\end{defn}++\begin{lem}\label{lem:order-enrichment}+Suppose $k$ is a preskeleton such that every $t$ in $unique(k)$ originates+in $k$ at most once.  Suppose also that there is a homomorphism from+$k$ to a skeleton.  Then there is a skeleton $k_0$ and a homomorphism+$k\homomorphism{\psi_0}k_0$ such that for every homomorphism+$k\homomorphism{\psi_1}k_1$ to a skeleton $k_1$, there is a unique+homomorphism $k_0\homomorphism{\psi}k_1$ so that $\psi_1=\psi\circ\psi_0$.++$$\xymatrix@C=3em{+k\ar@{|->}[r]^{\psi_0} \ar@{|->}[rd]_{\psi_1} &+k_0 \ar@{|->}[d]^{\psi}\\+&k_1}$$+\end{lem}++\begin{proof}+Let $k_0$ be obtained from $k$ by adding edges to the node+ordering relation.  That is, $n_0\kprec{k_0}n_1$ is the transitive+closure of pairs such that+either $n_0\kprec{k}n_1$ or for some $t\in unique(k)$, $t$ originates+at $n_0$ and $n_1\in\acqu(k,t)$.  Let $\psi_0$ be the obvious+embedding of $k$ into $k_0$.  We must show that $k_0$ is+a skeleton.  It will be sufficient to check that we did not introduce+any cycles into the node ordering.  But, in fact, if $\kprec{k_0}$+had a cycle, then so would the++First, we chose $k_0$ to be a skeleton.  Now let $k\homomorphism{\psi_1}k_1$+be an arbitrary homomorphism to a skeleton $k_1$.  Then we can also+apply $\psi_1$ to $k_0$, but we must be careful to check that it remains+a homomorphism.  Only clause 4 of Definition~\ref{def:homomorphism} could+potentially fail.  However, assume+\end{proof}++\begin{note}+Our current understanding of pruning is this.  We have an example that+shows that pruning one strand at a time does not remove all redundant+strands.  We are searching for efficient ways to perform multiple+strand pruning in one step, but haven't found one yet.++We also do not know if single strand pruning is confluent.+\end{note}++\begin{defn}[Pruning]\label{def:pruning}+Suppose skeleton~$k_0$ has a redundant strand~$s$.  Then there exists+a distinct strand~$s'$ that describes more specific behavior.+Skeleton~$k_0$ reduces to skeleton~$k_1$ by pruning, written+$k_0\reduction{\ops{P}_s}k_1$, iff there is a substitution~$\sigma$+such that $\sigma(\fn{evt}(k_0,(s,p)))\equiv \fn{evt}(k_0,(s',p))$ for+all $p<h$, where~$h$ is the height of strand~$s$ in~$k_0$, no variable+in $\fn{Dom}(\sigma)$ occurs in the trace of any strand other+than~$s$, $t\in\fn{unique}(k_0)$ implies+$\sigma(t)\in\fn{unique}(k_0)$, $t\in\fn{non}(k_0)$ implies+$\sigma(t)\in\fn{non}(k_0)$, there is a~$k$ such that+$k_0\reduction{\ops{S}_\sigma}k\reduction{\ops{C}_{s,s'}}k_1$, and if+$(s,p)\kprec{k_0}(s'',p'')$ then $(s',p')\kprec{k_0}(s'',p'')$, and if+$(s'',p'')\kprec{k_0}(s,p)$ then $(s'',p'')\kprec{k_0}(s',p')$.  For+the setwise pruning reduction,+$\{k_0\}\setreduction{\ops{P}_s}\{k_1\mid+k_0\reduction{\ops{P}_s}k_1\}$, when there is a $k_1$ such that+$k_0\reduction{\ops{P}_s}k_1$.+\end{defn}++\begin{lem}[Pruning]\label{lem:pruning}+Let~$k$ be a skeleton with redundant strand~$s$.  For every pruned+skeleton~$k_1$ such that $k\homomorphism{\psi_1}k_1$, there is a+skeleton~$k_0$ and homomorphisms~$\psi_0$ and~$\psi$ with+$k\reduction{\ops{P}_s}k_0$, $k\homomorphism{\psi_0}k_0$,+$\psi_1=\psi\circ\psi_0$, and $\psi_0=(\phi_{s,s'},\sigma)$, where+strand~$s'$ and substitution~$\sigma$ are as specified in+Definition~\ref{def:pruning}.+\end{lem}++\begin{proof}+Pruning operations commute.  Suppose~$k$ has two redundant+strands,~$s$ and~$s'$.  If~$s$ describes more specific behavior and+is used to justify pruning~$s'$, then the strand that justifies the+pruning of~$s$ can serve the same purpose.+\begin{note}+The proof is not complete.  Something more needs to be added here.+\end{note}+\end{proof}++Notice that a setwise hulling reduction may produce the empty set, but+a setwise order enrichment and pruning reduction never does.++Let reduction $\twoheadrightarrow=+\bigcup_{s,s'}\setreduction{\ops{H}_{s,s'}}\cup\setreduction{\ops{O}}\cup+\bigcup_s\setreduction{\ops{P}_s}$.++\begin{thm}+The reduction $\twoheadrightarrow$ is convergent.+\end{thm}++\begin{proof}+The reduction $\twoheadrightarrow$ is confluent by+Lemmas~\ref{lem:hulling} and~\ref{lem:pruning}.  It's convergent+because the number of hulling and pruning steps is bounded by the+number of strands in a preskeleton.+\end{proof}++\begin{defn}[Preskeleton Reduction System]+Preskeleton~$k_0$ reduces to pruned skeleton~$k_1$,+written~$k_0\reduction{\fn{skel}}k_1$, if+$\{k_0\}\twoheadrightarrow^\ast K$, $k_1\in K$, and~$K$ is a normal+form of~$\twoheadrightarrow$.+\end{defn}++It is easy to show $k_0\reduction{\fn{skel}}k_1$ implies~$k_0\mapsto+k_1$.  Furthermore, the structure-preserving map that demonstrates the+homomorphism is easy to derive.  For each pruned skeleton~$k$,+$k\reduction{\fn{skel}}k$.++\begin{thm}[Preskeleton Reduction System Correct]\label{thm:prsc}+Let~$k$ be a preskeleton.  For every pruned skeleton~$k_1$ such that+$k\homomorphism{\psi_1}k_1$, there is a pruned skeleton~$k_0$ and+homomorphisms~$\psi_0$ and~$\psi$ with $k\reduction{\fn{skel}}k_0$,+$k\homomorphism{\psi_0}k_0$, and $\psi_1=\psi\circ\psi_0$.++$$\xymatrix@C=3em{+k\ar@{|->}[r]^{\psi_0} \ar@{|->}[rd]_{\psi_1} &+k_0 \ar@{|->}[d]^{\psi}\\+&k_1}$$+\end{thm}++\begin{note}+Old stuff.+\end{note}++\begin{lem}[Hulling]+Suppose $k\mapsto k'$ with~$k$ a preskeleton and~$k'$ a hulled+preskeleton.  There exists a set of homomorphisms~$\Psi$ and a set of+hulled preskeletons~$K$, such that for every hulled preskeleton~$k_1$ and+every homomorphism~$k\homomorphism{\psi_1}k_1$, for+some~$\psi_0\in\Psi$, $k_0\in K$, and~$\psi$,+$\psi_1=\psi\circ\psi_0$,~$\psi$ is unique to within isomorphism,+and~$k_0$ is isomorphic to some~$k_2$ with+$k\to^\ast k_2$, where reduction $\to=\bigcup_{s,s'}\reduction{\ops{H}_{s,s'}}$.+\end{lem}++\begin{thm}+Suppose $k\mapsto k'$ with~$k$ a preskeleton and~$k'$ a pruned+skeleton.  There exists a set of homomorphisms~$\Psi$ and a set of+pruned skeletons~$K$, such that for every pruned skeleton~$k_1$ and+every homomorphism~$k\homomorphism{\psi_1}k_1$, for+some~$\psi_0\in\Psi$, $k_0\in K$, and~$\psi$,+$\psi_1=\psi\circ\psi_0$,~$\psi$ is unique to within isomorphism,+and~$k_0$ is isomorphic to some~$k_2$ with+$k\reduction{\fn{skel}}k_2$.++$$\xymatrix@C=3em{+k\ar@{|->}[r]^{\psi_0} \ar@{|->}[rd]_{\psi_1} &+k_0 \ar@{|->}[d]^{\psi}\\+&k_1}$$+\end{thm}++\section{Penetrator Derivable}\label{penetrator}++For each algebra, the powers of the adversary are defined by a set of+roles.  For the Basic Crypto Signature in Figure~\ref{fig:bcs}, the+traces of the penetrator roles are in Figure~\ref{fig:pen}.+Penetrator roles make no origination assumptions.++The context in which penetrator strands appear determine the messages+the adversary can derive.  The context includes previously sent+messages and atoms it is forbidden to originate.  An atom that is+assumed to be non-originating must be avoided as is a uniquely+originating atom that is assumed to originate on a regular strand.++The ternary relation \der{t}{T_p}{T_a} states that message~$t$ is+penetrator derivable from previously sent messages~$T_p$ while+avoiding atoms~$T_a$.  The relation is defined by a set of inference+rules.  Most of the rules are justified by a penetrator role that when+instantiated, derives a message in the conclusion of the rule.++The first rule states that no additional penetrator behavior is required+to derive~$t$ if it has been previously sent.+$$\infer{t\in{T_p}}{\der{t}{T_p}{T_a}}$$++A uniquely originating atom need not be avoided if it has been sent.+\begin{equation}\label{eqn:avoid}+\infer{\der{t}{T_p}{T_a}}%+{\der{t}{\{t_0\}\cup T_p}{\{t_0\}\cup T_a}}+\end{equation}++There are two decomposition steps available to the penetrator.+\begin{equation}\label{eqn:sep}+\infer{\der{t}{\{t_0,t_1\}\cup T_p}{T_a}}%+{\der{t}{\{(t_0,t_1)\}\cup T_p}{T_a}}\quad+[\mbox{by $\fn{sep}(t_0,t_1)$}]+\end{equation}+\begin{equation}\label{eqn:dec}+\infer{\der{\fn{inv}(t_1)}{T_p}{T_a}\qquad+\der{t}{\{t_0,\enc{t_0}{t_1}\}\cup T_p}{T_a}}%+{\der{t}{\{\enc{t_0}{t_1}\}\cup T_p}{T_a}}\quad+[\mbox{by $\fn{dec}(t_0,t_1)$}]+\end{equation}++There are two constructive steps.+$$\infer{\der{t_0}{T_p}{T_a}\qquad\der{t_1}{T_p}{T_a}}%+{\der{(t_0,t_1)}{T_p}{T_a}}\quad+[\mbox{by $\fn{cat}(t_0,t_1)$}]$$+$$\infer{\der{t_0}{T_p}{T_a}\qquad\der{t_1}{T_p}{T_a}}%+{\der{\enc{t_0}{t_1}}{T_p}{T_a}}\quad+[\mbox{by $\fn{enc}(t_0,t_1)$}]$$++There are three rules for indivisible messages.+$$\der{C_i}{T_p}{T_a}\quad+[\mbox{by $\fn{tag}(C_i)$}]$$+$$\infer{t\notin T_a\qquad\mbox{$t$ an atom}}%+{\der{t}{T_p}{T_a}}\quad+[\mbox{by $\fn{base}(t)$}]$$+A non-base sorted variable is derivable in a bundle that instantiates+it with any message other than an element of $X_\top$.+$$\infer{t\in X_\top}{\der{t}{T_p}{T_a}}$$++\begin{defn}[Outbound predecessors]+The \emph{outbound predecessors} of skeleton~$k$ at~$n$ is+$\fn{outpred}(k,n)=\{\fn{msg}(k,n_0)\mid n_0 \kprec{k} n, n_0\mbox{~is+  transmitting}\}$.+\end{defn}++\begin{defn}[Avoidance Set]\label{def:avoid}+The \emph{avoidance set} of skeleton~$k$ is+$\fn{avoid}(k)=\fn{non}(k)\cup\{t\mid+t\in\fn{unique}(k)\land|\orig(k,t)|=1\}$.+\end{defn}++An atom in $\fn{avoid}(k)$ is not available to the penetrator, except+if it is exposed by a messages transmission.  Clearly, only uniquely+originating atoms can be exposed.++\begin{defn}[Derivable Before]\label{def:der}+A message~$t$ is \emph{derivable before} reception node~$n$ in+skeleton~$k$, written $\fn{der}(k,n,t)$, if $\der{t}{T_p}{T_a}$ where+$T_p=\fn{outpred}(k,n)$ and $T_a=\fn{avoid}(k)$.+\end{defn}++\begin{defn}[Realized Node]+A reception node~$n$ is \emph{realized} in skeleton~$k$ if+$\fn{msg}(k,n)$ is derivable before~$n$ in~$k$.+\end{defn}++Notice that one can read off penetrator behavior from the proof tree+used to demonstrate that $\fn{msg}(k,n)$ is derivable before~$n$+in~$k$.  For example, if a decryption step is required by the proof,+an instance of the penetrator's decryption role is indicated.  In a+bundle, for a non-base sorted variable, there is a substitution that+maps the variable to a message that is not a non-base sorted variable.+The substitution determines the penetrator behavior associated with+the variable.++\begin{thm}[Realized Skeleton]+A skeleton is realized if and only if all of its reception nodes are+realized.+\end{thm}++\begin{proof}+Given a skeleton~$k$ in which all of its reception nodes are realized,+the combination of the regular behavior in the skeleton, the+penetrator behavior specified by the proof trees used to demonstrate+each node is realized, and a substitution for non-base sorted+variables determines a bundle.  The skeleton of the bundle may have+more non-originating atoms than is in $\fn{non}(k)$, however since the+extra non-originating atoms are derivable by the bundle that+realizes~$k$, the proof trees for those atoms specify any additional+penetrator behavior required.++\begin{note}+I haven't figure out how to do the ``only if'' part of this proof yet.+\end{note}+\end{proof}++\subsection{Implementation}\label{sec:derivable implementation}++The derivable before a node predicate is implemented using auxiliary+functions.++\begin{defn}[Buildable]+Message~$t$ is \emph{buildable} from previously sent messages~$T_p$+while avoiding~$T_a$, written $\fn{bld}(t,T_p,T_a)$, if+\der{t}{T_p}{T_a} without the use of Inference Rules \ref{eqn:avoid},+\ref{eqn:sep}, and~\ref{eqn:dec}.+\end{defn}++Consider the following reduction system based on Inference Rules+\ref{eqn:avoid}, \ref{eqn:sep}, and~\ref{eqn:dec}.+$$\begin{array}{r@{}c@{}ll}+\dctx{\{t\}\cup T_p}{T_a}&{}\to{}&\dctx{T_p}{T_a}\setminus\{t\}+&\mbox{if $t$ is an atom or in $X_{\top}$}\\+\dctx{\{(t_0,t_1)\}\cup T_p}{T_a}&{}\to{}&\dctx{\{t_0,t_1\}\cup T_p}{T_a}\\+\dctx{\{\enc{t_0}{t_1}\}\cup+T_p}{T_a}&{}\to{}&\dctx{\{t_0,\enc{t_0}{t_1}\}\cup T_p}{T_a}+&\mbox{if $t_0\notin T_p$ and}\\+&&&\fn{bld}(\fn{inv}(t_1),T_p,T_a)+\end{array}$$++\begin{defn}[Decompose]+Previously sent messages~$T_p$ and avoidance set~$T_a$+\emph{decompose} to $T'_p,T'_a$, written+$\fn{decompose}(T_p,T_a)=(T'_p,T'_a)$, if +$\dctx{T_p}{T_a}\to^\ast\dctx{T'_p}{T'_a}$+and $(T'_p,T'_a)$ is a normal form of reduction~$\to$.+\end{defn}++The penetrator derivable predicate $\der{t}{T_p}{T_a}$ is implemented as+\begin{center}+\begin{tabular}{l}+$\der{t}{T_p}{T_a}={}$\\+\quad\textbf{let} $T'_p, T'_a=\fn{decompose}(T_p,T_a)$ \textbf{in}\\+\quad$\fn{bld}(t,T'_p,T'_a)$+\end{tabular}+\end{center}++The decomposition at a node function is+\begin{center}+\begin{tabular}{l}+$\fn{dcmp}(k,n)={}$\\+\quad$\fn{decompose}(\fn{outpred}(k,n),\fn{avoid}(k))$+\end{tabular}+\end{center}++The derivable before a node predicate is implemented as+\begin{center}+\begin{tabular}{l}+$\fn{der}(k,n,t)={}$\\+\quad\textbf{let} $T_p, T_a=\fn{dcmp}(k,n)$ \textbf{in}\\+\quad$\fn{bld}(t,T_p,T_a)$+\end{tabular}+\end{center}++\subsection*{Discussion}++\begin{note}+Add discussion.+\end{note}++\section{Carried Only Within}\label{sec:cow}++A set of encryptions~$T_e$ protects critical message~$t$ in+message~$t'$ if~$t$ is carried by~$t'$ only within a member of~$T_e$.+The definition of the carried only within ({\cow}) relation to follow makes+this concept precise.  The concept is used when solving authentication+tests (Section~\ref{sec:auth tests}) using contraction+(Definition~\ref{def:contraction}) and augmentation+(Definition~\ref{def:augmentation}).++The question of the protection of a critical message is posed within+the context of a given pruned skeleton~$k$.  The message algebra is+$\alg{A}_\top(X)$, where~$X$ is the finite variable+set~$\fn{vars}(k)$.  Thus all substitutions in this section are finite+maps.++\begin{defn}[Ancestors]+Let $t'=t\termat p$.  The \emph{ancestors} of~$t'$ in~$t$ at~$p$ is+the set $\fn{anc}(t,p)=\{t\termat p'\mid \mbox{$p'$ a proper prefix+  of~$p$}\}$.+\end{defn}++\begin{defn}[Carried Only Within]\label{def:cow}+Message~$t$ is \emph{carried only within} set~$T_e$ in~$t'$, written+$t\nncow{T_e}t'$, if for all carried positions~$p$ of~$t$ in~$t'$,+there exists an ancestor~$t_a\in\fn{anc}(t',p)$ and $t_e\in T_e$ such+that~$t_a\equiv t_e$.  The negation, $\neg(t\nncow{T_e}t')$ is written+$t\ncow{T_e}t'$.+\end{defn}++Definition~\ref{def:carried positions} defines $\fn{carpos}(t,t')$, the+set of positions at which~$t'$ carries~$t$.++A reduction on skeletons called a contraction will be described in the+next section in Definition~\ref{def:contraction}.  For a contraction,+given~$t$,~$T_e$, and~$t'$, one must find all most general+unifiers~$\sigma$ such that~$\sigma(t)$ is carried only within+set~$\sigma(T_e)$ in~$\sigma(t')$.++\begin{defn}[Carried Only Within Solution]+The set~$S$ of substitutions is a \emph{carried only within solution}+for~$t$,~$T_e$, and~$t'$ iff $\sigma\in S$ implies $\sigma(t)$ is+carried only within set~$\sigma(T_e)$ in~$\sigma(t')$ and~$S$ is+a complete set of most general unifiers.+\end{defn}++A carried only within solution cannot be directly computed using+Definition~\ref{def:cow}.  Given terms~$t_a$ and~$t_e$, the+$\fn{unify}$ function specified at the end of+Section~\ref{sec:messages} finds substitutions~$\sigma$ such+$\sigma(t_a)\equiv \sigma(t_e)$, however, the carried positions+$\fn{carpos}(\sigma(t),\sigma(t'))$, are used before the $\fn{unify}$+function computes the substitution~$\sigma$.  The remainder of this+section describes an iterative procedure that breaks the cyclic+dependencies.  Each step of the iteration improves an approximation of+a solution to the problem.++\begin{defn}[Carried Only Within at a Substitution]+Message~$t$ is \emph{carried only within} set~$T_e$ in~$t'$ \emph{at+  substitution}~$\sigma$ if for all carried positions~$p$ of~$t$+in~$t'$, there exists an ancestor~$t_a\in\fn{anc}(t',p)$ and $t_e\in+T_e$ such that~$\sigma(t_a)\equiv\sigma(t_e)$, where~$\sigma$ is a+most general unifier.+\end{defn}++Another way to describe this concept is by specifying a set of+unification problems for $t$, $T$, and $t'$.  Let $P$ be a sequence+of positions.++$$\begin{array}{r@{}c@{}l}+\probs_{t,T,t'}(\seq{})&{}={}&\{\{\}\}\\+\probs_{t,T,t'}(\seq{p}\append P)&{}={}&\{+\begin{array}[t]{@{}l}+\{t_a\eqq t_e\}\cup E\mid{}\\+E\in\probs_{t,T,t'}(P), \\+t_a\in\fn{anc}(t',p),\\+t_e\in T\}+\end{array}+\end{array}$$++\begin{defn}[Carried Only Within Problems]+The set $\probs_{t,T,t'}$ is the set  of \emph{carried only within+  problems} for $t$, $T$, and $t'$, where+$\probs_{t,T,t'}=\probs_{t,T,t'}(P)$,+and $P$ is a sequence that enumerates the elements of+$\fn{carpos}(t,t')$.+\end{defn}++\begin{sloppypar}+Message~$t$ is {\cow}~$T$ in~$t'$ at~$\sigma$ if $\sigma$ is a unifier+for a problem in $\probs_{t,T,t'}$.  Message~$\sigma(t)$ is+{\cow}~$\sigma(T)$ in~$\sigma(t')$ if $\sigma$ is a unifier for a+problem in $\probs_{t,T,t'}(\fn{carpos}(\sigma(t),\sigma(t')))$.  When+convenient, a set of positions is sometimes conflated with a sequence+that enumerates the set.  The problems solved by~$\sigma$ are+$$\probs^\sigma_{t,T,t'}=\{E\mid+\begin{array}[t]{@{}l}+E\in\probs_{t,T,t'}(\fn{carpos}(\sigma(t),\sigma(t'))),\\+\mbox{$\sigma$+is a unifier of $E$}\}.+\end{array}$$+\end{sloppypar}++Each step in the iterative procedure involves finding+substitutions~$\sigma$ such that~$t$ is {\cow}~$T_e$+in~$t'$ at~$\sigma$.  The sense in which each step approximates the+solution is captured by the following lemmas.++\begin{lem}\label{lem:anc subst}+$t\termat p$ defined implies $\fn{anc}(\sigma(t),p)=\sigma(\fn{anc}(t,p))$.+\end{lem}++\begin{proof}+By induction patterned after the recursive definition of $\termat$+after expanding the definition of $\fn{anc}$.+\end{proof}++\begin{lem}\label{lem:carpos subst}+$\fn{carpos}(t,t')\subseteq\fn{carpos}(\sigma(t),\sigma(t'))$.+\end{lem}++\begin{proof}+By term induction on the second argument of $\fn{carpos}$.+The case in which $\sigma(t)\equiv\sigma(t')$ and $t\not\equiv t'$+provides an example in which the subset relation is proper.+\end{proof}++\begin{lem}\label{lem:cows approx}+Suppose message~~$t$ is {\cow} set~$T_e$ in~$t'$+at~$\sigma$ and $\sigma(t)$ is {\cow} set~$\sigma(T_e)$+in~$\sigma(t')$ at substitution~$\sigma'$.  Then~$\sigma'$ solves+equations generated from positions in+$\fn{carpos}(\sigma(t),\sigma(t'))\setminus\fn{carpos}(t,t')$,+and~$\sigma$ solves the remaining equations.+\end{lem}++\begin{proof}+The equations solved by~$\sigma'$ are of the form+$\sigma'(\sigma(t_a))\equiv\sigma'(\sigma(t_e))$.  By assumption,+$t'\termat p$ is defined for $p\in\fn{carpos}(t,t')$, so+Lemma~\ref{lem:anc subst} applies, and assures that equations+generated for $\fn{carpos}(t,t')$ remain the same.  By+Lemma~\ref{lem:carpos subst},+$\fn{carpos}(t,t')\setminus\fn{carpos}(\sigma(t),\sigma(t'))$ is+empty.+\end{proof}++Lemma~\ref{lem:carpos subst} can be used to show why this problem is+difficult.  If $\sigma(t)\equiv\sigma(t')$ and $\sigma\unlhd\sigma'$,+then $\sigma'(t)\equiv\sigma'(t')$, however, if~$\sigma(t)$ is+{\cow}~$\sigma(T)$ in~$\sigma(t')$ and $\sigma\unlhd\sigma'$, one+cannot conclude that~$\sigma'(t)$ is {\cow}~$\sigma'(T)$+in~$\sigma'(t')$, because by Lemma~\ref{lem:carpos subst}, it is+possible that $\fn{carpos}(\sigma(t),\sigma(t'))\subset+\fn{carpos}(\sigma'(t),\sigma'(t'))$.++The implementation must consider all possible solutions to the+equations.  It does so by operating on sets of terms and+substitutions.  Given solutions~$S$ to some other equations,+$\fn{solve}(T,T',S)$ extends them to include solutions to one pair+from~$t$ and~$t'$.+$$\fn{solve}(T,T',S)=\{\sigma'\mid t\in T, t'\in T',+\sigma\in S, \sigma'\in\fn{unify}(t,t',\sigma)\}$$++The implementation combines the solutions for single equations by+folding the substitutions produced by the $\fn{solve}$ function.  The+set oriented version of the carried only within at a substitution+function is:+\begin{center}+\begin{tabular}{l}+$\fn{cowf}(t,T_e,t',\sigma)={}$\\+$\quad\fn{cowf_{\mathrm 0}}(t,T_e,t',\{\sigma\},\fn{carpos}(t,t'))$\\+\\+$\fn{cowf_{\mathrm 0}}(t,T_e,t',S,\{\})=S$\\+$\fn{cowf_{\mathrm 0}}(t,T_e,t',S,\{p\}\cup P)={}$\\+\quad $\fn{cowf_{\mathrm 0}}(t,T_e,t',\fn{solve}(\fn{anc}(t',p),T_e,S),P\setminus\{p\})$+\end{tabular}+\end{center}+Observe that~$\sigma(t)$ is {\cow}~$\sigma(T_e)$ in~$\sigma(t')$ if+$\sigma\in\fn{cowf}(t,T_e,t',\sigma)$.++Iterating the $\fn{cowf}$ function can be used to find contractions.+Potential contractions are in $\fn{cows}(t,T_e,t')$, where++\begin{center}+\begin{tabular}{l}+$\fn{cows}(t,T_e,t') ={}$\\+\quad $\fn{cows}_0(t,T_e,t',\idsigma)$+\quad --- $\idsigma$ is the identity+substitution \\+\\+$\fn{cows}_0(t,T_e,t',\sigma) ={}$\\+\quad \textbf{if} $t$ is carried only within $T_e$ at $t'$ \textbf{then}\\+\qquad $\{\sigma\}$\\+\quad \textbf{else}\\+\qquad\textbf{let}+$S=\fn{cowf}(t,T_e,t',\sigma)$+\textbf{in}\\+\qquad$\bigcup_{\sigma'\in S}+\fn{cows}_0(\sigma'(t),\sigma'(T_e),\sigma'(t'),\sigma')$+\end{tabular}+\end{center}++We now show the $\fn{cows}$ function produces the unifiers that make+up a carried only within solution.  It may also produce non-minimal+unifiers.  An additional step is required to remove these unifiers.++The $\fn{cows}$ function terminates because each step in the iteration+reduces the number of variables in the problem statement.+Several lemmas are required to show termination.++\begin{lem}\label{lem:unify subst less}+$\sigma'\in\fn{unify}(t,t',\sigma)$ and+  $\sigma(t)\not\equiv\sigma(t')$ implies $\sigma\lhd\sigma'$.+\end{lem}++\begin{proof}+Assume the negation of the conclusion, that there is a+substitution~$\sigma''$ such that $\sigma=\sigma''\circ\sigma'$.  The+first hypothesis implies $\sigma'(t)\equiv\sigma'(t')$, so+$\sigma''(\sigma'(t))\equiv\sigma''(\sigma'(t'))$, a contradiction.+\end{proof}++\begin{lem}\label{lem:cows less general or equal}+$\sigma'\in\fn{cowf}(\sigma(t),\sigma(T_e),\sigma(t'),\sigma)$+implies $\sigma\unlhd\sigma'$.+\end{lem}++\begin{proof}+By expanding definitions and the transitivity of~$\unlhd$.+\end{proof}++\iffalse+\begin{lem}\label{lem:cows less carpos}+$\sigma'\in\fn{cowf}(\sigma(t),\sigma(T_e),\sigma(t'),\sigma)$+and $\sigma'(t)$ not {\cow}~$\sigma'(T_e)$ in~$\sigma'(t')$+implies+$\fn{carpos}(\sigma(t),\sigma(t'))\subset+\fn{carpos}(\sigma'(t),\sigma'(t'))$.+\end{lem}++\begin{proof}+Assume the negation of the conclusion.  By Lemmas~\ref{lem:carpos+  subst} and~\ref{lem:cows less general or equal},+$\fn{carpos}(\sigma(t),\sigma(t'))=+\fn{carpos}(\sigma'(t),\sigma'(t'))$.+Inspection of the \fn{cows} function shows that substitution~$\sigma'$ solves+the equations specified in Definition~\ref{def:cow},+a contradiction with the second hypothesis.+\end{proof}+\fi++\begin{lem}\label{lem:cows less general}+$\sigma'\in\fn{cowf}(\sigma(t),\sigma(T_e),\sigma(t'),\sigma)$+and+$\sigma(t)$ not {\cow}~$\sigma(T_e)$ in~$\sigma(t')$+implies+$\sigma\lhd\sigma'$.+\end{lem}++\begin{proof}+Assume the negation of the conclusion, that there is a+substitution~$\sigma''$ such that $\sigma=\sigma''\circ\sigma'$.+The first hypothesis implies~$\sigma'$ solves a set of equations+generated by $\fn{carpos}(\sigma'(t),\sigma'(t'))$.+By Lemma~\ref{lem:cows less general or equal}, $\sigma''$ must be a+variable renaming, so $\sigma''\circ\sigma'$ solves the same set of equations,+a contradiction with the second hypothesis.+\end{proof}++\begin{thm}\label{lem:cows terminates}+The function $\fn{cows}(t,T_e,t')$ terminates on all inputs.+\end{thm}++\begin{proof}+By Lemma~\ref{lem:cows less general}, each substitution produced at a+non-terminating step extends a substitution and is strictly less+general than the extended substitution.  Therefore, for each+$\sigma'\in\fn{cowf}(\sigma(t),\sigma(T_e),\sigma(t'),\sigma)$,+the cardinality of the set of variables that occur in $\sigma'(t)$,+$\sigma'(T_e)$, and $\sigma'(t')$ is less than the one for+$\sigma(t)$, $\sigma(T_e)$, and $\sigma(t')$.+\end{proof}++\begin{thm}\label{lem:cows sound}+$\sigma\in\fn{cows}(t,T_e,t')$ implies+$\sigma(t)$ is {\cow}~$\sigma(T_e)$ in~$\sigma(t')$.+\end{thm}++\begin{proof}+Function $\fn{cows}_0$ ensures this property holds when it+terminates.+\end{proof}++\begin{thm}\label{thm:cows complete}+$\sigma(t)$ is {\cow}~$\sigma(T_e)$ in~$\sigma(t')$ implies+  there exists a substitution~$\sigma'$ such that+  $\sigma'\unlhd\sigma$ and+  $\sigma'\in\fn{cows}(t,T_e,t')$.+\end{thm}++\begin{proof}+After~$i$ steps, the set of substitutions supplied to+$\fn{cows}_0$ is:+$$\begin{array}{r@{}c@{}l}+S_0&{}={}&\{\idsigma\}\\+S_{i+1}&{}={}&\{\sigma'\mid\sigma'\in+\fn{cowf}(\sigma(t),\sigma(T),\sigma(t'),\sigma),\sigma\in S_i\}+\end{array}$$+By Lemma~\ref{lem:cows less general or equal}, for each $\sigma'\in+S_{i+1}$, there is a $\sigma\in S_i$ such that $\sigma\unlhd\sigma'$.++The problems solved at the $i+1^{\mathrm{th}}$ step is $\probs^i_{t,T,t'}$.+$$\begin{array}{r@{}c@{}l}+\probs^0_{t,T,t'}&{}={}&\{E\mid E\in\probs_{t,T,t'},+\mbox{$\idsigma$ is a unifier of $E$}\}\\+\probs^{i+1}_{t,T,t'}&{}={}&+\{E\mid \begin{array}[t]{@{}l}+\sigma\in S_i,+E\in\probs_{t,T,t'}(\fn{carpos}(\sigma(t),\sigma(t'))),\\+\sigma'\in S_{i+1}, \mbox{$\sigma'$ is a unifier of $E$}\}+\end{array}+\end{array}$$++By Lemma~\ref{lem:carpos subst}, for each $E'\in+\probs^{i+1}_{t,T,t'}$ there is a $E\in \probs^i_{t,T,t'}$ such that+$E\subseteq E'$.  Observe that by construction, $S_i$+contains a complete set of unifiers for the unification problems in+$\probs^i_{t,T,t'}$.++By hypothesis, since $\sigma(t)$ is {\cow}~$\sigma(T)$+in~$\sigma(t')$, there is a unification problem+$E\in\probs^\sigma_{t,T,t'}$.  By induction we show that there is an+$E_i\in\probs^i_{t,T,t'}$ such that $E_i\subseteq E$ for all $i$.++The base case is obvious, so assume the conclusion at~$i$, that there+is a $\sigma_i\in S_i$ that is a unifier for some $E_i\subseteq E$ and+$\sigma_i\unlhd\sigma$.  By Lemma~\ref{lem:carpos subst}, there must+be an $E_{i+1}$ such that $E_i\subseteq E_{i+i}\subseteq E$.+Since~$S_{i+i}$ contains a complete set of unifiers for~$E_{i+1}$,+there is a $\sigma_{i+1}\in S_{i+1}$ with $\sigma_{i+1}\unlhd\sigma$.++Since the \fn{cows} function terminates and computes complete sets of+unifiers, it will produce a~$\sigma'$ such that $\sigma\unlhd\sigma'$.+\end{proof}++\section{Authentication Tests}\label{sec:auth tests}++In what follows, we assume all skeletons are pruned, and use the word+``skeleton'' to mean pruned skeleton.++\begin{defn}[Protectors]+Let \fn{deriv} be a boolean valued function that determines if a+message is derivable.  The encryptions that protect~$t_c$ in~$t$ is+$\fn{protectors}(\fn{deriv},t_c, t) = \fn{prot}(t)$ where+$$\fn{prot}(t) =\left\{+\begin{array}{ll}+\mbox{undefined}&\mbox{if $t\equiv t_c$, else}\\+\{\}&\mbox{if $t=\enc{t_0}{t_1}$ and $t_c$ is not carried by~$t_0$, else}\\+\{\enc{t_0}{t_1}\}&+\mbox{if $t=\enc{t_0}{t_1}$ and $\lnot\fn{deriv}(\fn{inv}(t_1))$, else}\\+\fn{prot}(t_0)&\mbox{if $t=\enc{t_0}{t_1}$, else}\\+\bigcup_{i<n}\fn{prot}(t_i)&\mbox{if $t=f(t_0,\ldots,t_{n-1})$ and~$t$+  is not an atom, else}\\+\{\}&\mbox{otherwise.}+\end{array}\right.$$+\end{defn}++\begin{defn}[Escape Set]+The escape set for message~$t_c$ at~$n$ in skeleton~$k$ is the set of+encryptions $\fn{esc}(k,n,t_c)$ where+$$\fn{esc}(k,n,t_c)=\{t_e\mid t_e\in\fn{protectors}(\lambda+t\mathpunct.\fn{der}(k,n,t),t_c,t_o), t_o\in\fn{outpred}(k,n)\}$$+and~$\fn{der}(k,n,t)$ is true when $t$ is derivable before~$n$ in~$k$+(See Definition~\ref{def:der}).+\end{defn}++The $\fn{der}$ function is implemented as+$\fn{der}(k,n,t)=\fn{bld}(t,T_p,T_a)$ where+$(T_p,T_a)=\fn{dcmp}(k,n)$, so that~$T_p$ and~$T_a$ need not be+recomputed.++\begin{defn}[Critical Nonce]+An atom~$t$ is a \emph{critical nonce} at unrealized reception+node~$n$ in skeleton~$k$ if~$t$ is carried by $\fn{msg}(k,n)$,+$t\in\fn{unique}(k)$,~$t$ originates in~$k$, $\fn{esc}(k,n,t)$ is+defined, and~$t$ is not carried only within $\fn{esc}(k,n,t)$ in+$\fn{msg}(k,n)$.+\end{defn}++\begin{defn}[Critical Encryption]+An encryption~$t=\enc{t_0}{t_1}$ is a \emph{critical encryption} at+unrealized reception node~$n$ in skeleton~$k$ if~$t$ is carried by+$\fn{msg}(k,n)$,~$t_1$ is not derivable before~$n$ in~$k$,+$\fn{esc}(k,n,t)$ is defined, and~$t$ is not carried only within+$\fn{esc}(k,n,t)$ in $\fn{msg}(k,n)$.+\end{defn}++\begin{defn}[Critical Message]+A message~$t$ is a \emph{critical message} at node~$n$ in skeleton~$k$+if it is a critical nonce or a critical encryption.+\end{defn}++Observe that every critical message at a node in a skeleton is not+derivable at the node.++\begin{thm}+Every unrealized reception node has a critical message.+\end{thm}++\begin{defn}[Critical Message Solved]\label{def:critical message solved}+Suppose~$t_0$ is a critical message at~$n_0$ in~$k_0$ and+$k_0\homomorphism{\phi,\sigma}k_1$.  Let~$t_1=\sigma(t_0)$,+$T=\sigma(\fn{esc}(k_0,n_0,t_0))$, $n_1=\phi(n_0)$,+and~$t=\fn{msg}(k_1,n_1)$.  Critical message~$t_0$ is solved in~$k_1$+after~$k_0$ at~$n_0$ if:+\begin{enumerate}+\item $t_1$ is carried only within~$T$ in~$t$, or+\item for some~$t_p\in\fn{outpred}(k_1,n_1)$, $t_1$ is not carried+  only within~$T$ in~$t_p$, or+\item the decryption key of a member of~$T$ is derivable+  before~$n_1$ in~$k_1$, or+\item $t_1$ is an encryption and its encryption key is derivable+  before~$n_1$ in~$k_1$.+\end{enumerate}+\end{defn}++\begin{defn}[Contraction]\label{def:contraction}+Let~$t_c$ be a critical message at~$n$ in~$k$.  Suppose there is a+substitution~$\sigma$ such that~$\sigma(t_c)$ is carried only+within~$\sigma(\fn{esc}(k,n,t_c))$ in $\sigma(\fn{msg}(k,n))$.+Skeleton~$k_1$ is a \emph{contraction} if+$k\reduction{\ops{S}_\sigma}k_0\reduction{\fn{skel}}k_1$.+\end{defn}++The function~$\ops{A}_{i,n}$ augments a preskeleton with a new strand.+It appends the instance~$i$ to the sequence of instances, adds node+orderings, and adds atoms as specified by the role of the instance.+The function orders the last node in the strand before some node~$n$+in the preskeleton.++\begin{defn}[Augmentation]\label{def:augmentation}+Skeleton~$k_0$ reduces to preskeleton~$k_1$ by the augmentation~$i,n$,+written $k_0\reduction{\ops{A}_{i,n}}k_1$ if+\begin{enumerate}+\item $\fn{insts}(k_1)=\fn{insts}(k_0)\append\seq{i}$;+\item $\kprec{k_1}=(\mathord{\kprec{k_0}}\cup\mathord{\Rightarrow_{k_1}}\cup+\mathord{\{(n_0, n)\}})^\ast$, where $n_0=(|\fn{insts}(k_0)|,+\fn{height}(i)-1))$;+\item $\fn{unique}(k_1)$ is $\fn{unique}(k_0)$ and the inherited+  uniquely originating atoms in~$i$;+\item $\fn{non}(k_1)$ is $\fn{non}(k_0)$ and the inherited+  non-originating atoms in~$i$.+\end{enumerate}+\end{defn}++\begin{defn}[Regular Augmentation]+Let~$t_c$ be a critical message at~$n$ in~$k$, and~$i$ be an instance+of a regular, non-listener role.  Skeleton~$k_2$ is a \emph{regular+  augmentation} if+$k\reduction{\ops{A}_{i,n}}k_0\reduction{\ops{S}_\sigma}k_1+\reduction{\fn{skel}}k_2$ for some substitution~$\sigma$ and~$t_c$ is+solved in~$k_2$ after~$k_0$ at~$n$.+\end{defn}++The details of regular augmentation is the subject of the next section.++\begin{defn}[Listener Augmentation]+Let~$t_c$ be a critical message at~$n$ in~$k$, and+$T=\fn{esc}(k,n,t_c)$.  For each $\enc{t_0}{t_1}\in T$,+skeleton~$k_1$ is a \emph{listener augmentation} if+$k\reduction{\ops{A}_{i,n}}k_0\reduction{\fn{skel}}k_1$ and~$i$ is a+listener for $\fn{inv}(t_1)$.  If $t_c=\enc{t_0}{t_1}$, then+skeleton~$k_1$ is a \emph{listener augmentation} if+$k\reduction{\ops{A}_{i,n}}k_0\reduction{\fn{skel}}k_1$ and~$i$ is a+listener for $t_1$.+\end{defn}++\begin{defn}[Cohort Member]+For unrealized node~$n$ in a skeleton~$k_0$, and a critical+message~$t$ at~$n$, $k_0\reduction{n,t}k_1$ asserts that $k_1$ is a+member of the cohort of~$k_0$, where~$k_1$ is derived using+contraction, regular augmentation, or listener augmentation, and~$t$+is solved in~$k_1$ after~$k_0$ at~$n$.  For the setwise cohort member+reduction, $\{k_0\}\setreduction{n,t}\{k_1\mid k_0\reduction{n,t}k_1\}$,+when~$n$ is unrealized in~$k_0$, and~$t$ is a critical message at~$n$.+\end{defn}++\begin{thm}[Cohort Correct]+Let node~$n$ be unrealized in skeleton~$k$, and~$t$ be a critical+message at~$n$.  For every realized skeleton~$k_1$ such that+$k\homomorphism{\psi_1}k_1$, there is a~$k_0$,~$\psi_0$, and~$\psi$+with $k\reduction{n,t}k_0$, $k\homomorphism{\psi_0}k_0$, and+$\psi_1=\psi\circ\psi_0$.++$$\xymatrix@C=3em{+k\ar@{|->}[r]^{\psi_0} \ar@{|->}[rd]_{\psi_1} &+k_0 \ar@{|->}[d]^{\psi}\\+&k_1}$$+\end{thm}++\begin{thm}[Cohort]+Reduction $\setreduction{\fn{co}}=\bigcup_{n,t}\setreduction{n,t}$ is+confluent.+\end{thm}++\begin{thm}[Critical Message Solved]+If $k_0\reduction{n_0,t_0}k_1 \reduction{n_1,t_1}\ldots+\reduction{n_{\ell-1},t_{\ell-1}}k_\ell$ is a sequence of cohort member+reductions, then for positive~$\ell$,~$t_0$ is solved in~$k_\ell$+after~$k_0$ at~$n_0$.+\end{thm}++\section{Finding Regular Augmentations}\label{augmentations}++Let~$t_c$ be the critical message that demonstrates~$n$ is a test node+in skeleton~$k$.  For each substitution-instance pair~$(\sigma,i)$+that satisfies some properties, there is a potential regular+augmentation with~$\comp{\reduction{\fn{skel}}}%+{\comp{\reduction{\ops{S}_\sigma}}{\reduction{\ops{A}_{i,n}}}}$.+When successful, the message~$t$ in the last node of the added strand+is outbound, carries~$\sigma(t_c)$, but~$\sigma(t_c)$ is not carried+only within escape set~$\sigma(T_e)$ in~$t$.  Moreover, for every+other message~$t$ in the strand,~$\sigma(t_c)$ is carried only within+escape set~$\sigma(T_e)$ in~$t$.  The last node in the strand is+called a \emph{transforming node}, as this node no longer protects the+critical message, but nodes that precede it do.++When generating a candidate substitution-instance pair~$(\sigma,i)$+for augmentation, $\fn{trace}(i)$ must contain a member of~$T_t$, the+set of \emph{target messages}.  The critical message~$t_c$ is a member along+with each ancestor of the critical message~$t_c$ on every path to a place+at which~$t_c$ is carried in every member of the escape set~$T_e$,+with the exception of the members of~$T_e$.  That is,+$T_t=\{t_c\}\cup\{t_t\mid t_e\in T_e,p\in\fn{carpos}(t_c, t_e),+t_t\in\fn{anc}(t_e,p)\}\setminus T_e$.++To find all candidate substitution-instance pairs, each role in the+protocol is considered.  For each role~$r$, a substitution~$\sigma_r$+is created.  The domain of~$\sigma_r$, $\fn{Dom}(\sigma_r)$, is the+variables that occur in the role's trace.  The substitution~$\sigma_r$+is a bijection, and each variable in $\fn{Ran}(\sigma_r)$ is chosen in+a way that ensures it does not occur in the skeleton~$k$ or in any of+its roles.++Consider each outbound message~$t_{n-1}$ in $\fn{rtrace}(r)=\seq{\pm+  t_0,\ldots,+t_{n-1},\ldots}$.  Let substitutions~$S$ be a complete+set of most general unifiers~$\sigma'$ such that for every message~$t$+that is carried by $t_{n-1}$ and message~$t_t\in T_t$,+$\sigma'(t)\equiv\sigma'(t_t)$, and $\sigma_r\unlhd\sigma'$.  This+operation inserts the critical message into the trace+$\sigma_r\circ\fn{rtrace}(r)$.++The next step is to explore ways to extend the substitution~$\sigma'$+so that for events in $\sigma'\circ\fn{rtrace}(r)$ that+precede~$t_{n-1}$, the critical message is carried only within the+escape set.  The function \fn{cowt} performs the explorations,+producing the substitutions+$S'=\fn{cowt}(t_c,T_e,\fn{rtrace}(r)|_{n-1},S)$.+\begin{center}+\begin{tabular}{l}+$\fn{cowt}(t,T_e,\seq{},S)=S$\\+$\fn{cowt}(t,T_e,\seq{\pm t'}\append C,S)={}$\\+$\quad\fn{cowt}(t,T_e,C,\bigcup_{\sigma\in S}+\fn{cows}_0(\sigma(t),\sigma(T_e),\sigma(t'),\sigma))$+\end{tabular}+\end{center}+Function $\fn{cows}_0$ is defined in Section~\ref{sec:cow}.++The final step is to check that for each $\sigma''\in S'$, $\sigma''(t_c)$+is not carried only within $\sigma''(T_e)$ in~$\sigma''(t_{n-1})$.  If so+there is a potential regular augmentation constructed from+$(\sigma,i)$, where $\fn{role}(i)=r$, $\fn{height}(i)=n$,+and $\fn{subst}(i)=\sigma$, where~$\sigma$ is~$\sigma''$ stripped of+mappings to messages with variables that do not occur in+$\sigma''\circ\fn{rtrace}(r)$.++\begin{note}+Substitutions $\sigma''$ that are not mgus should be dumped.  Is it+okay to dump substitutions before the last check?  Are we sure we can+dump them before we transform the resulting preskeletons into pruned+skeletons?++Update: we have to dump non-mgus after the resulting preskeletons into pruned+skeletons.+\end{note}++\begin{note}+It may not be enough to add an edge from the final node of the new strand+to the test node.  It may be that in order to really \emph{solve} the+test, we must provide a sufficient explanation of how the added strand+received the critical term carried only with the escape set.  This+would involve finding the appropriate edges from the existing skeleton+to the added strand.+\end{note}++\section{Generalization}\label{generalization}++Each problem statement for {\cpsa} is expressed as a preskeleton.  If+the preskeleton cannot be transformed into a single skeleton using the+Preskeleton Reduction System, an error is signaled.  Otherwise, the+first skeleton is designated as the \index{point-of-view+  skeleton}point-of-view skeleton.  For each skeleton generated from a+point-of-view skeleton via contraction, augmentation, and+generalization, there is a homomorphism from the point-of-view+skeleton.  Simplifying the implementation is the motivation for+restricting the algorithm to problem statements that are expressed by+a single skeleton.++\begin{defn}[Generalize]+A skeleton~$k_0$ \emph{generalizes}+skeleton~$k_1$, written $k_1\reduction{<}_k k_0$, if+both~$k_0$ and~$k_1$ are realized,~$k_0$ and~$k_1$ are not isomorphic,+there is a homomorphism from a point-of-view skeleton~$k$ to~$k_0$, and+a strandwise injective homomorphism $k_0\mapsto k_1$.+\end{defn}++\begin{note}+Recent experiments show that pruning must not be performed when+generalizing.+\end{note}++If skeletons are allowed to be isomorphic, we+write~$k_1\reduction{\leq}_k k_0$, and note that $\reduction{\leq}_k$+defines a partial ordering.  Therefore, there are maximal elements in+the partial ordering.  A shape associated with a preskeleton+is a maximally generalized realized skeleton derived from the+preskeleton.++\begin{defn}[Shape]+Let~$k_0$ be a preskeleton such that $k_0\reduction{\fn{skel}}k$+and~$k$ is unique, and let~$k_1$ be a realized skeleton such that+$k\mapsto k_1$.  Skeleton~$k_2$ is a \emph{shape} of~$k_0$ if+$k_1\reduction{\leq}_k k_2$, and~$k_2$ is maximal among skeletons that+generalize~$k_1$.+\end{defn}++There are four generalization reductions used to transform a realized+skeleton into its shapes: deletion, weakening, forgetting, and+separation.++\begin{defn}[Deletion]+Skeleton~$k_0$ \emph{generalizes by deletion} skeleton~$k_1$, written+$k_1\reduction{\ops{D}_n}_k k_0$, if $k_1\reduction{<}_k k_0$,+$k_2\reduction{\fn{skel}}k_0$, and~$k_2$ is the result of deleting+node~$n$ in~$k_1$ and all of the nodes that follow it in its strand.+\end{defn}++\begin{defn}[Weakening]+Skeleton~$k_0$ \emph{generalizes by weakening} skeleton~$k_1$, written+$k_1\reduction{\ops{W}_{n,n'}}_k k_0$, if $k_1\reduction{<}_k k_0$,+$k_2\reduction{\fn{skel}}k_0$, and~$k_2$ is~$k_1$ except+$\kprec{k_2}=(\kprec{k_1}\setminus\{(n,n')\})^\ast$.+\end{defn}++\begin{defn}[Forgetting]+Skeleton~$k_0$ \emph{generalizes by origination assumption forgetting}+skeleton~$k_1$, written $k_1\reduction{\ops{F}_t}_k k_0$, if+$k_1\reduction{<}_k k_0$, $k_2\reduction{\fn{skel}}k_0$, and~$k_2$+is~$k_1$ except $\fn{unique}(k_2)=\fn{unique}(k_1)\setminus\{t\}$ and+$\fn{non}(k_2)=\fn{non}(k_1)\setminus\{t\}$.+\end{defn}++Sometimes a more general skeleton can be found by replacing some+occurrences of one variable by a fresh variable.  For variable+separation, the location of an occurrence of a variable is defined+using a skeleton's instance sequence.++\begin{defn}[Location]+Message~$t$ is at \emph{location} $(s,x,p)$ in~$k$ if+$t=\fn{subst}(I(s))(x)\termat p$ and $I=\fn{insts}(k)$.+\end{defn}++\begin{defn}[Separation]+Skeleton~$k_0$ \emph{generalizes by variable separation}+skeleton~$k_1$, written $k_1\reduction{\ops{V}_t}_k k_0$, if+$k_1\reduction{<}_k k_0$, $k_2\reduction{\fn{skel}}k_0$, and~$k_2$+is~$k_1$ except ~$t$ is a variable that occurs in multiple locations+in~$k_1$, and~$k_2$ is the result of replacing~$t$ with a variable~$t_0$+of the same sort at a subset of~$t$'s locations, where~$t_0$ occurs+nowhere in~$k_1$.+\end{defn}++When separating a non-originating term, both the term and its clone+are non-originating.  When separating a uniquely originating term,+either the term or its clone is uniquely originating.++\begin{note}+What happens when separating~$t$ in~$k$ into~$t$ and~$t_0$, and+$\cn{ltk}(t,t)\in\fn{non}(k)$?  Should a skeleton~$k_0$ with+$\cn{ltk}(t,t_0)\in\fn{non}(k_0)$ be a candidate separation?+Currently, only skeletons~$k_1$ with $\cn{ltk}(t,t)\in\fn{non}(k_1)$+and $\cn{ltk}(t_0,t_0)\in\fn{non}(k_1)$ are considered.+\end{note}++\begin{defn}[Generalization]+The reduction~$\reduction{\fn{gen}}_k+=\bigcup_n\reduction{\ops{D}_n}_k\cup+\bigcup_{n,n'}\reduction{\ops{W}_{n,n'}}_k\cup+\bigcup_t\reduction{\ops{F}_t}_k\cup \bigcup_t\reduction{\ops{V}_t}_k$+is the \emph{generalization} relation.  For the setwise generalization+reduction, $\{k_0\}\setreduction{\fn{gen}}_k\{k_1\}$ when+$k_0\reduction{\fn{gen}}_k k_1$.+\end{defn}++\begin{note}+The fact that each generalization reduction replaces a singleton with+just a singleton requires explanation.  We're not sure it's justified,+and harbor serious doubts.  It is justified if we can prove the+conjecture that the cohort reduction relation produces every shape,+and generalization just identifies which realized skeletons are+shapes.  However, one member of the test suite provides a counter+example to the conjecture.  Barring a bug in {\cpsa}, the conjecture+must be false.+\end{note}++\begin{thm}[Generalization]+The relation~$\setreduction{\fn{gen}}_k$ is terminating.+\end{thm}++\subsection*{Discussion}+In~\cite{DoghmiGuttmanThayer07}, the shapes of a point-of-view+skeleton are said to be minimal, in the partial ordering induced by+injective homomorphism, among all realized homomorphic images of the+point-of-view skeleton.  Minimal corresponds to maximally generalized.+The need for origination assumption forgetting was not known+when~\cite{DoghmiGuttmanThayer07} was written.  Generalization by+variable separation uses non-carried positions, and in particular,+positions that traverse an atom edge.  Algebras in previous strand+space papers have no concept of a position that traverses an atom+edge, and therefore cannot be used to specify generalization by+variable separation.++\section{Collapsing}\label{collapsing}++Let reduction $\setreduction{\fn{cg}}_k=(\setreduction{\fn{co}}\cup+\setreduction{\fn{gen}}_k)^+$, the transitive closure of the cohort+and generalization setwise reduction relations.  The normal forms of+this relation are sets of shapes, however, shapes may be missing from+each set.  The missing shapes are found by collapsing other shapes.++\begin{defn}[Collapsing]+Let $k_0$ and $k_1$ be two skeletons such that there are two+strands,~$s$ and~$s'$, and a substitution~$\sigma$ with+$\sigma(\fn{evt}(k_0,(s,p)))= \sigma(\fn{evt}(k_0,(s',p)))$ for all+$p<h$, where~$h$ is the height of strand~$s$ in~$k_0$.  Then~$k_0$+\emph{collapses} to~$k_1$, written $k_0\reduction{\fn{clp}}k_1$, if+$k_0\reduction{\ops{S}_\sigma}k\reduction{\ops{C}_{s,s'}}k'+\reduction{\fn{skel}}k_1$.+\end{defn}++\begin{defn}[Setwise Collapsing]+For the collapsing relation $\setreduction{\fn{clp}}_k\subseteq+\pow{\alg{K}}\times\pow{\alg{K}}$,+$K_0\setreduction{\fn{clp}}_k K_1$ if~$K_0$ is a normal form of+$\setreduction{\fn{cg}}_k$, for some $k_0\in K_0$, $k_0+\reduction{\fn{clp}}k$, $\{k\}\cup K_0\setreduction{\fn{cg}}_k K_1$,+and $K_0\neq K_1$.+\end{defn}++Notice that a setwise cohort reduction may produce the empty set, but+a setwise generalization and collapsing reduction never does.++\section{Skeleton Reduction System}\label{sec:skeleton reduction}++Let reduction+$\twoheadrightarrow_k=\setreduction{\fn{cg}}_k\cup+(\setreduction{\fn{clp}}_k)^+$.+\begin{thm}+The reduction~$\twoheadrightarrow_k$ is confluent.+\end{thm}++\begin{thm}[Soundness]+Let~$k_0$ be a preskeleton such that $k_0\reduction{\fn{skel}}k$+and~$k$ is unique and unrealized.  Skeleton~$k_1$ is a shape of~$k_0$+if $\{k\}\twoheadrightarrow_k K$, $k_1\in K$, and~$K$ is a normal+form.+\end{thm}++\begin{thm}[Completeness]+Let~$k_0$ be a preskeleton such that $k_0\reduction{\fn{skel}}k$+and~$k$ is unique and unrealized.  If $\{k\}\twoheadrightarrow_k K$,+and~$K$ is a normal form, then~$k_1$ is a shape of~$k_0$ only if+$k_1\in K$.+\end{thm}+\appendix++\section{Programs Specified by a Role's Trace}\label{sec:traces}++The behavior associated with a role's trace is possible as long as some+messages are available initially.  The required initial messages are+specified by a pair of ternary relations, $\flow{T_0}{C}{T_1}$ and+$\flow{T_0}{\pm t}{T_1}$.  The relation $\flow{T_0}{C}{T_1}$ asserts+that messages in~$T_1$ are available after a run of~$C$ given the+messages in~$T_0$ are available initially.  The relation is defined+using the $\flow{T_0}{\pm t}{T_1}$ relation.++$$\flow{T}{\seq{}}{T}\qquad+\infer{\flow{T_0}{\pm t}{T}\quad\flow{T}{C}{T_1}}%+{\flow{T_0}{\seq{\pm t}\append C}{T_1}}$$++The $\flow{T_0}{\pm t}{T_1}$ relation is defined using the+$\flow{T_0}{C}{T_1}$ relation.  An outbound message can be formed if+it is available initially+$$\infer{t\in T}{\flow{T}{+t}{T}}$$+or if it can be formed by construction.+$$\infer{\flow{T}{\seq{+t_0,\ldots,+t_{n-1}}}{T}}%+{\flow{T}{+f(t_0,\ldots,t_{n-1})}{T}}\quad+\left[\begin{array}{l}+f\in\Sigma_{w,s}\land n=|w|\land {}\\+\mbox{$f(t_0,\ldots,t_{n-1})$ not an atom}+\end{array}\right]$$++An inbound message makes atoms, acquired variables, and+encryptions available.+$$\flow{T}{-t}{T\cup\{t\}}\quad [\mbox{$t$ an atom or a variable}]$$+When the decryption key is available, the contents of the encryption+is also available.  Furthermore, the encryption can be sent in future+messages without access to its encryption key.+$$\infer{\flow{T_0}{+\fn{inv}(t_1)}{T_0}\quad+  \flow{T_0}{-t_0}{T_1}}{\relax+  \flow{T_0}{-\enc{t_0}{t_1}}{T_1\cup\{\enc{t_0}{t_1}\}}}$$ A received+encryption that can be sent ensures the encyption agrees with+currently available terms and makes nothing new available.+$$\infer{\flow{T}{+\enc{t_0}{t_1}}{T}}{\relax+  \flow{T}{-\enc{t_0}{t_1}}{T}}$$++Consider an operation $f\in\Sigma_{w,s}$ other than the encryption+operation.  The order in which messages that occur in a message+constructed using~$f$ are made available may determine if the+decryption key of an encryption is available.  Let~$\pi_n$ be a+permutation on the domain of a sequence of length~$n$.+$$\infer{\flow{T_0}{\seq{-t_0,\ldots,-t_{n-1}}\circ\pi_n}{T_1}}%+{\flow{T_0}{-f(t_0,\ldots,t_{n-1})}{T_1}}\quad+\left[\begin{array}{l}+f\in\Sigma_{w,s}\land n=|w|\land f\neq\cn{enc}\land {}\\+\mbox{$f(t_0,\ldots,t_{n-1})$ not an atom}+\end{array}\right]$$++\begin{defn}[Trace Parameters]+The set of atoms~$T_0$ are \emph{parameters} of trace~$C$ if+$\flow{T_0}{C}{T_1}$ for some~$T_1$, and~$T_0$ is minimal, that is for+all~$T'_0$ such that $\flow{T'_0}{C}{T_1}$, $T'_0\not\subset T_0$.+\end{defn}++The role $\seq{\outbnd\enc{a,n}{K_b},\inbnd\enc{n}{K_a}}$ has+two sets of parameters, $\{a,n,K_b,K^{-1}_a\}$+and $\{a,n,K_b,K_a\}$.  A program that implements the role using the+second set is useless, so it will be ignored.  The intended program+for the role follows.+$$\begin{array}{ll}+\cn{proc}(a,n,K_b,K^{-1}_a)\\+\quad \cn{send}(\enc{a,n}{K_b});\\+\quad x_0\gets \cn{recv}();\\+\quad x_1\gets \cn{decrypt}(x_0,K^{-1}_a);\quad\mbox{--- may fail}\\+\quad x_1 \neq n \to \cn{fail};\\+\cn{end}+\end{array}$$++Let $T_0=\{a,n,K_b,K^{-1}_a\}$ and $T_1=T_0\cup\{\enc{n}{K_a}\}$.  The+derivation tree that specifies the intended program has the following+outline.+$$\begin{array}{l}+\mbox{\ldots~construct outbound message}  \\+\flow{T_0}{\outbnd\enc{a,n}{K_b}}{T_0}\\+\mbox{\ldots~decode inbound message}  \\+\flow{T_0}{\inbnd\enc{n}{K_a}}{T_1} \\+\mbox{\ldots~compose trace}  \\+\flow{T_0}{\seq{\outbnd\enc{a,n}{K_b},\inbnd\enc{n}{K_a}}}{T_1}+\end{array}$$++The decoding of the inbound message is specified by this derivation.+$$\infer{\flow{T_0}{\outbnd K^{-1}_a}{T_0}\qquad+\infer{\flow{T_0}{\outbnd n}{T_0}}{\flow{T_0}{\inbnd n}{T_0}}}+{\flow{T_0}{\inbnd\enc{n}{K_a}}{T_1}}$$++\section*{Acknowledgment}++Carolyn Talcott and Leonard Monk provided valuable feedback on drafts+of this document.++\bibliography{cpsa}+\bibliographystyle{plain}++\printindex++\tableofcontents++\end{document}
+ doc/cpsauser.html view
@@ -0,0 +1,479 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"+      "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+<head>+  <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />+  <title>CPSA 2.0 User Guide</title>+  <meta name="generator" content="Amaya 9.54, see http://www.w3.org/Amaya/" />+  <style type="text/css">+    h1 { text-align: center }+    body { background: white; color: black }+  </style>+</head>++<body>+<h1>CPSA 2.0 User Guide</h1>++<p>The Cryptographic Protocol Shapes Analyzer (CPSA) attempts to enumerate all+essentially different executions possible for a cryptographic protocol. We call+them the <i>shapes</i> of the protocol. Naturally occurring protocols have only+finitely many, indeed very few shapes. Authentication and secrecy properties+are easy to determine from them, as are attacks and anomalies.</p>++<p>For each input problem, the CPSA program is given some initial behavior, and+it descovers what shapes are compatible with it. Normally, the initial behavior+is from the point of view of one participant. The analysis reveals what the+other participants must have done, given the participant's view. The search is+based on a high-level algorithm shown to be complete, i.e. every shape can in+fact be found in a finite number of steps. The implemented algorithm is not+known to be complete, but appears to come close. The shapes analysis is+performed within a pure Dolev-Yao model, and the analyzer handles message terms+compatible with the signature of an Order Sorted Algebra. In this release, the+analyzer, <tt>cpsa</tt> handles two algebras, the Basic Cryptographic Algebra+and the Diffie-Hellman Algebra. The source release contains an interface+designed to ease the task of adding support for other message term algebras.</p>++<p>The analyzer is designed to work well with other tools. S-expressions are+used for both input and output. The analyzer reads all the problems in its+input, writes out the solution to each problem, and then exits. This release+contains five tools. The <a href="#cpsagraph"><tt>cpsagraph</tt></a> program+provides a visualization of answers using Scalable Vector Graphics (<a+href="http://www.w3.org/Graphics/SVG/">SVG</a>). The <a+href="#cpsashapes"><tt>cpsashapes</tt></a> program removes intermediate results+from analyzer runs making the shapes easy to identify. The <a+href="#cpsaannotations"><tt>cpsaannotations</tt></a> program uses protocol+annotations to annotate shapes and generate protocol soundness obligations. The+<a href="#cpsaparameters"><tt>cpsaparameters</tt></a> program detects some+specification errors by performing a base term usage analysis. The <a+href="#cpsapp"><tt>cpsapp</tt></a> program pretty prints its input using the+CPSA specific algorithm.</p>++<p>The input syntax is essentially the same as the output systax. A Lisp aware+editor will pretty print input, and the output is pretty printed. We use Emacs'+Scheme mode to prepare input. This document describes the syntax, but provides+little assistance for its interpretation. See the CPSA Tutorial document for+this information.</p>++<p>The typical pattern of usage is to enter the set of problems to be analyzed+into a file, in this example, <tt>prob.scm</tt>, analyze the problems, and if+something interesting is produced, visualize the answers.</p>++<blockquote>+  <pre>$ cpsa +RTS -M512m -RTS -o prob.txt prob.scm+$ cpsagraph -o prob.xml prob.txt+$ firefox -remote "openFile(`pwd`/prob.xml)"</pre>+</blockquote>++<p>Often a summary of the analysis is more enlightening.</p>++<blockquote>+  <pre>$ cpsashapes -o prob_shapes.txt prob.txt+$ cpsagraph -o prob_shapes.xml prob_shapes.txt+$ firefox -remote "openFile(`pwd`/prob_shapes.xml)"</pre>+</blockquote>++<p>The distribution comes with the file <a href="cpsa.mk"><tt>cpsa.mk</tt></a>+for inclusion into your makefile. A sample makefile follows. If you+cut-and-paste from a browser window, but sure to convert the leading spaces in+the last line to a tab character.</p>++<blockquote>+  <pre>CPSAFLAGS = +RTS -M512m -RTS++include cpsa.mk++all:    $(patsubst %.scm,%_shapes.xml,$(wildcard *.scm))++clean:+        -rm *.txt *.xml</pre>+</blockquote>++<p>For platforms without GNU <tt>make</tt>, the Haskell program <a+href="Make.hs"><tt>Make.hs</tt></a> can be loaded into a Haskell interpreter+and perform a similar function. Users are expected to modify the program to+suit their needs.</p>++<h2>Syntax</h2>++<p>The syntax is extensible. Association lists in which the key is always a+symbol are allowed at various points in the grammar. Key-value pairs with+unrecognized keys are ignored, and are available for use by other tools. On+output, unrecognized key-value pairs are preserved when printing protocols, but+elided when printing skeletons, with the exception of the <tt>comment</tt>+key.</p>++<p>The input is a sequence of protocol definitions and problem statements. A+problem statement describes the initial behavior as a skeleton. The grammar for+a protocol follows.</p>++<blockquote>+  <pre>PROTOCOL   ::= (defprotocol ID ALG ROLE+ PROT-ALIST)+ID         ::= SYMBOL+ALG        ::= SYMBOL+ROLE       ::= (defrole ID VARS TRACE ROLE-ALIST)+VARS       ::= (vars DECL*)+DECL       ::= (ID+ SORT)+TRACE      ::= (trace EVENT+)+EVENT      ::= (send TERM) | (recv TERM)+ROLE-ALIST ::= (non-orig HT-TERM*) ROLE-ALIST+            |  (uniq-orig TERM*) ROLE-ALIST | ...+HT-TERM    ::= TERM | (INT TERM)+PROT-ALIST ::= ...</pre>+</blockquote>++<p>The protocol <tt>ID</tt> is a symbol that names the protocol, and the role+<tt>ID</tt> is a symbol that names the role. The <tt>ALG</tt> symbol identifies+the algebra used by the protocol. For the Basic Cryptographic Algebra, the+symbol is <tt>basic</tt>. For the Diffie-Hellman Algebra, the symbol is+<tt>diffie-hellman</tt>. The <tt>var</tt> form contains symbols that declare+the sort of the variables used in this role. The set of sort symbols is algebra+specific. The protocol association list has no predefined keys, while the role+association list has two. The value associated with both of these keys must be+base terms in the algebra. Each <tt>non-orig</tt> term must not be carried by+any event in the role's trace, but must occur in some term. Each+<tt>uniq-orig</tt> term must originate in the role's trace. Every non-base+variable must be acquired by the role's trace.</p>++<p>The structure of sorts and terms in the Basic Cryptographic Algebra+follows.</p>++<blockquote>+  <pre>SORT :: = text | data | name | skey | akey | mesg+TERM ::= ID | STRING | (cat TERM+) | (enc TERM+ TERM)+      |  (pubk ID) | (privk ID) | (invk ID) | (ltk ID ID)+      |  (pubk STRING ID) | (privk STRING ID)</pre>+</blockquote>++<p>The form (<tt>cat</tt> a b c d e) is sugar for (<tt>cat</tt> a (<tt>cat</tt>+b (<tt>cat</tt> c (<tt>cat</tt> d e)))).</p>++<blockquote>+  <pre>SKELETON   ::= (defskeleton ID VARS STRAND+ SKEL-ALIST)+STRAND     ::= (defstrand ID INT MAPLET*) | (deflistener TERM)+MAPLET     ::= (TERM TERM)+SKEL-ALIST ::= (non-orig TERM*) SKEL-ALIST+            |  (uniq-orig TERM*) SKEL-ALIST+            |  (precedes NODE-PAIR*) SKEL-ALIST | ...+NODE-PAIR  ::= (NODE NODE)+NODE       ::= (INT INT)</pre>+</blockquote>++<p>The <tt>ID</tt> in the skeleton form names a protocol. It refers to the last+protocol definition of that name which precedes the skeleton form. The+<tt>ID</tt> in the strand form names a role. The integer in the strand form+gives the height of the strand. The sequence of pairs of terms in the strand+form specify an environment used to construct the messages in a strand from its+role's trace. The first term is interpreted using the role's variables and the+second term uses the skeleton's variables. The environment used to produce the+strand's trace is derived by matching the second term using the first term as a+pattern.</p>++<p>The first integer in a node identifies a strand, and the second one+specifies the position of the node in the strand. Zero-based indexing is used.+Zero identifies the first strand, and the first node in a strand has position+zero.</p>++<p>A variable may occur in more then one role within a protocol. The reader+performs a renaming so as to ensure these occurrences do not overlap.+Furthermore, the maplets used to specify a strand need not specify how to map+every role variable. The reader inserts missing mappings, and renames every+skeleton variable that also occurs in a role of its protocol. The sort of every+skeleton variable that occurs in the <tt>non-orig</tt> or <tt>uniq-orig</tt>+list or in a maplet must be declared.</p>++<p>On output, key-value pairs are added to all skeleton's association list.+Every skeleton in the output is labeled with a unique identifier with+<tt>(label INT)</tt> A skeleton has <tt>(parent INT)</tt> if it is a member of+the cohort of the identified parent. A skeleton has <tt>(seen INT+)</tt> when+members of its cohort are isomorphic to previously seen skeletons. A skeleton+lists its unrealized nodes with <tt>(unrealized NODE*)</tt>. The traces+associated with each strand is given by the <tt>(traces ...)</tt> form.+Finally, the operation used to derive this skeleton from its parent is recorded+with <tt>(operation TEST KIND TERM NODE TERM*)</tt>, where <tt>TEST</tt> is the+authentication test <tt>encryption-test</tt> or <tt>nonce</tt>, <tt>KIND</tt>+is <tt>(added-strand ID INT)</tt>, <tt>(contracted MAPLET*)</tt>, or+<tt>(added-listener TERM)</tt>, <tt>TERM</tt> is the critical term,+<tt>NODE</tt> in the test node, and the remaining terms specify the escape set.+When the operation kind is augmenting, the instance's role name and height are+provided. For kind listening, a term is provided. For kind contracting, the+substitution is provided. When a substitution refers to a variable not in the+skeleton, its name is unpredictable. For generalization, the operation is+recorded as <tt>(operation generalization METHOD)</tt>, where <tt>METHOD</tt>+is one of <tt>deleted NODE</tt>, <tt>weakened NODE-PAIR</tt>, <tt>separated+TERM</tt> and <tt>forgot TERM</tt>. Generalization is used to find shapes from+realized skeletons. For shape collapsing, the operation is recorded as+<tt>(operation collapsed INT INT)</tt>, where the two <tt>INT</tt>s identify+the strands merged. Shape collapsing is used to find related shapes.</p>++<p>The additional sorts and terms in the Diffie-Hellman Algebra follow.</p>++<blockquote>+  <pre>SORT :: = ... | base | expn+TERM ::= ... | (gen) | (exp TERM TERM)+      |  (one) | (mul TERM*) | (rec TERM)</pre>+</blockquote>++<h3>Macros</h3>++<p>After reading the input, <tt>cpsa</tt> expands macros before in analyzing+the results. A macro definition is a top-level form.</p>++<blockquote>+  <pre>MACRO ::= (defmacro (NAME ARG*) BODY)</pre>+</blockquote>++<p>The <tt>cpsa</tt> program expands all calls to macros in non-macro defining+S-expressions using the macros that have been defined previously. A macro+definition can be used to expand a call if the first element of a list matches+the name of the macro, and the length of the remaining elements in the list+matches the length of the macro's argument list. When two macros definitions+are applicable, the last definition takes precedence. The <tt>cpsa</tt> program+omits macro definitions from its output.</p>++<h3>Usage of CPSA</h3>++<blockquote>+  <pre>$ cpsa -h+Usage: cpsa [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)+  -m INT     --margin=INT      set output margin (default 72)+  -e         --expand          expand macros only; don't analyze+  -n         --noisochk        disable isomorphism checks+  -a STRING  --algebra=STRING  algebra (default basic)+  -s         --show-algebras   show algebras+  -h         --help            show help message+  -v         --version         show version number</pre>+</blockquote>++<p>This program will abort if too many steps are taken. A skeleton is printed+for each step taken by the program. The step count limit option is used to+override the default step count limit. It will also abort when it detects a+skeleton with too many strands. The strand count bound option is used to+override the default strand count bound. Another way to limit resources used by+the program is to limit the amount of memory it may use. The command-line+option <tt>+RTS -M512m -RTS</tt> limits memory usage to 512m.</p>++<p>For long running problems, SMP parallelism is available. For example, on a+quad-core machine, we would prrobably use <tt>+RTS -N4 -RTS</tt>.</p>++<p>When run with isomorphism checks disabled (<tt>--noisochk</tt>), CPSA+searches for realized skeletons, not shapes. It attempts to speed up analysis+by not identifying duplicate skeletons or generalizing realized skeletons,+however in many cases, run times increase. It is used when normal analysis+takes too much time on the chance that avoiding the checks makes more progress.+</p>++<p>In no isomorphism checking mode output, every realized skeleton is labeled a+shape even when it is not. This allows the extraction of every realized+skeletons from the output using the <a+href="#cpsashapes"><tt>cpsashapes</tt></a> program.</p>++<p>An error message that begins with "No test for unrealized node" identifies a+severe error that should be reported as a bug.</p>++<h2 id="cpsagraph">Visualization</h2>++<p>The <tt>cpsagraph</tt> program produces a graphical rendering of the output+or input of an analyzer using SVG. It is viewable only with a+standards-compliant web browser such as FireFox.</p>++<p>When applied to the output of CPSA, the program groups together all the+skeletons related to each problem statement in the input. The program assembles+the related skeletons into a directed acyclic graph using the parent identifier+and renders it as a tree using SVG. Each vertex in the tree is the label added+to the skeleton by the CPSA program. Click the label in the tree to view the+skeleton. Hover over a node in a skeleton drawing to see the term associated+with it. Hover over a role to see the mapping from role variables to skeleton+variables.</p>++<p>A node ordering edge in a skeleton drawing indicates that the message+transmission at the source of the edge happened before message reception at the+destination edge. The edge is solid if the transmitting term is syntactically+identical to the receiving term, otherwise the edge is dashed. Thus in an+algebra with a commutative operation <tt>*</tt>, the graphing program draws a+dashed line between <tt>(send (* a b))</tt> and <tt>(recv (* b a))</tt>.</p>++<p>In the tree drawing, 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>++<p>By the default, <tt>cpsagraph</tt> generates a view of CPSA S-expressions as+a compound document that contains SVG within XHTML. This view integrates+graphics with the input text.</p>++<p>In compact mode, <tt>cpsagraph</tt> generates an SVG document. The tree is+displayed immediately to the left of skeleton drawings. When there is more than+one tree, the left-hand-side of the drawing contains a vertical listing of the+trees. Compact mode output should never be used as a replacement for studying+the text version of the output. The text version contains strictly more+information, and should be displayed next to its graphical rendition.</p>++<p>In LaTeX mode, <tt>cpsagraph</tt> generates LaTeX source. XY-pic is used for+drawings of skeletons. The margin specified in <a+href="cpsa.mk"><tt>cpsa.mk</tt></a> produces good results. </p>++<h3>Usage</h3>++<blockquote>+  <pre>$ cpsagraph -h+Usage: cpsagraph [OPTIONS] [FILE]+  -o FILE  --output=FILE  output FILE+  -x       --expanded     use expanded format (default)+  -c       --compact      use compact format+  -l       --latex        use LaTeX format+  -m INT   --margin=INT   set output margin (default 72)+  -h       --help         show help message+  -v       --version      show version number</pre>+</blockquote>++<h2 id="cpsashapes">Shape Extraction</h2>++<p>The <tt>cpsashapes</tt> program extracts the original problems and the+shapes from the output of a CPSA run. The shapes are linked to their problem so+the output can be graphed.</p>++<h3>Usage</h3>++<blockquote>+  <pre>$ cpsashapes -h+Usage: cpsashapes [OPTIONS] [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>++<h2 id="cpsaannotations">Annotations</h2>++<p>The <tt>cpsaannotations</tt> program uses protocol annotations to annotate+shapes and generate protocol soundness obligations.</p>++<h3>Usage</h3>++<blockquote>+  <pre>$ cpsaannotations -h+Usage: cpsashapes [OPTIONS] [FILE]+  -o FILE    --output=FILE     output FILE+  -m INT     --margin=INT      set output margin (default 72)+  -a STRING  --algebra=STRING  algebra (default basic)+  -s         --show-algebras   show algebras+  -h         --help            show help message+  -v         --version         show version number</pre>+</blockquote>++<h3>Syntax</h3>++<p>To be analyzed, each role in a protocol must include an <tt>annotations</tt>+form. The <tt>TERM</tt> is a role base term that when instantiated, is the name+of a principal in the shape. What follows is sequences of pairs. The integer+gives the position of the event in the trace that is annotated by the formula.+Zero-based indexing is used.</p>++<p>The language of formulas is first-order logic extended with a modal says+operator. Formula terms may include function symbols that are not part of a+protocol's message signature.</p>++<blockquote>+  <pre>ANNOTATION ::= (annotations TERM (INT FORMULA)*)+FORMULA    ::= (ID FTERM*) | (not FORMULA)+            |  (and FORMULA*) | (or FORMULA*)+            |  (implies FORMULA* FORMULA)+            |  (iff FORMULA FORMULA)+            |  (says TERM FORMULA)+            |  (forall (DECL*) FORMULA)+	    |  (exists (DECL*) FORMULA)+FTERM      ::= TERM | (ID FTERM*)</pre>+</blockquote>++<p>Use <tt>(and)</tt> for truth and <tt>(or)</tt> for falsehood.</p>++<h3>Output</h3>++<p>On output, each shape contains an <tt>annotations</tt> form and a+<tt>obligations</tt> form. The annotations form presents every non-trivial+formula derived from the protocol. The obligations form presents every+non-trivial soundness obligation.</p>++<h2 id="cpsaparameters">Parameter Analysis</h2>++<p>The parameters of a role are the base terms that are not acquired by the+role's trace, but must be available before a complete execution of the trace is+possible. This program computes sets of sets of parameters consistent with the+role. If the expected parameter set is not a member, a specification error is+indicated.</p>++<h3>Usage</h3>++<blockquote>+  <pre>$ cpsaparameters -h+Usage: cpsaparameters [OPTIONS] [FILE]+  -o FILE    --output=FILE     output FILE+  -m INT     --margin=INT      set output margin (default 72)+  -a STRING  --algebra=STRING  algebra (default basic)+  -s         --show-algebras   show algebras+  -h         --help            show help message+  -v         --version         show version number</pre>+</blockquote>++<h3>Output</h3>++<p>On output, each role contains a <tt>parameters</tt> form with a list of sets+of base terms.</p>++<blockquote>+  <pre>(defrole resp (vars (b a name) (n2 n1 text))+  (trace+    (recv (enc n1 a (pubk b)))+    (send (enc n1 n2 (pubk a)))+    (recv (enc n2 (pubk b))))+  (parameters+    (n2 n1 a (pubk b) (pubk a))+    (n2 (privk b) (pubk a))))</pre>+</blockquote>++<p>In this example, the second parameter set is what is expected for a+responder role in this version of the Needham-Schroeder protocol.</p>++<p>Macro expansion is not performed by this program. Use the <tt>-e</tt> option+with <tt>cpsa</tt> to preprocess input that contains macro definitions.</p>++<h2 id="cpsapp">Pretty Printing</h2>++<p>The <tt>cpsapp</tt> program program pretty prints its input using the CPSA+specific algorithm.</p>++<h3>Usage</h3>++<blockquote>+  <pre>$ cpsapp -h+Usage: cpsapp [OPTIONS] [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>++<h2>S-expressions</h2>++<p>The S-expressions used are restricted so that most dialects of Lisp can read+them, and characters within symbols and strings never need quoting. ASCII is+used to encode characters. Every list is proper. An atom is either a symbol, an+integer, or a string. The characters that make up a symbol are the letters, the+digits, and the special characters in "<tt>-*/&lt;=&gt;!?:$%_&amp;~^</tt>". A+symbol may not begin with a digit or a sign followed by a digit. The characters+that make up a string are the ASCII printing characters omitting double quote+and backslash. Double quotes delimit a string. A comment begins with a+semicolon, or is an S-expression list at top-level that starts with the+<tt>comment</tt> symbol. </p>+<hr />++<p>Copyright (c) 2009 The MITRE Corporation. Permission to copy without fee all+or part of this material is granted provided that the copies are not made or+distributed for direct commercial advantage, this copyright notice and the+title of the publication and its date appear, and notice in given that copying+is by permission of The MITRE Corporation.</p>+</body>+</html>
+ doc/ffgg.scm view
@@ -0,0 +1,23 @@+;;; The ffgg  Protocol++(defprotocol ffgg basic+  (defrole init (vars (a b name) (n1 n2 m x y text))+    (trace+     (send a)+     (recv (cat b n1 n2))+     (send (cat a (enc n1 n2 m (pubk b))))+     (recv (cat n1 x (enc x y n1 (pubk b))))))+  (defrole resp (vars (b a name) (n1 n2 x y text))+    (trace+     (recv a)+     (send (cat b n1 n2))+     (recv (cat a (enc n1 x y (pubk b))))+     (send (cat n1 x (enc x y n1 (pubk b)))))+    (uniq-orig n1 n2)))++(defskeleton ffgg+  (vars (b name) (n1 n2 m text))+  (defstrand init 4 (b b) (m m))+  (deflistener m)+  (uniq-orig m)+  (non-orig (privk b)))
+ doc/index.html view
@@ -0,0 +1,52 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"+      "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+<head>+  <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />+  <title>CPSA</title>+  <meta name="generator" content="Amaya 9.54, see http://www.w3.org/Amaya/" />+</head>++<body>+<p>[<a href="cpsauser.html">CPSA User Guide</a>] [<a href="cpsaprimer.pdf">CPSA+Primer</a>] [<a href="cpsaoverview.pdf">CPSA Overview</a>]</p>++<h1>CPSA</h1>++<p>The Cryptographic Protocol Shapes Analyzer (CPSA) attempts to enumerate all+essentially different executions possible for a cryptographic protocol. We call+them the <i>shapes</i> of the protocol. Naturally occurring protocols have only+finitely many, indeed very few shapes. Authentication and secrecy properties+are easy to determine from them, as are attacks and anomalies.</p>++<p>CPSA comes with a user guide, a primer, and an overview. To make effective+use of CPSA, new users should read the primer.</p>++<p>Start using CPSA by analyzing the protocols that come with this document.+Copy the contents of this directory to a place that allows it to be modified.+In a Unix shell, type:</p>++<blockquote>+  <pre>$ echo build | ghci Make.hs</pre>+</blockquote>++<p>In Windows, you can click on <tt>Make.hs</tt> and type <tt>build</tt>. The+<a href="cpsauser.html">CPSA User Guide</a> describes a better way to analyze+protocols when GNU Make is available.</p>++<p>After running the analysis, you will note files with the extension+<tt>.xml</tt>. These are XHTML/SVG compound documents that can be viewed by+standards compliant browsers such as Firefox or Safari.</p>++<p>New users should study CPSA's analysis of the following protocols in order,+Needham-Schroeder (<tt>ns.xml</tt>), Woo-Lam (<tt>woolam.xml</tt>), Yahalom+(<tt>yahalom.xml</tt>), ffgg (<tt>ffgg.xml</tt>), and finally Otway-Rees+(<tt>or.xml</tt>). When studying the full output, simultaneously display the+extracted shapes. The shapes file has an extension of <tt>_shapes.xml</tt>.</p>++<p>Choose a small, simple protocol for your first analysis task. When analyzing+complex protocols, analyze small parts of the protocol first, and then enrich+the description of the problem. </p>+</body>+</html>
+ doc/macros.tex view
@@ -0,0 +1,60 @@+\newcommand{\cpsa}{\textsc{cpsa}}+\newcommand{\version}{2.0.0}+\newcommand{\cpsacopying}{\begingroup+  \renewcommand{\thefootnote}{}\footnotetext{{\copyright} 2009 The+    MITRE Corporation.  Permission to copy without fee all or part of+    this material is granted provided that the copies are not made or+    distributed for direct commercial advantage, this copyright notice+    and the title of the publication and its date appear, and notice+    in given that copying is by permission of The MITRE+    Corporation.}\endgroup}+\newcommand{\pov}{\textsc{pov}}+\newcommand{\cow}{\textsc{cow}}+\newcommand{\cn}[1]{\ensuremath{\mathop{\relax+                    \smash{\sf#1}}\!\mathop{\vphantom{#1}}\nolimits}}+\newcommand{\dom}[1]{\ensuremath{\mathop{\relax+                    \smash{\rm#1}}\!\mathop{\vphantom{#1}}\nolimits}}+\newcommand{\fn}[1]{\ensuremath{\mathop{\relax+                    \smash{\it#1}}\!\mathop{\vphantom{#1}}\nolimits}}+\newcommand{\seq}[1]{\langle#1\rangle}+\newcommand{\enc}[2]{\{\!|#1|\!\}_{#2}}+\newcommand{\comp}[2]{{\mathord{#1}}\circ{\mathord{#2}}}+\newcommand{\sembrack}[1]{[\![#1]\!]}+\newcommand{\semfn}[1]{{\mathcal #1}}+\newcommand{\sem}[2]{\semfn{#1}\sembrack{#2}}+\newcommand{\mcsu}{\ensuremath{\mathcal{C}}}+\newcommand{\probs}{\ensuremath{\mathcal{E}}}+\newcommand{\eqq}{\stackrel{?}{=}}+\newcommand{\inbnd}{\mathord -}+\newcommand{\outbnd}{\mathord +}+\newcommand{\nat}{\mathbb{N}}+\newcommand{\baseterms}{\mathbb{B}}+\newcommand{\cons}{\mathbin{::}}+\newcommand{\ith}{\imath^\mathrm{th}}+\newcommand{\jth}{\jmath^\mathrm{th}}+\newcommand{\append}{\mathbin{{}^\smallfrown}}+\newcommand{\orig}{\mathcal{O}}+\newcommand{\acqu}{\mathcal{A}}+%\newcommand{\pow}[1]{\mathcal{P}(#1)}+%\newcommand{\pow}[1]{\wp(#1)}+\newcommand{\pow}[1]{2^{#1}}+\newcommand{\termat}{\mathbin{@}}+\newcommand{\idsigma}{\sigma_{\mathrm{id}}}+\newcommand{\idphi}{\phi_{\mathrm{id}}}+\newcommand{\kprec}[1]{\mathbin{\prec_{#1}}}+\newcommand{\terms}{\ensuremath{\mathcal{T}}}+\newcommand{\alg}[1]{\ensuremath{\mathfrak#1}}+\newcommand{\ops}[1]{\ensuremath{\mathbb#1}}+\newcommand{\bundle}{\ensuremath{\mathcal{B}}}+\newcommand{\nncow}[1]{\mathbin{\odot^{#1}}}+\newcommand{\ncow}[1]{\mathbin{\dagger^{#1}}}+\newcommand{\der}[3]{\ensuremath{\dctx{#2}{#3}\vdash#1}}+\newcommand{\dctx}[2]{\ensuremath{#1:#2}}+\newcommand{\flow}[3]{\ensuremath{#1,#2\rhd#3}}+\newcommand{\infer}[2]{\begin{array}{c}#1\\\hline#2\end{array}}+\hyphenation{pre-skel-e-ton}+\newcommand{\homomorphism}[1]{\stackrel{#1}{\longmapsto}}+\newcommand{\reduction}[1]{\stackrel{#1}{\longrightarrow}}+\newcommand{\longtwoheadrightarrow}{\relax+\smash{\relbar\joinrel\twoheadrightarrow}\vphantom\rightarrow}+\newcommand{\setreduction}[1]{\stackrel{#1}{\longtwoheadrightarrow}}
+ doc/ns.scm view
@@ -0,0 +1,35 @@+;;; Needham-Schroeder Protocol++;;; Used to generate output for inclusion in the primer.+;;; Use margin = 60 (-m 60) to generate the output.++(defprotocol ns basic+  (defrole init+    (vars (a b name) (n1 n2 text))+    (trace+     (send (enc n1 a (pubk b)))+     (recv (enc n1 n2 (pubk a)))+     (send (enc n2 (pubk b)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace+     (recv (enc n1 a (pubk b)))+     (send (enc n1 n2 (pubk a)))+     (recv (enc n2 (pubk b)))))+  (comment "Needham-Schroeder"))++;;; The initiator point-of-view+(defskeleton ns+  (vars (a b name) (n1 text))+  (defstrand init 3 (a a) (b b) (n1 n1))+  (non-orig (privk b) (privk a))+  (uniq-orig n1)+  (comment "Initiator point-of-view"))++;;; The responder point-of-view+(defskeleton ns+  (vars (a name) (n2 text))+  (defstrand resp 3 (a a) (n2 n2))+  (non-orig (privk a))+  (uniq-orig n2)+  (comment "Responder point-of-view"))
+ doc/or.scm view
@@ -0,0 +1,28 @@+;;; Otway-Rees Protocol++;;; Standard version using variables of sort mesg++(defprotocol or basic+  (defrole init (vars (a b s name) (na text) (k skey) (m text))+    (trace+     (send (cat m a b (enc na m a b (ltk a s))))+     (recv (cat m (enc na k (ltk a s))))))+  (defrole resp+    (vars (a b s name) (nb text) (k skey) (m text) (x y mesg))+    (trace+     (recv (cat m a b x))+     (send (cat m a b x (enc nb m a b (ltk b s))))+     (recv (cat m y (enc nb k (ltk b s))))+     (send y)))+  (defrole serv (vars (a b s name) (na nb text) (k skey) (m text))+    (trace+     (recv (cat m a b (enc na m a b (ltk a s))+		(enc nb m a b (ltk b s))))+     (send (cat m (enc na k (ltk a s)) (enc nb k (ltk b s)))))+    (uniq-orig k)))++(defskeleton or+  (vars (nb text) (s a b name))+  (defstrand resp 4 (a a) (b b) (s s) (nb nb))+  (non-orig (ltk a s) (ltk b s))+  (uniq-orig nb))
+ doc/strands.mp view
@@ -0,0 +1,91 @@+% Strand macros++%% John D. Ramsdell--May 2008,+%% The MITRE Corporation, Bedford, MA.++% For simple drawings, use the strand macro.++% Use these macros when drawing strand edges.  The cmstrands package+% redefines these two macros.++% Draw a message edge+def drawmsg(expr p) =+  drawarrow p;+enddef;++% Draw a strand succession edge+def drawsucc(expr p) =+  drawarrow p;+enddef;++% Strand drawing macros++% Box the nodes of a strand.  The origin of the strand is the center+% of the last strand node.  The name is a picture for the first node,+% and node is a picture for the successive nodes.+vardef boxstrand@#(expr height, origin, name, node) =+  boxit.@#1(name);+  for i = 2 upto height:+    boxit.@#[i](node);+    xpart @#[i-1].s = xpart @#[i].n;+  endfor;+  @#[height].c = origin;+enddef;++% Space a pair of strand nodes using the given height and separation+% delta.+vardef spacestrand@#(expr pos, delta) =+  ypart @#[pos].s = delta + ypart @#[pos+1].n;+enddef;++% Layout strand by making the distance been successive nodes the given+% separation delta.+vardef layoutstrand@#(expr height, delta) =+  for i = 1 upto height - 1:+    spacestrand@#(i, delta);+  endfor;+enddef;++% Link the nodes of a strand.+vardef linkstrand@#(expr height) =+  for i = 2 upto height:+    drawsucc(@#[i-1].s -- @#[i].n);+  endfor;+enddef;++% Draw a strand with equally spaced nodes.  The origin of the strand+% is the center of the last strand node.  The the distance between+% successive nodes is delta.  The name is a picture for the first+% node, and node is a picture for the successive nodes.++% A strand is drawn bottom up because the size of the label in the+% first box may vary.++vardef strand@#(expr height, origin, delta, name, node) =+  boxstrand@#(height, origin, name, node);+  layoutstrand@#(height, delta);+  for i = height downto 1:+    draw pic @#[i];+  endfor;+  linkstrand@#(height);+enddef;++% Directed term macros++% Draw an inbound directed term at a given strand position.  The width+% is the length of the first arrow.+vardef inbnd@#(expr pos, width, term) =+  pair d;+  d = (width + xpart @#[1].e, ypart @#[pos].e);+  drawmsg(d .. @#[pos].e);+  label.rt(term, d);+enddef;++% Draw an outbound directed term at a given strand position.  The+% width is the length of the first arrow.+vardef outbnd@#(expr pos, width, term) =+  pair d;+  d = (width + xpart @#[1].e, ypart @#[pos].e);+  drawmsg(@#[pos].e .. d);+  label.rt(term, d);+enddef;
+ doc/termtree.mp view
@@ -0,0 +1,60 @@+filenametemplate "%j-%c.mps";++verbatimtex+\documentclass[12pt]{article}+\newcommand{\enc}{\ensuremath{\mathsf{enc}}}+\newcommand{\pair}{\ensuremath{\mathsf{pair}}}+\newcommand{\pubk}{\ensuremath{\mathsf{pubk}}}+%\newcommand{\enc}{\ensuremath{\{\!|\cdot|\!\}_{(\cdot)}}}+%\newcommand{\pair}{\ensuremath{(\cdot,\cdot)}}+%\newcommand{\pubk}{\ensuremath{K_{(\cdot)}}}+\begin{document}+etex++beginfig(0);+  h = -1cm;+  w = 1cm;+  z0 = origin;+  z1 = z0 + (-1.5w, h);+  z2 = z1 + (-.5w, h);+  z3 = z1 + (.5w, h);+  z4 = z3 + (0, h);+  z5 = z0 + (1.5w, h);+  z6 = z5 + (-w, h);+  z7 = z6 + (-.5w, h);+  z8 = z6 + (.5w, h);+  z9 = z8 + (0, h);+  z10 = z5 + (w, h);+  z11 = z10 + (0, h);++  draw z0--z1;+  draw z1--z2;+  draw z1--z3;+  draw z3--z4;+  draw z0--z5;+  draw z5--z6;+  draw z6--z7;+  draw z6--z8;+  draw z8--z9;+  draw z5--z10;+  draw z10--z11;++  pickup pencircle scaled 4pt;+  dotlabel.rt(btex ~~\pair etex, z0);+  dotlabel.rt(btex ~~\enc etex, z1);+  dotlabel.rt(btex ~$x$ etex, z2);+  dotlabel.rt(btex ~\pubk etex, z3);+  dotlabel.rt(btex ~$a$ etex, z4);+  dotlabel.rt(btex ~\enc etex, z5);+  dotlabel.rt(btex ~\enc etex, z6);+  dotlabel.rt(btex ~$x$ etex, z7);+  dotlabel.rt(btex ~\pubk etex, z8);+  dotlabel.rt(btex ~$a$ etex, z9);+  dotlabel.rt(btex ~\pubk etex, z10);+  dotlabel.rt(btex ~$b$ etex, z11);+endfig;++verbatimtex+\end{document}+etex+bye;
+ doc/woolam.scm view
@@ -0,0 +1,26 @@+;;; Woo-Lam Protocol++(defprotocol woolam basic+  (defrole init (vars (a s name) (n text))+    (trace+     (send a)+     (recv n)+     (send (enc n (ltk a s))))+    (non-orig (ltk a s)))+  (defrole resp (vars (a s b name) (n text))+    (trace+     (recv a)+     (send n)+     (recv (enc n (ltk a s)))+     (send (enc a (enc n (ltk a s)) (ltk b s)))+     (recv (enc a n (ltk b s))))+    (non-orig (ltk b s))+    (uniq-orig n))+  (defrole serv (vars (a s b name) (n text))+    (trace+     (recv (enc a (enc n (ltk a s)) (ltk b s)))+     (send (enc a n (ltk b s))))))++(defskeleton woolam (vars (n text) (a s name))+  (defstrand resp 5 (a a) (s s))+  (non-orig (ltk a s)))
+ doc/yahalom.scm view
@@ -0,0 +1,34 @@+;;; Yahalom Protocol with Forwarding Removed++(defprotocol yahalom basic+  (defrole init+    (vars (a b c name) (n-a n-b text) (k skey))+    (trace (send (cat a n-a))+	   (recv (enc b k n-a n-b (ltk a c)))+	   (send (enc n-b k))))+  (defrole resp+    (vars (b a c name) (n-a n-b text) (k skey))+    (trace (recv (cat a n-a))+	   (send (cat b (enc a n-a n-b (ltk b c))))+	   (recv (enc a k (ltk b c)))+	   (recv (enc n-b k))))+  (defrole serv+    (vars (c a b name) (n-a n-b text) (k skey))+    (trace (recv (cat b (enc a n-a n-b (ltk b c))))+	   (send (enc b k n-a n-b (ltk a c)))+	   (send (enc a k (ltk b c))))+    (uniq-orig k)))++(defskeleton yahalom+  (vars (a b c name) (n-b text))+  (defstrand resp 4 (a a) (b b) (c c) (n-b n-b))+  (non-orig (ltk b c) (ltk a c))+  (uniq-orig n-b))++;;; Ensure encryption key remains secret.+(defskeleton yahalom+  (vars (a b c name) (n-b text) (k skey))+  (defstrand resp 4 (a a) (b b) (c c) (n-b n-b) (k k))+  (deflistener k)+  (non-orig (ltk b c) (ltk a c))+  (uniq-orig n-b))
+ ghci view
@@ -0,0 +1,2 @@+:set -fglasgow-exts -fbreak-on-error -isrc:dist/build/autogen+:set args -a diffie-hellman tst/dh.lisp
+ license.txt view
@@ -0,0 +1,38 @@++			 CPSA LICENSE NOTICE++This software was produced for the U. S. Government under Contract+No. W15P7T-04-C-D199, and is subject to the Rights in Noncommercial+Computer Software and Noncommercial Computer Software Documentation+Clause 252.227-7014 (JUN 1995).++Copyright (c) 2009 The MITRE Corporation.+All Rights Reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are+met:++    * Redistributions of source code must retain the above copyright+      notice, this list of conditions and the following disclaimer.++    * Redistributions in binary form must reproduce the above+      copyright notice, this list of conditions and the following+      disclaimer in the documentation and/or other materials provided+      with the distribution.++    * Neither the name of The MITRE Corporation nor the names of its+      contributors may be used to endorse or promote products derived+      from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ src/CPSA/Annotations/Annotations.hs view
@@ -0,0 +1,517 @@+-- Adds annotations to preskeletons++-- 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.Annotations.Annotations (Prot, annotations) where++import Control.Monad+import qualified Data.List as L+import qualified Data.Set as S+import CPSA.Lib.CPSA+import CPSA.Annotations.Formulas++{--+import System.IO.Unsafe+z :: Show a => a -> b -> b+z x y = seq (unsafePerformIO (print x)) y+--}++-- Constructs the output or reports an error from the input given a+-- protocol name, and its algebra specific starting variable+-- generator.  The third argument is the protocol information required+-- for processing preskeletons.++annotations :: (Algebra t p g s e c, Monad m) => String -> g ->+         [Prot t p g s e c] -> SExpr Pos ->+         m ([Prot t p g s e c], SExpr Pos)+annotations name origin ps x@(L pos (S _ "defprotocol" : xs)) =+    do+      p <- loadProt name origin pos xs+      return (p : ps, x)+annotations _ _ ps (L pos (S _ "defskeleton" : xs)) =+    do+      y <- findPreskel pos ps xs+      return (ps, y)+annotations _ _ ps x = return (ps, x)++-- Load a protocol++-- The Prot record contains information extraced from protocols for+-- use when processing preskeletons.+data Algebra t p g s e c => Prot t p g s e c = Prot+    { pname :: String,          -- Protocol name+      gen :: g,                 -- Generator for preskeletons+      roles :: [Role t p g s e c] }+    deriving Show++-- The Role record contains information extraced from roles for use+-- when processing preskeletons.+data Algebra t p g s e c => Role t p g s e c = Role+    { rname :: String,          -- Role name+      vars :: [t],              -- Declared variables+      prin :: t,                -- Principal+      forms :: [Formula t p g s e c] } -- Annotations+    deriving Show++-- Load a protocol.  On success, returns a Prot record.++loadProt :: (Algebra t p g s e c, Monad m) => String -> g ->+            Pos -> [SExpr Pos] -> m (Prot t p g s e c)+loadProt nom origin pos (S _ name : S _ alg : x : xs)+    | alg /= nom =+        fail (shows pos $ "Expecting terms in algebra " ++ nom)+    | otherwise =+        do+          (gen, rs) <- loadRoles origin (x : xs)+          return (Prot { pname = name, gen = gen, roles = rs })+loadProt _ _ pos _ =+    fail (shows pos "Malformed protocol")++-- A generator is threaded thoughout the protocol loading process so+-- as to ensure no variable occurs in two roles.  It also ensures that+-- every variable that occurs in a preskeleton never occurs in one of+-- its roles.++loadRoles :: (Algebra t p g s e c, Monad m) => g ->+             [SExpr Pos] -> m (g, [Role t p g s e c])+loadRoles origin xs =+    mapAccumLM loadRole origin xs++loadRole :: (Algebra t p g s e c, Monad m) => g ->+            SExpr Pos -> m (g, Role t p g s e c)+loadRole gen (L pos (S _ "defrole" :+                     S _ name :+	             L _ (S _ "vars" : vars) :+                     L _ (S _ "trace" : _ : c) :+                     rest)) =+    do+      (gen, vars) <- loadDecls gen vars+      let len = 1 + length c    -- Length of the trace+      let annos = assoc annotationsKey rest+      (gen, prin, forms) <- loadFormulas pos vars len gen annos+      let r = Role { rname = name, vars = vars, prin = prin, forms = forms }+      return (gen, r)+loadRole _ x =+    fail (shows (annotation x) "Malformed role")++loadFormulas :: (Algebra t p g s e c, Monad m) => Pos -> [t] -> Int ->+                g -> [SExpr Pos] -> m (g, t, [Formula t p g s e c])+loadFormulas pos vars len gen (x : xs) =+    do+      prin <- loadTerm vars x+      case isBaseTerm prin of+        True -> return ()+        False -> fail (shows pos "principal not an atom")+      (g, alist) <- mapAccumLM (loadIndexedFormula vars len) gen xs+      checkIndices pos alist+      return (g, prin, map (getNth alist) (nats len))+    where+      getNth alist i = maybe true id (lookup i alist)+loadFormulas pos _ _ _ [] =+    fail (shows pos "Role missing annotations")++loadIndexedFormula :: (Algebra t p g s e c, Monad m) => [t] -> Int ->+                      g -> SExpr Pos -> m (g, (Int, Formula t p g s e c))+loadIndexedFormula _ len _ (L _ [N pos i, _])+    | i < 0 || i >= len = fail (shows pos "Bad index for formula")+loadIndexedFormula vars _ gen (L _ [N _ i, form]) =+    do+      (g, f) <-  loadFormula vars gen form+      return (g, (i, f))+loadIndexedFormula _ _ _ x =+    fail (shows (annotation x) "Malformed indexed formula")++-- Ensure there are no formulas with the same index+checkIndices :: (Algebra t p g s e c, Monad m) => Pos ->+                [(Int, Formula t p g s e c)] -> m ()+checkIndices _ [] = return ()+checkIndices pos ((i, _) : alist)+    | any ((== i) . fst) alist =+        fail (shows pos $ showString "Duplicate index " $ show i)+    | otherwise = checkIndices pos alist++-- Load a preskeleton++data Algebra t p g s e c => Instance t p g s e c = Instance+    -- Role from which this was instantiated (Nothing for listeners)+    { pos :: Pos,               -- Instance position+      role :: Maybe (Role t p g s e c),+      env :: e,                 -- The environment+      height :: Int }           -- Height of the instance+    deriving Show++type Strands = [Int]            -- [Strand height]++type Trace = [Bool]             -- Directions of terms in trace++type Node = (Int, Int)          -- (Strand, Position)++type Pair = (Node, Node)        -- Precedes relation++data Algebra t p g s e c => Preskel t p g s e c = Preskel+    -- Role from which this was instantiated (Nothing for listeners)+    { protocol :: Prot t p g s e c,+      insts :: [Instance t p g s e c],+      traces :: [Trace],+      orderings :: [Pair] }++-- Find protocol and then load preskeleton.+-- Remove any old annotations, and add new ones.+findPreskel :: (Algebra t p g s e c, Monad m) => Pos ->+               [Prot t p g s e c] -> [SExpr Pos] -> m (SExpr Pos)+findPreskel pos ps (S _ name : xs) =+    case L.find (\p -> name == pname p) ps of+      Nothing -> fail (shows pos $ "Protocol " ++ name ++ " unknown")+      Just p ->+          do+            xs <- updatePreskel pos p xs+            return (L pos (S pos "defskeleton" : S pos name : xs))+findPreskel pos _ _ = fail (shows pos "Malformed skeleton")++updatePreskel :: (Algebra t p g s e c, Monad m) => Pos ->+                 Prot t p g s e c -> [SExpr Pos] -> m [SExpr Pos]+updatePreskel pos prot (vs@(L _ (S _ "vars" : vars)) : xs)+    | not (realized xs) || not (hasKey tracesKey xs) =+        return (vs : xs)        -- Don't annotate+    | otherwise =+        do+          (gen', kvars) <- loadDecls (gen prot) vars+          k <- loadPreskel prot gen' kvars xs+          let xs' = strip annotationsKey (strip obligationsKey xs)+          annos <- mapM instAnnos (insts k)+          obls <- obligations pos k annos+          let xs'' = xs' ++ [addPos pos $ displayAnnos kvars annos,+                             addPos pos $ displayObls kvars obls]+          return (vs : xs'')+updatePreskel pos _ _ = fail (shows pos "Malformed skeleton")++realized :: [SExpr a] -> Bool+realized xs =+    null (assoc "unrealized" xs) && hasKey "unrealized" xs++loadPreskel :: (Algebra t p g s e c, Monad m) => Prot t p g s e c ->+               g -> [t] -> [SExpr Pos] -> m (Preskel t p g s e c)+loadPreskel prot gen kvars xs =+    do+      traces <- mapM loadTrace (assoc tracesKey xs)+      insts <- loadInsts prot gen kvars [] xs+      let heights = map height insts+      orderings <- loadOrderings heights (assoc precedesKey xs)+      return (Preskel { protocol = prot,+                        insts = insts,+                        traces = traces,+                        orderings = orderings })++loadInsts :: (Algebra t p g s e c, Monad m) => Prot t p g s e c ->+             g -> [t] -> [Instance t p g s e c] -> [SExpr Pos] ->+             m [Instance t p g s e c]+loadInsts prot gen kvars insts (L pos (S _ "defstrand" : x) : xs) =+    case x of+      S _ role : N _ height : env ->+          do+            (gen', i) <- loadInst pos prot gen kvars role height env+            loadInsts prot gen' kvars (i : insts) xs+      _ ->+          fail (shows pos "Malformed defstrand")+loadInsts prot kvars gen insts (L pos (S _ "deflistener" : x) : xs) =+    case x of+      [_] ->+          do+            let i = Instance { pos = pos, role = Nothing,+                               env = emptyEnv, height = 2 }+            loadInsts prot kvars gen (i : insts) xs+      _ ->+          fail (shows pos "Malformed deflistener")+loadInsts _ _ _ insts _ =+    return (reverse insts)++loadInst :: (Algebra t p g s e c, Monad m) => Pos -> Prot t p g s e c ->+            g -> [t] -> String -> Int -> [SExpr Pos] ->+            m (g, Instance t p g s e c)+loadInst pos prot gen kvars role height env =+    do+      r <- lookupRole pos prot role+      case height < 1 || height > length (forms r) of+        True -> fail (shows pos "Bad height")+        False -> return ()+      (gen', env) <- foldM (loadMaplet kvars (vars r)) (gen, emptyEnv) env+      return (gen', Instance { pos = pos, role = Just r,+                               env = env, height = height })++lookupRole :: (Algebra t p g s e c, Monad m) => Pos ->+              Prot t p g s e c -> String -> m (Role t p g s e c)+lookupRole pos prot role =+    case L.find (\r -> role == rname r) (roles prot) of+      Nothing ->+          fail (shows pos $ "Role " ++ role ++ " not found in " ++ pname prot)+      Just r -> return r++loadMaplet :: (Algebra t p g s e c, Monad m) =>+              [t] -> [t] -> (g, e) -> SExpr Pos -> m (g, e)+loadMaplet kvars vars env (L pos [domain, range]) =+    do+      t <- loadTerm vars domain+      t' <- loadTerm kvars range+      case match t t' env of+        Nothing -> fail (shows pos "Domain does not match range")+        Just env' -> return env'+loadMaplet _ _ _ x = fail (shows (annotation x) "Malformed maplet")++-- Load a trace++loadTrace :: Monad m => SExpr Pos -> m Trace+loadTrace (L _ xs) = mapM loadDt xs+loadTrace x = fail (shows (annotation x) "Malformed trace")++loadDt :: Monad m => SExpr Pos -> m Bool+loadDt (L _ [S _ "recv", _]) = return False+loadDt (L _ [S _ "send", _]) = return True+loadDt  (L pos [S _ dir, _]) =+    fail (shows pos $ "Unrecognized direction " ++ dir)+loadDt x = fail (shows (annotation x) "Malformed direction")++-- Load the node orderings++loadOrderings :: Monad m => Strands -> [SExpr Pos] -> m [Pair]+loadOrderings strands xs =+    foldM f [] xs+    where+      f ns x =+          do+            np <- loadPair strands x+            return (adjoin np ns)++loadPair :: Monad m => [Int] -> SExpr Pos -> m Pair+loadPair heights (L pos [x0, x1]) =+    do+      n0 <- loadNode heights x0+      n1 <- loadNode heights x1+      case sameStrands n0 n1 of  -- Same strand+        True -> fail (shows pos "Malformed pair -- nodes in same strand")+        False -> return (n0, n1)+    where+      sameStrands (s0, _) (s1, _) = s0 == s1+loadPair _ x = fail (shows (annotation x) "Malformed pair")++loadNode :: Monad m => [Int] -> SExpr Pos -> m Node+loadNode heights (L pos [N _ s, N _ p])+    | s < 0 = fail (shows pos "Negative strand in node")+    | p < 0 = fail (shows pos "Negative position in node")+    | otherwise =+        case height heights s of+          Nothing -> fail (shows pos "Bad strand in node")+          Just h | p < h -> return (s, p)+          _ -> fail (shows pos "Bad position in node")+    where+      height [] _ = Nothing+      height (x: xs) s          -- Assume s non-negative+          | s == 0 = Just x+          | otherwise = height xs (s - 1)+loadNode _ x = fail (shows (annotation x) "Malformed node")++-- Formula instantiation++type Annotations t p g s e c = Maybe (t, [Formula t p g s e c])++-- Construct the annotations for an instance+instAnnos :: (Algebra t p g s e c, Monad m) =>+             Instance t p g s e c -> m (Annotations t p g s e c)+-- A listener has no annotations+instAnnos (Instance { role = Nothing }) = return Nothing+instAnnos i@(Instance { pos = pos, role = Just r }) =+    do+      t <- transTerm pos (vars r) (env i) (prin r)+      fs <- mapM instAnno (take (height i) (forms r))+      return (Just (t, fs))+    where+      instAnno f =+          transForm pos (vars r) (env i) f++showsTerm :: Algebra t p g s e c => [t] -> t -> ShowS+showsTerm vars t = shows (displayTerm (varsContext vars) t)++varsContext :: Algebra t p g s e c => [t] -> c+varsContext vars =+    addToContext emptyContext vars++-- Instantiate term and ensure all the free variables have been mapped.+transTerm :: (Algebra t p g s e c, Monad m) => Pos -> [t] -> e -> t -> m t+transTerm pos vars env t =+    let t' = instantiate env t in+    case L.find (flip S.member (fv t')) vars of+      Nothing -> return t'+      Just var ->+          fail $ shows pos $ showString "The variable " $+               showsTerm vars var " is not mapped in a term"+    where+      fv t = foldVars (flip S.insert) S.empty t++-- Instantiate formula and ensure all the free variables have been mapped.+transForm :: (Algebra t p g s e c, Monad m) => Pos -> [t] -> e ->+             Formula t p g s e c -> m (Formula t p g s e c)+transForm pos vars env f =+    let f' = finstantiate env f in+    case L.find (flip S.member (freeVars f')) vars of+      Nothing -> return f'+      Just var ->+          fail $ shows pos $ showString "The variable " $+               showsTerm vars var " is not mapped in a formula"++displayAnnos :: Algebra t p g s e c => [t] ->+                [Annotations t p g s e c] -> SExpr ()+displayAnnos vars annos =+    L () (S () annotationsKey : table)+    where+      table = [ displayObl vars ((s, p), t, f) |+                (s, Just (t, fs)) <- zip [0..] annos,+                (p, f) <- zip [0..] fs,+                not (truth f) ]++-- Graphs as adjacency lists++adj :: Strands -> [Pair] -> Node -> [Node]+adj strands precedes (s, p) =+    [ strand s h | (s, h) <- zip [0..] strands ] !! s !! p+    where+      strand :: Int -> Int -> [[Node]]+      strand s h = [ entry (s, p) | p <- nats h ]+      entry :: Node -> [Node]+      entry n = enrich n [ n0 | (n0, n1) <- precedes, n1 == n ]+      -- add strand succession edges+      enrich (s, p) ns+          | p > 0 = (s, p - 1) : ns+          | otherwise = ns++-- Transitive closure++close :: Strands -> [Pair] -> [Pair]+close strands precedes =+    loop prec False prec+    where+      prec = successors strands ++ precedes+      loop prec False [] = prec+      loop prec True [] =+          loop prec False prec -- restart loop+      loop prec repeat ((n0, n1) : pairs) =+          inner prec repeat pairs [(n, n1) | n <- adj strands precedes n0]+      inner prec repeat pairs [] =+          loop prec repeat pairs+      inner prec repeat pairs (p : rest)+          | elem p prec = inner prec repeat pairs rest+          | otherwise = inner (p : prec) True pairs rest++-- Filter pairs that don't effect annotations.++orient :: [Trace] -> [Pair] -> [Pair]+orient traces precedes =+    L.nub $ L.filter pred precedes+    where+      pred (n0, n1) = out traces n0 && not (out traces n1)++out :: [Trace] -> Node -> Bool+out traces (s, p) = traces !! s !! p++successors :: Strands -> [Pair]+successors strands =+    [((s, p), (s, p + 1)) | (s, n) <- zip [0..] strands, p <- nats (n - 1)]++before :: (Algebra t p g s e c, Monad m) => Pos ->+          Preskel t p g s e c -> m [(Node, [Node])]+before pos k =+    case isAcyclic graph (zip [0..] (replicate (length strands) 0)) of+      False -> fail (shows pos "Cycle found")+      True -> return $ alist (traces k) $ orient (traces k) closure+    where+      closure = close strands (orderings k)+      strands = map height (insts k)+      graph = adj strands (orderings k)++-- Computes all transmission nodes before a reception node++alist :: [Trace] -> [Pair] -> [(Node, [Node])]+alist traces precedes =+    [ node (s, p) | (s, t) <- zip [0..] traces, (p, d) <- zip [0..] t, not d ]+    where+      node n = (n, L.sort (depends n))+      depends n = [ n0 | (n0, n1) <- precedes, n == n1 ]++type Obligation t p g s e c = (Node, t, Formula t p g s e c)++obligations :: (Algebra t p g s e c, Monad m) => Pos ->+               Preskel t p g s e c -> [Annotations t p g s e c] ->+               m [Obligation t p g s e c]+obligations pos k annos =+    do+      depends <- before pos k+      let obls = map (obligation annos) depends+      -- filter out trivial obligations+      return [ obl | Just obl@(_, _, f) <- obls, not (truth f) ]++obligation :: Algebra t p g s e c => [Annotations t p g s e c] ->+              (Node, [Node]) -> Maybe (Obligation t p g s e c)+obligation annos (n@(s, p), ns) =+    do+      (t, fs) <- annos !! s                      -- t relies on (fs !! p)+      let guar = [ if t == t' then f else says t' f | -- Believe t+                   (s, p) <- ns,                 -- For each predecessor+                   let Just (t', fs) = annos !! s, -- t' is the speaker+                   let f = fs !! p ]               -- f is the guarantee+      return (n, t, implies guar (fs !! p))++displayObls :: Algebra t p g s e c => [t] ->+               [Obligation t p g s e c] -> SExpr ()+displayObls vars obls =+    L () (S () obligationsKey : map (displayObl vars) obls)++displayObl :: Algebra t p g s e c => [t] ->+              Obligation t p g s e c -> SExpr ()+displayObl vars (n, t, f) =+    L () [displayNode n, displayTerm ctx t, displayFormula vars f]+    where+      ctx = varsContext vars++displayNode :: Node -> SExpr ()+displayNode (s, p) = L () [N () s, N () p]++addPos :: Pos -> SExpr a -> SExpr Pos+addPos pos (S _ s) = S pos s+addPos pos (Q _ s) = Q pos s+addPos pos (N _ n) = N pos n+addPos pos (L _ l) = L pos (map (addPos pos) l)++-- Association lists++-- Lookup value in alist, appending values with the same key+assoc :: String -> [SExpr a] -> [SExpr a]+assoc key alist =+    concat [ rest | L _ (S _ head : rest) <- alist, key == head ]++keyPred :: String -> SExpr a -> Bool+keyPred key (L _ (S _ head : _)) = key == head+keyPred _ _ = False++hasKey :: String -> [SExpr a] -> Bool+hasKey key alist = any (keyPred key) alist++strip :: String -> [SExpr a] -> [SExpr a]+strip key alist = filter (not . keyPred key) alist++-- the key used in protocols and preskeletons for annotations+annotationsKey :: String+annotationsKey = "annotations"++-- The key used in preskeletons for obligations+obligationsKey :: String+obligationsKey = "obligations"++-- The key used in preskeletons for communication orderings+precedesKey :: String+precedesKey = "precedes"++-- The key used in preskeletons for traces+tracesKey :: String+tracesKey = "traces"
+ src/CPSA/Annotations/Formulas.hs view
@@ -0,0 +1,329 @@+-- Formulas used as annotations++-- 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.Annotations.Formulas (Formula, truth, true, says, implies,+    freeVars, finstantiate, mapAccumLM, loadDecls, loadFormula,+    displayFormula) where++import Control.Monad+import qualified Data.Set as S+import CPSA.Lib.CPSA++-- A CPSA formula is first-order logic augmented with the says modal+-- operator.  True is And [], and false is Or [].++-- The formulas are constructed with the property that that every+-- bound variable is quantified once, and no free variable is also+-- quantified within a subformula.  During the construction, each+-- variable bound by a forall or exists quantifier is freshly+-- generated.++data Algebra t p g s e c => Formula t p g s e c+    = Predicate String [FTerm t p g s e c]+    | Not (Formula t p g s e c)+    | And [Formula t p g s e c]+    | Or [Formula t p g s e c]+    | Implies [Formula t p g s e c] -- Null list not allowed+    | Says t (Formula t p g s e c)+    | Forall [t] (Formula t p g s e c)+    | Exists [t] (Formula t p g s e c)+      deriving (Eq, Show)++-- A formula term is an algebra term or an application of a function+-- symbol to list of formula terms.++data Algebra t p g s e c => FTerm t p g s e c+    = AlgTerm t+    | Application String [FTerm t p g s e c]+      deriving (Eq, Show)++true :: Algebra t p g s e c => Formula t p g s e c+true = And []++truth :: Algebra t p g s e c => Formula t p g s e c -> Bool+truth f = f == true++says :: Algebra t p g s e c => t -> Formula t p g s e c ->+        Formula t p g s e c+says t f+    | truth f = true+    | otherwise = Says t f++implies :: Algebra t p g s e c => [Formula t p g s e c] ->+           Formula t p g s e c -> Formula t p g s e c++implies antecedents consequence+    | truth consequence = true+    | null simp = consequence+    | otherwise = Implies (simp ++ [consequence])+    where+      simp = filter (not . truth) antecedents++-- Free variables in a formula++freeVars :: Algebra t p g s e c => Formula t p g s e c -> S.Set t+freeVars f = freeVarsForm S.empty f++freeVarsForm :: Algebra t p g s e c => S.Set t ->+                Formula t p g s e c -> S.Set t+freeVarsForm s (Predicate _ ts) = foldl freeVarsFTerm s ts+freeVarsForm s (Not f) = freeVarsForm s f+freeVarsForm s (And fs) = foldl freeVarsForm s fs+freeVarsForm s (Or fs) = foldl freeVarsForm s fs+freeVarsForm s (Implies fs) = foldl freeVarsForm s fs+freeVarsForm s (Says t f) = freeVarsForm (freeVarsTerm s t) f+freeVarsForm s (Forall ts f) = foldl (flip S.delete) (freeVarsForm s f) ts+freeVarsForm s (Exists ts f) = foldl (flip S.delete) (freeVarsForm s f) ts++freeVarsFTerm :: Algebra t p g s e c => S.Set t ->+                 FTerm t p g s e c -> S.Set t+freeVarsFTerm s (AlgTerm t) = freeVarsTerm s t+freeVarsFTerm s (Application _ ts) = foldl freeVarsFTerm s ts++freeVarsTerm :: Algebra t p g s e c => S.Set t -> t -> S.Set t+freeVarsTerm s t = foldVars (flip S.insert) s t++-- Formula instantiation++-- The implementations assumes the environment maps no bound+-- variables.++finstantiate :: Algebra t p g s e c => e ->+                Formula t p g s e c -> Formula t p g s e c+finstantiate env (Predicate sym ts) =+    Predicate sym (map (tinstantiate env) ts)+finstantiate env (Not f) =+    Not (finstantiate env f)+finstantiate env (And fs) =+    And (map (finstantiate env) fs)+finstantiate env (Or fs) =+    Or (map (finstantiate env) fs)+finstantiate env (Implies fs) =+    Implies (map (finstantiate env) fs)+finstantiate env (Says t f) =+    Says (instantiate env t) (finstantiate env f)+finstantiate env (Forall ts f) =+    Forall ts (finstantiate env f)+finstantiate env (Exists ts f) =+    Exists ts (finstantiate env f)++tinstantiate :: Algebra t p g s e c => e ->+                FTerm t p g s e c -> FTerm t p g s e c+tinstantiate env (AlgTerm t) =+    AlgTerm (instantiate env t)+tinstantiate env (Application sym ts) =+    Application sym (map (tinstantiate env) ts)++-- The follow translations are used on input and output so as to+-- reduce the number of cases used internally.++-- f == (or)+-- t == (and)++-- The follow translation is used on input to get rid of the form++-- (iff a b) == (and (implies a b) (implies b a))++-- Keywords used in the S-Expression representation of formulas++-- The following keywords may not be used as variables, function+-- symbols, or predicate symbols.+keywords :: [String]+keywords = ["forall", "exists", "says", "not",+            "or", "and", "implies", "iff"]++-- Load a formula.  The vars list is the list of variables that are in+-- scope.  The variable generator for the algebra is threaded through+-- the loading process so that every bound variable is quantified+-- once, and no free variable is bound within a formula.  Use+-- loadDecls to ensure vars are not keywords.+loadFormula :: (Algebra t p g s e c, Monad m) => [t] -> g ->+               SExpr Pos -> m (g, Formula t p g s e c)+loadFormula vars gen (L _ (S _ pred : xs)) -- Atomic formula+    | notElem pred keywords =+        do+          fs <- loadFTerms vars xs+          return (gen, Predicate pred fs)+loadFormula vars gen (L _ (S _ "or" : xs)) = -- Disjunction+    do+      (gen', ts) <- mapAccumLM (loadFormula vars) gen xs+      return (gen', Or ts)+loadFormula vars gen (L _ (S _ "and" : xs)) = -- Conjunction+    do+      (gen', ts) <- mapAccumLM (loadFormula vars) gen xs+      return (gen', And ts)+loadFormula vars gen (L _ [S _ "not", x]) = -- Negation+    do+      (gen', t) <- loadFormula vars gen x+      return (gen', Not t)+loadFormula vars gen (L _ (S _ "implies" : x : xs)) = -- Implication+    do+      (gen', ts) <- mapAccumLM (loadFormula vars) gen (x : xs)+      return (gen', Implies ts)+loadFormula vars gen (L pos [S pos' "iff", x, y]) = -- If and only if+    loadFormula vars gen (L pos [S pos' "and",+                                 L pos [S pos' "implies", x, y],+                                 L pos [S pos' "implies", y, x]])+loadFormula vars gen (L _ [S _ "says", x, y]) = -- Says modal operator+    do+      t <- loadTerm vars x+      (gen', f) <- loadFormula vars gen y+      return (gen', Says t f)+loadFormula vars gen (L _ [S _ "forall", L _ xs, x]) = -- Universal+    loadQuantified Forall vars gen xs x                -- quantification+loadFormula vars gen (L _ [S _ "exists", L _ xs, x]) = -- Existential+    loadQuantified Exists vars gen xs x                -- quantification+loadFormula _ _ x =+    fail (shows (annotation x) "Malformed formula")++data EitherS a+    = RightS a+    | LeftS String++instance Monad EitherS where+    return = RightS+    LeftS l >>= _ = LeftS l+    RightS r >>= k = k r+    fail s = LeftS s++{- Monad laws++1. return a >>= k          <==> k a++RightS r >>= k ==> k r++2. m >>= return            <==> m++  Cases on m+  a. m is RightS r+     RightS r >>= RightS ==> RightS r ==> m+  b. m is LeftS l+     LeftS l >>= RightS ==> LeftS l ==> m++3. m >>= (\x -> k x >>= h) <===> (m >>= k) >>= h++  Cases on m+  a. m is RightS r+     1. RightS r >>= (\x -> k x >>= h) ==> k r >>= h+     2. (RightS r >> k) >>= h ==> k r >>= h+  b. m is LeftS l ==>+     1. LeftS l >>= (\x -> k x >>= h) ==> LeftS l+     2. (LeftS l >>= k) >>= h ==> LeftS l >>= h ==> LeftS l+-}++loadFTerms :: (Algebra t p g s e c, Monad m) => [t] ->+              [SExpr Pos] -> m [FTerm t p g s e c]+loadFTerms vars xs =+    foldM f [] (reverse xs)+    where+      f acc x =+          case loadFTerm vars x of+            RightS t -> return (t : acc)+            LeftS msg -> fail msg++-- Load a formula term+loadFTerm :: Algebra t p g s e c => [t] -> SExpr Pos ->+             EitherS (FTerm t p g s e c)+loadFTerm vars x =+    case loadTerm vars x of+      RightS t -> return (AlgTerm t)+      LeftS msg ->              -- If x is not an algebra term+          case x of             -- see if it's an application+            L _ (S pos fun : xs)+                | elem fun keywords ->+                    LeftS (shows pos $+                           "Keyword " ++ fun ++ " used as a function")+                | otherwise ->+                 case mapM (loadFTerm vars) xs of+                   RightS ts -> RightS (Application fun ts)+                   LeftS _ -> LeftS msg+            _ -> LeftS msg++-- A monad version of map accumulation from the left+mapAccumLM :: Monad m => (a -> b -> m (a, c)) -> a -> [b] -> m (a, [c])+mapAccumLM _ z [] =+    return (z, [])+mapAccumLM f z (x : xs) =+    do+      (z', y) <- f z x+      (z'', ys) <- mapAccumLM f z' xs+      return (z'', y : ys)++-- Load a quantified formula.  Note that loadVars returns variables in+-- reverse order, so list append is the correct way to extend the list+-- of variables that are in scope.+loadQuantified :: (Algebra t p g s e c, Monad m) =>+                  ([t] -> Formula t p g s e c -> Formula t p g s e c) ->+                  [t] -> g -> [SExpr Pos] -> SExpr Pos ->+                  m (g, Formula t p g s e c)+loadQuantified build vars gen decls body =+    do+      (gen', vars') <- loadDecls gen decls+      (gen'', f) <- loadFormula (vars' ++ vars) gen' body+      return (gen'', build (reverse vars') f)++loadDecls :: (Algebra t p g s e c, Monad m) => g ->+             [SExpr Pos] -> m (g, [t])+loadDecls gen decls =+    do+      mapM_ checkDecl decls     -- Check for keywords+      loadVars gen decls++-- Fail if a variable is used as a keyword+checkDecl :: Monad m => SExpr Pos -> m ()+checkDecl (L _ (S pos sym : _))+    | elem sym keywords =+        fail (shows pos "Keyword " ++ sym ++ " used as a variable")+checkDecl _ = return ()++-- Display a formula+displayFormula :: Algebra t p g s e c => [t] ->+                  Formula t p g s e c -> SExpr ()+displayFormula vars form =+    displayForm ctx' form+    where                       -- Add quantified vars last so they are+      ctx = addToContext emptyContext vars -- most like to be renamed.+      ctx' = addToContext ctx (quantified form)++-- Collect the quantified variables+quantified :: Algebra t p g s e c =>+              Formula t p g s e c -> [t]+quantified (Predicate _ _) = []+quantified (Not f) = quantified f+quantified (And fs) = concatMap quantified fs+quantified (Or fs) = concatMap quantified fs+quantified (Implies fs) = concatMap quantified fs+quantified (Says _ f) = quantified f+quantified (Forall ts f) = ts ++ quantified f+quantified (Exists ts f) = ts ++ quantified f++displayForm :: Algebra t p g s e c => c ->+               Formula t p g s e c -> SExpr ()+displayForm ctx (Predicate sym ts) =+    L () (S () sym : map (displayFTerm ctx) ts)+displayForm ctx (Not f) =+    L () [S () "not", displayForm ctx f]+displayForm ctx (And fs) =+    L () (S () "and" : map (displayForm ctx) fs)+displayForm ctx (Or fs) =+    L () (S () "or" : map (displayForm ctx) fs)+displayForm ctx (Implies fs) =+    L () (S () "implies" : map (displayForm ctx) fs)+displayForm ctx (Says t f) =+    L () [S () "says", displayTerm ctx t, displayForm ctx f]+displayForm ctx (Forall ts f) =+    L () [S () "forall", L () (displayVars ctx ts), displayForm ctx f]+displayForm ctx (Exists ts f) =+    L () [S () "exists", L () (displayVars ctx ts), displayForm ctx f]++displayFTerm :: Algebra t p g s e c => c ->+                FTerm t p g s e c -> SExpr ()+displayFTerm ctx (AlgTerm t) =+    displayTerm ctx t+displayFTerm ctx (Application sym ts) =+    L () (S () sym : map (displayFTerm ctx) ts)
+ src/CPSA/Annotations/Main.hs view
@@ -0,0 +1,71 @@+-- Add annotations to skeletons++-- This module simply maps the function annotations to S-expressions in the+-- file.++-- 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 System.IO.Error+import CPSA.Lib.CPSA+import CPSA.Lib.Entry+import CPSA.Annotations.Annotations+import qualified CPSA.Basic.Algebra+import qualified CPSA.DiffieHellman.Algebra++-- Algebra names+algs :: [String]+algs = [CPSA.Basic.Algebra.name, CPSA.DiffieHellman.Algebra.name]++main :: IO ()+main =+    do+      let options = algOptions CPSA.Basic.Algebra.name+      let interp = algInterp CPSA.Basic.Algebra.name algs+      (p, (output, alg, margin)) <- start options interp+      h <- outputHandle output+      writeComment h margin cpsaVersion+      writeComment h margin "Annotated skeletons"+      case () of+        _ | alg == CPSA.Basic.Algebra.name ->+              go (step h alg CPSA.Basic.Algebra.origin margin) p []+          | alg == CPSA.DiffieHellman.Algebra.name ->+              go (step h alg CPSA.DiffieHellman.Algebra.origin margin) p []+          | otherwise ->+               abort ("Bad algebra: " ++ alg)+      hClose h++go :: (a -> SExpr Pos -> IO a) -> PosHandle -> a -> IO ()+go f p a =+    loop a+    where+      loop a =+          do+            x <- readSExpr p+            case x of+              Nothing ->+                  return ()+              Just sexpr ->+                  do+                    a <- f a sexpr+                    loop a++step :: Algebra t p g s e c => Handle ->+        String -> g -> Int -> [Prot t p g s e c] ->+        SExpr Pos -> IO [Prot t p g s e c]+step output name origin margin ps sexpr =+    do+      x <- try (annotations name origin ps sexpr)+      case x of+        Right (ps, sexpr) ->+            do+              writeLnSEexpr output margin sexpr+              return ps+        Left err ->+            abort (ioeGetErrorString err)
+ src/CPSA/Basic/Algebra.hs view
@@ -0,0 +1,1096 @@+-- Basic Crypto Algebra implementation++-- 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.++-- 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.++{-# LANGUAGE MultiParamTypeClasses #-}++module CPSA.Basic.Algebra (name, origin) where++import Control.Monad (foldM)+import qualified Data.List as L+import qualified Data.Set as S+import Data.Set (Set)+import qualified Data.Map as M+import Data.Map (Map)+import qualified CPSA.Lib.CPSA as C+import CPSA.Lib.CPSA (SExpr(..), Pos, annotation)++name :: String+name = "basic"++-- An identifier is a variable without any information about its sort++newtype Id = Id (Integer, String) deriving Show++-- The integer distinguishes an identifier, the string is for printing.++instance Eq Id where+    (Id (x, _)) == (Id (x', _)) = x == x'++instance Ord Id where+    compare (Id (x, _)) (Id (x', _)) = compare x x'++idName :: Id -> String+idName (Id (_, name)) = name++-- Counter used for generating fresh identifiers.++newtype Gen = Gen (Integer) deriving Show++origin :: Gen+origin = Gen (0)++freshId :: Gen -> String -> (Gen, Id)+freshId (Gen (i)) name = (Gen (i + 1), Id (i, name))++cloneId :: Gen -> Id -> (Gen, Id)+cloneId gen x = freshId gen (idName x)++-- The Basic Crypto Order-Sorted Signature is++-- Sorts: mesg, text, data, name, skey, akey, and string+--+-- Subsorts: text, data, name, skey, akey < mesg+--+-- Operations:+--   cat : mesg X mesg -> mesg               Pairing+--   enc : mesg X mesg -> mesg               Encryption+--   string : mesg                           Tag constants+--   ltk : name X name -> skey               Long term shared 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++-- Variables of sort string are forbidden.++-- The implementation exploits the isomorphism between order-sorted+-- algebras and many-sorted algebras by adding inclusion operations to+-- produce an equivalent Basic Crypto Many-Sorted Signature.  There is+-- an inclusion operation for each subsort of mesg.++-- Sorts: mesg, text, data, name, skey, akey, and string+--+-- Operations:+--   cat : mesg X mesg -> mesg               Pairing+--   enc : mesg X mesg -> mesg               Encryption+--   string : mesg                           Tag constants+--   ltk : name X name -> skey               Long term shared 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++-- In both algebras, invk(invk(t)) = t for all t of sort akey++-- Operations other than the tag constant constructor+data Symbol+    = Text                      -- Text+    | Data                      -- Another text-like item+    | Name                      -- Principal+    | Skey                      -- Symmetric key+    | Ltk                       -- Long term shared symmetric key+    | Akey                      -- Asymmetric key+    | Invk                      -- Inverse of asymmetric key+    | Pubk                      -- Public asymmetric key of a principal+    | Cat                       -- Term concatenation (Pairing really)+    | Enc                       -- Encryption+      deriving (Show, Eq, Ord, Enum, Bounded)++-- A Basic Crypto Algebra Term++data Term+    = I !Id+    | C !String                 -- Tag constants+    | F !Symbol ![Term]+      deriving (Show, Eq, Ord)++-- In this algebra (F Invk [F Invk [t]]) == t is an axiom++-- 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 variables.+isVar :: Term -> Bool+isVar (I _) = True           -- Sort: mesg+isVar (F s [I _]) =+    -- Sorts: text, data, name, skey, and akey+    s == Text || s == Data || s == Name || s == Skey || s == Akey+isVar _ = False++-- Extract the identifier from a variable+varId :: Term -> Id+varId (I x) = x+varId (F Text [I x]) = x+varId (F Data [I x]) = x+varId (F Name [I x]) = x+varId (F Skey [I x]) = x+varId (F Akey [I x]) = x+varId _ = error "Algebra.varId: term not a variable with its sort"++-- A list of terms are well-formed if each one has the correct+-- structure and every occurrence of an identifier in a term has the+-- same sort.  Variable environments are used to check the sort+-- condition.  It maps an identifier to a variable that contains the+-- identifier.++-- termsWellFormed u ensures all terms in u use each identifier at the+-- same sort, and makes sure every term has the correct structure.+termsWellFormed :: [Term] -> Bool+termsWellFormed u =+    loop emptyVarEnv u+    where+      loop _ [] = True+      loop env (t : u) =+          case termWellFormed env t of+            Nothing -> False+            Just env' -> loop env' u++newtype VarEnv = VarEnv (Map Id Term) deriving Show++emptyVarEnv :: VarEnv+emptyVarEnv = VarEnv M.empty++-- A term is well-formed if it is in the language defined by the+-- following grammar, and variables occur at positions within the term+-- in a way that allows each variable to be assigned one sort.+--+-- The start symbol is T, for all well-formed terms.  Terminal symbol+-- I is for variables and terminal symbol C is for quoted strings.+-- The non-terminal symbols are B, K, and T.  Symbol B is for base+-- sorted terms, and K is for asymmetric keys.+--+--     T ::= I | C | B | cat(T, T) | enc(T, T)+--+--     B ::= text(I) | data(I) | name(I) | skey(I)+--        |  skey(I) | skey(ltk(I, I)) | akey(K)+--+--     K ::= I | pubk(I) | invk(I) | invk(pubk(I))++-- termWellFormed checks the structure and sort condition.+termWellFormed :: VarEnv -> Term -> Maybe VarEnv+termWellFormed xts t@(I x) =+    extendVarEnv xts x t        -- Mesg variable+termWellFormed xts t@(F Text [I x]) =+    extendVarEnv xts x t        -- Text variable+termWellFormed xts t@(F Data [I x]) =+    extendVarEnv xts x t        -- Data variable+termWellFormed xts t@(F Name [I x]) =+    extendVarEnv xts x t        -- Name variable+termWellFormed xts t@(F Skey [I x]) =+    extendVarEnv xts x t        -- Symmetric key variable+termWellFormed xts (F Skey [F Ltk [I x, I y]]) =+    -- Long term shared symmetric key+    doubleTermWellFormed xts (F Name [I x]) (F Name [I y])+termWellFormed xts (F Akey [t]) = -- Asymmetric key terms+    case t of+      I x -> extendVarEnv xts x (F Akey [I x])+      F Invk [I x] -> extendVarEnv xts x (F Akey [I x])+      F Pubk [I x] -> extendVarEnv xts x (F Name [I x])+      F Pubk [C _, I x] -> extendVarEnv xts x (F Name [I x])+      F Invk [F Pubk [I x]] -> extendVarEnv xts x (F Name [I x])+      F Invk [F Pubk [C _, I x]] -> extendVarEnv xts x (F Name [I x])+      _ -> Nothing+termWellFormed xts (C _) =+    Just xts                    -- Tags+termWellFormed xts (F Cat [t0, t1]) =+    doubleTermWellFormed xts t0 t1  -- Concatenation+termWellFormed xts (F Enc [t0, t1]) =+    doubleTermWellFormed xts t0 t1  -- Encryption+termWellFormed _ _ = Nothing++-- Extend when sorts agree+extendVarEnv :: VarEnv -> Id -> Term -> Maybe VarEnv+extendVarEnv (VarEnv env) x t =+    case M.lookup x env of+      Nothing -> Just $ VarEnv $ M.insert x t env+      Just t' -> if t == t' then Just (VarEnv env) else Nothing++doubleTermWellFormed :: VarEnv -> Term -> Term -> Maybe VarEnv+doubleTermWellFormed xts t0 t1 =+    do+      xts <- termWellFormed xts t0+      termWellFormed xts t1++-- Is the sort of the term a base sort?+isBaseTerm :: Term -> Bool+isBaseTerm (I _) = False+isBaseTerm (C _) = False+isBaseTerm (F s _) =+    s == Text || s == Data || s == Name || s == Skey || s == Akey++-- Does a term occur in another term?+occursIn :: Term -> Term -> Bool+occursIn t t' =+    t == t' ||+      case t' of+        F _ u -> any (occursIn t) u+        _ -> False++-- Fold f through a term applying it to each variable in the term.+foldVars :: (a -> Term -> a) -> a -> Term -> a+foldVars f acc t@(I _) = f acc t          -- Mesg variable+foldVars f acc t@(F Text [I _]) = f acc t -- Text variable+foldVars f acc t@(F Data [I _]) = f acc t -- Data variable+foldVars f acc t@(F Name [I _]) = f acc t -- Name variable+foldVars f acc t@(F Skey [I _]) = f acc t -- Symmetric keys+foldVars f acc (F Skey [F Ltk [I x, I y]]) =+    f (f acc (F Name [I x])) (F Name [I y])+foldVars f acc t@(F Akey [I _]) = f acc t -- Asymmetric keys+foldVars f acc (F Akey [F Invk [I x]]) = f acc (F Akey [I x])+foldVars f acc (F Akey [F Pubk [I x]]) = f acc (F Name [I x])+foldVars f acc (F Akey [F Pubk [C _, I x]]) = f acc (F Name [I x])+foldVars f acc (F Akey [F Invk [F Pubk [I x]]]) = f acc (F Name [I x])+foldVars f acc (F Akey [F Invk [F Pubk [C _, I x]]]) = f acc (F Name [I x])+foldVars _ acc (C _) = acc        -- Tags+foldVars f acc (F Cat [t0, t1]) = -- Concatenation+    foldVars f (foldVars f acc t0) t1+foldVars f acc (F Enc [t0, t1]) = -- Encryption+    foldVars f (foldVars f acc t0) t1+foldVars _ _ t = error $ "Algebra.foldVars: Bad term " ++ show t++-- Fold f through a term applying it to each term that is carried by the term.+foldCarriedTerms :: (a -> Term -> a) -> a -> Term -> a+foldCarriedTerms f acc t@(F Cat [t0, t1]) = -- Concatenation+    foldCarriedTerms f (foldCarriedTerms f (f acc t) t0) t1+foldCarriedTerms f acc t@(F Enc [t0, _]) = -- Encryption+    foldCarriedTerms f (f acc t) t0+foldCarriedTerms f acc t = f acc t     -- atoms and tags++-- Is a term carried by another term?+carriedBy :: Term -> Term -> Bool+carriedBy t t' =+    t == t' ||+      case t' of+        F Cat [t0, t1] -> carriedBy t t0 || carriedBy t t1+        F Enc [t0, _] -> carriedBy t t0+        _ -> False++-- The key used to decrypt an encrypted term, otherwise Nothing.+decryptionKey :: Term -> Maybe Term+decryptionKey (F Enc [_, t]) = Just (inv t)+decryptionKey _ = Nothing++buildable :: Set Term -> Set Term -> Term -> Bool+buildable knowns unguessable term =+    ba term+    where+      ba (I _) = True           -- A mesg sorted variable is always buildable+      ba (C _) = True           -- and so is a tag+      ba (F Cat [t0, t1]) =+          ba t0 && ba t1+      ba t@(F Enc [t0, t1]) =+          S.member t knowns || ba t0 && ba t1+      ba t = isBaseTerm t && not (S.member t unguessable)++-- Compute the decomposition given some known terms and some unguessable+-- atoms.  The code is quite tricky.  It iterates until the known+-- terms don't change.  The known terms ends up with all the+-- encryptions that are known.+decompose :: Set Term -> Set Term -> (Set Term, Set Term)+decompose knowns unguessable =+    loop unguessable knowns S.empty []+    where+      loop unguessable knowns old []+          | old == knowns = (knowns, unguessable) -- Done+          | otherwise = loop unguessable knowns knowns (S.elems knowns)+      loop unguessable knowns old (t@(F Cat _) : todo) =+          loop unguessable (decat t (S.delete t knowns)) old todo+      loop unguessable knowns old ((F Enc [t0, t1]) : todo)+          | buildable knowns unguessable (inv t1) = -- Add plaintext+              loop unguessable (decat t0 knowns) old todo+          | otherwise = loop unguessable knowns old todo+      loop unguessable knowns old (t : todo) =+          loop (S.delete t unguessable) (S.delete t knowns) old todo+      -- Decat+      decat (F Cat [t0, t1]) s = decat t1 (decat t0 s)+      decat t s = S.insert t s++-- Inverts an asymmetric key+inv :: Term -> Term+inv (F Akey [F Invk [t]]) = F Akey [t]+inv (F Akey [t]) = F Akey [F Invk [t]]+inv (I _) = error "Algebra.inv: Cannot invert a variable of sort mesg"+inv t = t++-- Extracts every encryption that is carried by a term along with its+-- encryption key.+encryptions :: Term -> [(Term, Term)]+encryptions t =+    reverse $ loop t []+    where+      loop (F Cat [t, t']) acc =+          loop t' (loop t acc)+      loop t@(F Enc [t', t'']) acc =+          loop t' (adjoin (t, t'') acc)+      loop _ acc = acc+      adjoin x xs+          | x `elem` xs = xs+          | otherwise = x : xs++-- Returns the encryptions that carry the target.  If the target is+-- carried outside all encryptions, or is exposed because a decription+-- key is derivable, Nothing is returned.+protectors :: (Term -> Bool) -> Term -> Term -> Maybe [Term]+protectors derivable target source =+    do+      ts <- bare source S.empty+      return $ S.elems ts+    where+      bare source _+           | source == target = Nothing+      bare (F Cat [t, t']) acc =+          maybe Nothing (bare t') (bare t acc)+      bare t@(F Enc [t', key]) acc =+          if target `carriedBy` t' then+              if derivable (inv key) then+                  bare t' acc+              else+                  Just (S.insert t acc)+          else+              Just acc+      bare _ acc = Just acc++-- Support for data flow analysis of traces.  A flow rule maps an+-- initial set of atoms and a set of available terms to sets of pairs+-- of the same sets.+type FlowRule = (Set Term, Set Term) -> Set (Set Term, Set Term)++-- Combine flow rules sequentially.+comb :: FlowRule -> FlowRule -> FlowRule+comb f g x =+    S.fold h S.empty (g x)+    where+      h a s = S.union (f a) s++-- Analyze a term as a sent term.+outFlow :: Term -> FlowRule+outFlow t a@(_, available)+    | S.member t available = S.singleton a+outFlow (I _) _ = S.empty+outFlow (C _) a = S.singleton a+outFlow (F Cat [t0, t1]) a =    -- Construct non-atoms+    comb (outFlow t1) (outFlow t0) a+outFlow (F Enc [t0, t1]) a =+    comb (outFlow t1) (outFlow t0) a+outFlow t (initial, available) = -- Don't look inside atoms+    S.singleton (S.insert t initial, S.insert t available)++-- Analyze a term as a received term.+inFlow :: Term -> FlowRule+inFlow (C _) a = S.singleton a+inFlow (F Cat [t0, t1]) a =     -- Try to receive components+    S.union                     -- in both orders+         (comb (inFlow t1) (inFlow t0) a)+         (comb (inFlow t0) (inFlow t1) a)+inFlow t@(F Enc [t0, t1]) (initial, available) =+    S.union                     -- Encryption can be built+         (outFlow t (initial, available)) -- or decrypted+         (comb (inFlow t0) (outFlow (inv t1)) a)+    where                       -- Derive decryption key first+      a = (initial, S.insert t available)+inFlow t (initial, available) =+    S.singleton (initial, S.insert t available)++instance C.Term Term where+    isVar = isVar+    isBaseTerm = isBaseTerm+    termsWellFormed = termsWellFormed+    occursIn = occursIn+    foldVars = foldVars+    foldCarriedTerms = foldCarriedTerms+    carriedBy = carriedBy+    decryptionKey = decryptionKey+    decompose = decompose+    buildable = buildable+    encryptions = encryptions+    protectors = protectors+    outFlow = outFlow+    inFlow = inFlow+    loadTerm = loadTerm++-- Places++-- A place names a one subterm within a term.  It is a list of+-- integers giving a path through a term to that named subterm.  Each+-- integer in the list identifies the subterm in a function+-- application on the path to the named subterm.  The integer is the+-- index of the subterm in the application's list of terms.++newtype Place = Place [Int] deriving Show++-- Returns the places a term occurs within another term.+places :: Term -> Term -> [Place]+places target source =+    f [] [] source+    where+      f paths path source+          | target == source = Place (reverse path) : paths+      f paths path (F _ u) =+          g paths path 0 u+      f paths _ _ = paths+      g paths _ _ [] = paths+      g paths path i (t : u) =+          g (f paths (i: path) t) path (i + 1) u++-- Returns the places a term is carried by another term.+carriedPlaces :: Term -> Term -> [Place]+carriedPlaces target source =+    f [] [] source+    where+      f paths path source+          | target == source = Place (reverse path) : paths+      f paths path (F Cat [t, t']) =+	  f (f paths  (0 : path) t) (1 : path) t'+      f paths path (F Enc [t, _]) =+	  f paths (0 : path) t+      f paths _ _ = paths++-- Replace a term within a term at a given place.+replace :: Term -> Place -> Term -> Term+replace target (Place ints) source =+    loop ints source+    where+      loop [] _ = target+      loop (i : path) (F s u) =+          F s (C.replaceNth (loop path (u !! i)) i u)+      loop _ _ = error "Algebra.replace: Bad path to term"++-- Return the ancestors of the term at the given place.+ancestors :: Term -> Place -> [Term]+ancestors source (Place ints) =+    loop [] ints source+    where+      loop ts [] _ = ts+      loop ts (i: path) t@(F _ u) =+          loop (t : ts) path (u !! i)+      loop _ _ _ = error "Algebra.ancestors: Bad path to term"++instance C.Place Term Place where+    places = places+    carriedPlaces = carriedPlaces+    replace = replace+    ancestors = ancestors++-- Rename the identifiers in a term.  Gen keeps the state of the+-- renamer.  (Question: should alist be replaced by a Map?)+clone :: Gen -> Term -> (Gen, Term)+clone gen t =+    (gen', t')+    where+      (_, gen', t') = cloneTerm ([], gen) t+      cloneTerm (alist, gen) t =+          case t of             -- The association list maps+            I x ->              -- identifiers to identifier.+                case lookup x alist of+                  Just y -> (alist, gen, I y)+                  Nothing ->+                      let (gen', y) = cloneId gen x in+                      ((x, y) : alist, gen', I y)+            C c -> (alist, gen, C c)+            F sym u ->+                let (alist', gen', u') =+                        foldl cloneTermList (alist, gen, []) u in+                (alist', gen', F sym $ reverse u')+      cloneTermList (alist, gen, u) t =+          let (alist', gen', t') = cloneTerm (alist, gen) t in+          (alist', gen', t' : u)++instance C.Gen Term Gen where+    origin = origin+    clone = clone+    loadVars = loadVars++-- Functions used in both unification and matching++type IdMap = Map Id Term++emptyIdMap :: IdMap+emptyIdMap = M.empty++-- Apply a substitution to a term+idSubst :: IdMap -> Term -> Term+idSubst subst (I x) =+    M.findWithDefault (I x) x subst+idSubst _ t@(C _) = t+idSubst subst (F Invk [t]) =+    case idSubst subst t of+      F Invk [t] -> t           -- Apply axiom+      t -> F Invk [t]+idSubst subst (F s u) =+    F s (map (idSubst subst) u)++-- Unification and substitution++newtype Subst = Subst IdMap deriving (Eq, Ord, Show)++emptySubst :: Subst+emptySubst = Subst emptyIdMap++-- Apply a substitution created by unification+substitute :: Subst -> Term -> Term+substitute (Subst s) t =+    idSubst s t++-- Composition of substitutions++-- substitute (compose s0 s1) t = substitute s0 (substitute s1 t)++-- 1. apply s0 to range of s1 to obtain s2;+-- 2. remove bindings is s0 where domains of s0 and s1 overlap to form s3;+-- 3. remove trivial bindings from s2 to form s4; and+-- 4. take the union of s4 and s3.++compose :: Subst -> Subst -> Subst+compose (Subst s0) (Subst s1) =+    let s2 = M.map (substitute (Subst s0)) s1        -- Step 1+        s4 = M.filterWithKey nonTrivialBinding s2 in -- Step 3+    Subst (M.union s4 s0)       -- Steps 2 and 4, union is left-biased++nonTrivialBinding :: Id -> Term -> Bool+nonTrivialBinding x (I y) = x /= y+nonTrivialBinding _ _ = True++-- During unification, variables determined to be equal are collected+-- into an equivalence class.  Multiple lookups of each variable in+-- the internal representation of a substitution finds the canonical+-- representive of the class.  The chase function finds the current+-- canonical representitive.++-- Get the canonical representative of equivalent identifiers making use+-- of this algebra's axiom.+chase :: Subst -> Term -> Term+chase (Subst s) (I x) =+    case M.lookup x s of+      Nothing -> I x+      Just t -> chase (Subst s) t+chase s (F Invk [t]) = chaseInvk s t+chase _ t = t++chaseInvk :: Subst -> Term -> Term+chaseInvk (Subst s) (I x) =+    case M.lookup x s of+      Nothing -> F Invk [I x]+      Just t -> chaseInvk (Subst s) t+chaseInvk s (F Invk [t]) = chase s t+chaseInvk _ t = F Invk [t]++-- Does x occur in t?+occurs :: Id -> Term -> Bool+occurs x (I y) = x == y+occurs _ (C _) = False+occurs x (F _ u) = any (occurs x) u++unifyChase :: Term -> Term -> Subst -> Maybe Subst+unifyChase t t' s = unifyTerms (chase s t) (chase s t') s++unifyTerms :: Term -> Term -> Subst -> Maybe Subst+unifyTerms (I x) (I y) (Subst s)+    | x == y = Just (Subst s)+    | otherwise = Just (Subst $ M.insert x (I y) s)+unifyTerms (I x) t (Subst s)+    | occurs x t = Nothing+    | otherwise = Just (Subst $ M.insert x t s)+unifyTerms t (I x) s = unifyTerms (I x) t s+unifyTerms (C c) (C c') s+    | c == c' = Just s+    | otherwise = Nothing+unifyTerms (F Invk [I x]) (F Pubk [I y]) s =+    unifyTerms (I x) (F Invk [F Pubk [I y]]) s+unifyTerms (F Invk [I x]) (F Pubk [C c, I y]) s =+    unifyTerms (I x) (F Invk [F Pubk [C c, I y]]) s+unifyTerms (F Pubk [I x]) (F Invk [I y]) s =+    unifyTerms (I y) (F Invk [F Pubk [I x]]) s+unifyTerms (F Pubk [C c, I x]) (F Invk [I y]) s =+    unifyTerms (I y) (F Invk [F Pubk [C c, I x]]) s+unifyTerms (F sym u) (F sym' u') s+    | sym == sym' = unifyTermLists u u' s+    | otherwise = Nothing+unifyTerms _ _ _ = Nothing++unifyTermLists :: [Term] -> [Term] -> Subst -> Maybe Subst+unifyTermLists [] [] s = Just s+unifyTermLists (t : u) (t' : u') s =+    maybe Nothing (unifyTermLists u u') (unifyChase t t' s)+unifyTermLists _ _ _ = Nothing++-- The exported unifier converts the internal representation of a+-- substitution into the external form using chaseMap.++unify :: Term -> Term -> Subst -> Maybe Subst+unify t t' s =+    do+      s <- unifyChase t t' s+      return $ chaseMap s++-- Apply the chasing version of substitution to the range of s.++chaseMap :: Subst -> Subst+chaseMap (Subst s) =+    Subst $ M.map (substChase (Subst s)) s++-- A chasing version of substitution.++substChase :: Subst -> Term -> Term+substChase subst t =+    case chase subst t of+      t@(I _) -> t+      t@(C _) -> t+      F Invk [t] ->+          case substChase subst t of+            F Invk [t] -> t           -- Apply axiom+            t -> F Invk [t]+      F s u ->+          F s (map (substChase subst) u)++-- more general than relation+-- s0 `lte` s1 if s1 = compose s2 s0 for some s2+moreGeneral :: (Gen, Subst) -> (Gen, Subst) -> Bool+moreGeneral (_, Subst s0) (_, Subst s1) =+    let dom = S.elems $ foldl idSet (M.keysSet s0) (M.elems s0)+        env = foldl (flip M.delete) s1 (M.keys s0) in+    loop dom (Env env)+    where+      loop [] _ = True+      loop (x : xs) env =+          maybe False (loop xs) (match (get x s0) (get x s1) env)+      get x env = M.findWithDefault (I x) x env++idSet :: Set Id -> Term -> Set Id+idSet set (I id) = S.insert id set+idSet set (C _) = set+idSet set (F _ u) = foldl idSet set u++instance C.Subst Term Gen Subst where+   emptySubst = emptySubst+   substitute = substitute+   unify t t' (g, s) =+       maybe Nothing (\s -> Just (g, s)) $ unify t t' s+   compose = compose+   moreGeneral = moreGeneral++-- Matching and instantiation++newtype Env = Env IdMap deriving (Eq, Ord, Show)++-- An environment may contain an explicit identity mapping, whereas a+-- substitution is erroneous if it has one.++emptyEnv :: Env+emptyEnv = Env emptyIdMap++-- Apply a substitution created my matching+instantiate :: Env -> Term -> Term+instantiate (Env r) t = idSubst r t++-- Matching++-- The matcher has the property that when pattern P and term T match+-- then instantiate (match P T emptyEnv) P = T.+match ::  Term -> Term -> Env -> Maybe Env+match (I x) t (Env r) =+    case M.lookup x r of+      Nothing -> Just $ Env $ M.insert x t r+      Just t' -> if t == t' then Just $ Env r else Nothing+match (C c) (C c') r = if c == c' then Just r else Nothing+match (F Invk [I x]) (F Pubk [I y]) r =+    match (I x) (F Invk [F Pubk [I y]]) r+match (F Invk [I x]) (F Pubk [C c, I y]) r =+    match (I x) (F Invk [F Pubk [C c, I y]]) r+match (F s u) (F s' u') r+    | s == s' = matchLists u u' r+    | otherwise = Nothing+match _ _ _ = Nothing++matchLists :: [Term] -> [Term] -> Env -> Maybe Env+matchLists [] [] r = Just r+matchLists (t : u) (t' : u') r =+    maybe Nothing (matchLists u u') (match t t' r)+matchLists _ _ _ = Nothing++-- Does every varible in ts not occur in the domain of e?+-- Trivial bindings in e are ignored.+idempotentEnvFor :: Env -> [Term] -> Bool+idempotentEnvFor (Env r) ts =+    all (allId $ flip S.notMember dom) ts+    where+      dom = M.foldWithKey f S.empty r -- The domain of r+      f x (I y) dom+          | x == y = dom        -- Ignore trivial bindings+          | otherwise = S.insert x dom+      f x _ dom = S.insert x dom++allId :: (Id -> Bool) -> Term -> Bool+allId f (I x) = f x+allId _ (C _) = True+allId f (F _ u) = all (allId f) u++-- Cast an environment into a substitution by filtering out trivial+-- bindings.++substitution :: Env -> Subst+substitution (Env r) =+    Subst $ M.filterWithKey nonTrivialBinding r++-- Add type information to an environment, and return it as a list of+-- associations.++reify :: [Term] -> Env -> [(Term, Term)]+reify domain (Env env) =+    map (loop domain) $ M.assocs env+    where+      loop [] (x, _) =+          error $ "Algebra.reify: variable missing from domain " ++ idName x+      loop (I x : _) (y, t)+          | x == y = (I x, t)+      loop (F Text [I x] : _) (y, t)+          | x == y = (F Text [I x], F Text [t])+      loop (F Data [I x] : _) (y, t)+          | x == y = (F Data [I x], F Data [t])+      loop (F Name [I x] : _) (y, t)+          | x == y = (F Name [I x], F Name [t])+      loop (F Skey [I x] : _) (y, t)+          | x == y = (F Skey [I x], F Skey [t])+      loop (F Akey [I x] : _) (y, t)+          | x == y = (F Akey [I x], F Akey [t])+      loop (_ : domain) pair = loop domain pair++-- Ensure the range of an environment contains only variables and that+-- the environment is injective.+matchRenaming :: Env -> Bool+matchRenaming (Env e) =+    loop S.empty $ M.elems e+    where+      loop _ [] = True+      loop s (I x:e) =+          not (S.member x s) && loop (S.insert x s) e+      loop _ _ = False++instance C.Env Term Gen Subst Env where+   emptyEnv = emptyEnv+   instantiate = instantiate+   match t t' (g, e) =+       maybe Nothing (\e -> Just (g, e)) $ match t t' e+   idempotentEnvFor (g, e) ts =+       if idempotentEnvFor e ts then+           Just (g, e)+       else+           Nothing+   substitution = substitution+   reify = reify+   matchRenaming (_, e) = matchRenaming e++-- Term specific loading functions++loadVars :: Monad m => Gen -> [SExpr Pos] -> m (Gen, [Term])+loadVars gen sexprs =+    do+      pairs <- mapM loadVarPair sexprs+      (g, vars) <- foldM loadVar (gen, []) (concat pairs)+      return (g, reverse vars)++loadVarPair :: Monad m => SExpr Pos -> m [(SExpr Pos, SExpr Pos)]+loadVarPair (L _ (x:xs)) =+    let (t:vs) = reverse (x:xs) in+    return [(v,t) | v <- reverse vs]+loadVarPair x = fail (shows (annotation x) "Bad variable declaration")++loadVar :: Monad m => (Gen, [Term]) -> (SExpr Pos, SExpr Pos) ->+           m (Gen, [Term])+loadVar (gen, vars) (S pos name, S pos' sort) =+    case loadLookup pos vars name of+      Right _ ->+          fail (shows pos "Duplicate variable declaration for " ++ name)+      Left _ ->+          do+            let (gen', x) = freshId gen name+            p <- mkVar (I x)+            return (gen', p : vars)+    where+      mkVar t =+          case sort of+            "mesg" -> return t+            "text" -> return $ F Text [t]+            "data" -> return $ F Data [t]+            "name" -> return $ F Name [t]+            "skey" -> return $ F Skey [t]+            "akey" -> return $ F Akey [t]+            _ -> fail (shows pos' "Sort " ++ sort ++ " not recognized")+loadVar _ (x,_) = fail (shows (annotation x) "Bad variable syntax")++loadLookup :: Pos -> [Term] -> String -> Either String Term+loadLookup pos [] name = Left (shows pos $ "Identifier " ++ name ++ " unknown")+loadLookup pos (t : u) name =+    let name' = idName (varId t) in+    if name' == name then Right t else loadLookup pos u name++loadLookupName :: Monad m => Pos -> [Term] -> String -> m Term+loadLookupName pos vars name =+    either fail f (loadLookup pos vars name)+    where+      f t@(F Name [I _]) = return t+      f _ = fail (shows pos $ "Expecting " ++ name ++ " to be a name")++loadLookupAkey :: Monad m => Pos -> [Term] -> String -> m Term+loadLookupAkey pos vars name =+    either fail f (loadLookup pos vars name)+    where+      f t@(F Akey [I _]) = return t+      f _ = fail (shows pos $ "Expecting " ++ name ++ " to be an akey")++-- Load term and check that it is well-formed.+loadTerm :: Monad m => [Term] -> SExpr Pos -> m Term+loadTerm vars (S pos s) =+    either fail return (loadLookup pos vars s)+loadTerm _ (Q _ t) =+    return (C t)+loadTerm vars (L pos (S _ s : l)) =+    case lookup s loadDispatch of+      Nothing -> fail (shows pos "Keyword " ++ s ++ " unknown")+      Just f -> f pos vars l+loadTerm _ x = fail (shows (annotation x) "Malformed term")++type LoadFunction m = Pos -> [Term] -> [SExpr Pos] -> m Term++loadDispatch :: Monad m => [(String, LoadFunction m)]+loadDispatch =+    [("pubk", loadPubk)+    ,("privk", loadPrivk)+    ,("invk", loadInvk)+    ,("ltk", loadLtk)+    ,("cat", loadCat)+    ,("enc", loadEnc)+    ]++-- Atom constructors: pubk privk invk ltk++loadPubk :: Monad m => LoadFunction m+loadPubk _ vars [S pos s] =+    do+      t <- loadLookupName pos vars s+      return $ F Akey [F Pubk [I $ varId t]]+loadPubk _ vars [Q _ c, S pos s] =+    do+      t <- loadLookupName pos vars s+      return $ F Akey [F Pubk [C c, I $ varId t]]+loadPubk pos _ _ = fail (shows pos "Malformed pubk")++loadPrivk :: Monad m => LoadFunction m+loadPrivk _ vars [S pos s] =+    do+      t <- loadLookupName pos vars s+      return $ F Akey [F Invk [F Pubk [I $ varId t]]]+loadPrivk _ vars [Q _ c, S pos s] =+    do+      t <- loadLookupName pos vars s+      return $ F Akey [F Invk [F Pubk [C c, I $ varId t]]]+loadPrivk pos _ _ = fail (shows pos "Malformed privk")++loadInvk :: Monad m => LoadFunction m+loadInvk _ vars [S pos s] =+    do+      t <- loadLookupAkey pos vars s+      return $ F Akey [F Invk [I $ varId t]]+loadInvk pos _ _ = fail (shows pos "Malformed invk")++loadLtk :: Monad m => LoadFunction m+loadLtk _ vars [S pos s, S pos' s'] =+    do+      t <- loadLookupName pos vars s+      t' <- loadLookupName pos' vars s'+      return $ F Skey [F Ltk [I $ varId t, I $ varId t']]+loadLtk pos _ _ = fail (shows pos "Malformed ltk")++-- Term constructors: cat enc++loadCat :: Monad m => LoadFunction m+loadCat _ vars (l : ls) =+    do+      ts <- mapM (loadTerm vars) (l : ls)+      return $ foldr1 (\a b -> F Cat [a, b]) ts+loadCat pos _ _ = fail (shows pos "Malformed cat")++loadEnc :: Monad m => LoadFunction m+loadEnc pos vars (l : l' : ls) =+    do+      let (butLast, last) = splitLast l (l' : ls)+      t <- loadCat pos vars butLast+      t' <- loadTerm vars last+      return $ F Enc [t, t']+loadEnc pos _ _ = fail (shows pos "Malformed enc")++splitLast :: a -> [a] -> ([a], a)+splitLast x xs =+    loop [] x xs+    where+      loop z x [] = (reverse z, x)+      loop z x (y : ys) = loop (x : z) y ys++-- Term specific displaying functions++newtype Context = Context [(Id, String)] deriving Show++displayVars :: Context -> [Term] -> [SExpr ()]+displayVars _ [] = []+displayVars ctx vars =+    let (v,t):pairs = map (displayVar ctx) vars in+    loop t [v] pairs+    where+      loop t vs [] = [L () (reverse (t:vs))]+      loop t vs ((v',t'):xs)+          | t == t' = loop t (v':vs) xs+          | otherwise = L () (reverse (t:vs)):loop t' [v'] xs++displayVar :: Context -> Term -> (SExpr (), SExpr ())+displayVar ctx (I x) = displaySortId "mesg" ctx x+displayVar ctx (F Text [I x]) = displaySortId "text" ctx x+displayVar ctx (F Data [I x]) = displaySortId "data" ctx x+displayVar ctx (F Name [I x]) = displaySortId "name" ctx x+displayVar ctx (F Skey [I x]) = displaySortId "skey" ctx x+displayVar ctx (F Akey [I x]) = displaySortId "akey" ctx x+displayVar _ _ =+    error "Algebra.displayVar: term not a variable with its sort"++displaySortId :: String -> Context -> Id -> (SExpr (), SExpr ())+displaySortId sort ctx x = (displayId ctx x, S () sort)++displayId :: Context -> Id -> SExpr ()+displayId (Context ctx) x =+    case lookup x ctx of+      Nothing ->+          let msg = idName x ++ " in a display context" in+          error $ "Algebra.displayId: Cannot find variable " ++ msg+      Just name -> S () name++displayTerm :: Context -> Term -> SExpr ()+displayTerm ctx (I x) = displayId ctx x+displayTerm ctx (F Text [I x]) = displayId ctx x+displayTerm ctx (F Data [I x]) = displayId ctx x+displayTerm ctx (F Name [I x]) = displayId ctx x+displayTerm ctx (F Skey [I x]) = displayId ctx x+displayTerm ctx (F Skey [F Ltk [I x, I y]]) =+    L () [S () "ltk", displayId ctx x, displayId ctx y]+displayTerm ctx (F Akey [t]) =+    case t of+      I x -> displayId ctx x+      F Invk [I x] -> L () [S () "invk", displayId ctx x]+      F Pubk [I x] -> L () [S () "pubk", displayId ctx x]+      F Pubk [C c, I x] -> L () [S () "pubk", Q () c, displayId ctx x]+      F Invk [F Pubk [I x]] -> L () [S () "privk", displayId ctx x]+      F Invk [F Pubk [C c, I x]] ->+          L () [S () "privk", Q () c, displayId ctx x]+      _ -> error ("Algebra.displayAkey: Bad term " ++ show t)+displayTerm _ (C t) = Q () t+displayTerm ctx (F Cat [t0, t1]) =+    L () (S () "cat" : displayTerm ctx t0 : displayList ctx t1)+displayTerm ctx (F Enc [t0, t1]) =+    L () (S () "enc" : displayEnc ctx t0 t1)+displayTerm _ t = error ("Algebra.displayTerm: Bad term " ++ show t)++displayList :: Context -> Term -> [SExpr ()]+displayList ctx (F Cat [t0, t1]) = displayTerm ctx t0 : displayList ctx t1+displayList ctx t = [displayTerm ctx t]++displayEnc :: Context -> Term -> Term -> [SExpr ()]+displayEnc ctx (F Cat [t0, t1]) t = displayTerm ctx t0 : displayEnc ctx t1 t+displayEnc ctx t0 t1 = [displayTerm ctx t0, displayTerm ctx t1]++-- displaySubst c s displays a substitution s in context c, where some+-- variables that occur in s might not be in c.  Enough sort+-- inference is performed so as to allow the extension of the context.+displaySubst :: Context -> Subst -> [SExpr ()]+displaySubst ctx s@(Subst r) =+    map (\(x, t) -> L () [displayTerm ctx' x, displayTerm ctx' t]) r'+    where+      r' = map (\(x, t) -> (I x, inferSort (substitute s t))) $ M.assocs r+      ctx' = foldl (\ctx (x, t) -> addToContext ctx [x, t]) ctx r'++inferSort :: Term -> Term+inferSort t@(F Invk _) = F Akey [t]+inferSort t@(F Pubk _) = F Akey [t]+inferSort t@(F Ltk _) = F Skey [t]+inferSort t = t++emptyContext :: Context+emptyContext = Context []++-- Generate names for output renaming as necessary.+-- Assumes the input is a list of term that are well-formed+addToContext :: Context -> [Term] -> Context+addToContext ctx u =+    foldl (foldVars varContext) ctx u++varContext :: Context -> Term -> Context+varContext ctx t =+    let x = varId t+        name = idName x in+    if hasId ctx x then+        ctx+    else+        if hasName ctx name then+            extendContext ctx x (genName ctx name)+        else+            extendContext ctx x name++hasId :: Context -> Id -> Bool+hasId (Context ctx) id =+    maybe False (const True) (lookup id ctx)++hasName :: Context -> String -> Bool+hasName (Context ctx) name =+    maybe False (const True) (L.find ((name ==) . snd) ctx)++extendContext :: Context -> Id -> String -> Context+extendContext (Context ctx) x name =+    Context $ (x, name) : ctx++genName :: Context -> String -> String+genName ctx name =+    loop 0+    where+      root = rootName name+      loop :: Int -> String+      loop n =+          let name' = revapp root (show n) in+          if hasName ctx name' then+              loop (n + 1)+          else+              name'+      revapp [] s = s+      revapp (c : cs) s = revapp cs (c : s)++-- Returns the reverse of the root+rootName :: String -> String+rootName s =+    loop rs+    where+      rs = reverse s+      loop [] = '-' : rs+      loop (c : cs) =+          if c == '-' then+              c : cs+          else+              loop cs++instance C.Context Term Gen Subst Env Context where+    emptyContext = emptyContext+    addToContext = addToContext+    displayVars = displayVars+    displayTerm = displayTerm+    displaySubst = displaySubst++instance C.Algebra Term Place Gen Subst Env Context
+ src/CPSA/DiffieHellman/Algebra.hs view
@@ -0,0 +1,1628 @@+-- Diffie-Hellman Algebra implementation++-- 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.++-- 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.++{-# LANGUAGE MultiParamTypeClasses #-}++module CPSA.DiffieHellman.Algebra (name, origin) where++import Control.Monad (foldM)+import qualified Data.List as L+import qualified Data.Set as S+import Data.Set (Set)+import qualified Data.Map as M+import Data.Map (Map)+import qualified CPSA.Lib.CPSA as C+import CPSA.Lib.CPSA (SExpr(..), Pos, annotation)+import qualified CPSA.DiffieHellman.IntLinEq as I++{-- Debugging support+import System.IO.Unsafe++z :: Show a => a -> b -> b+z x y = seq (unsafePerformIO (print x)) y++zz :: Show a => a -> a+zz x = z x x++zn :: Show a => a -> Maybe b -> Maybe b+zn x Nothing = z x Nothing+zn _ y = y++zf :: Show a => a -> Bool -> Bool+zf x False = z x False+zf _ y = y++zt :: Show a => a -> Bool -> Bool+zt x True = z x True+zt _ y = y+--}++{-- Export iUnify and iMatch for GHCi for debugging+iUnify :: String -> String -> String -> Maybe Subst+iUnify vars t t' =+    iRun unify emptySubst vars t t'++iMatch :: String -> String -> String -> Maybe Env+iMatch vars t t' =+    iRun match emptyEnv vars t t'++iRun :: (Term -> Term -> (Gen, a) -> Maybe (Gen, a)) -> a ->+        String -> String -> String -> Maybe a+iRun f mt vars t t' =+    do+      vars <- C.load "" vars+      [t] <- C.load "" t+      [t'] <- C.load "" t'+      (gen, vars) <- loadVars origin vars+      t <- loadTerm vars t+      t' <- loadTerm vars t'+      (_, a) <- f t t' (gen, mt)+      return a++gRun :: Gen -> Term -> a -> a+gRun (Gen n) t a =+    foldVars f a t+    where+      f a t =+          case varId t of+            Id (m, _) | m >= n -> error ("Bad gen " ++ show n)+            _ -> a++gMatch :: Term -> Term -> GenEnv -> Maybe GenEnv+gMatch t t' r@(g, _) = gRun g t' (match t t' r)++gUnify :: Term -> Term -> GenSubst -> Maybe GenSubst+gUnify t t' r@(g, _) = gRun g (F Cat [t, t']) (unify t t' r)+--}++name :: String+name = "diffie-hellman"++-- An identifier++newtype Id = Id (Integer, String) deriving Show++-- The integer distinguishes an identifier, the string is for printing.++instance Eq Id where+    (Id (x, _)) == (Id (x', _)) = x == x'++instance Ord Id where+    compare (Id (x, _)) (Id (x', _)) = compare x x'++idName :: Id -> String+idName (Id (_, name)) = name++-- Counter used for generating fresh identifiers.++newtype Gen = Gen (Integer) deriving Show++origin :: Gen+origin = Gen (0)++freshId :: Gen -> String -> (Gen, Id)+freshId (Gen (i)) name = (Gen (i + 1), Id (i, name))++cloneId :: Gen -> Id -> (Gen, Id)+cloneId gen x = freshId gen (idName x)++mash :: Gen -> Gen -> Gen+mash (Gen i) (Gen j) = Gen (max i j)++-- A term in an Abelian group is a map from identifiers to non-zero integers.++type Group = Map Id Int++isGroupVar :: Group -> Bool+isGroupVar t =+    M.size t == 1 && head (M.elems t) == 1++groupVar :: Id -> Term+groupVar x = G $ M.singleton x 1++invert :: Group -> Group+invert t = M.map negate t++expg :: Group -> Int -> Group+expg _ 0 = M.empty+expg t 1 = t+expg t n = M.map (* n) t++mul :: Group -> Group -> Group+mul t t' =+    M.foldWithKey f t' t      -- Fold over the mappings in t+    where+      f x c t =                 -- Alter the mapping of+          M.alter (g c) x t     -- variable x in t+      g c Nothing =             -- Variable x not currently mapped+          Just c                -- so add a mapping+      g c (Just c')             -- Variable x maps to c'+          | c + c' == 0 = Nothing     -- Delete the mapping+          | otherwise = Just $ c + c' -- Adjust the mapping++group :: [(Id, Int)] -> Group+group assocs =+    foldr f M.empty assocs+    where+      f (x, c) t = mul (expg (M.singleton x 1) c) t++-- Function symbols--see foldVar to see the arity of each symbol.+data Symbol+    = Text                      -- Text atom+    | Data                      -- Another text-like atom+    | Name                      -- Principal atom+    | Skey                      -- Symmetric key atom+    | Base                      -- Base of an exponentiated atom+    | Ltk                       -- Long term shared symmetric key+    | Akey                      -- Asymmetric key atom+    | Invk                      -- Inverse of asymmetric key+    | Pubk                      -- Public asymmetric key of a principal+    | Genr                      -- The generator constant for the group+    | Exp                       -- Exponentiation function symbol+    | Cat                       -- Term concatenation+    | Enc                       -- Encryption+      deriving (Show, Eq, Ord, Enum, Bounded)++-- A Basic Crypto Algebra Term++data Term+    = I !Id+    | C !String+    | F !Symbol ![Term]+    | G !Group                  -- An exponent, an Abelian group+      deriving Show++equalTerm :: Term -> Term -> Bool+equalTerm (I x) (I y) = x == y+equalTerm (C c) (C c') = c == c'+equalTerm (F Invk [F Invk [t]]) t' = equalTerm t t'+equalTerm t (F Invk [F Invk [t']]) = equalTerm t t'+equalTerm (F Exp [t0, G t1]) t' | M.null t1 = equalTerm t0 t'+equalTerm t (F Exp [t0, G t1]) | M.null t1 = equalTerm t t0+equalTerm (F Exp [F Exp [t, G t0], G t1]) t' =+    equalTerm (F Exp [t, G (mul t0 t1)]) t'+equalTerm t (F Exp [F Exp [t', G t0], G t1])  =+    equalTerm t (F Exp [t', G (mul t0 t1)])+equalTerm (F s u) (F s' u') =+    s == s' && equalTermLists u u'+equalTerm (G t) (G t') = t == t'+equalTerm _ _ = False++equalTermLists :: [Term] -> [Term] -> Bool+equalTermLists [] [] = True+equalTermLists (t : u) (t' : u') =+    equalTerm t t' && equalTermLists u u'+equalTermLists _ _ = False++instance Eq Term where+    (==) = equalTerm++-- Term comparison respecting the axiom++compareTerm :: Term -> Term -> Ordering+compareTerm (I x) (I y) = compare x y+compareTerm (C c) (C c') = compare c c'+compareTerm (F Invk [F Invk [t]]) t' = compareTerm t t'+compareTerm t (F Invk [F Invk [t']]) = compareTerm t t'+compareTerm (F Exp [t0, G t1]) t' | M.null t1 = compareTerm t0 t'+compareTerm t (F Exp [t0, G t1]) | M.null t1 = compareTerm t t0+compareTerm (F Exp [F Exp [t, G t0], G t1]) t' =+    compareTerm (F Exp [t, G (mul t0 t1)]) t'+compareTerm t (F Exp [F Exp [t', G t0], G t1])  =+    compareTerm t (F Exp [t', G (mul t0 t1)])+compareTerm (F s u) (F s' u') =+    case compare s s' of+      EQ -> compareTermLists u u'+      o -> o+compareTerm (G t) (G t') = compare t t'+compareTerm (I _) (C _) = LT+compareTerm (C _) (I _) = GT+compareTerm (I _) (F _ _) = LT+compareTerm (F _ _) (I _) = GT+compareTerm (I _) (G _) = LT+compareTerm (G _) (I _) = GT+compareTerm (C _) (F _ _) = LT+compareTerm (F _ _) (C _) = GT+compareTerm (C _) (G _) = LT+compareTerm (G _) (C _) = GT+compareTerm (F _ _) (G _) = LT+compareTerm (G _) (F _ _) = GT++compareTermLists :: [Term] -> [Term] -> Ordering+compareTermLists [] [] = EQ+compareTermLists (t : u) (t' : u') =+    case compareTerm t t' of+      EQ -> compareTermLists u u'+      o -> o+compareTermLists [] _ = LT+compareTermLists _ [] = GT++instance Ord Term where+    compare = compareTerm++-- 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 variables.+isVar :: Term -> Bool+isVar (I _) = True           -- Sort: mesg+isVar (F s [I _]) =+    -- Sorts: text, data, name, skey, and akey+    s == Text || s == Data || s == Name || s == Skey || s == Akey || s == Base+isVar (G t) = isGroupVar t+isVar _ = False++-- Extract the identifier from a variable+varId :: Term -> Id+varId (I x) = x+varId (F Text [I x]) = x+varId (F Data [I x]) = x+varId (F Name [I x]) = x+varId (F Skey [I x]) = x+varId (F Akey [I x]) = x+varId (F Base [I x]) = x+varId (G t) | isGroupVar t = head $ M.keys t+varId _ = error "Algebra.varId: term not a variable with its sort"++-- A list of terms are well-formed if each one has the correct+-- structure and every occurrence of an identifier in a term has the+-- same sort.  Variable environments are used to check the sort+-- condition.  It maps an identifier to a variable that contains the+-- identifier.++-- termsWellFormed u ensures all terms in u use each identifier at the+-- same sort, and makes sure every term has the correct structure.+termsWellFormed :: [Term] -> Bool+termsWellFormed u =+    loop emptyVarEnv u+    where+      loop _ [] = True+      loop env (t : u) =+          case termWellFormed env t of+            Nothing -> False+            Just env' -> loop env' u++newtype VarEnv = VarEnv (Map Id Term) deriving Show++emptyVarEnv :: VarEnv+emptyVarEnv = VarEnv M.empty++-- Check the structure and sort condition.++termWellFormed :: VarEnv -> Term -> Maybe VarEnv+termWellFormed xts t@(I x) =+    extendVarEnv xts x t        -- Mesg variable+termWellFormed xts t@(F Text [I x]) =+    extendVarEnv xts x t        -- Text variable+termWellFormed xts t@(F Data [I x]) =+    extendVarEnv xts x t        -- Data variable+termWellFormed xts t@(F Name [I x]) =+    extendVarEnv xts x t        -- Name variable+termWellFormed xts t@(F Skey [I x]) =+    extendVarEnv xts x t        -- Symmetric key variable+termWellFormed xts (F Skey [F Ltk [I x, I y]]) =+    -- Long term shared symmetric key+    doubleTermWellFormed xts (F Name [I x]) (F Name [I y])+termWellFormed xts (F Akey [t]) = -- Asymmetric key terms+    case t of+      I x -> extendVarEnv xts x (F Akey [I x])+      F Invk [I x] -> extendVarEnv xts x (F Akey [I x])+      F Pubk [I x] -> extendVarEnv xts x (F Name [I x])+      F Pubk [C _, I x] -> extendVarEnv xts x (F Name [I x])+      F Invk [F Pubk [I x]] -> extendVarEnv xts x (F Name [I x])+      F Invk [F Pubk [C _, I x]] -> extendVarEnv xts x (F Name [I x])+      _ -> Nothing+termWellFormed xts (F Base [t]) =+    baseVarEnv xts t+    where+      baseVarEnv xts t@(I x) =+          extendVarEnv xts x (F Base [t])+      baseVarEnv xts (F Genr []) =+          Just xts+      baseVarEnv xts (F Exp [t0, G t1]) =+          do+            xts <- baseVarEnv xts t0+            termWellFormed xts (G t1)+      baseVarEnv _ _ = Nothing+termWellFormed xts (G t) =+    foldM expnVarEnv xts (M.keys t)+    where+      expnVarEnv xts x =+          extendVarEnv xts x (groupVar x)+termWellFormed xts (C _) =+    Just xts                    -- Tags+termWellFormed xts (F Cat [t0, t1]) =+    doubleTermWellFormed xts t0 t1  -- Concatenation+termWellFormed xts (F Enc [t0, t1]) =+    doubleTermWellFormed xts t0 t1  -- Encryption+termWellFormed _ _ = Nothing++-- Extend when sorts agree+extendVarEnv :: VarEnv -> Id -> Term -> Maybe VarEnv+extendVarEnv (VarEnv env) x t =+    case M.lookup x env of+      Nothing -> Just $ VarEnv $ M.insert x t env+      Just t' -> if t == t' then Just (VarEnv env) else Nothing++doubleTermWellFormed :: VarEnv -> Term -> Term -> Maybe VarEnv+doubleTermWellFormed xts t0 t1 =+    do+      xts <- termWellFormed xts t0+      termWellFormed xts t1++-- Is the sort of the term a base sort?+isBaseTerm :: Term -> Bool+isBaseTerm (I _) = False+isBaseTerm (C _) = False+isBaseTerm (F s _) =+    s == Text || s == Data || s == Name || s == Skey || s == Akey || s == Base+isBaseTerm (G _) = True++-- Does a term occur in another term?+occursIn :: Term -> Term -> Bool+occursIn (G t) (G t') =+    all f (M.assocs t)+    where+      f (x, n) =+          let n' = M.findWithDefault 0 x t' in+          n > 0 && n' >= n || n < 0 && n' <= n+occursIn t t' =+    t == t' ||+      case t' of+        F _ u -> any (occursIn t) u+        _ -> False++-- Fold f through a term applying it to each variable in the term.+foldVars :: (a -> Term -> a) -> a -> Term -> a+foldVars f acc t@(I _) = f acc t          -- Mesg variable+foldVars f acc t@(F Text [I _]) = f acc t -- Text variable+foldVars f acc t@(F Data [I _]) = f acc t -- Data variable+foldVars f acc t@(F Name [I _]) = f acc t -- Name variable+foldVars f acc t@(F Skey [I _]) =+    f acc t                     -- Symmetric key variable+foldVars f acc (F Skey [F Ltk [I x, I y]]) =+    -- Long term shared symmetric key+    f (f acc (F Name [I x])) (F Name [I y])+foldVars f acc t@(F Akey [I _]) = f acc t -- Asymmetric keys+foldVars f acc (F Akey [F Invk [I x]]) = f acc (F Akey [I x])+foldVars f acc (F Akey [F Pubk [I x]]) = f acc (F Name [I x])+foldVars f acc (F Akey [F Pubk [C _, I x]]) = f acc (F Name [I x])+foldVars f acc (F Akey [F Invk [F Pubk [I x]]]) = f acc (F Name [I x])+foldVars f acc (F Akey [F Invk [F Pubk [C _, I x]]]) = f acc (F Name [I x])+foldVars f acc (F Base [t]) =+    baseAddVars acc t+    where+      baseAddVars acc t@(I _) =+          f acc (F Base [t])+      baseAddVars acc (F Genr []) =+          acc+      baseAddVars acc (F Exp [t0, G t1]) =+          foldVars f (baseAddVars acc t0) (G t1)+      baseAddVars _ _ = error "Algebra.foldVars: Bad term"+foldVars f acc (G t) =+    foldl expnAddVars acc (M.keys t)+    where+      expnAddVars acc x =+          f acc (groupVar x)+foldVars _ acc (C _) = acc        -- Tags+foldVars f acc (F Cat [t0, t1]) = -- Concatenation+    foldVars f (foldVars f acc t0) t1+foldVars f acc (F Enc [t0, t1]) = -- Encryption+    foldVars f (foldVars f acc t0) t1+foldVars _ _ t = error $ "Algebra.foldVars: Bad term " ++ show t++-- Fold f through a term applying it to each term that is carried by the term.+foldCarriedTerms :: (a -> Term -> a) -> a -> Term -> a+foldCarriedTerms f acc t@(F Cat [t0, t1]) = -- Concatenation+    foldCarriedTerms f (foldCarriedTerms f (f acc t) t0) t1+foldCarriedTerms f acc t@(F Enc [t0, _]) = -- Encryption+    foldCarriedTerms f (f acc t) t0+foldCarriedTerms f acc t = f acc t     -- atoms and tags++-- Is a term carried by another term?+carriedBy :: Term -> Term -> Bool+carriedBy t t' =+    t == t' ||+      case t' of+        F Cat [t0, t1] -> carriedBy t t0 || carriedBy t t1+        F Enc [t0, _] -> carriedBy t t0+        _ -> False++-- The key used to decrypt an encrypted term, otherwise Nothing.+decryptionKey :: Term -> Maybe Term+decryptionKey (F Enc [_, t]) = Just (inv t)+decryptionKey _ = Nothing++buildable :: Set Term -> Set Term -> Term -> Bool+buildable knowns unguessable term =+    ba term+    where+      ba (I _) = True           -- A mesg sorted variable is always buildable+      ba (C _) = True           -- and so is a tag+      ba (F Cat [t0, t1]) =+          ba t0 && ba t1+      ba t@(F Enc [t0, t1]) =+          S.member t knowns || ba t0 && ba t1+      ba t = isBaseTerm t && not (S.member t unguessable)++-- Compute the decomposition given some known terms and some unguessable+-- atoms.  The code is quite tricky.  It iterates until the known+-- terms don't change.  The known terms ends up with all the+-- encryptions that are known.+decompose :: Set Term -> Set Term -> (Set Term, Set Term)+decompose knowns unguessable =+    loop unguessable knowns S.empty []+    where+      loop unguessable knowns old []+          | old == knowns = (knowns, unguessable) -- Done+          | otherwise = loop unguessable knowns knowns (S.elems knowns)+      loop unguessable knowns old (t@(F Cat _) : todo) =+          loop unguessable (decat t (S.delete t knowns)) old todo+      loop unguessable knowns old ((F Enc [t0, t1]) : todo)+          | buildable knowns unguessable (inv t1) = -- Add plaintext+              loop unguessable (decat t0 knowns) old todo+          | otherwise = loop unguessable knowns old todo+      loop unguessable knowns old (t : todo) =+          loop (S.delete t unguessable) (S.delete t knowns) old todo+      -- Decat+      decat (F Cat [t0, t1]) s = decat t1 (decat t0 s)+      decat t s = S.insert t s++-- Inverts an asymmetric key+inv :: Term -> Term+inv (F Akey [F Invk [t]]) = F Akey [t]+inv (F Akey [t]) = F Akey [F Invk [t]]+inv (I _) = error "Algebra.inv: Cannot invert a variable of sort mesg"+inv t = t++-- Extracts every encryption that is carried by a term along with its+-- encryption key.+encryptions :: Term -> [(Term, Term)]+encryptions t =+    reverse $ loop t []+    where+      loop (F Cat [t, t']) acc =+          loop t' (loop t acc)+      loop t@(F Enc [t', t'']) acc =+          loop t' (adjoin (t, t'') acc)+      loop _ acc = acc+      adjoin x xs+          | x `elem` xs = xs+          | otherwise = x : xs++-- Returns the encryptions that carry the target.  If the target is+-- carried outside all encryptions, or is exposed because a decription+-- key is derivable, Nothing is returned.+protectors :: (Term -> Bool) -> Term -> Term -> Maybe [Term]+protectors derivable target source =+    do+      ts <- bare source S.empty+      return $ S.elems ts+    where+      bare source _+           | source == target = Nothing+      bare (F Cat [t, t']) acc =+          maybe Nothing (bare t') (bare t acc)+      bare t@(F Enc [t', key]) acc =+          if target `carriedBy` t' then+              if derivable (inv key) then+                  bare t' acc+              else+                  Just (S.insert t acc)+          else+              Just acc+      bare _ acc = Just acc++-- Support for data flow analysis of traces.  A flow rule maps an+-- initial set of atoms and a set of available terms to sets of pairs+-- of the same sets.+type FlowRule = (Set Term, Set Term) -> Set (Set Term, Set Term)++-- Combine flow rules sequentially.+comb :: FlowRule -> FlowRule -> FlowRule+comb f g x =+    S.fold h S.empty (g x)+    where+      h a s = S.union (f a) s++-- Analyze a term as a sent term.+outFlow :: Term -> FlowRule+outFlow t a@(_, available)+    | S.member t available = S.singleton a+outFlow (I _) _ = S.empty+outFlow (C _) a = S.singleton a+outFlow (F Cat [t0, t1]) a =    -- Construct non-atoms+    comb (outFlow t1) (outFlow t0) a+outFlow (F Enc [t0, t1]) a =+    comb (outFlow t1) (outFlow t0) a+outFlow t (initial, available) = -- Don't look inside atoms+    S.singleton (S.insert t initial, S.insert t available)++-- Analyze a term as a received term.+inFlow :: Term -> FlowRule+inFlow (C _) a = S.singleton a+inFlow (F Cat [t0, t1]) a =     -- Try to receive components+    S.union                     -- in both orders+         (comb (inFlow t1) (inFlow t0) a)+         (comb (inFlow t0) (inFlow t1) a)+inFlow t@(F Enc [t0, t1]) (initial, available) =+    S.union                     -- Encryption can be built+         (outFlow t (initial, available)) -- or decrypted+         (comb (inFlow t0) (outFlow (inv t1)) a)+    where                       -- Derive decryption key first+      a = (initial, S.insert t available)+inFlow t (initial, available) =+    S.singleton (initial, S.insert t available)++instance C.Term Term where+    isVar = isVar+    isBaseTerm = isBaseTerm+    termsWellFormed = termsWellFormed+    occursIn = occursIn+    foldVars = foldVars+    foldCarriedTerms = foldCarriedTerms+    carriedBy = carriedBy+    decryptionKey = decryptionKey+    decompose = decompose+    buildable = buildable+    encryptions = encryptions+    protectors = protectors+    outFlow = outFlow+    inFlow = inFlow+    loadTerm = loadTerm++-- Places++-- A place names a one subterm within a term.  It is a list of+-- integers giving a path through a term to that named subterm.  Each+-- integer in the list identifies the subterm in a function+-- application on the path to the named subterm.  The integer is the+-- index of the subterm in the application's list of terms.++newtype Place = Place [Int] deriving Show++-- Returns the places a variable occurs within a term.+places :: Term -> Term -> [Place]+places var source =+    f [] [] source+    where+      f paths path source+          | var == source = Place (reverse path) : paths+      f paths path (F _ u) =+          g paths path 0 u+      f paths path (G t) =+          groupPlaces (varId var) paths path 0 (linearize t)+      f paths _ _ = paths+      g paths _ _ [] = paths+      g paths path i (t : u) =+          g (f paths (i: path) t) path (i + 1) u++linearize :: Group -> [Id]+linearize t =+    concatMap f (M.assocs t)+    where+      f (x, n)+          | n >= 0 = replicate n x+          | otherwise = replicate (negate n) x++groupPlaces ::  Id -> [Place] -> [Int] -> Int -> [Id] -> [Place]+groupPlaces _ paths _ _ [] = paths+groupPlaces x paths path i (y:ys) =+    let paths' = if x == y then+                     Place (reverse (i : path)) : paths+                 else paths in+    groupPlaces x paths' path (i + 1) ys++-- Returns the places a term is carried by another term.+carriedPlaces :: Term -> Term -> [Place]+carriedPlaces target source =+    f [] [] source+    where+      f paths path source+          | target == source = Place (reverse path) : paths+      f paths path (F Cat [t, t']) =+	  f (f paths  (0 : path) t) (1 : path) t'+      f paths path (F Enc [t, _]) =+	  f paths (0 : path) t+      f paths _ _ = paths++-- Replace a variable within a term at a given place.+replace :: Term -> Place -> Term -> Term+replace var (Place ints) source =+    loop ints source+    where+      loop [] _ = var+      loop (i : path) (F s u) =+          F s (C.replaceNth (loop path (u !! i)) i u)+      loop [i] (G t) =+          groupReplace (varId var) i (factors t)+      loop _ _ = error "Algebra.replace: Bad path to term"++factors :: Group -> [(Id, Int)]+factors t =+    concatMap f (M.assocs t)+    where+      f (x, n)+          | n >= 0 = replicate n (x, 1)+          | otherwise = replicate (negate n) (x, -1)++groupReplace :: Id -> Int -> [(Id, Int)] -> Term+groupReplace x i factors =+    let (_, n) = factors !! i in+    G $ group $ C.replaceNth (x, n) i factors++-- Return the ancestors of the term at the given place.+ancestors :: Term -> Place -> [Term]+ancestors source (Place ints) =+    loop [] ints source+    where+      loop ts [] _ = ts+      loop ts (i: path) t@(F _ u) =+          loop (t : ts) path (u !! i)+      loop ts [_] t@(G _) = t : ts+      loop _ _ _ = error "Algebra.ancestors: Bad path to term"++instance C.Place Term Place where+    places = places+    carriedPlaces = carriedPlaces+    replace = replace+    ancestors = ancestors++-- Rename the identifiers in a term.  Gen keeps the state of the+-- renamer.  (Question: should alist be replaced by a Map?)+clone :: Gen -> Term -> (Gen, Term)+clone gen t =+    (gen', t')+    where+      (_, gen', t') = cloneTerm ([], gen) t+      cloneTerm (alist, gen) t =+          case t of             -- The association list maps+            I x ->              -- identifiers to identifier.+                case lookup x alist of+                  Just y -> (alist, gen, I y)+                  Nothing ->+                      let (gen', y) = cloneId gen x in+                      ((x, y) : alist, gen', I y)+            C c -> (alist, gen, C c)+            F sym u ->+                let (alist', gen', u') =+                        foldl cloneTermList (alist, gen, []) u in+                (alist', gen', F sym $ reverse u')+            G t ->+                let (alist', gen', ts) =+                        foldl cloneGroupList (alist, gen, []) (M.assocs t) in+                (alist', gen', G $ group ts)+      cloneTermList (alist, gen, u) t =+          let (alist', gen', t') = cloneTerm (alist, gen) t in+          (alist', gen', t' : u)+      cloneGroupList (alist, gen, ts) (x, n) =+          case lookup x alist of+            Just y -> (alist, gen, (y, n) : ts)+            Nothing ->+                let (gen', y) = cloneId gen x in+                ((x, y) : alist, gen', (y, n) : ts)++instance C.Gen Term Gen where+    origin = origin+    clone = clone+    loadVars = loadVars++-- Functions used in both unification and matching++type IdMap = Map Id Term++emptyIdMap :: IdMap+emptyIdMap = M.empty++-- Apply a substitution to a term+idSubst :: IdMap -> Term -> Term+idSubst subst (I x) =+    M.findWithDefault (I x) x subst+idSubst _ t@(C _) = t+idSubst subst (F Invk [t]) =+    case idSubst subst t of+      F Invk [t] -> t           -- (invk (invk x)) = x+      t -> F Invk [t]+idSubst subst (F Exp [t0, G t1]) =+    case idSubst subst t0 of    -- (exp (exp g x) y) = (exp g (mul x y))+      F Exp [t0', G t1'] ->+          idSubst subst (F Exp [t0', G $ mul t1' t1])+      t -> expSubst subst t t1+idSubst subst (F s u) =+    F s (map (idSubst subst) u)+idSubst subst (G t) =+    G $ groupSubst subst t++expSubst :: IdMap -> Term -> Group -> Term+expSubst subst t0 t1 =+    case groupSubst subst t1 of+      t1' | M.null t1' -> t0    -- (exp g (one)) = g+          | otherwise -> F Exp [t0, G t1']++groupSubst :: IdMap -> Group -> Group+groupSubst subst t =+    M.foldWithKey f M.empty t+    where+      f x n t =+          mul (expg (groupLookup subst x) n) t++groupLookup :: IdMap -> Id -> Group+groupLookup subst x =+    case M.findWithDefault (groupVar x) x subst of+      G t -> t+      w -> error ("Algebra.groupLookup: Bad substitution: " +++                  show x ++ " -> " ++ show w)++showMap :: (Show a, Show b) => Map a b -> ShowS+showMap m =+    showAssocs (M.assocs m)+    where+      showAssocs [] = id+      showAssocs ((x,y):m) =+          showString "\n " . shows x . showString " -> " .+          shows y . showAssocs m++-- Unification and substitution++newtype Subst = Subst IdMap deriving (Eq, Ord)++instance Show Subst where+    showsPrec _ (Subst s) = showString "Subst (" . showMap s . showChar ')'++emptySubst :: Subst+emptySubst = Subst emptyIdMap++-- Apply a substitution created by unification+substitute :: Subst -> Term -> Term+substitute (Subst s) t =+    idSubst s t++-- Composition of substitutions++-- substitute (compose s0 s1) t = substitute s0 (substitute s1 t)++-- 1. apply s0 to range of s1 to obtain s2;+-- 2. remove bindings is s0 where domains of s0 and s1 overlap to form s3;+-- 3. remove trivial bindings from s2 to form s4; and+-- 4. take the union of s4 and s3.++compose :: Subst -> Subst -> Subst+compose (Subst s0) (Subst s1) =+    let s2 = M.map (substitute (Subst s0)) s1        -- Step 1+        s4 = M.filterWithKey nonTrivialBinding s2 in -- Step 3+    Subst (M.union s4 s0)       -- Steps 2 and 4, union is left-biased++nonTrivialBinding :: Id -> Term -> Bool+nonTrivialBinding x (I y) = x /= y+nonTrivialBinding _ _ = True++-- During unification, variables determined to be equal are collected+-- into an equivalence class.  Multiple lookups of each variable in+-- the internal representation of a substitution finds the canonical+-- representive of the class.  The chase function finds the current+-- canonical representitive.++-- Get the canonical representative of equivalent identifiers making use+-- of this algebra's axiom.+chase :: Subst -> Term -> Term+chase (Subst s) (I x) =+    case M.lookup x s of+      Nothing -> I x+      Just t -> chase (Subst s) t+chase s (F Invk [t]) = chaseInvk s t+chase s (F Exp [t0, G t1]) = chaseExp s t0 t1+chase _ t = t++chaseInvk :: Subst -> Term -> Term+chaseInvk (Subst s) (I x) =+    case M.lookup x s of+      Nothing -> F Invk [I x]+      Just t -> chaseInvk (Subst s) t+chaseInvk s (F Invk [t]) = chase s t+chaseInvk _ t = F Invk [t]++chaseExp :: Subst -> Term -> Group -> Term+chaseExp s t0 t1+    | M.null t1 = chase s t0+chaseExp s (I x) t1 =+    case chase s (I x) of+      F Exp [t0', G t1'] -> chaseExp s t0' (mul t1 t1')+      t0 -> F Exp [t0, G t1]+chaseExp s (F Exp [t0', G t1']) t1 =+    chaseExp s t0' (mul t1 t1')+chaseExp _ t0 t1 = F Exp [t0, G t1]++-- Does x occur in t?+occurs :: Id -> Term -> Bool+occurs x (I y) = x == y+occurs _ (C _) = False+occurs x (F _ u) = any (occurs x) u+occurs x (G t) = elem x (M.keys t)++type GenSubst = (Gen, Subst)++unifyChase :: Term -> Term -> GenSubst -> Maybe GenSubst+unifyChase t t' (g, s) = unifyTerms (chase s t) (chase s t') (g, s)++unifyTerms :: Term -> Term -> GenSubst -> Maybe GenSubst+unifyTerms (I x) (I y) (g, Subst s)+    | x == y = Just (g, Subst s)+    | otherwise = Just (g, Subst $ M.insert x (I y) s)+unifyTerms (I x) t (g, Subst s)+    | occurs x t = Nothing+    | otherwise = Just (g, Subst $ M.insert x t s)+unifyTerms t (I x) s = unifyTerms (I x) t s+unifyTerms (C c) (C c') s+    | c == c' = Just s+    | otherwise = Nothing+unifyTerms (F Invk [I x]) (F Pubk [I y]) s =+    unifyTerms (I x) (F Invk [F Pubk [I y]]) s+unifyTerms (F Invk [I x]) (F Pubk [C c, I y]) s =+    unifyTerms (I x) (F Invk [F Pubk [C c, I y]]) s+unifyTerms (F Pubk [I x]) (F Invk [I y]) s =+    unifyTerms (I y) (F Invk [F Pubk [I x]]) s+unifyTerms (F Pubk [C c, I x]) (F Invk [I y]) s =+    unifyTerms (I y) (F Invk [F Pubk [C c, I x]]) s+unifyTerms (F Exp [t0, G t1]) (F Exp [t0', G t1']) s =+    unifyExp t0 t1 t0' t1' s+unifyTerms (F sym u) (F sym' u') s+    | sym == sym' = unifyTermLists u u' s+    | otherwise = Nothing+unifyTerms (G t) (G t') s =+    Just $ unifyGroup t t' s+unifyTerms _ _ _ = Nothing++unifyExp :: Term -> Group -> Term -> Group -> GenSubst -> Maybe GenSubst+unifyExp t0 t1 t0' t1' s+    | t0 == t0' = Just $ unifyGroup t1 t1' s+unifyExp (I x) t1 (F Genr []) t1' (g, Subst s)+    | t1 == t1' =+        Just (g, Subst $ M.insert x (F Genr []) s)+    | otherwise =+        Just (g, Subst (M.insert+                        x+                        (F Exp [F Genr [], G $ mul t1' (invert t1)])+                        s))+unifyExp (F Genr []) t1 (I x) t1' s =+    unifyExp (I x) t1' (F Genr []) t1 s+unifyExp _ _ _ _ _ = Nothing++unifyTermLists :: [Term] -> [Term] -> GenSubst -> Maybe GenSubst+unifyTermLists [] [] s = Just s+unifyTermLists (t : u) (t' : u') s =+    maybe Nothing (unifyTermLists u u') (unifyChase t t' s)+unifyTermLists _ _ _ = Nothing++unifyGroup :: Group -> Group -> GenSubst -> GenSubst+unifyGroup t0 t1 (g, Subst s) =+    case matchGroup (groupSubst s $ mul t0 $ invert t1) M.empty S.empty g of+      Nothing -> error "Algebra.unifyGroup: unification failed"+      Just (_, g', s') -> (g', Subst $ M.union s' s)++-- The exported unifier converts the internal representation of a+-- substitution into the external form using chaseMap.++unify :: Term -> Term -> GenSubst -> Maybe GenSubst+unify t t' s =+    do+      (g, s) <- unifyChase t t' s+      return (g, chaseMap s)++-- Apply the chasing version of substitution to the range of s.++chaseMap :: Subst -> Subst+chaseMap (Subst s) =+    Subst $ M.map (substChase (Subst s)) s++-- A chasing version of substitution.++substChase :: Subst -> Term -> Term+substChase subst t =+    case chase subst t of+      t@(I _) -> t+      t@(C _) -> t+      F Invk [t] ->+          case substChase subst t of+            F Invk [t] -> t           -- Apply axiom+            t -> F Invk [t]+      F Exp [t0, G t1] ->+          case substChase subst t0 of+            F Exp [t0', G t1'] ->+                substChase subst (F Exp [t0', G $ mul t1' t1])+            t -> expChase subst t t1+      F s u ->+          F s (map (substChase subst) u)+      G t -> G $ groupChase subst t++expChase :: Subst -> Term -> Group -> Term+expChase subst t0 t1 =+    case groupChase subst t1 of+      t1' | M.null t1' -> t0+          | otherwise -> F Exp [t0, G t1']++groupChase :: Subst -> Group -> Group+groupChase (Subst subst) t = groupSubst subst t++-- more general than relation+-- s0 `lte` s1 if s1 = compose s2 s0 for some s2+moreGeneral :: (Gen, Subst) -> (Gen, Subst) -> Bool+moreGeneral (gen0, Subst s0) (gen1, Subst s1) =+    let dom = S.elems $ foldl idSet (M.keysSet s0) (M.elems s0)+        env = foldl (flip M.delete) s1 (M.keys s0) in+    loop dom (mash gen0 gen1, Env (S.empty, env))+    where+      loop [] _ = True+      loop (x : xs) env =+          maybe False (loop xs) (match (get x s0) (get x s1) env)+      get x env = M.findWithDefault (I x) x env++idSet :: Set Id -> Term -> Set Id+idSet set (I id) = S.insert id set+idSet set (C _) = set+idSet set (F _ u) = foldl idSet set u+idSet set (G t) = S.union (M.keysSet t) set++instance C.Subst Term Gen Subst where+   emptySubst = emptySubst+   substitute = substitute+   unify = unify+   compose = compose+   moreGeneral = moreGeneral++-- Matching and instantiation++newtype Env = Env (Set Id, IdMap) deriving (Eq, Ord)++instance Show Env where+    showsPrec _ (Env (v, r)) =+        showString "Env (\n " . shows v .+        showChar ',' . showMap r . showChar ')'++-- An environment may contain an explicit identity mapping, whereas a+-- substitution is erroneous if it has one.  The set of variables+-- associated with a map is the variables in the range that were+-- generated by matching and should be treated as variables when using+-- unification to perform matching.  The other variables in the range+-- are treated as constants.++emptyEnv :: Env+emptyEnv = Env (S.empty, emptyIdMap)++-- Apply a substitution created my matching+instantiate :: Env -> Term -> Term+instantiate (Env (_, r)) t = idSubst r t++-- Matching++type GenEnv = (Gen, Env)++-- The matcher has the property that when pattern P and term T match+-- then instantiate (match P T emptyEnv) P = T.+match ::  Term -> Term -> GenEnv -> Maybe GenEnv+match (I x) t (g, Env (v, r)) =+    case M.lookup x r of+      Nothing -> Just (g, Env (v, M.insert x t r))+      Just t' -> if t == t' then Just (g, Env (v, r)) else Nothing+match (C c) (C c') r = if c == c' then Just r else Nothing+match (F Invk [I x]) (F Pubk [I y]) r =+    match (I x) (F Invk [F Pubk [I y]]) r+match (F Invk [I x]) (F Pubk [C c, I y]) r =+    match (I x) (F Invk [F Pubk [C c, I y]]) r+match (F Exp [t0, G t1]) (F Exp [t0', G t1']) r+      = matchExp t0 t1 t0' t1' r+match (F s u) (F s' u') r+    | s == s' = matchLists u u' r+    | otherwise = Nothing+match (G t) (G t') (g, Env (v, r)) =+    do+      let (t0, t0') = merge t t' r+      (v, g, r') <- matchGroup t0 t0' v g+      return (g, Env (v, M.union r' r))+match _ _ _ = Nothing++matchExp ::  Term -> Group -> Term -> Group -> GenEnv -> Maybe GenEnv+matchExp (I x) t1 t0' t1' r@(_, Env (_, e)) =+    case M.lookup x e of+      Just (F Exp [t0'', G t1''])+          | t0' == t0'' -> match (G t1) (G (mul t1' (invert t1''))) r+      _ -> matchLists [I x, G t1] [t0', G t1'] r+matchExp (F Genr []) t1 t0' t1' r =+    matchLists [F Genr [], G t1] [t0', G t1'] r+matchExp _ _ _ _ _ = error "Algebra.matchExp: Bad match term"++matchLists :: [Term] -> [Term] -> GenEnv -> Maybe GenEnv+matchLists [] [] r = Just r+matchLists (t : u) (t' : u') r =+    maybe Nothing (matchLists u u') (match t t' r)+matchLists _ _ _ = Nothing++merge ::  Group -> Group -> IdMap -> (Group, Group)+merge t t' r =+    (group t0, t0')+    where+      (t0, t0') = loop (M.assocs t) ([], t')+      loop [] acc = acc+      loop (p@(x, n) : t0) (t1, t1') =+          case M.lookup x r of+            Nothing -> loop t0 (p : t1, t1')+            Just (G t) ->+                loop t0 (t1, mul (expg t (negate n)) t1')+            Just t ->+                error $ "Algebra.merge: expecting an expn but got " ++ show t++matchGroup ::  Group -> Group -> Set Id -> Gen -> Maybe (Set Id, Gen, IdMap)+matchGroup t0 t1 v g =+    case partition t0 t1 v of+      (_, [], []) -> return (v, g, emptyIdMap)+      (_, [], _) -> Nothing+      (n, t0, t1) ->+          do+            subst <- I.intLinEq (map snd t0, map snd t1)+            return $ mgu v n (map fst t0) (map fst t1) subst g++type Coeff = [(Id, Int)]++-- Move variables on the RHS of the equation to the LHS+partition ::  Group -> Group -> Set Id -> (Int, Coeff, Coeff)+partition t0 t1 v =+    (length v0, v0 ++ map (\(x,n) -> (x, negate n)) v1, c1)+    where+      v0 = M.assocs t0+      (v1, c1) = L.partition f (M.assocs t1)+      f (x, _) = S.member x v++mgu :: Set Id -> Int -> [Id] -> [Id] -> I.Subst -> Gen -> (Set Id, Gen, IdMap)+mgu v _ _ _ [] gen = (v, gen, emptyIdMap)+mgu v n vars syms subst gen =+    (v', gen', foldl f emptyIdMap (zip vars [0..(n - 1)]))+    where+      (gen', genSyms) = genVars vars (length (fst (snd (head subst)))) gen+      v' = foldl (flip S.insert) v genSyms+      f s (x, n) =+          case lookup n subst of+            Just (factors, consts) ->+                M.insert x (g factors consts) s+            Nothing ->+                M.insert x (groupVar $ genSyms !! n) s+      g factors consts =+          G $ group (zip genSyms factors ++ zip syms consts)++genVars :: [Id] -> Int -> Gen -> (Gen, [Id])+genVars [] _ _ =+    error "Algebra.genVars: no variables to clone"+--    let (g', id) = freshId g "dh" in+--    genVars [id] n g'+genVars vars n g =+    loop n vars (g, [])+    where+      loop n [] (g, ids) =+           loop n vars (g, ids)+      loop n (v:vs) (g, ids)+          | n <= 0 = (g, ids)+          | otherwise =+              case cloneId g v of+                (g, id) -> loop (n - 1) vs (g, id : ids)++-- Does every varible in ts not occur in the domain of e?+-- Trivial bindings in e are ignored.+idempotentEnvFor :: GenEnv -> [Term] -> Maybe GenEnv+idempotentEnvFor ge ts =+    let env@(_, Env (_, r)) = nonTrivialEnv ge in+    if all (allId $ flip S.notMember $ M.keysSet r) ts then+        Just env+    else+        Nothing++allId :: (Id -> Bool) -> Term -> Bool+allId f (I x) = f x+allId _ (C _) = True+allId f (F _ u) = all (allId f) u+allId f (G t) = all f (M.keys t)++nonTrivialEnv :: GenEnv -> GenEnv+nonTrivialEnv (g, Env (v, r)) =+    nonGroupEnv (M.assocs r) M.empty []+    where+      nonGroupEnv [] env grp =+          groupEnv g v env grp grp+      nonGroupEnv ((x, I y):r) env grp+          | x == y = nonGroupEnv r env grp+      nonGroupEnv ((x, G y):r) env grp+          | isGroupVar y && varId (G y) == x =+              nonGroupEnv r env grp+          | otherwise = nonGroupEnv r env ((x, y):grp)+      nonGroupEnv ((x, y):r) env grp = nonGroupEnv r (M.insert x y env) grp++groupEnv :: Gen -> Set Id -> IdMap -> [(Id, Group)] -> [(Id, Group)] -> GenEnv+groupEnv g v env grp [] =+    (g, Env (v, foldl (\env (x, y) -> M.insert x (G y) env) env grp))+groupEnv g v env grp ((x, t):map)+    | M.lookup x t /= Just 1 = groupEnv g v env grp map+    | otherwise =+        let (_, t0, t1) = partition M.empty (mul t (M.singleton x (-1))) v in+        case matchGroup (group t0) (group t1) S.empty g of+          Nothing -> groupEnv g v env grp map+          Just (v', g', subst) ->+              let grp' = L.delete (x, t) grp+                  grp'' = L.map (\(x, t) -> (x, groupSubst subst t)) grp' in+              groupEnv g' (S.union v' v) env grp'' grp''++-- Cast an environment into a substitution by filtering out trivial+-- bindings.++substitution :: Env -> Subst+substitution (Env (_, r)) =+    Subst $ M.filterWithKey nonTrivialBinding r++-- Add type information to an environment, and return it as a list of+-- associations.++reify :: [Term] -> Env -> [(Term, Term)]+reify domain (Env (_, env)) =+    map (loop domain) $ M.assocs env+    where+      loop [] (x, _) =+          error $ "Algebra.reify: variable missing from domain " ++ idName x+      loop (I x : _) (y, t)+          | x == y = (I x, t)+      loop (F Text [I x] : _) (y, t)+          | x == y = (F Text [I x], F Text [t])+      loop (F Data [I x] : _) (y, t)+          | x == y = (F Data [I x], F Data [t])+      loop (F Name [I x] : _) (y, t)+          | x == y = (F Name [I x], F Name [t])+      loop (F Skey [I x] : _) (y, t)+          | x == y = (F Skey [I x], F Skey [t])+      loop (F Akey [I x] : _) (y, t)+          | x == y = (F Akey [I x], F Akey [t])+      loop (F Base [I x] : _) (y, t)+          | x == y = (F Base [I x], F Base [t])+      loop (G x : _) (y, G t)+          | isGroupVar x && varId (G x) == y = (G x, G t)+      loop (_ : domain) pair = loop domain pair++-- Ensure the range of an environment contains only variables and that+-- the environment is injective.+matchRenaming :: GenEnv -> Bool+matchRenaming (gen, Env (v, e)) =+    nonGrp S.empty (M.elems e) &&+    groupMatchRenaming v gen (M.foldWithKey grp M.empty e)+    where+      nonGrp _ [] = True+      nonGrp s (I x:e) =+          not (S.member x s) && nonGrp (S.insert x s) e+      nonGrp s (G _:e) = nonGrp s e -- Check group bindings elsewhere+      nonGrp _ _ = False+      grp x (G t) map = M.insert x t map+      grp _ _ map = map++groupMatchRenaming :: Set Id -> Gen -> Map Id Group -> Bool+groupMatchRenaming v gen map =+    loop S.empty $ M.elems map+    where+      loop _ [] = True+      loop s (t:ge)+          | M.null t = False+          | isGroupVar t =+              let x = varId (G t) in+              not (S.member x s) && loop (S.insert x s) ge+          | otherwise = any (groupMatchElim v gen map t) (M.assocs t)++groupMatchElim :: Set Id -> Gen -> Map Id Group -> Group -> (Id, Int) -> Bool+groupMatchElim v gen ge t (x, 1) =+    let (_, t0, t1) = partition M.empty (mul t (M.singleton x (-1))) v in+    case matchGroup (group t0) (group t1) S.empty gen of+      Nothing -> False+      Just (v', gen', subst) ->+          groupMatchRenaming (S.union v' v) gen' $ M.map (groupSubst subst) ge+groupMatchElim _ _ _ _ _ = False++instance C.Env Term Gen Subst Env where+   emptyEnv = emptyEnv+   instantiate = instantiate+   match = match+   idempotentEnvFor = idempotentEnvFor+   substitution = substitution+   reify = reify+   matchRenaming = matchRenaming++-- Term specific loading functions++loadVars :: Monad m => Gen -> [SExpr Pos] -> m (Gen, [Term])+loadVars gen sexprs =+    do+      pairs <- mapM loadVarPair sexprs+      (g, vars) <- foldM loadVar (gen, []) (concat pairs)+      return (g, reverse vars)++loadVarPair :: Monad m => SExpr Pos -> m [(SExpr Pos, SExpr Pos)]+loadVarPair (L _ (x:xs)) =+    let (t:vs) = reverse (x:xs) in+    return [(v,t) | v <- reverse vs]+loadVarPair x = fail (shows (annotation x) "Bad variable declaration")++loadVar :: Monad m => (Gen, [Term]) -> (SExpr Pos, SExpr Pos) ->+           m (Gen, [Term])+loadVar (gen, vars) (S pos name, S pos' sort) =+    case loadLookup pos vars name of+      Right _ ->+          fail (shows pos "Duplicate variable declaration for " ++ name)+      Left _ ->+          do+            let (gen', x) = freshId gen name+            p <- mkVar x+            return (gen', p : vars)+    where+      mkVar x =+          let t = I x in+          case sort of+            "mesg" -> return t+            "text" -> return $ F Text [t]+            "data" -> return $ F Data [t]+            "name" -> return $ F Name [t]+            "skey" -> return $ F Skey [t]+            "akey" -> return $ F Akey [t]+            "base" -> return $ F Base [t]+            "expn" -> return $ groupVar x+            _ -> fail (shows pos' "Sort " ++ sort ++ " not recognized")+loadVar _ (x,_) = fail (shows (annotation x) "Bad variable syntax")++loadLookup :: Pos -> [Term] -> String -> Either String Term+loadLookup pos [] name = Left (shows pos $ "Identifier " ++ name ++ " unknown")+loadLookup pos (t : u) name =+    let name' = idName (varId t) in+    if name' == name then Right t else loadLookup pos u name++loadLookupName :: Monad m => Pos -> [Term] -> String -> m Term+loadLookupName pos vars name =+    either fail f (loadLookup pos vars name)+    where+      f t@(F Name [I _]) = return t+      f _ = fail (shows pos $ "Expecting " ++ name ++ " to be a name")++loadLookupAkey :: Monad m => Pos -> [Term] -> String -> m Term+loadLookupAkey pos vars name =+    either fail f (loadLookup pos vars name)+    where+      f t@(F Akey [I _]) = return t+      f _ = fail (shows pos $ "Expecting " ++ name ++ " to be an akey")++-- Load term and check that it is well-formed.+loadTerm :: Monad m => [Term] -> SExpr Pos -> m Term+loadTerm vars (S pos s) =+    either fail return (loadLookup pos vars s)+loadTerm _ (Q _ t) =+    return (C t)+loadTerm vars (L pos (S _ s : l)) =+    case lookup s loadDispatch of+      Nothing -> fail (shows pos "Keyword " ++ s ++ " unknown")+      Just f -> f pos vars l+loadTerm _ x = fail (shows (annotation x) "Malformed term")++type LoadFunction m = Pos -> [Term] -> [SExpr Pos] -> m Term++loadDispatch :: Monad m => [(String, LoadFunction m)]+loadDispatch =+    [("pubk", loadPubk)+    ,("privk", loadPrivk)+    ,("invk", loadInvk)+    ,("ltk", loadLtk)+    ,("gen", loadGen)+    ,("exp", loadExp)+    ,("one", loadOne)+    ,("rec", loadRec)+    ,("mul", loadMul)+    ,("cat", loadCat)+    ,("enc", loadEnc)+    ]++-- Atom constructors: pubk privk invk ltk++loadPubk :: Monad m => LoadFunction m+loadPubk _ vars [S pos s] =+    do+      t <- loadLookupName pos vars s+      return $ F Akey [F Pubk [I $ varId t]]+loadPubk _ vars [Q _ c, S pos s] =+    do+      t <- loadLookupName pos vars s+      return $ F Akey [F Pubk [C c, I $ varId t]]+loadPubk pos _ _ = fail (shows pos "Malformed pubk")++loadPrivk :: Monad m => LoadFunction m+loadPrivk _ vars [S pos s] =+    do+      t <- loadLookupName pos vars s+      return $ F Akey [F Invk [F Pubk [I $ varId t]]]+loadPrivk _ vars [Q _ c, S pos s] =+    do+      t <- loadLookupName pos vars s+      return $ F Akey [F Invk [F Pubk [C c, I $ varId t]]]+loadPrivk pos _ _ = fail (shows pos "Malformed privk")++loadInvk :: Monad m => LoadFunction m+loadInvk _ vars [S pos s] =+    do+      t <- loadLookupAkey pos vars s+      return $ F Akey [F Invk [I $ varId t]]+loadInvk pos _ _ = fail (shows pos "Malformed invk")++loadLtk :: Monad m => LoadFunction m+loadLtk _ vars [S pos s, S pos' s'] =+    do+      t <- loadLookupName pos vars s+      t' <- loadLookupName pos' vars s'+      return $ F Skey [F Ltk [I $ varId t, I $ varId t']]+loadLtk pos _ _ = fail (shows pos "Malformed ltk")++-- Base and exponents++loadGen :: Monad m => LoadFunction m+loadGen _ _ [] =+    return $ F Base [F Genr []]+loadGen pos _ _ = fail (shows pos "Malformed gen")++loadExp :: Monad m => LoadFunction m+loadExp _ vars [x, x'] =+    do+      t <- loadBase vars x+      t' <- loadExpn vars x'+      return $ F Base [idSubst emptyIdMap $ F Exp [t, G t']]+loadExp pos _ _ = fail (shows pos "Malformed exp")++loadBase :: Monad m => [Term] -> SExpr Pos -> m Term+loadBase vars x =+    do+      t <- loadTerm vars x+      case t of+        F Base [t] -> return t+        _ -> fail (shows (annotation x) "Malformed base")++loadExpn :: Monad m => [Term] -> SExpr Pos -> m Group+loadExpn vars x =+    do+      t <- loadTerm vars x+      case t of+        G t -> return t+        _ -> fail (shows (annotation x) "Malformed expn")++loadOne :: Monad m => LoadFunction m+loadOne _ _ [] =+    return $ G M.empty+loadOne pos _ _ = fail (shows pos "Malformed one")++loadRec :: Monad m => LoadFunction m+loadRec _ vars [x] =+    do+      t <- loadExpn vars x+      return $ G $ invert t+loadRec pos _ _ = fail (shows pos "Malformed rec")++loadMul :: Monad m => LoadFunction m+loadMul _ vars xs =+    do+      t <- foldM f M.empty xs+      return $ G t+    where+      f acc x =+          do+            t <- loadExpn vars x+            return $ mul t acc++-- Term constructors: cat enc++loadCat :: Monad m => LoadFunction m+loadCat _ vars (l : ls) =+    do+      ts <- mapM (loadTerm vars) (l : ls)+      return $ foldr1 (\a b -> F Cat [a, b]) ts+loadCat pos _ _ = fail (shows pos "Malformed cat")++loadEnc :: Monad m => LoadFunction m+loadEnc pos vars (l : l' : ls) =+    do+      let (butLast, last) = splitLast l (l' : ls)+      t <- loadCat pos vars butLast+      t' <- loadTerm vars last+      return $ F Enc [t, t']+loadEnc pos _ _ = fail (shows pos "Malformed enc")++splitLast :: a -> [a] -> ([a], a)+splitLast x xs =+    loop [] x xs+    where+      loop z x [] = (reverse z, x)+      loop z x (y : ys) = loop (x : z) y ys++-- Term specific displaying functions++newtype Context = Context [(Id, String)] deriving Show++displayVars :: Context -> [Term] -> [SExpr ()]+displayVars _ [] = []+displayVars ctx vars =+    let (v,t):pairs = map (displayVar ctx) vars in+    loop t [v] pairs+    where+      loop t vs [] = [L () (reverse (t:vs))]+      loop t vs ((v',t'):xs)+          | t == t' = loop t (v':vs) xs+          | otherwise = L () (reverse (t:vs)):loop t' [v'] xs++displayVar :: Context -> Term -> (SExpr (), SExpr ())+displayVar ctx (I x) = displaySortId "mesg" ctx x+displayVar ctx (F Text [I x]) = displaySortId "text" ctx x+displayVar ctx (F Data [I x]) = displaySortId "data" ctx x+displayVar ctx (F Name [I x]) = displaySortId "name" ctx x+displayVar ctx (F Skey [I x]) = displaySortId "skey" ctx x+displayVar ctx (F Akey [I x]) = displaySortId "akey" ctx x+displayVar ctx (F Base [I x]) = displaySortId "base" ctx x+displayVar ctx t@(G x)+    | isGroupVar x = displaySortId "expn" ctx (varId t)+displayVar _ _ =+    error "Algebra.displayVar: term not a variable with its sort"++displaySortId :: String -> Context -> Id -> (SExpr (), SExpr ())+displaySortId sort ctx x = (displayId ctx x, S () sort)++displayId :: Context -> Id -> SExpr ()+displayId (Context ctx) x =+    case lookup x ctx of+      Nothing ->+          let msg = idName x ++ " in a display context" in+          error $ "Algebra.displayId: Cannot find variable " ++ msg+      Just name -> S () name++displayTerm :: Context -> Term -> SExpr ()+displayTerm ctx (I x) = displayId ctx x+displayTerm ctx (F Text [I x]) = displayId ctx x+displayTerm ctx (F Data [I x]) = displayId ctx x+displayTerm ctx (F Name [I x]) = displayId ctx x+displayTerm ctx (F Skey [I x]) = displayId ctx x+displayTerm ctx (F Skey [F Ltk [I x, I y]]) =+    L () [S () "ltk", displayId ctx x, displayId ctx y]+displayTerm ctx (F Akey [t]) =+    case t of+      I x -> displayId ctx x+      F Invk [I x] -> L () [S () "invk", displayId ctx x]+      F Pubk [I x] -> L () [S () "pubk", displayId ctx x]+      F Pubk [C c, I x] -> L () [S () "pubk", Q () c, displayId ctx x]+      F Invk [F Pubk [I x]] -> L () [S () "privk", displayId ctx x]+      F Invk [F Pubk [C c, I x]] ->+          L () [S () "privk", Q () c, displayId ctx x]+      _ -> error ("Algebra.displayAkey: Bad term " ++ show t)+displayTerm ctx (F Base [t]) =+    displayBase t+    where+      displayBase (I x) = displayId ctx x+      displayBase (F Genr []) =+          L () [S () "gen"]+      displayBase (F Exp [t0, G t1]) =+          L () [S () "exp", displayBase t0, displayTerm ctx (G t1)]+      displayBase t = error ("Algebra.displayBase: Bad term " ++ show t)+displayTerm ctx (G t) =+    displayExpn t+    where+      displayExpn t+          | M.null t = L () [S () "one"]+          | otherwise =+              case factors t of+                [f] -> displayFactor f+                fs -> L () (S () "mul" : map displayFactor fs)+      displayFactor (x, n)+          | n >= 0 = displayId ctx x+          | otherwise = L () [S () "rec", displayId ctx x]+displayTerm _ (C t) = Q () t+displayTerm ctx (F Cat [t0, t1]) =+    L () (S () "cat" : displayTerm ctx t0 : displayList ctx t1)+displayTerm ctx (F Enc [t0, t1]) =+    L () (S () "enc" : displayEnc ctx t0 t1)+displayTerm _ t = error ("Algebra.displayTerm: Bad term " ++ show t)++displayList :: Context -> Term -> [SExpr ()]+displayList ctx (F Cat [t0, t1]) = displayTerm ctx t0 : displayList ctx t1+displayList ctx t = [displayTerm ctx t]++displayEnc :: Context -> Term -> Term -> [SExpr ()]+displayEnc ctx (F Cat [t0, t1]) t = displayTerm ctx t0 : displayEnc ctx t1 t+displayEnc ctx t0 t1 = [displayTerm ctx t0, displayTerm ctx t1]++-- displaySubst c s displays a substitution s in context c, where some+-- variables that occur in s might not be in c.  Enough sort+-- inference is performed so as to allow the extension of the context.+displaySubst :: Context -> Subst -> [SExpr ()]+displaySubst ctx s@(Subst r) =+    map (\(x, t) -> L () [displayTerm ctx' x, displayTerm ctx' t]) r'+    where+      r' = map (\(x, t) -> (I x, inferSort (substitute s t))) $ M.assocs r+      ctx' = foldl (\ctx (x, t) -> addToContext ctx [x, t]) ctx r'++inferSort :: Term -> Term+inferSort t@(F Invk _) = F Akey [t]+inferSort t@(F Pubk _) = F Akey [t]+inferSort t@(F Ltk _) = F Skey [t]+inferSort t@(F Genr _) = F Base [t]+inferSort t@(F Exp _) = F Base [t]+inferSort t = t++emptyContext :: Context+emptyContext = Context []++-- Generate names for output renaming as necessary.+-- Assumes the input is a list of term that are well-formed+addToContext :: Context -> [Term] -> Context+addToContext ctx u =+    foldl (foldVars varContext) ctx u++varContext :: Context -> Term -> Context+varContext ctx t =+    let x = varId t+        name = idName x in+    if hasId ctx x then+        ctx+    else+        if hasName ctx name then+            extendContext ctx x (genName ctx name)+        else+            extendContext ctx x name++hasId :: Context -> Id -> Bool+hasId (Context ctx) id =+    maybe False (const True) (lookup id ctx)++hasName :: Context -> String -> Bool+hasName (Context ctx) name =+    maybe False (const True) (L.find ((name ==) . snd) ctx)++extendContext :: Context -> Id -> String -> Context+extendContext (Context ctx) x name =+    Context $ (x, name) : ctx++genName :: Context -> String -> String+genName ctx name =+    loop 0+    where+      root = rootName name+      loop :: Int -> String+      loop n =+          let name' = revapp root (show n) in+          if hasName ctx name' then+              loop (n + 1)+          else+              name'+      revapp [] s = s+      revapp (c : cs) s = revapp cs (c : s)++-- Returns the reverse of the root+rootName :: String -> String+rootName s =+    loop rs+    where+      rs = reverse s+      loop [] = '-' : rs+      loop (c : cs) =+          if c == '-' then+              c : cs+          else+              loop cs++instance C.Context Term Gen Subst Env Context where+    emptyContext = emptyContext+    addToContext = addToContext+    displayVars = displayVars+    displayTerm = displayTerm+    displaySubst = displaySubst++instance C.Algebra Term Place Gen Subst Env Context
+ src/CPSA/DiffieHellman/IntLinEq.hs view
@@ -0,0 +1,197 @@+-- Integer Solutions of Linear Inhomogeneous Equations++-- 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.DiffieHellman.IntLinEq+-- Copyright   : (c) 2009 The MITRE Corporation+-- License     : BSD+--+-- Integer Solutions of Linear Inhomogeneous Equations+--+-- A linear equation with integer coefficients is represented as a+-- pair of lists of non-zero integers, the coefficients and the+-- constants.  If there are no constants, the linear equation+-- represented by (c, []) is the homogeneous equation:+--+-- >     c[0]*x[0] + c[1]*x[1] + ... + c[n-1]*x[n-1] = 0+--+-- where n is the length of c.  Otherwise, (c, d) represents the+-- inhomogeneous equation:+--+-- >     c[0]*x[0] + c[1]*x[1] + ... + c[n-1]*x[n-1] = g+--+-- where g = gcd(d[0], d[1], ..., d[m-1]), and m is the length of d.+-- Thus g is the greatest common denominator of the elements of d.+--+-- A solution is a partial map from variables to terms, and a term is+-- a pair of lists of integers, the variable part of the term followed+-- by the constant part.  The variable part may specify variables not+-- in the input.  In other words, the length of the coefficents in the+-- answer may exceed the length of the coefficients in the input.  For+-- example, the solution of+--+-- >     64x - 41y = 1+--+-- is x = -41z - 16 and y = -64z - 25.  The computed solution is read+-- off the list returned as an answer.+--+-- >     intLinEq [64,-41] [1] =+-- >         [(0,([0,0,0,0,0,0,-41],[-16])),+-- >         (1,([0,0,0,0,0,0,-64],[-25]))]+--+-- The algorithm used to find solutions is described in Vol. 2 of The+-- Art of Computer Programming \/ Seminumerical Alorithms, 2nd Ed.,+-- 1981, by Donald E. Knuth, pg. 327.  To show sums, we write+--+-- >     sum[i] c[i]*x[i] for c[0]*x[0] + c[1]*x[1] + ... + c[n-1]*x[n-1].+--+-- The algorithm's initial values are the linear equation (c,d) and an+-- empty substitution s.+--+-- 1.  Let c[i] be the smallest non-zero coefficient in absolute value.+--+-- 2.  If c[i] < 0, multiply c and d by -1 and goto step 1.+--+-- 3.  If c[i] = 1, a general solution of the following form has been+-- found:+--+-- >     x[i] = sum[j] -c'[j]*x[j] + d[k] for all k+--+--  where c' is c with c'[i] = 0.  Use the equation to eliminate x[i]+--  from the range of the current substitution s.  If variable x[i] is+--  in the original equation, add the mapping to substitution s.+--+-- 4.  If c[i] divides every coefficient in c,+--+--     * if c[i] divides every constant in d, divide c and d by c[i]+--       and goto step 3,+--+--     * otherwise fail because there is no solution.+--+-- 5.  Otherwise, eliminate x[i] as above in favor of freshly created+-- variable x[n], where n is the length of c.+--+-- >    x[n] = sum[j] (c[j] div c[i] * x[j])+--+-- Goto step 1 and solve the equation:+--+-- >    c[i]*x[n] + sum[j] (c[j] mod c[i])*x[j] = d[k] for all k++module CPSA.DiffieHellman.IntLinEq+    (LinEq, Subst, intLinEq) where++-- | A linear equation with integer coefficients is represented as a+-- pair of lists of non-zero integers, the coefficients and the+-- constants.+type LinEq = ([Int], [Int])++-- | A solution to a linear equation is a partial map from variables+-- to terms, and a term is a pair of lists of integers, the variable+-- part of the term followed by the constant part.  The variable part+-- may specify variables not in the input.  In other words, the length+-- of the coefficents in the answer may exceed the length of the+-- coefficients in the input.+type Subst = [(Int, LinEq)]++-- | Find integer solutions to a linear equation or fail when there+-- are no solutions.+intLinEq :: Monad m => LinEq -> m Subst+intLinEq (coefficients, constants) =+    intLinEqLoop (length coefficients) (coefficients, constants) []++-- The algorithm used to find solutions is described in Vol. 2 of The+-- Art of Computer Programming / Seminumerical Alorithms, 2nd Ed.,+-- 1981, by Donald E. Knuth, pg. 327.++-- On input, n is the number of variables in the original problem, c+-- is the coefficients, d is the constants, and subst is a list of+-- eliminated variables.+intLinEqLoop :: Monad m => Int -> LinEq -> Subst -> m Subst+intLinEqLoop n (c, d) subst =+    -- Find the smallest non-zero coefficient in absolute value+    let (i, ci) = smallest c in+    case () of+      _ | ci < 0 -> intLinEqLoop n (invert c, invert d) subst+      --  Ensure the smallest coefficient is positive+        | ci == 0 -> fail "bad problem"+      --  Lack of non-zero coefficients is an error+        | ci == 1 ->+      --  A general solution of the following form has been found:+      --    x[i] = sum[j] -c'[j]*x[j] + d[k] for all k+      --  where c' is c with c'[i] = 0.+            return $ eliminate n (i, (invert (zero i c), d)) subst+        | divisible ci c ->+      --  If all the coefficients are divisible by c[i], a solution is+      --  immediate if all the constants are divisible by c[i],+      --  otherwise there is no solution.+            if divisible ci d then+                let c' = divide ci c+                    d' = divide ci d in+                return $ eliminate n (i, (invert (zero i c'), d')) subst+            else+                fail "no solution"+        | otherwise ->+      --  Eliminate x[i] in favor of freshly created variable x[n],+      --  where n is the length of c.+      --    x[n] = sum[j] (c[j] div c[i] * x[j])+      --  The new equation to be solved is:+      --    c[i]*x[n] + sum[j] (c[j] mod c[i])*x[j] = d[k] for all k+            intLinEqLoop n (map (\x -> mod x ci) c ++ [ci], d) subst'+            where+              subst' = eliminate n (i, (invert c' ++ [1], [])) subst+              c' = divide ci (zero i c)++-- Find the smallest non-zero coefficient in absolute value+smallest :: [Int] -> (Int, Int)+smallest xs =+    foldl f (-1, 0) (zip [0..] xs)+    where+      f (i, n) (j, x)+        | n == 0 = (j, x)+        | x == 0 || abs n <= abs x = (i, n)+        | otherwise = (j, x)++invert :: [Int] -> [Int]+invert t = map negate t++-- Zero the ith position in a list+zero :: Int -> [Int] -> [Int]+zero _ [] = []+zero 0 (_:xs) = 0 : xs+zero i (x:xs) = x : zero (i - 1) xs++-- Eliminate a variable from the existing substitution.  If the+-- variable is in the original problem, add it to the substitution.+eliminate :: Int -> (Int, LinEq) -> Subst -> Subst+eliminate n m@(i, (c, d)) subst =+    if i < n then+        m : map f subst+    else+        map f subst+    where+      f m'@(i', (c', d')) =     -- Eliminate i in c' if it occurs in c'+          case get i c' of+            0 -> m'             -- i is not in c'+            ci -> (i', (addmul ci (zero i c') c, addmul ci d' d))+      -- Find ith coefficient+      get _ [] = 0+      get 0 (x:_) = x+      get i (_:xs) = get (i - 1) xs+      -- addnum n xs ys sums xs and ys after multiplying ys by n+      addmul 1 [] ys = ys+      addmul n [] ys = map (* n) ys+      addmul _ xs [] = xs+      addmul n (x:xs) (y:ys) = (x + n * y) : addmul n xs ys++divisible :: Int -> [Int] -> Bool+divisible small t =+    all (\x -> mod x small == 0) t++divide :: Int -> [Int] -> [Int]+divide small t =+    map (\x -> div x small) t
+ src/CPSA/Graph/CompactView.hs view
@@ -0,0 +1,100 @@+-- Generates a compact view of CPSA S-expressions as an SVG image++-- 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.Graph.CompactView (compactView) where++import System.IO+import CPSA.Graph.XMLOutput+import CPSA.Graph.Config+import CPSA.Graph.SVG+import CPSA.Graph.Loader+import CPSA.Graph.Tree+import CPSA.Graph.Preskeleton++compactView :: Handle -> Config -> [Preskel] -> IO ()+compactView h config preskels =+    do+      let (width, height, es) = draw config preskels+      hPutStrLn h $ show $ docRoot config width height es+      hClose h+      return ()++-- Generates the SVG document root.+docRoot :: Config -> Float -> Float -> [Element] -> Element+docRoot conf w h es =+    ec "svg" attrs es+    where+      attrs = [("width", showL w ++ units conf),+               ("height", showL h ++ units conf),+               ("xmlns", "http://www.w3.org/2000/svg"),+               ("xmlns:xlink", "http://www.w3.org/1999/xlink"),+               ("version", "1.1"),+               ("viewBox", viewbox),+               ("font-size", showL (font conf)),+               ("onload", "init(evt)")]+      viewbox = "0 0 " ++ showL w ++ " " ++ showL h++draw :: Config -> [Preskel] -> (Float, Float, [Element])+draw conf ks =+    case forest ks of+      [t] ->+          (w, h, [script, defs conf, e])+          where+            (w, h, e) = tdraw conf 0 0 t+      ts ->+          fdraw conf ts++-- Draw a forest+fdraw :: Config -> Forest -> (Float, Float, [Element])+fdraw conf ts =+    (w + fw, max h fh, script : defs conf : rect conf 0 0 w h : es)+    where+      w = 2 * mx conf+      h = 2 * my conf + fromIntegral (length ts - 1) * ty conf+      (fw, fh, es) = foldl f (0, 0, index conf ts) ts+      f (fw, fh, es) t =+          (max fw tw, max fh th, e : es)+          where+            (tw, th, e) = tdraw conf w 0 t++-- Draw an index that gives access to trees in the forest+index :: Config -> Forest -> [Element]+index conf (t:ts) =+    snd $ foldl loop (y, top) ts+    where+      x = mx conf+      y = my conf+      top = [tbutton conf x y (label (vertex t))]+      loop (y1, es) t =+          (y2, es')+          where+            es' = tbutton conf x y2 (label (vertex t)) : es+            y2 = y1 + ty conf+index _ _ = error "Tree: Empty forest found"++-- Draw one tree in the forest+tdraw :: Config -> Float -> Float -> Tree -> (Float, Float, Element)+tdraw conf x y t =+    (w, h, ec "svg" attrs (rect conf 0 0 tw th : contents))+    where+      attrs = [("id", "t" ++ show (label (vertex t))),+               ("x", showL x), ("y", showL y),+               ("width", showL w), ("height", showL h),+               ("visibility", "hidden")]+      w = tw + kw               -- Total width+      h = max th kh             -- Total height+      (tw, th, es) = tree conf t+      (kw, kh, contents) = body conf tw 0 (0, 0, es) t++-- Extract the preskeletons within one tree+body :: Config -> Float -> Float -> (Float, Float, [Element]) ->+        Tree -> (Float, Float, [Element])+body conf x y (w, h, es) t =+    foldl (body conf x y) (max w w', max h h', e:es) (children t)+    where+      (w', h', e) = kdraw conf x y (vertex t)
+ src/CPSA/Graph/Config.hs view
@@ -0,0 +1,27 @@+-- Exports a configuration that contains drawing parameters.++-- 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.Graph.Config where++data Config = Config+    { units :: String,          -- Unit of length+      font :: Float,            -- Font size+      stroke :: Float,          -- Stroke width+      dash :: Float,            -- Dash width+      gap :: Float,             -- Gap width in dashed lines+      mx :: Float,              -- Width of margin+      my :: Float,              -- Height of margin+      tx :: Float,              -- Distance between tree leaves+      ty :: Float,              -- Distance between tree levels+      ta :: Float,              -- Font ascent+      td :: Float,              -- Font descent+      dx :: Float,              -- Distance between strands+      dy :: Float,              -- Distance between nodes+      br :: Float,              -- Bullet radius+      compact :: Bool }         -- Generate compact format+    deriving (Show, Read)
+ src/CPSA/Graph/ExpandedView.hs view
@@ -0,0 +1,163 @@+-- Generates an expanded view of CPSA S-expressions as a compound+-- document that contains SVG within XHTML.++-- 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.Graph.ExpandedView (expandedView) where++import qualified Data.Set as S+import System.IO+import CPSA.Lib.CPSA+import CPSA.Graph.XMLOutput+import CPSA.Graph.Config+import CPSA.Graph.SVG+import CPSA.Graph.Loader+import CPSA.Graph.Preskeleton+import CPSA.Graph.Tree++expandedView :: Handle -> Config -> Int -> [Preskel] -> IO ()+expandedView h conf margin ps =+    do+      hPutList h (header ps)+      let f = forest ps+      case f of+        [t] ->+            tdrawer h conf margin False t+        _ ->+            do+              toc h f+              mapM_ (tdrawer h conf margin True) f+      hPutList h closer+      hClose h++header :: [Preskel] -> [String]+header ps =+    ["<html xmlns=\"http://www.w3.org/1999/xhtml\">",+     "<head>",+     " <meta http-equiv=\"content-type\"" +++     " content=\"application/xhtml+xml; charset=UTF-8\" />",+     title ps,+     "</head>",+     "<body>"]+    where+      title [] = " <title>CPSA</title>"+      title (k : _) = " <title>CPSA " ++ protocol k ++ "</title>"++closer :: [String]+closer =+    ["", "</body>", "</html>"]++hPutList :: Handle -> [String] -> IO ()+hPutList h xs = mapM_ (hPutStrLn h) xs++-- Generates a list of trees within the document when there are more+-- than one.+toc :: Handle -> Forest -> IO ()+toc h f =+    do+      hPutStrLn h ""+      hPutStr h $ "<p id=\"" ++ topid ++ "\">Trees:"+      mapM_ (anchor h treeid . label . vertex) f+      hPutStrLn h ".</p>"++topid :: String+topid = "top"++anchor :: Handle -> (Int -> String) -> Int -> IO ()+anchor h id n =+    hPutStr h $ " <a href=\"#" ++ id n ++ "\">" ++ show n ++ "</a>"++-- Generates an SVG document root and puts in into a div element.+docRoot :: Config -> Float -> Float -> [Element] -> Element+docRoot conf w h es =+    ec "div" [] [ec "svg" attrs es]+    where+      attrs = [("width", showL w ++ units conf),+               ("height", showL h ++ units conf),+               ("xmlns", "http://www.w3.org/2000/svg"),+               ("xmlns:xlink", "http://www.w3.org/1999/xlink"),+               ("version", "1.1"),+               ("viewBox", viewbox),+               ("font-size", showL (font conf))]+      viewbox = "0 0 " ++ showL w ++ " " ++ showL h++-- Draws one tree+tdrawer :: Handle -> Config -> Int -> Bool -> Tree -> IO ()+tdrawer h conf margin toc t =+    do+      hPutStrLn h ""+      let id = label (vertex t)+      hPutStr h $ "<p id=\"" ++ treeid id ++ "\">Tree"+      case toc of+        True -> anchor h (\_ -> topid) id+        False -> hPutStr h $ " " ++ show id+      hPutStrLn h ".</p>"+      hPutStrLn h ""+      let (width, height, es) = tree conf t+      hPutStrLn h $ show $ docRoot conf width height $+                rect conf 0 0 width height : es+      hPutSExpr h margin (protSrc (vertex t))+      mapM_ (kdrawer h conf margin id) (collectPreskels t)++treeid :: Int -> String+treeid label = "t" ++ show label++-- Collects the preskeletons within a tree and sorts them by label.+collectPreskels :: Tree -> [Tree]+collectPreskels t =+    S.toAscList $ f S.empty t+    where+      f s t = foldl f (S.insert t s) (children t)++-- Draws one item in the tree--a preskeleton.+kdrawer :: Handle -> Config -> Int -> Int -> Tree -> IO ()+kdrawer h conf margin tid t =+    do+      hPutStrLn h ""+      let k = vertex t+      let id = label k+      hPutStr h $ "<p id=\"" ++ itemid id ++ "\">Item"+      anchor h (\_ -> treeid tid) id+      case parent k of+        Nothing -> return ()+        Just p ->+            do+              hPutStr h ", Parent:"+              anchor h itemid p+      titledList h "Child" "Children" $ map (label . vertex) (children t)+      titledList h "Seen Child" "Seen Children" $ seen k+      hPutStrLn h ".</p>"+      hPutStrLn h ""+      let (width, height, e) = kdraw conf 0 0 k+      hPutStrLn h $ show $ docRoot conf width height [defs conf, e]+      hPutSExpr h margin (preskelSrc k)++itemid :: Int -> String+itemid label = "i" ++ show label++-- Handle singular vs. plural.+titledList :: Handle -> String -> String -> [Int] -> IO ()+titledList _ _ _ [] =+    return ()+titledList h singular _ [id] =+    do+      hPutStr h $ ", " ++ singular ++ ":"+      anchor h itemid id+titledList h _ plural ls =+    do+      hPutStr h $ ", " ++ plural ++ ":"+      mapM_ (anchor h itemid) ls++hPutSExpr :: Handle -> Int -> SExpr Pos -> IO ()+hPutSExpr h margin sexpr =+    do+      hPutStrLn h ""+      hPutStrLn h $ show $ mc "pre" [] (pp margin indent sexpr)++-- S-expression pretty print parameters+indent :: Int+indent = 2
+ src/CPSA/Graph/LaTeXView.hs view
@@ -0,0 +1,145 @@+-- Generates a text view of CPSA S-expressions as a LaTeX document.++-- 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.Graph.LaTeXView (latexView) where++import System.IO+import CPSA.Lib.CPSA (nats)+import CPSA.Lib.Entry (writeSExpr)+import CPSA.Graph.Loader+import CPSA.Graph.Layout++-- Main entry point+latexView :: Handle -> Int -> [Preskel] -> IO ()+latexView h margin ps =+    do+      hPutStrLn h "\\usepackage[matrix,arrow,curve]{xy}"+      hPutStrLn h "\\begin{document}"+      mapM_ (writeLnPreskel h margin) ps+      hPutStrLn h "\n\\end{document}"+      hClose h+      return ()++writeLnPreskel :: Handle -> Int -> Preskel -> IO ()+writeLnPreskel h m k =+    do+      case parent k of          -- Write protocol with first preskeleton+        Nothing ->+            do+              hPutStrLn h "\n\\begin{verbatim}"+              writeSExpr h m (protSrc k)+              hPutStrLn h "\\end{verbatim}"+        Just _ -> return ()+      hPutStrLn h (showString "\n\\paragraph{Label " $ shows (label k) "}\n")+      hPutStrLn h (show (matrix k))+      hPutStrLn h "\n\\begin{verbatim}"+      writeSExpr h m (preskelSrc k)+      hPutStrLn h "\\end{verbatim}"++-- XY-pic output++newtype Matrix = Matrix [Row]   -- Generates \xymatrix when shown++newtype Row = Row [Entry]       -- A row in the matrix++data Entry                      -- An entry in a row+    = Empty                     -- Leave entry blank.+    | Item { tag :: Maybe String, -- Maybe place text, else use bullet+             len :: Int,          -- Length of the strand succession arrow+                                  -- Communication arrows, bend arrows+             adj :: [(Int, Int, Bool)] } -- when bool is True++-- Construct the matrix for a preskeleton+matrix :: Preskel -> Matrix+matrix k =+    Matrix (roles : [ row r | r <- nats (1 + maxRank k rank) ])+    where                       -- Column header is a role name+      roles = Row (map role (initial k))+      role v = Item { tag = Just ("\\txt{\\strut " ++ part (inst v) ++ "}"),+                      len = 0, adj = [] }+      row r = Row [ entry r c | c <- nats (strands k) ]+      entry r c =               -- Entry constructor+          case lookup (c, r) alist of+            Nothing -> Empty    -- Nothing at this grid point+            Just v -> item c r v -- Grid point has content+      item c r v =+          let len = maybe 0 (\v'->rank (vnode v') - r) (next v)+              adj = map (shift (c, r) . rankNode . vnode) (succs v) in+          Item { tag = Nothing, len = len, adj = map (curve c r) adj }+      curve c r (x, y) =        -- Decide if an arrows is curved+          (x, y, abs x > 1 && bend)+          where+            bend = y /= 0 || any (obstruction c r) (between x)+      obstruction c r x =       -- Is there an obstruction here?+          maybe False (const True) (lookup (c + x, r) alist)+      between n =               -- List of ints toward zero+          case compare n 0 of+            LT -> [(n + 1)..(-1)]+            EQ -> []+            GT -> [1..(n - 1)]+      -- Map grid points with content to vertices+      alist = [ (rankNode (vnode v), v) | v <- vertices k ]+      rankNode (s, p) = (s, rank (s, p))+      rank = layout k     -- Get causally intuitive preskeleton layout++-- Shift origin of a pair+shift :: (Int, Int) -> (Int, Int) -> (Int, Int)+shift (x0, y0) (x1, y1) = (x1 - x0, y1 - y0)++-- A matrix is translated into LaTeX XY-pic macros using show methods++instance Show Matrix where+    showsPrec _ (Matrix []) =+        showString "\\relax"+    showsPrec _ (Matrix (r : rs)) =+        showString "$$\\xymatrix{\n" . shows r . rows rs . showString "}$$"+        where+          rows [] = id+          rows (r : rs) =+              showString "\\\\\n" . shows r . rows rs++instance Show Row where+    showsPrec _ (Row []) = id+    showsPrec _ (Row (e : es)) =+        shows e . entries es+        where+          entries [] = id+          entries (e : es) =+              showChar '&' . shows e . entries es++instance Show Entry where+    showsPrec _ Empty = id+    showsPrec _ (Item {tag = tag, len = len, adj = adj}) =+        element . succ . comm adj+        where+          element = showString (maybe "\\bullet" id tag)+          succ = if len > 0 then+                     showString "\\ar@{=>}[" . vert len . showChar ']'+                 else+                     id+          comm [] = id+          comm ((x, y, bend) : cs) =+              showString ar . horiz x . vert y . showChar ']' . comm cs+              where+                ar = if not bend then "\\ar["+                     else if x > 0 then "\\ar@/_/["+                          else "\\ar@/^/["++vert :: Int -> ShowS+vert n =+    case compare n 0 of+      LT -> showChar 'u' . vert (succ n)+      EQ -> id+      GT -> showChar 'd' . vert (pred n)++horiz :: Int -> ShowS+horiz n =+    case compare n 0 of+      LT -> showChar 'l' . horiz (succ n)+      EQ -> id+      GT -> showChar 'r' . horiz (pred n)
+ src/CPSA/Graph/Layout.hs view
@@ -0,0 +1,74 @@+-- Produces node rankings for the Causally Intuitive Preskeleton Layout++-- 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.Graph.Layout (Node, vnode, Rank, layout, maxRank) where++import qualified Data.List as L+import CPSA.Lib.CPSA (adjoin)+import CPSA.Graph.Loader++-- The node's rank determines its vertical position.+type Rank = Node -> Int++maxRank :: Preskel -> Rank -> Int+maxRank k rank =+    maximum (map (rank . vnode . lastVertex) (initial k))++-- Node rank computation++type Ranking = [(Node, Int)]++-- The default rank of a node is its position in the strand.+ranker :: Ranking -> Rank+ranker ranking n@(_, p) =+    case lookup n ranking of+      Nothing -> p+      Just rank -> rank++-- Layout algorithm described is described in the design document.+layout :: Preskel -> Rank+layout k =+    stretch [] (vertices k)+    where+      -- The node list is a todo list.+      stretch :: Ranking -> [Vertex] -> Rank+      stretch r [] = compress r (vertices k)+      stretch r (n1:ns) =+          if r1 < h then+              linearize ((vnode n1, h):r) ns h (next n1)+          else+              stretch r ns+          where+            r1 = ranker r (vnode n1)+            h = foldr (max . ranker r . vnode) r1 (preds n1)+      linearize :: Ranking -> [Vertex] -> Int -> Maybe Vertex -> Rank+      linearize r ns _ Nothing = stretch r ns+      linearize r ns r0 (Just n1) =+          if r1 <= r0 then+              linearize ((vnode n1, r0 + 1):r) ns' (r0 + 1) (next n1)+          else+              stretch r ns+          where+            r1 = ranker r (vnode n1)+            ns' = L.union (succs n1) ns+      compress :: Ranking -> [Vertex] -> Rank+      compress r [] = ranker r+      compress r (n1:ns) =+          case next n1 of+            Nothing ->  compress r ns+            Just n2 ->+                if r1 < h then+                    compress ((vnode n1, h):r) ns'+                else+                    compress r ns+                where+                  r1 = ranker r (vnode n1)+                  r2 = ranker r (vnode n2)+                  h = foldr (min . ranker r . vnode) (r2 - 1) (succs n1)+                  ns' = mbAdd (prev n1) (L.union (preds n1) ns)+                  mbAdd n ns = maybe ns (flip adjoin ns) n
+ src/CPSA/Graph/Loader.hs view
@@ -0,0 +1,405 @@+-- Loads preskeletons and returns the results for display.  An error+-- is signaled if the ordering relation is cyclic.  For preskeleton+-- input without labels, a unique label is added.  The representation+-- of each strand includes its trace, but not its environment.+-- Ordering relations implied by transitive closure are eliminated so+-- as to reduce clutter.++-- 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.Graph.Loader (Preskel, Vertex, protocol, role, env, inst,+                          part, lastVertex, vertices, Node, vnode,+                          strands, label, parent, seen, unrealized,+                          protSrc, preskelSrc, initial, strand, pos,+                          prev, next, msg, succs, preds, loadDefs)+                          where++import qualified Data.List as L+import Control.Monad+import CPSA.Lib.CPSA++-- A view of protocols and preskeletons designed for display.++data Preskel = Preskel+    { protocol :: String,       -- Name of the protocol+      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+      strands :: Int,           -- Number of strands+      initial :: [Vertex],      -- The initial node in each strand+      unrealized :: Maybe [Vertex], -- Nodes not realized if available+      protSrc :: SExpr Pos,       -- Source for the protocol+      preskelSrc :: SExpr Pos }   -- Source for 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)++data Inst = Inst+    { part :: String,       -- Role name (empty if this is a listener)+      mapping :: String,  -- Environment (empty if this is a listener)+      trace :: [String] }      -- Transmit or reception directed terms+    deriving Show++-- A vertex v contains the information associated with the node+-- (strand v, pos v).+data Vertex = Vertex+    { msg :: String,+      inst :: Inst,+      prev :: Maybe Vertex,     -- Strand previous+      next :: Maybe Vertex,     -- Strand next+      preds :: [Vertex],        -- Cross strand predecessors+      succs :: [Vertex],        -- Cross strand successors+      strand :: Int,            -- Strand ID+      pos :: Int }              -- Position in strand++instance Eq Vertex where+    n0 == n1 = (strand n0, pos n0) == (strand n1, pos n1)++instance Ord Vertex where+    compare n0 n1 = compare (strand n0, pos n0) (strand n1, pos n1)++instance Show Vertex where+    showsPrec _ n = let (s, p) = (strand n, pos n) in+                    showChar '(' . shows s . showString ", " .+                    shows p . showChar ')'++-- Returns the role associated with the node+role :: Vertex -> String+role v = part (inst v)++-- Returns the env associated with the node+env :: Vertex -> String+env v = mapping (inst v)++lastVertex :: Vertex -> Vertex+lastVertex n =+    maybe n lastVertex (next n)++vertices :: Preskel -> [Vertex]+vertices k = foldl addNext [] (initial k)++addNext :: [Vertex] -> Vertex -> [Vertex]+addNext ns n = foldStrand (flip (:)) ns n++foldStrand :: (a -> Vertex -> a) -> a -> Vertex -> a+foldStrand f a n = maybe (f a n) (foldStrand f (f a n)) (next n)++-- The remaing is in support of the loader++-- The protocol data structure is used only within the loader++data Protocol = Protocol+    { name :: String,           -- Protocol name+      roles :: [(String, Trace)], -- A role is just a name and a trace+      src :: SExpr Pos }         -- Source of protocol+    deriving Show++type Trace = [SExpr Pos]        -- A list of directed messages++-- A node is a strand (an instance index), and a position along the+-- strand.+type Node = (Int, Int)++-- Convert a vertex in a diagram into a pair of natural numbers+vnode :: Vertex -> Node+vnode v = (strand v, pos v)++type Pair = (Node, Node)        -- An ordering of nodes++-- Load the top-level defs or return an error message++loadDefs :: Monad m => [SExpr Pos] -> m [Preskel]+loadDefs xs =+    do+      (_, ks, _) <- foldM loadSExpr ([], [], 0) xs+      return (reverse ks)++-- The integer is used to add a label to preskeleton without one.+type LoadSExpr = ([(String, Protocol)], [Preskel], Int)++loadSExpr :: Monad m => LoadSExpr -> SExpr Pos -> m LoadSExpr+loadSExpr (ps, ks, tag) x@(L pos (S _ "defprotocol" : xs)) =+    do+      p <- loadProt x pos xs+      return (p : ps, ks, tag)+loadSExpr (ps, ks, tag) x@(L pos (S _ "defskeleton" : xs)) =+    do+      k <- loadPreskel x pos ps tag xs+      -- Ensure labels are unique+      case any ((== (label k)) . label) ks of+        True -> fail (shows pos ("Duplicate label " ++ show (label k)))+        False -> return (ps, k : ks, tag + 1)+loadSExpr le (L _ (S _ "comment" : _)) = return le+loadSExpr _ x = fail (shows (annotation x) "Malformed input")++-- Protocols++loadProt :: Monad m => SExpr Pos -> Pos -> [SExpr Pos] ->+            m (String, Protocol)+loadProt x _ (S _ name : S _ _ : xs) =+    do+      roles <- loadRoles xs+      return (name, Protocol { name = name, roles = roles, src = x })+loadProt _ pos _ = fail (shows pos "Malformed protocol")++loadRoles :: Monad m => [SExpr Pos] -> m [(String, Trace)]+loadRoles (L pos (S _ "defrole" : x) : xs) =+    do+      r <- loadRole pos x+      rs <- loadRoles xs+      return (r : rs)+loadRoles _ = return []++loadRole :: Monad m => Pos -> [SExpr Pos] -> m (String, Trace)+loadRole _ (S _ name :+	    L _ (S _ "vars" : _) :+            L _ (S _ "trace" : trace) : _) = return (name, trace)+loadRole pos _ = fail (shows pos "Malformed role")++-- Preskeletons++loadPreskel :: Monad m => SExpr Pos -> Pos -> [(String, Protocol)] ->+               Int -> [SExpr Pos] -> m Preskel+loadPreskel s pos ps tag (S _ name : (L _ (S _ "vars" : _)) : xs) =+    case lookup name ps of+      Nothing -> fail (shows pos $ "Protocol " ++ name ++ " unknown")+      Just p -> loadInsts s pos p tag [] xs+loadPreskel _ pos _ _ _ = fail (shows pos "Malformed skeleton")++loadInsts :: Monad m => SExpr Pos -> Pos -> Protocol -> Int ->+             [Inst] -> [SExpr Pos] -> m Preskel+loadInsts s top p tag insts (L pos (S _ "defstrand" : x) : xs) =+    case x of+      S _ role : N _ height : env ->+          do+            i <- loadInst pos p role height env+            loadInsts s top p tag (i : insts) xs+      _ ->+          fail (shows pos "Malformed defstrand")+loadInsts s top p tag insts (L pos (S _ "deflistener" : x) : xs) =+    case x of+      [term] ->+          let e0 = show (L pos [S pos "recv", term]) in+          let e1 = show (L pos [S pos "send", term]) in+          let i = Inst { part = "", mapping = "", trace = [e0, e1] } in+          loadInsts s top p tag (i : insts) xs+      _ ->+          fail (shows pos "Malformed deflistener")+loadInsts s pos p tag revInsts xs =+    do+      alist xs                  -- Ensure alist syntax+      label <- nassoc "label" xs+      parent <- nassoc "parent" xs+      seen <- nsassoc "seen" xs+      let insts = reverse revInsts+      case null insts of+        True -> fail (shows pos "No strands")+        False -> return ()+      let heights = map (length . trace) insts+      unrealized <- loadNodes heights (assoc "unrealized" xs)+      let orderings = maybe [] id (assoc "precedes" xs)+      pairs <- loadOrderings heights orderings+      let graph = adj heights pairs+      let pairs' = reduce graph pairs+      let strands = length insts+      case isAcyclic graph (zip [0..] (replicate strands 0)) of+        False -> fail (shows pos "Cycle found")+        True ->+            return Preskel { protocol = name p,+                             label = maybe tag id label,+                             parent  = parent,+                             seen = maybe [] (L.sort . L.nub) seen,+                             strands = strands,+                             initial = initial,+                             unrealized = unrealized',+                             protSrc = src p,+                             preskelSrc = s }+            where+              initial = map head nodes -- The first node in each strand+              nodes = [ [ Vertex {+                            msg = msg,+                            inst = inst,+                            prev = getPrev (s, p),+                            next = getNext ht (s, p),+                            preds = getPreds (s, p),+                            succs = getSuccs (s, p),+                            strand = s,+                            pos = p } |+                          (p, msg) <- zip [0..] (trace inst) ] |+                        (s, inst) <- zip [0..] insts,+                        let ht = length (trace inst) ]+              getNode (s, p) = nodes !! s !! p+              getPrev (s, p)+                  | p > 0 = Just (getNode (s, p - 1))+                  | otherwise = Nothing+              getNext ht (s, p)+                  | p + 1 < ht= Just (getNode (s, p + 1))+                  | otherwise = Nothing+              getPreds n = [ getNode n0 | (n0, n1) <- pairs', n == n1 ]+              getSuccs n = [ getNode n1 | (n0, n1) <- pairs', n == n0 ]+              unrealized' =+                  maybe Nothing (Just . map getNode) unrealized++-- Construct an adjacency representation of the ordering relation.+-- The first argument is a list giving the length of each strand.+adj :: [Int] -> [Pair] -> Node -> [Node]+adj strands orderings (s, p) =+    [ strand s h | (s, h) <- zip [0..] strands ] !! s !! p+    where+      strand s h = [ entry (s, p) | p <- nats h ]+      entry n = enrich n [ n0 | (n0, n1) <- orderings, n1 == n ]+      -- add strand succession edges+      enrich (s, p) ns+          | p > 0 = (s, p - 1) : ns+          | otherwise = ns++-- Transitive Reduction++-- An edge is essential if its removal eliminates all paths from its+-- source to its destination.  This function removes all non-essential+-- edges from the ordering relation.+reduce :: (Node -> [Node]) -> [Pair] -> [Pair]+reduce graph orderings =+    filter essential orderings+    where+      essential (src, dst) =+          loop dst (L.delete dst (graph src)) [src]+      loop _ [] _ = True        -- No other path found+      loop dst (n : ns) seen+          | n == dst = False    -- There is another path+          | elem n seen = loop dst ns seen+          | otherwise = loop dst (graph n ++ ns) (n : seen)++-- Instances++loadInst :: Monad m => Pos -> Protocol -> String -> Int ->+            [SExpr Pos] -> m Inst+loadInst pos p role ht env =+    case lookup role (roles p) of+      Nothing ->+          fail (shows pos $ "Role " ++ role ++ " not found in " ++ name p)+      Just trace ->+          case ht < 1 || ht > length trace of+            True -> fail (shows pos "Bad height")+            False ->+                do+                  let mapping = show (L pos env)+                  env <- loadMaplet env+                  let evts = map (show . subst env) (take ht trace)+                  return Inst { part = role,+                                mapping = mapping,+                                trace = evts }++loadMaplet :: Monad m => [SExpr Pos] -> m [(String, SExpr Pos)]+loadMaplet (L _ [S _ name, x] : xs) =+    do+      env <- loadMaplet xs+      return ((name, x) : env)+loadMaplet [] = return []+loadMaplet (x:_) = fail (shows (annotation x) "Bad maplet")++subst :: [(String, SExpr Pos)] -> SExpr Pos -> SExpr Pos+subst env x@(S _ name) =+    case lookup name env of+      Nothing -> x+      Just x' -> x'+subst env (L pos (x : xs)) = L pos (x : map (subst env) xs)+subst _ x = x++-- Ensure alist has the proper form+alist :: Monad m => [SExpr Pos] -> m ()+alist [] = return ()+alist ((L _ (S _ _ : _)) : xs) = alist xs+alist 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 :: Monad 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 :: Monad m => SExpr Pos -> m Int+num (N _ n) = return n+num x = fail (shows (annotation x) "Expecting a number")++nsassoc :: Monad 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)++loadOrderings :: Monad m => [Int] -> [SExpr Pos] -> m [Pair]+loadOrderings heights x =+    foldM f [] x+    where+      f ns x =+          do+            np <- loadPair heights x+            return (adjoin np ns)++loadPair :: Monad m => [Int] -> SExpr Pos -> m Pair+loadPair heights (L pos [x0, x1]) =+    do+      n0 <- loadNode heights x0+      n1 <- loadNode heights x1+      case sameStrands n0 n1 of  -- Same strand+        True -> fail (shows pos "Malformed pair -- nodes in same strand")+        False -> return (n0, n1)+    where+      sameStrands (s0, _) (s1, _) = s0 == s1+loadPair _ x = fail (shows (annotation x) "Malformed pair")++loadNode :: Monad m => [Int] -> SExpr Pos -> m Node+loadNode heights (L pos [N _ s, N _ p])+    | s < 0 = fail (shows pos "Negative strand in node")+    | p < 0 = fail (shows pos "Negative position in node")+    | otherwise =+        case height heights s of+          Nothing -> fail (shows pos "Bad strand in node")+          Just h | p < h -> return (s, p)+          _ -> fail (shows pos "Bad position in node")+    where+      height [] _ = Nothing+      height (x: xs) s          -- Assume s non-negative+          | s == 0 = Just x+          | otherwise = height xs (s - 1)+loadNode _ x = fail (shows (annotation x) "Malformed node")++loadNodes :: Monad m => [Int] -> Maybe [SExpr Pos] -> m (Maybe [Node])+loadNodes _ Nothing = return Nothing+loadNodes heights (Just xs) =+    do+      ns <- mapM (loadNode heights) xs+      return (Just ns)
+ src/CPSA/Graph/Main.hs view
@@ -0,0 +1,155 @@+-- Generate views of a sequence of preskeletons++-- 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.IO.Error+import System.Console.GetOpt+import CPSA.Lib.CPSA (PosHandle, SExpr, Pos)+import CPSA.Lib.Entry+import CPSA.Graph.Config+import CPSA.Graph.Loader+import CPSA.Graph.CompactView+import CPSA.Graph.ExpandedView+import CPSA.Graph.LaTeXView++-- Runtime parameters++data Params = Params+    { file :: Maybe FilePath,   -- Nothing specifies standard output+      format :: Format,         -- Output format+      margin :: Int }           -- Output line length+    deriving Show++data Format = XML | SVG | LaTeX deriving Show++main :: IO ()+main =+    do+      (p, params) <- start options interp+      sexprs <- readSExprs p+      preskels <- try (loadDefs sexprs)+      case preskels of+        Left err -> abort (ioeGetErrorString err)+        Right [] ->+            abort "Empty input"+        Right preskels ->+            do+              h <- outputHandle (file params)+              case format params of+                LaTeX ->+                    do+                      hPutStrLn h "\\documentclass[12pt]{article}"+                      hPutStrLn h ("% " ++ cpsaVersion)+                      latexView h (margin params) preskels+                _ ->+                    do+                      hPutStrLn h "<?xml version=\"1.0\"?>"+                      hPutStrLn h ("<!-- " ++ cpsaVersion ++ " -->")+                      case format params of+                        XML -> expandedView h (config False)+                               (margin params) preskels+                        SVG -> compactView h (config True) preskels+                        LaTeX -> error "Bad case in main"++readSExprs :: PosHandle -> IO [SExpr Pos]+readSExprs p =+    loop []+    where+      loop xs =+          do+            x <- readSExpr p+            case x of+              Nothing ->+                  return $ reverse xs+              Just x ->+                  loop (x:xs)++-- Command line option flags+data Flag+    = Help                      -- Help+    | Info                      -- Version information+    | Expanded                  -- Select expanded format in XML+    | Compact                   -- Select compact format in SVG+    | Text                      -- Select text format in LaTeX+    | Margin String             -- Output line length+    | Output String             -- Output file name+      deriving Show++options :: [OptDescr Flag]+options =+    [ Option ['o'] ["output"]   (ReqArg Output "FILE") "output FILE",+      Option ['x'] ["expanded"] (NoArg Expanded)+      "use expanded format (default)",+      Option ['c'] ["compact"]  (NoArg Compact)        "use compact format",+      Option ['l'] ["latex"]    (NoArg Text)           "use LaTeX format",+      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+interp :: [Flag] -> IO Params+interp flags =+    loop flags Nothing XML defaultMargin -- By default, no output file+    where                                -- and use expanded format+      loop [] file format margin =+          return Params { file = file,+                          format = format,+                          margin = margin }+      loop (Output name : flags) Nothing format margin =+          loop flags (Just name) format margin+      loop (Expanded : flags) file _ margin =+          loop flags file XML margin+      loop (Compact : flags) file _ margin =+          loop flags file SVG margin+      loop (Text : flags) file _ margin =+          loop flags file LaTeX margin+      loop (Margin value : flags) file format _ =+          case readDec value of+            [(margin, "")] ->+                loop flags file format margin+            _ ->+                do+                  msg <- usage options ["Bad value for margin\n"]+                  abort msg+      loop (Info : _) _ _ _ =+          success cpsaVersion+      loop (Help : _) _ _ _ =+          do                    -- Show help then exit with success+            msg <- usage options []+            success msg+      loop _ _ _ _ =+           do                   -- Show help then exit with failure+             msg <- usage options ["Bad option combination\n"]+             abort msg++-- Default configuration.  The lengths are in points, however the more+-- natural choice is a font relative unit of length such as ems,+-- however FireFox doesn't support these units yet.+config :: Bool -> Config+config compact =+    Config { units = "pt",+             font = font,+             stroke = 0.08 * font,+             dash = 0.50 * font,+             gap = 0.20 * font,+             tx = 4.16 * font,+             ty = 6.25 * font,+             ta = 1.75 * font,+             td = 1.16 * font,+             dx = 8.33 * font,+             dy = 6.25 * font,+             mx = 3.33 * font,+             my = 3.33 * font,+             br = 0.50 * font,+             compact = compact}+    where+      font = 12
+ src/CPSA/Graph/Preskeleton.hs view
@@ -0,0 +1,104 @@+-- Draws preskeletons++-- 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.Graph.Preskeleton (kdraw) where++import CPSA.Graph.XMLOutput+import CPSA.Graph.Config+import CPSA.Graph.SVG+import CPSA.Graph.Loader+import CPSA.Graph.Layout++-- Compute a node's position.+npos :: Config -> Rank -> Node -> (Float, Float)+npos conf rank (s, p) =+    (xpos, ypos)+    where+      -- Node x coordinate is determined by its strand+      xpos = mx conf + dx conf * fromIntegral s+      -- Node y coordinate is determined by its rank+      ypos = my conf + dy conf * fromIntegral (rank (s, p) + 1)++-- Dimension of the diagram+dim :: Config -> Int -> Int -> (Float, Float)+dim conf strands maxRank =+    (w, h)+    where+      w = 2 * mx conf + dx conf * fromIntegral (strands - 1)+      h = 2 * my conf + dy conf * fromIntegral (maxRank + 1)++-- Add a cross strand arrow+addEdge :: Config -> Rank -> Vertex -> Float -> Float ->+           [Element] -> Vertex -> [Element]+addEdge conf rank src x1 y1 elements n =+    let (x2, y2) = npos conf rank (vnode n) in+    arrow conf (sameMsg src n) x1 y1 x2 y2 : elements++sameMsg :: Vertex -> Vertex -> Bool+sameMsg src dest =+    drop 6 (msg src) == drop 6 (msg dest)++-- Add a strand node+addNode :: Config -> Preskel -> Rank -> [Element] -> Vertex -> [Element]+addNode conf k rank elements node =+    let (x, y) = npos conf rank (vnode node)+        color = elem node (maybe [] id (unrealized k))+        bullet = circ conf color x y+        es = tooltip (msg node) [bullet] : elements+        es' = foldl (addEdge conf rank node x y) es (succs node) in+    maybe es' (addNode conf k rank es') (next node)++-- Add role above a strand+addRole :: Config -> [Element] -> Vertex -> [Element]+addRole conf es node =+    if null r then+        es+    else+        tooltip e [text conf x y r] : es+    where+      r = role node+      e = env node+      (x, y0) = npos conf snd (strand node, 0)+      (_, y1) = npos conf snd (strand node, (-1))+      y = (y0 + y1) / 2++-- Add strand lines+addStrand :: Config -> Rank -> [Element] -> Vertex -> [Element]+addStrand conf rank es n =+    line conf x1 y1 x2 y2 : es+    where+      (x1, y1) = npos conf rank (vnode n)+      (x2, y2) = npos conf rank (vnode (lastVertex n))++-- Add title of diagram+title :: Config -> Preskel -> [Element]+title conf k =+    foldl (addRole conf) [header] (initial k)+    where+      (w, _) = dim conf (strands k) 0+      (_, y) = npos conf snd (0, (-1))+      content = protocol k ++ " " ++ show (label k)+      header = text conf (w / 2) y (content ++ annotation)+      annotation =+          case unrealized k of+            Nothing -> ""+            Just [] -> " (realized)"+            _ -> ""++-- Draw a preskeleton+kdraw :: Config -> Float -> Float -> Preskel -> (Float, Float, Element)+kdraw conf x y k =+    (w, h, ec "svg" attrs (rect conf 0 0 w h : lines))+    where+      attrs = [("id", "k" ++ show (label k)), ("x", showL x),+               ("y", showL y), ("width", showL w), ("height", showL h)] +++              if compact conf then [("visibility", "hidden")] else []+      (w, h) = dim conf (strands k) (maxRank k rank)+      circs = foldl (addNode conf k rank) (title conf k) (initial k)+      lines = foldl (addStrand conf rank) circs (initial k)+      rank = layout k
+ src/CPSA/Graph/SVG.hs view
@@ -0,0 +1,177 @@+-- Exports SVG primitives.++-- 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.Graph.SVG where++import qualified Numeric as N+import CPSA.Graph.XMLOutput+import CPSA.Graph.Config++-- Show a coordinate as a length++showsL :: Float -> ShowS+showsL len s =+    N.showFFloat (Just 3) len s++showL :: Float -> String+showL len = showsL len []++-- Shortens a line from (x1, y1) to (x2, y2) by d.+shorten :: Float -> Float -> Float -> Float -> Float -> (Float, Float)+shorten d x1 y1 x2 y2 =+    (x3 + x1, y3 + y1)+    where+      dx, dy, fd :: Float+      dx = x2 - x1+      dy = y2 - y1+      fd = 1.0 - d / sqrt (dx * dx + dy * dy)+      x3 = fd * dx+      y3 = fd * dy++-- Tooltip+tooltip :: String -> [Element] -> Element+tooltip tip content =+    ec "a" [("xlink:title", tip)] content++-- Centered text+text :: Config -> Float -> Float -> String -> Element+text _ x y content =+    mc "text" [("x", showL x), ("y", showL y), ("style", style)] content+    where+      style = props [("text-anchor", "middle")]++-- Circle with radius from configuration+circ :: Config -> Bool -> Float -> Float -> Element+circ conf color x y =+    ec "circle" attrs []+    where+      dims = [("cx", showL x), ("cy", showL y), ("r", showL (br conf))]+      style = ("style", props [("fill", "red")])+      attrs = if color then (style : dims) else dims++rect :: Config -> Float -> Float -> Float -> Float -> Element+rect conf x y w h =+    ec "rect" [("x", showL x), ("y", showL y),+               ("width", showL w), ("height", showL h),+               ("style", props style)] []+    where+      style = [("fill", "none"), ("stroke", "black"),+               ("stroke-width", showL (stroke conf))]++-- Gray line+line :: Config -> Float -> Float -> Float -> Float -> Element+line conf x1 y1 x2 y2 =+    ec "line" [("x1", showL x1), ("y1", showL y1),+               ("x2", showL x2), ("y2", showL y2),+               ("style", props style)] []+    where+      style = [("stroke-width", showL (stroke conf)), ("stroke", "gray")]++-- An arrow that is curved when its horizontal length exceeds a limit.+arrow :: Config -> Bool -> Float -> Float -> Float -> Float -> Element+arrow conf solid x1 y1 x3 y3 =+    ec "path" [("d", path), ("style", props style)] []+    where+      (x2, y2) = shorten (br conf) x1 y1 x3 y3+      path = showString "M " $+             showsL x1 $ showChar ' ' $ showsL y1 $ showString " Q " $+             showsL xq $ showChar ' ' $ showsL yq $ showChar ' ' $+             showsL x2 $ showChar ' ' $ showL y2+      xq = (x1 + x2) / 2+      yq = (y1 + y2 - delta) / 2+      delta = if abs (x1 - x2) > dx conf then dy conf else 0+      style = if solid then solidStyle else dashedStyle+      solidStyle =+          [("stroke-width", showL (stroke conf)),+           ("stroke", "black"),+           ("marker-end", "url(#arrow)"),+           ("fill", "none")]+      dashedStyle = ("stroke-dasharray",+                     showsL (dash conf) $ showString "," $ showL (gap conf))+                    : solidStyle++data ButtonKind+    = AliveTree                 -- tree node is alive+    | AliveDup                  -- duplicate node is alive+    | DeadTree                  -- tree node is dead+    | DeadDup                   -- duplication node is dead++-- A button that displays a preskeleton+kbutton :: Config -> Float -> Float -> ButtonKind -> Int -> Element+kbutton conf x y kind label =+    mc "text" attrs (show label)+    where+      attrs = [("x", showL x), ("y", showL y), ("style", props style),+               ("onclick", onclick conf label)]+      style = italic kind [("text-anchor", "middle"), ("fill", color kind)]+      color AliveTree = "black"+      color AliveDup = "green"+      color DeadTree = "red"+      color DeadDup = "orange"+      italic AliveTree props = props+      italic AliveDup props = ("font-style", "italic"):props+      italic DeadTree props = props+      italic DeadDup props = ("font-style", "italic"):props++onclick :: Config -> Int -> String+onclick conf label =+    if compact conf then+        showString "showk(evt, \"k" $ shows label "\")"+    else+        showString "window.open(\"#i" $ shows label "\", \"_self\")"++-- A button that displays a tree and its first preskeleton+tbutton :: Config -> Float -> Float -> Int -> Element+tbutton _ x y label =+    mc "text" attrs (content [])+    where+      attrs = [("x", showL x), ("y", showL y),+               ("style", style), ("onclick", script)]+      style = props [("text-anchor", "middle")]+      script = showString "showt(evt, \"t" $ content $+               showString "\", \"k" $ content "\")"+      content = shows label++-- The script for the buttons+ecmascript :: String+ecmascript =+    "\nvar t;\n\+    \var k;\n\n\+    \function init(evt) {\n\+    \  t = evt.target.ownerDocument.getElementById(\"t0\");\n\+    \  t.setAttribute(\"visibility\", \"visible\");\n\+    \  k = evt.target.ownerDocument.getElementById(\"k0\");\n\+    \  k.setAttribute(\"visibility\", \"visible\");\n\+    \}\n\n\+    \function showk(evt, kid) {\n\+    \  k.setAttribute(\"visibility\", \"hidden\");\n\+    \  k = evt.target.ownerDocument.getElementById(kid);\n\+    \  k.setAttribute(\"visibility\", \"visible\");\n\+    \}\n\n\+    \function showt(evt, tid, kid) {\n\+    \  showk(evt, kid);\n\+    \  t.setAttribute(\"visibility\", \"hidden\");\n\+    \  t = evt.target.ownerDocument.getElementById(tid);\n\+    \  t.setAttribute(\"visibility\", \"visible\");\n\+    \}\n"++script :: Element+script = mc "script" [("type", "application/ecmascript")] ecmascript++-- The marker for arrow heads+defs :: Config -> Element+defs _ =+    ec "defs" [] [marker]+    where+      marker =+          ec "marker"+                 [("id", "arrow"), ("orient", "auto"),+                  ("markerWidth", "5"), ("markerHeight", "10"),+                  ("refX", "5"), ("refY", "5")] [path]+      path = ec "path" [("d", "M 0 0 5 5 0 10"), ("style", props style)] []+      style = [("stroke-width", "2"), ("fill", "none"), ("stroke", "black")]
+ src/CPSA/Graph/Tree.hs view
@@ -0,0 +1,201 @@+-- Generate an SVG drawing of a tree of preskeletons++-- 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.Graph.Tree (Tree (..), Forest, forest, tree) where++import qualified Data.List as L+import CPSA.Graph.XMLOutput+import CPSA.Graph.Config+import CPSA.Graph.SVG+import CPSA.Graph.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,+      duplicates :: Forest,     -- Preskeletons already seen+      children :: Forest,       -- Freshly discovered preskeletons+      alive :: Bool,            -- Is preskeleton alive?+      width :: Int,             -- Number of leaf nodes+      height :: Int }           -- Longest distance to a leaf plus one+    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 dups kids =+    Tree { vertex = k, duplicates = dups, children = kids,+           alive = True,        -- The correct value is set later+           width = x (dups ++ kids), height = y (dups ++ kids) }+    where+      x [] = 1                  -- Compute the width and height+      x kids = sum (map width kids)+      y kids = 1 + foldl max 0 (map height kids)++type Forest = [Tree]++-- Assemble preskeletons into a forest and then set the alive flag+forest :: [Preskel] -> Forest+forest ks = map setLiveness (assemble ks)++-- Assemble preskeletons into a forest+assemble :: [Preskel] -> Forest+assemble ks =+    map loops (spanning ks)+    where+      loops t =                 -- Add in the other edges+          let k = vertex t in   -- in the forest+          makeTree k (map (duplicate k) (seen k))+                       (map loops (children t))+      duplicate k tag =+          case L.find (\k -> label k == tag) ks of+            Just k -> makeTree k [] []+            Nothing ->+                error ("Tree: Cannot find " ++ show tag +++                       " seen in skeleton " ++ show (label k))++-- Compute the spanning forest of the preskeletons+spanning :: [Preskel] -> Forest+spanning [] = []+spanning (k:ks) =+    makeTree k [] kids : rest+    where+      (kids, rest) = partition (label k) (assemble ks)+      partition _ [] = ([], [])+      partition tag (t:ts) =+          let (kids, rest) = partition tag ts in+          case parent (vertex t) of+            Just parent' ->+                if parent' == tag then+                    (t:kids, rest)+                else+                    (kids, t:rest)+            Nothing ->+                (kids, t:rest)++-- Set the alive flag in each preskeleton.+setLiveness :: Tree -> Tree+setLiveness t = updateLiveness (live t) t++-- Extract the non-dead preskeletons from a tree.  A preskeleton is+-- dead if it is known to be unrealized, and all of its children are+-- unrealized.  Because of duplicates, process of computing the list+-- must be iterated.+live :: Tree -> [Preskel]+live t =+    loop []+    where+      decend ks t =+          let ks' = foldl decend ks (kids t) in+          if contain ks' (vertex t) || dead ks' t then+              ks'+          else+              vertex t : ks'+      dead ks t =+          maybe False (not . null) (unrealized (vertex t))+          && all (not . contain ks . vertex) (kids t)+      loop old =+          let new = decend old t in+          if length new == length old then+              old+          else+              loop new+      kids t = duplicates t ++ children t++updateLiveness :: [Preskel] -> Tree -> Tree+updateLiveness live t =+    t { duplicates = map (updateLiveness live) (duplicates t),+        children = map (updateLiveness live) (children t),+        alive = contain live (vertex t) }++-- Does list contain a given preskeleton?+contain :: [Preskel] -> Preskel -> Bool+contain [] _ = False+contain (k:ks) k' =+    label k == label k' || contain ks k'++-- Draw tree view of preskeleton relations+tree :: Config -> Tree -> (Float, Float, [Element])+tree conf t =+    if compact conf then+        vtree conf t+    else+        htree conf t++-- Draw a vertical tree+vtree :: Config -> Tree -> (Float, Float, [Element])+vtree conf t =+    (w, h, snd $ folddup (loop x y) (mx conf, top) t)+    where+      tw = tx conf * fromIntegral (width t - 1)  -- Tree width+      th = ty conf * fromIntegral (height t - 1) -- Tree height+      x = mx conf + tw / 2+      y = my conf+      top = [button conf x y False t]+      loop :: Float -> Float -> Bool -> (Float, [Element]) ->+              Tree -> (Float, [Element])+      loop x1 y1 dup (w, es) t =+          (w + tx conf + tw, es')+          where+            x2 = w + tw / 2+            y2 = y1 + ty conf+            es'' = button conf x2 y2 dup t :+                   line conf x1 (y1 + td conf) x2 (y2 - ta conf) : es+            es' = snd $ folddup (loop x2 y2) (w, es'') t+            tw = tx conf * fromIntegral (width t - 1)+      w = 2 * mx conf + tw                       -- Diagram width+      h = 2 * my conf + th                       -- Diagram height++-- Draw a horizontal tree+htree :: Config -> Tree -> (Float, Float, [Element])+htree conf t =+    (w, h, snd $ folddup (loop x y) (my conf, top) t)+    where+      tw = tx conf * fromIntegral (height t - 1)  -- Tree width+      th = ty conf * fromIntegral (width t - 1)   -- Tree height+      x = mx conf+      y = my conf + th / 2+      top = [button conf x (y - td conf) False t]+      loop :: Float -> Float -> Bool -> (Float, [Element]) ->+              Tree -> (Float, [Element])+      loop x1 y1 dup (h, es) t =+          (h + ty conf + th, es')+          where+            x2 = x1 + tx conf+            y2 = h + th / 2+            es'' = button conf x2 (y2 - td conf) dup t :+                   line conf x1 y1 x2 y2 : es+            es' = snd $ folddup (loop x2 y2) (h, es'') t+            th = ty conf * fromIntegral (width t - 1)+      w = 2 * mx conf + tw                       -- Diagram width+      h = 2 * my conf + th                       -- Diagram height++folddup :: (Bool -> a -> Tree -> a) -> a -> Tree -> a+folddup f z t =+    foldl (f False) (foldl (f True) z (duplicates t)) (children t)++button :: Config -> Float -> Float -> Bool -> Tree -> Element+button conf x y dup t =+    kbutton conf x y kind (label (vertex t))+    where+      kind =+          case (alive t, dup) of+            (True, False) -> AliveTree+            (True, True) -> AliveDup+            (False, False) -> DeadTree+            (False, True) -> DeadDup
+ src/CPSA/Graph/XMLOutput.hs view
@@ -0,0 +1,88 @@+-- Simple support for generating XML++-- This package assumes that the body of an element is either CDATA or+-- a sequence of elements.  An element is showable.++-- 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.Graph.XMLOutput (Attribute, Element, mc, ec, props) where++import CPSA.Lib.CPSA++type Attribute = (String, String)++data Element+    = M String [Attribute] String    -- Mixed content (just CDATA)+    | E String [Attribute] [Element] -- Element content++-- Build an element that contains CDATA (mixed content)++mc :: String -> [Attribute] -> String -> Element+mc = M++-- Build an element that contains only elements (element content)++ec :: String -> [Attribute] -> [Element] -> Element+ec = E++instance Show Element where+    showsPrec _ element = pr 72 (pretty 1 element)++pretty :: Int -> Element -> Pretty+pretty indent (M name attrs "") = start indent name attrs [str "/>"]+pretty indent (E name attrs []) = start indent name attrs [str "/>"]+pretty indent (M name attrs body) =+    start indent name attrs (str ">" : str (quote body []) : close name)+pretty indent (E name attrs body) =+    start indent name attrs (str ">" : contents body)+    where+      contents [] = brk 0 : close name+      contents (e:es) = brk 0 : pretty indent e : contents es++start :: Int -> String -> [Attribute] -> [Pretty] -> Pretty+start indent name attrs rest =+    blo indent (str "<" : str name : attributes attrs rest)++attributes :: [Attribute] -> [Pretty] -> [Pretty]+attributes [] tail = tail+attributes (attr:attrs) tail =+    brk 1 : blo 0 (attribute attr (loop attrs)) : tail+    where                       -- Attributes can be+      loop [] = []              -- vertically aligned+      loop (attr:attrs) = brk 1 : attribute attr (loop attrs)++attribute :: Attribute -> [Pretty] -> [Pretty]+attribute (key, value) tail =+    str key : str "='" : str (quote value []) : str "'" : tail++close :: String -> [Pretty]+close name = [str "</", str name, str ">"]++-- Quote mixed content and attribute values+quote :: String -> ShowS+quote [] = id+quote ('<':cs) = showString "&lt;" . quote cs+quote ('>':cs) = showString "&gt;" . quote cs+quote ('&':cs) = showString "&amp;" . quote cs+quote ('"':cs) = showString "&quot;" . quote cs+quote ('\'':cs) = showString "&apos;" . quote cs+quote (c:cs) = showChar c . quote cs++-- Support for CSS properties++props :: [Attribute] -> String+props [] = ""+props (p:ps) =+    prop p (propl ps "")+    where+      propl [] = id+      propl (p:ps) = showChar ' ' . prop p . propl ps++prop :: Attribute -> ShowS+prop (key, value) =+    showString key . showString ": " .+    showString value . showChar ';'
+ src/CPSA/Lib/Algebra.hs view
@@ -0,0 +1,185 @@+-- Defines the interface to CPSA algebras++-- 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.++{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}++module CPSA.Lib.Algebra where++import Data.Set (Set)+import CPSA.Lib.SExpr++-- Algebras++-- This class collects all the types that make up an algebra.+-- Non-algebra specific types should use this type class in their+-- context, and not any of the others in this module.++class (Term t, Place t p, Gen t g, Subst t g s,+       Env t g s e, Context t g s e c) =>+    Algebra t p g s e c++-- Terms++class (Ord t, Show t) => Term t where+    isVar :: t -> Bool          -- Is term a variable in the algebra?+    isBaseTerm :: t -> Bool     -- Is the sort of this term a base sort?++    -- Does a term occur in another term?+    occursIn :: t -> t -> Bool++    -- Check to see if a list of terms is well-formed.+    termsWellFormed :: [t] -> Bool++    -- Fold a function through a term applying it to each variable in+    -- the term.+    foldVars :: (a -> t -> a) -> a -> t -> a++    -- Fold a function through a term applying it to each term carried+    -- by the term.+    foldCarriedTerms :: (a -> t -> a) -> a -> t -> a++    -- Is a term carried by another term?  In other words, does the+    -- possession of the appropriate keys allow the term to be+    -- extracted from the other term?+    carriedBy :: t -> t -> Bool++    -- Returns the key used to decrypt an encryption term, otherwise+    -- Nothing.+    decryptionKey :: t -> Maybe t++    -- decompose outpred avoid returns minimum sets required to+    -- determine if a term is penetrator derivable, where outpred is a+    -- set of previously sent messages and avoid is an avoidance set.+    -- An atom in the avoidance set cannot be guess by the penetrator,+    -- except when it is exposed in the sent terms.+    decompose :: Set t -> Set t -> (Set t, Set t)++    -- buildable outpred avoid term is true when the penetrator can+    -- derive the term given a minimum previously sent message set and+    -- an avoidance set, as computed using the decompose function.+    buildable :: Set t -> Set t -> t -> Bool++    -- encryptions term returns a list of encryptions carried by the+    -- term, each with the key used to prepare it, with duplicates+    -- eliminated.  Encryptions that occur in other encryption are+    -- later in the list.+    encryptions :: t -> [(t,t)]++    -- protectors derivable target source returns Nothing if target is+    -- carried by the source outside of an encryption, where derivable+    -- is used to determine if a decryption key can be used to expose+    -- the target.  Otherwise, it returns the list of encryptions in+    -- the source that carry the target and have underivable+    -- decryption keys, with duplicates eliminated.  If two+    -- encryptions protect the target, only the outside one is+    -- returned.  The inside encryption is the one that is carried by+    -- the outside encryption.+    protectors :: (t -> Bool) -> t -> t -> Maybe [t]++    -- The next two functions are used to perform a dataflow analysis+    -- of a trace.  The analysis finds minimal sets of atoms that+    -- must be available initially to complete a run of the trace.++    -- The algebra specific part of the analysis focuses on a term+    -- used to send or receive a message.  Each term is analyzed in+    -- the context of two sets of terms.  A Flow t is a pair of sets+    -- of terms (initial, available).  The first set contains the base+    -- terms initially available.  The second set contains the terms+    -- currently available.  The analysis of a term produces the set+    -- of pairs the reflect the possible extensions associated with+    -- sending or receiving the term.+    outFlow, inFlow :: t -> Flow t -> Set (Flow t)++    -- Given a list of variables, load a term from an S-expression.+    loadTerm :: Monad m => [t] -> SExpr Pos -> m t++-- A parameter flow analysis is performed using a pair of sets of terms+type Flow t = (Set t, Set t)++-- The place at which a term occurs in another term++class (Term t, Show p) => Place t p | t -> p, p -> t where+    -- places variable source returns a list of places at which the+    -- variable occurs in the term.+    places :: t -> t -> [p]+    -- carriedPlaces target source returns a list of places at which+    -- the target is carried in the term.+    carriedPlaces :: t -> t -> [p]+    -- replace variable place source returns the term that results from+    -- replacing the variable at the give place in the source term.+    replace :: t -> p -> t -> t+    -- ancestors source place extracts the terms in the source that+    -- contain the term at the given place.+    ancestors :: t -> p -> [t]++-- Generation of terms with fresh variables.++class (Term t, Show g) => Gen t g | t -> g, g -> t where+    -- The starting generator.+    origin :: g++    -- Given a generator, generate a clone of a term in which each+    -- variable has been replaced by a variable that has never been+    -- generated by the generator.+    clone :: g -> t -> (g, t)++    -- Given a generator, load a list of variables or return an error+    -- message.  Each element of the list is an identifier and a sort.+    -- The varibles are returned in the reverse order.+    loadVars :: Monad m => g -> [SExpr Pos] -> m (g, [t])++-- Substitutions++-- A substitution is a map from variables to terms.  Two terms unify+-- if there is a substitution, that when applied to both terms,+-- produces the same term.+class (Term t, Gen t g, Ord s, Show s) => Subst t g s | t -> s, s -> t where+    emptySubst :: s+    substitute :: s -> t -> t+    unify :: t -> t -> (g, s) -> Maybe (g, s)+    compose :: s -> s -> s+    moreGeneral :: (g, s) -> (g, s) -> Bool  -- more general than relation+    -- (g0, s0) `moreGeneral` (g1, s1) if s1 = compose s2 s0 for some s2++-- Environments++-- An environment is a partial map from variables to terms.  It is+-- used to relate the variables in a role to ones in an instance of+-- the role, and for other tasks involving matching.+class (Term t, Gen t g, Subst t g s, Ord e, Show e) => Env t g s e+    | t -> e, e -> t where+    emptyEnv :: e+    instantiate :: e -> t -> t+    match :: t -> t -> (g, e) -> Maybe (g, e)+    -- Can environment be refined so it is idempotent when applied to+    -- some terms?+    idempotentEnvFor :: (g, e) -> [t] -> Maybe (g, e)+    -- Cast an environment into a substitution+    substitution :: e -> s+    -- Provide a concrete representation of an environment as an+    -- association list.  The first argument is a list of variables+    -- that make up the domain of the environment.+    reify :: [t] -> e -> [(t, t)]+    -- Is match a one-to-one variable-to-variable map?  This function+    -- is used while testing if two skeletons are isomorphic.+    matchRenaming :: (g, e) -> Bool++-- Display contexts--maps from variables to their printed representation.++class (Term t, Gen t g, Subst t g s, Env t g s e, Show c) => Context t g s e c+    | t -> c, c -> t where+    emptyContext :: c             -- The initial context+    addToContext :: c -> [t] -> c -- Add to context from some terms+    displayVars :: c -> [t] -> [SExpr ()]+    displayTerm :: c -> t -> SExpr ()+    -- A substitution display routine is required due to the fact that+    -- the sort of some variables in the substitition might not be+    -- known.  For the purposes of displaying the substitition, enough+    -- sort information can be inferred.  For displaySubst, there may+    -- be variables in the substitution that are not in the context.+    displaySubst :: c -> s -> [SExpr ()]
+ src/CPSA/Lib/CPSA.hs view
@@ -0,0 +1,32 @@+-- Types and functions used to construct an implementation of an+-- algebra.++-- Each algebra provides an instance of each type class in the Algebra+-- module, and exports its name, and its starting variable generator.++-- module CPSA.????.Loader (name, origin) where+-- import qualified CPSA.Lib.CPSA as C+-- import CPSA.Lib.CPSA (SExpr(..), Pos, annotation)++-- The algebra is made available for use by adding the name origin+-- pair to the association list in CPSA.Lib.Main.++-- 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.Lib.CPSA (module CPSA.Lib.Utilities,+                      module CPSA.Lib.SExpr,+                      module CPSA.Lib.Printer,+                      module CPSA.Lib.Pretty,+                      module CPSA.Lib.Algebra,+                      Event (..), flow) where++import CPSA.Lib.Utilities+import CPSA.Lib.SExpr+import CPSA.Lib.Pretty+import CPSA.Lib.Printer+import CPSA.Lib.Algebra+import CPSA.Lib.Protocol(Event (..), flow)
+ src/CPSA/Lib/Cohort.hs view
@@ -0,0 +1,525 @@+-- Computes the cohort associated with a skeleton or its generalization++-- 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.Lib.Cohort (reduce, unrealized) where++import Control.Monad+import qualified Data.Set as S+import Data.Set (Set)+import qualified Data.List as L+import Data.Maybe+import CPSA.Lib.Algebra+import CPSA.Lib.Protocol+import CPSA.Lib.Strand++{-- Debugging support+import System.IO.Unsafe+import qualified CPSA.Lib.Utilities as U++z :: Show a => a -> b -> b+z x y = seq (unsafePerformIO (print x)) y++zz :: Show a => a -> a+zz x = z x x++zn :: Show a => a -> Maybe b -> Maybe b+zn x Nothing = z x Nothing+zn _ y = y++zf :: Show a => a -> Bool -> Bool+zf x False = z x False+zf _ y = y++zt :: Algebra t p g s e c => t -> String+zt t =+    show (displayTerm (addToContext emptyContext [t]) t)++zs :: Algebra t p g s e c => Set t -> String+zs s =+    show $ map (displayTerm (addToContext emptyContext ts)) ts+    where+      ts = S.toList s++zi :: Algebra t p g s e c => Instance t p g s e c -> String+zi inst =+    show (map f e)+    where+      domain = rvars (role inst)+      e = reify domain (env inst)+      range = map snd e+      f (x, t) = (displayTerm (context domain) x,+                  displayTerm (context range) t)+      context ts = addToContext emptyContext ts+--}++derivable :: Algebra t p g s e c => Set t -> Set t -> t -> Bool+derivable avoid sent term =+    let (knowns, unknowns) = decompose sent avoid in+    buildable knowns unknowns term++-- Returns the nodes in a preskeleton that are not realized.+unrealized :: Algebra t p g s e c => Preskel t p g s e c -> [Node]+unrealized k =+    foldl unrealizedInStrand [] (strands k)+    where+      (a, _) = avoid k+      unrealizedInStrand acc s =+          fst $ foldl unrealizedInNode (acc, S.empty) (nodes s)+      unrealizedInNode (acc, ns) n =+          case event n of+            Out _ -> (acc, ns)+            In t ->+                let ns' = addSendingBefore ns n+                    ts = S.map (evtTerm . event) ns' in+                case derivable a ts t of+                  True -> (acc, ns')+                  False -> (graphNode n : acc, ns')++addSendingBefore :: Algebra t p g s e c => Set (Vertex t p g s e c) ->+                    Vertex t p g s e c  -> Set (Vertex t p g s e c)+addSendingBefore s n =+    foldl addSending s (preds n)+    where+      addSending s n+        | S.member n s = s+        | otherwise = addSendingBefore (addIfSending s n) n+      addIfSending s n =+          case event n of+            In _ -> s+            Out _ -> S.insert n s++-- Returns that atoms that cannot be guess when determining if a+-- term is derivable from some other terms, and the atoms that+-- uniquely originate in this skeleton.+avoid :: Algebra t p g s e c => Preskel t p g s e c -> (Set t, [t])+avoid k =+    (S.union (S.fromList (knon k)) (S.fromList u), u)+    where+      u = uniqOrig k++-- Suppose k --v,t-> k', where k |-pi,sigma-> k'.  Let t'=sigma(t),+-- T=sigma(esc(k, v, t)), and t"=msg(k', pi(v)).  Term t is solved in+-- k' from k at v if:+--+-- 1. t' is carried only within T in t", or+--+-- 2. for some t in outpred(k', pi(v)), t' is not carried only within+--    T in t, or+--+-- 3. the decryption key for an element of T is derivable, or+--+-- 4. t' is an encryption and the encryption key for t' is derivable.+solved :: Algebra t p g s e c => t -> Maybe t -> Set t ->+          Preskel t p g s e c -> Node -> s -> Bool+solved ct ek escape k (s, p) subst =+    carriedOnlyWithin ct' escape' t ||+    any (not . carriedOnlyWithin ct' escape') (S.toList ts) ||+    any (maybe False (derivable a ts) . decryptionKey) (S.toList escape') ||+    maybe False (derivable a ts) ek+    where+      v = nodes (strands k !! s) !! p -- Look up vertex in k+      t = evt id err (event v)        -- Term at v+      err = const $ error "Cohort.solved: got an outbound term"+      ct' = substitute subst ct       -- Mapped critical term+      escape' = S.map (substitute subst) escape+      vs = addSendingBefore S.empty v+      ts = S.map (evtTerm . event) vs -- Outbound predecessors+      (a, _) = avoid k++-- This switch controls the use of solved filtering.+useSolvedFilter :: Bool+useSolvedFilter = True++maybeSolved :: Algebra t p g s e c => t -> Maybe t -> Set t ->+               Preskel t p g s e c -> Node -> s -> Bool+maybeSolved ct ek escape k n subst =+    not useSolvedFilter || solved ct ek escape k n subst++-- Abort if there is an unrealized node without a test, otherwise+-- return a list of skeletons that solve one test.  If the skeleton is+-- realized, try to generalize it, but only when noIsoChk is false.+reduce :: Algebra t p g s e c => Bool -> Preskel t p g s e c ->+          [Preskel t p g s e c]+reduce noIsoChk k =+    firstJust (map (testStrand k u a) ss)+                  (whenRealized k) -- Skeleton is realized+    where+      ss = reverse (strands  k) -- Visit recently added strands first+      (a, u) = avoid k+      whenRealized k = if noIsoChk then [] else realizedReductions k++-- These reductions use isomorphism checking.+realizedReductions :: Algebra t p g s e c => Preskel t p g s e c ->+                      [Preskel t p g s e c]+realizedReductions k =+    let ks = maximize k in+    if null ks then             -- If k is a shape, collapse it+        collapse k+    else                        -- else generalize it+        ks++-- Returns the first Just value in a list or the default when there is+-- none.+firstJust :: [Maybe a] -> a -> a+firstJust [] x = x+firstJust (Just x : _) _ = x+firstJust (Nothing : xs) x = firstJust xs x++-- Look for a test node in a strand+testStrand :: Algebra t p g s e c => Preskel t p g s e c ->+              [t] -> Set t -> Strand t p g s e c ->+              Maybe [Preskel t p g s e c]+testStrand k u a s =+    loop S.empty (nodes s)+    where+      loop _ [] = Nothing+      loop ns (n : nodes) =+          case event n of+            Out _ -> loop ns nodes+            In t ->+                let ns' = addSendingBefore ns n+                    ts = S.map (evtTerm . event) ns'+                    (ts', a') = decompose ts a+                    der = buildable ts' a' in -- Derivable before node+                if der t then+                    loop ns' nodes+                else+                    Just $ testNode k u ts der (graphNode n) t++-- Look for a critical term that makes this node a test node.+testNode :: Algebra t p g s e c => Preskel t p g s e c ->+            [t] -> Set t -> (t -> Bool) -> Node -> t ->+            [Preskel t p g s e c]+testNode k u ts derivable n t =+    loop cts+    where+      loop [] = error ("Cohort.testNode missing test at " ++ show n)+      loop ((ct, ek) : cts) =+          case escapeSet ts derivable ct of+            Nothing -> loop cts+            Just escape ->+                if carriedOnlyWithin ct escape t then+                    loop cts+                else+                    solveNode k ct ek n t escape+      cts = map g (filter h (encryptions t)) +++            map f (filter (flip carriedBy t) u)+      f ct = (ct, Nothing)+      g (ct, ek) = (ct, Just ek)+      h (_, ek) = not (derivable ek)++-- Compute the escape set+escapeSet :: Algebra t p g s e c => Set t ->+             (t -> Bool) -> t -> Maybe (Set t)+escapeSet ts derivable ct =+    foldM f S.empty (S.toList ts)+    where+      f e t =+          do+            es <- protectors derivable ct t+            return (foldl (flip S.insert) e es)++carriedOnlyWithin :: Algebra t p g s e c => t -> Set t -> t -> Bool+carriedOnlyWithin target escape source =+    existsOnAllPathsToTarget (flip S.member escape) target source++-- existsOnAllPathsToTarget pred target source is true if the+-- predicate is true for some term on a path for every path from the+-- source to the target+existsOnAllPathsToTarget :: Algebra t p g s e c =>+                            (t -> Bool) -> t -> t -> Bool+existsOnAllPathsToTarget pred target source =+    all (any pred) (map (ancestors source) (carriedPlaces target source))++solveNode :: Algebra t p g s e c => Preskel t p g s e c ->+             t -> Maybe t -> Node -> t -> Set t ->+             [Preskel t p g s e c]+solveNode k ct ek n t escape =+    cons ++ augs ++ cwos ++ lsns+    where+      cons = contractions k ct ek n t escape cause+      augs = augmentations  k ct ek n escape cause+      cwos =+          if useContractionsWithOrdering then+              contractionsWithOrdering k ct ek n escape cause+          else+              []+      lsns = addListeners k ct ek n t escape cause+      cause = Cause (dir ek) n ct escape++useContractionsWithOrdering :: Bool+useContractionsWithOrdering = False++-- Contractions++contractions :: Algebra t p g s e c => Preskel t p g s e c ->+                t -> Maybe t -> Node -> t -> Set t ->+                Cause t p g s e c -> [Preskel t p g s e c]+contractions k ct ek n t escape cause =+    [ k | subst <- mgus $ cows ct escape t (gen k, emptySubst),+          (k, n, subst') <- maybeToList $ contract k n cause subst,+          maybeSolved ct ek escape k n subst' ]++cows :: Algebra t p g s e c => t -> Set t -> t -> (g, s) -> [(g, s)]+cows ct escape t subst =+    if carriedOnlyWithin ct escape t then+        [subst]+    else+        concatMap f (cowf ct escape t [subst])+        where+          f (gen, subst) =+              let ct' = substitute subst ct+                  escape' = S.map (substitute subst) escape+                  t' = substitute subst t in+              cows ct' escape' t' (gen, subst)++cowf :: Algebra t p g s e c => t -> Set t -> t -> [(g, s)] -> [(g, s)]+cowf ct escape t substs =+    foldl f substs (carriedPlaces ct t)+    where+      f substs p =+          [ s |+            a <- ancestors t p,+            e <- S.toList escape,+            subst <- substs,+            s <- maybeToList $ unify a e subst ]++useMguFilter :: Bool+useMguFilter = True++-- Filter out non-most general unifiers+mgus :: Algebra t p g s e c => [(g, s)] -> [(g, s)]+mgus substs =+    if useMguFilter then+        loop substs []+    else+        substs+    where+      loop [] acc = acc+      loop (subst : substs) acc+          | any (f subst) substs || any (f subst) acc =+              loop substs acc+          | otherwise = loop substs (subst : acc)+      f subst subst' = moreGeneral subst' subst++{-+-- Given finite maps f and g, find all maps h such that f = h o g+-- -1 is a map is the wildcard.++maps :: [Int] -> [Int] -> Maybe [Int]+maps f g =+    loop f g [] (-1)++loop :: [Int] -> [Int] -> [(Int, Int)] -> Int -> Maybe [Int]+loop [] [] h n =+    return $ map (maybe (-1) id . flip lookup h) (nats (n + 1))+loop (x:xs) (y:ys) h n =+    case lookup y h of+      Nothing -> loop xs ys ((y,x) : h) (max y n)+      Just x' | x' == x -> loop xs ys h n+              | otherwise -> Nothing+loop _ _ _ _ = Nothing+-}++dir :: Maybe a -> Direction+dir Nothing = Nonce+dir _ = Encryption++-- Augmentations++augmentations :: Algebra t p g s e c => Preskel t p g s e c ->+                t -> Maybe t -> Node -> Set t ->+                Cause t p g s e c -> [Preskel t p g s e c]+augmentations k ct ek n escape cause =+    [ k' | r <- roles (protocol k),+           k' <- roleAugs k ct ek n escape cause r ]++roleAugs :: Algebra t p g s e c => Preskel t p g s e c ->+            t -> Maybe t -> Node -> Set t -> Cause t p g s e c ->+            Role t p g s e c -> [Preskel t p g s e c]+roleAugs k ct ek n escape cause role =+    [ k' | (subst', inst) <- transformingNode ct escape role subst,+           (k', n', subst'') <-+               maybeToList $ augment k n cause role subst' inst,+           maybeSolved ct ek escape k' n' subst'' ]+    where+      subst = cloneRoleVars (gen k) role++-- Generate a fresh set of role variables+cloneRoleVars :: Algebra t p g s e c => g -> Role t p g s e c -> (g, s)+cloneRoleVars gen role =+    grow (rvars role) gen emptySubst+    where+      grow [] gen subst = (gen, subst)+      grow (t : ts) gen subst =+          let (gen', t') = clone gen t in+          case unify t t' (gen', subst) of+            Nothing -> error "Cohort.grow: Internal error"+            Just (gen'', subst') -> grow ts gen'' subst'++transformingNode :: Algebra t p g s e c => t -> Set t ->+                    Role t p g s e c -> (g, s) ->+                    [((g, s), Instance t p g s e c)]+transformingNode ct escape role subst =+    loop 1 [] [] (rtrace role)+    where+      targets = S.toList (targetTerms ct escape)+      -- loop height past acc trace+      loop _ _ acc [] = acc+      loop ht past acc (In t : c) =+          loop (ht + 1) (In t : past) acc c+      loop ht past acc (Out t : c) =+          loop (ht + 1) (Out t : past) acc' c+          where+            substs = carriedBindings targets t subst+            substs' =+                if useMguFilter then+                    concat [ mgus $ cowt ct escape past [s] | s <- substs]+                else+                    cowt ct escape past substs+            acc' = maybeAug ct escape role ht substs' acc t++-- Terms considered for binding with the carried terms in an outbound+-- term.+targetTerms :: Algebra t p g s e c => t -> Set t -> Set t+targetTerms ct escape =+    S.difference (S.fold f (S.singleton ct) escape) escape+    where+      f t ts =+          foldl (flip S.insert) ts+                (concatMap (ancestors t) (carriedPlaces ct t))++-- Find bindings for terms in the test.+carriedBindings :: Algebra t p g s e c => [t] -> t -> (g, s) -> [(g, s)]+carriedBindings targets outbound subst =+    [ s |+      subterm <- S.toList (foldCarriedTerms (flip S.insert) S.empty outbound),+      target <- targets,+      s <- maybeToList $ unify subterm target subst ]++-- Ensure the critical term is carried only within the escape set of+-- every term in the past using cows.+cowt :: Algebra t p g s e c => t -> Set t ->+        Trace t p g s e c -> [(g, s)] -> [(g, s)]+cowt _ _ [] substs = substs+cowt ct escape (evt : c) substs =+    cowt ct escape c (concatMap f substs)+    where+      f (gen, subst) =+          let ct' = substitute subst ct+              escape' = S.map (substitute subst) escape+              t' = substitute subst (evtTerm evt) in+          cows ct' escape' t' (gen, subst)++-- If the outbound term is carried only within, no transforming node+-- was found, otherwise, add a candidate augmentation to the+-- accumulator.+maybeAug :: Algebra t p g s e c => t -> Set t ->+            Role t p g s e c -> Int -> [(g, s)] ->+            [((g, s), Instance t p g s e c)] -> t ->+            [((g, s), Instance t p g s e c)]+maybeAug ct escape role ht substs acc t =+    foldl f acc $ L.filter testNotSolved substs+    where+      testNotSolved (_, subst) =+          not $ carriedOnlyWithin+                  (substitute subst ct)+                  (S.map (substitute subst) escape)+                  (substitute subst t)+      f acc (gen, subst) =+          maybe acc (\(gen, inst) -> ((gen, subst), inst) : acc) inst'+          where+            inst' = bldInstance role itrace gen+            itrace = map (evtMap $ substitute subst) (take ht (rtrace role))++-- Contractions with an ordering++contractionsWithOrdering :: Algebra t p g s e c => Preskel t p g s e c ->+                            t -> Maybe t -> Node -> Set t ->+                            Cause t p g s e c -> [Preskel t p g s e c]+contractionsWithOrdering k ct ek n escape cause =+    [ k' | (n', t, past) <- copresent k n,+           subst <- carriedBindings targets t (gen k, emptySubst),+           subst' <-  mgus $ cowp ct escape past [subst],+           testNotSolved t subst',+           (k', n'', subst'') <-+               maybeToList $ contractAndOrder k n cause subst' n',+           maybeSolved ct ek escape k' n'' subst'' ]+    where+      targets = S.toList (targetTerms ct escape)+      testNotSolved t (_, subst) =+          not $ carriedOnlyWithin+                  (substitute subst ct)+                  (S.map (substitute subst) escape)+                  (substitute subst t)++cowp :: Algebra t p g s e c => t -> Set t ->+        [t] -> [(g, s)] -> [(g, s)]+cowp _ _ [] substs = substs+cowp ct escape (t : ts) substs =+    cowp ct escape ts (concatMap f substs)+    where+      f (gen, subst) =+          let ct' = substitute subst ct+              escape' = S.map (substitute subst) escape+              t' = substitute subst t in+          cows ct' escape' t' (gen, subst)++-- Listener augmentations++addListeners :: Algebra t p g s e c => Preskel t p g s e c ->+                t -> Maybe t -> Node -> t -> Set t ->+                Cause t p g s e c -> [Preskel t p g s e c]+addListeners k ct ek n t escape cause =+    [ k' | t' <- filter (/= t) (S.toList (escapeKeys ek escape)),+           (k', n', subst) <- maybeToList $ addListener k n cause t',+           maybeSolved ct ek escape k' n' subst ]++escapeKeys :: Algebra t p g s e c => Maybe t -> Set t -> Set t+escapeKeys ek escape =+    S.fold f e escape+    where+      f e s = maybe s (flip S.insert s) (decryptionKey e)+      e = maybe S.empty S.singleton ek++-- Maximize a realized skeleton if possible++maximize :: Algebra t p g s e c => Preskel t p g s e c ->+            [Preskel t p g s e c]+maximize k =+    loop (generalize k)         -- Generalize generates candidates+    where+      loop [] = []              -- Realized skeleton k is a shape+      loop ((k', mapping) : rest) =+          case specialization k k' mapping of -- Test a candidate+            Nothing -> loop rest   -- Not a specialization, try again+            Just k' -> [k']        -- Found a more minimal skeleton++-- Test to see if realized skeleton k is a specialization of+-- preskeleton k' using the given strand mapping.  Returns the+-- skeleton associated with k' if it refines k.++specialization :: Algebra t p g s e c => Preskel t p g s e c ->+                  Preskel t p g s e c -> [Sid] ->+                  Maybe (Preskel t p g s e c)+specialization k k' mapping+    | not (preskelWellFormed k') = Nothing+    | otherwise =+        do+          k'' <- toSkeleton False k'+          case realized k'' && gist k /= gist k'' &&+               refines k'' (pov k'') (prob k'') &&+               refines k (Just k') mapping of+            True -> Just k''+            False -> Nothing+        where+          realized = null . unrealized+          refines _ Nothing _ =+              error "Cohort.specialization: cannot find point of view"+          refines k (Just k') mapping =+              maybe False (const True) (homomorphism k' k mapping)
+ src/CPSA/Lib/Displayer.hs view
@@ -0,0 +1,171 @@+-- Displayer for protocols and preskeletons++-- 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.Lib.Displayer (displayProt, displayPreskel, displayNode) where++import qualified Data.List as L+import qualified Data.Set as S+import CPSA.Lib.SExpr+import CPSA.Lib.Algebra+import CPSA.Lib.Protocol+import CPSA.Lib.Strand++-- Display of protocols++displayProt :: Algebra t p g s e c => Prot t p g s e c -> SExpr ()+displayProt p =+    L () (S () "defprotocol" : S () (pname p) : S () (alg p) : rs)+    where+      rs = foldl f (pcomment p) (reverse (roles p))+      f rs r = displayRole r : rs++displayRole :: Algebra t p g s e c => Role t p g s e c -> SExpr ()+displayRole r =+    L () (S () "defrole" :+          S () (rname r) :+          L () (S () "vars" : displayVars ctx vars) :+          L () (S () "trace" : displayTrace ctx (rtrace r)) :+          displayOptional "non-orig" (displayLenTerms ctx (rnon r))+          (displayOptional "uniq-orig" (displayTerms ctx (runique r))+           (rcomment r)))+    where+      ctx = varsContext vars+      vars = rvars r++varsContext :: Algebra t p g s e c => [t] -> c+varsContext vars =+    addToContext emptyContext vars++displayTerms :: Algebra t p g s e c => c -> [t] -> [SExpr ()]+displayTerms ctx ts = map (displayTerm ctx) (L.sort ts)++displayLenTerms :: Algebra t p g s e c => c -> [(Maybe Int, t)] -> [SExpr ()]+displayLenTerms ctx ts = map (displayLenTerm ctx) (L.sort ts)++displayLenTerm :: Algebra t p g s e c => c -> (Maybe Int, t) -> SExpr ()+displayLenTerm ctx (Nothing, t) = displayTerm ctx t+displayLenTerm ctx (Just len, t) = L () [N () len, displayTerm ctx t]++displayOptional :: String -> [SExpr ()] -> [SExpr ()] -> [SExpr ()]+displayOptional _ [] rest = rest+displayOptional key value rest =+    L () (S () key : value) : rest++displayTrace :: Algebra t p g s e c => c ->+                Trace t p g s e c -> [SExpr ()]+displayTrace ctx trace =+    map displayDt trace+    where+      displayDt (In t) = L () [S () "recv", displayTerm ctx t]+      displayDt (Out t) = L () [S () "send", displayTerm ctx t]++-- Display of preskeletons++displayPreskel :: Algebra t p g s e c => Preskel t p g s e c ->+                  [SExpr ()] -> SExpr ()+displayPreskel k rest =+    L () (S () "defskeleton" :+          S () (pname (protocol k)) :+          L () (S () "vars" : displayVars ctx (L.sort vars)) :+          foldr f (displayRest k ctx rest) (insts k))+    where+      ctx = varsContext vars+      vars = kvars k+      f i rest = displayInst ctx i : rest++-- Display the remainder of a preskeleton+displayRest :: Algebra t p g s e c => Preskel t p g s e c ->+               c -> [SExpr ()] -> [SExpr ()]+displayRest k ctx rest =+    displayOptional "precedes" (displayOrdering (orderings k))+     (displayOptional "non-orig" (displayTerms ctx (knon k))+      (displayOptional "uniq-orig" (displayTerms ctx (kunique k))+       (kcomment k +++        (displayOperation k ctx+         (displayOptional "traces" traces rest)))))+    where+      traces = map (L () . displayTrace ctx . trace) (insts k)++displayInst :: Algebra t p g s e c => c ->+               Instance t p g s e c -> SExpr ()+displayInst ctx s =+    case listenerTerm s of+      Just t -> L () [S () "deflistener", displayTerm ctx t]+      Nothing ->+          L () (S () "defstrand" :+                S () (rname r) :+                N () (height s) :+                map (displayMaplet rctx ctx) maplets)+          where+            r = role s+            domain = rvars r+            maplets = L.sort (reify domain (env s))+            rctx = varsContext domain++displayMaplet :: Algebra t p g s e c => c -> c -> (t, t) -> SExpr ()+displayMaplet domain range (x, t)=+    L () [displayTerm domain x, displayTerm range t]++displayOrdering :: [Pair] -> [SExpr ()]+displayOrdering orderings =+    map displayPair (L.sort orderings)++displayPair :: Pair -> SExpr ()+displayPair (n0, n1) =+    L () [displayNode n0, displayNode n1]++displayNode :: Node -> SExpr ()+displayNode (s, p) = L () [N () s, N () p]++-- Display the reason the preskeleton was created+displayOperation :: Algebra t p g s e c => Preskel t p g s e c ->+                    c -> [SExpr ()] -> [SExpr ()]+displayOperation k ctx rest =+    case operation k of+      New -> rest+      Contracted subst cause ->+          let substitution = displaySubst ctx subst in+          displayCause (L () (S () "contracted" : substitution)) cause+      AddedOrdering node cause ->+          displayCause (L () [S () "added-ordering", displayNode node]) cause+      AddedStrand role height cause ->+          displayCause+	  (L () [S () "added-strand", S () role, N () height]) cause+      AddedListener t cause ->+          displayCause (L () [S () "added-listener", displayOpTerm ctx t]) cause+      Generalized method ->+          let desc = displayMethod ctx method in+          L () (S () "operation" : S () "generalization" : desc) : rest+      Collapsed s s' ->+          let desc = [N () s, N () s'] in+          L () (S () "operation" : S () "collapsed" : desc) : rest+    where+      displayCause op (Cause dir node critical escape) =+          L () (S () "operation" :+                displayDirection dir :+                op :+                displayOpTerm ctx critical :+                displayNode node :+                displayOpTerms ctx (S.toList escape)) : rest+      displayDirection Encryption = S () "encryption-test"+      displayDirection Nonce = S () "nonce-test"+      displayMethod _ (Deleted node) =+          [S () "deleted", displayNode node]+      displayMethod _ (Weakened (n0, n1)) =+          [S () "weakened", L () [displayNode n0, displayNode n1] ]+      displayMethod ctx (Separated t) =+          [S () "separated", displayOpTerm ctx t]+      displayMethod ctx (Forgot t) =+          [S () "forgot", displayOpTerm ctx t]++-- Terms in the operation field may contain variables not in the skeleton+displayOpTerm :: Algebra t p g s e c => c -> t -> SExpr ()+displayOpTerm ctx t = displayTerm (addToContext ctx [t]) t++displayOpTerms :: Algebra t p g s e c => c -> [t] -> [SExpr ()]+displayOpTerms ctx ts = map (displayTerm (addToContext ctx ts)) (L.sort ts)
+ src/CPSA/Lib/Entry.hs view
@@ -0,0 +1,220 @@+-- A common entry point for programs based on the CPSA library++-- 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.Lib.Entry (start, usage, abort, success, algOptions,+                       algInterp, filterOptions, filterInterp,+                       readSExpr, outputHandle, defaultMargin,+                       writeSExpr, writeLnSEexpr, cpsaVersion,+                       comment, writeComment) where++import Numeric+import System.IO+import System.IO.Error+import System.Environment+import System.Console.GetOpt+import System.Exit+import Data.Version+import Paths_cpsa+import CPSA.Lib.SExpr+import CPSA.Lib.Printer++-- Returns the input S-expression and an interpretation of the command+-- line options.+start :: [OptDescr a] -> ([a] -> IO b) -> IO (PosHandle, b)+start options interp =+    do+      argv <- getArgs+      (flags, files) <- opts options argv+      output <- interp flags+      case files of+        [file] ->               -- Input from named file+            do+              input <- openFile file ReadMode+              p <- posHandle file input+              return (p, output)+        [] ->                   -- Input from the standard input+            do+              p <- posHandle "" stdin+              return (p, output)+        _ ->+            do+              msg <- usage options ["too many input files\n"]+              abort msg++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++usage :: [OptDescr a] -> [String] -> IO String  -- Return usage string+usage options errs =+    do+      name <- getProgName+      let header = "Usage: " ++ name ++ " [OPTIONS] [FILE]"+      return (concat errs ++ usageInfo header options)++readSExpr :: PosHandle -> IO (Maybe (SExpr Pos))+readSExpr p =+    do+      x <- try (load p)+      case x of+        Right x ->+            return x+        Left err ->+            abort (ioeGetErrorString err)++-- Options set up for simple filters:++defaultMargin :: Int+defaultMargin = 72++-- Command line option flags+data Flag+    = Help                      -- Help+    | Info                      -- Version information+    | Algebra String            -- Algebra+    | Algebras                  -- Show algebras+    | Margin String             -- Output line length+    | Output String             -- Output file name+      deriving Show++algOptions :: String -> [OptDescr Flag]+algOptions defaultAlgebra =+    [ Option ['o'] ["output"]  (ReqArg Output "FILE")  "output FILE",+      Option ['m'] ["margin"]  (ReqArg Margin "INT")+      ("set output margin (default " ++ show defaultMargin ++ ")"),+      Option ['a'] ["algebra"]  (ReqArg Algebra "STRING")+      ("algebra (default " ++ defaultAlgebra ++ ")"),+      Option ['s'] ["show-algebras"] (NoArg Algebras)  "show algebras",+      Option ['h'] ["help"]    (NoArg Help)          "show help message",+      Option ['v'] ["version"] (NoArg Info)          "show version number" ]++data Params = Params+    { file :: Maybe FilePath,   -- Nothing specifies standard output+      alg :: String,            -- Name of the algebra+      margin :: Int }           -- Output line length+    deriving Show++-- Interpret option flags+algInterp :: String -> [String] -> [Flag] -> IO (Maybe FilePath, String, Int)+algInterp alg algs flags =+    loop flags (Params { file = Nothing, alg = alg, margin = defaultMargin })+    where+      loop [] (Params { file = file, alg = alg, margin = margin}) =+          return (file, alg, margin)+      loop (Output name : flags)  params+          | file params == Nothing =+              loop flags $ params { file = Just name }+      loop (Margin value : flags) params =+          case readDec value of+            [(margin, "")] ->+                loop flags $ params { margin = margin }+            _ ->+                do+                  msg <- usage (algOptions alg) ["Bad value for margin\n"]+                  abort msg+      loop (Algebra name : flags) params+          | elem name algs = loop flags $ params { alg = name }+          | otherwise =+              abort ("Algebra " ++ name ++ " not one of\n" ++ unlines algs)+      loop (Algebras : _) _ =+          success $ unlines algs+      loop (Info : _) _ =+          success cpsaVersion+      loop (Help : _) _ =+          do                    -- Show help then exit with success+            msg <- usage (algOptions alg) []+            success msg+      loop _ _ =+           do                   -- Show help then exit with failure+             msg <- usage (algOptions alg) ["Bad option combination\n"]+             abort msg++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++-- Contruct the output handle specified by the command line.+outputHandle :: Maybe FilePath -> IO (Handle)+outputHandle output =+    case output of+      Nothing -> return stdout+      Just file -> openFile file WriteMode++abort :: String -> IO a         -- Print message then exit with failure+abort msg =+    do+      hPutStrLn stderr msg+      exitFailure++success :: String -> IO a       -- Print message then exit with success+success msg =+    do+      hPutStrLn stderr msg+      exitWith ExitSuccess++-- S-expression pretty print parameters+indent :: Int+indent = 2++writeSExpr :: Handle -> Int -> SExpr a -> IO ()+writeSExpr h margin sexpr =+    hPutStrLn h (pp margin indent sexpr)++writeLnSEexpr :: Handle -> Int -> SExpr a -> IO ()+writeLnSEexpr h margin sexpr =+    do+      hPutStrLn h ""+      writeSExpr h margin sexpr++cpsaVersion :: String+cpsaVersion = showString "CPSA " (showVersion version)++comment :: String -> SExpr ()+comment msg =+    L () [S () "comment", Q () msg]++writeComment :: Handle -> Int -> String -> IO ()+writeComment h margin msg =+    writeSExpr h margin (comment msg)
+ src/CPSA/Lib/Expand.hs view
@@ -0,0 +1,108 @@+-- Expands macros using definitions in the input++-- 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.Lib.Expand (expand) where++import Control.Monad+import CPSA.Lib.CPSA++-- The macroexpand loop limit+limit :: Int+limit = 1000++expand :: Monad m => [SExpr Pos] -> m [SExpr Pos]+expand sexprs =+    do+      (_, sexprs) <- foldM expandSExpr ([], []) sexprs+      return (reverse sexprs)++expandSExpr :: Monad m => ([Macro], [SExpr Pos]) -> SExpr Pos ->+               m ([Macro], [SExpr Pos])+expandSExpr (macs, sexprs) (L pos (S _ "defmacro" : xs)) =+    do                          -- Process a macro definition+      mac <- defmacro pos xs+      return (mac : macs, sexprs)+expandSExpr (macs, sexprs) sexpr =+    do                          -- Process all other S-expressions+      sexpr <- expandAll macs sexpr+      return (macs, sexpr : sexprs)++-- A macro definition is of the form:+--+-- (defmacro (NAME ARG*) BODY)+--+-- where NAME and each ARG is a symbol++data Macro = Macro+    { name :: String,+      args :: [String],+      body :: SExpr Pos }++defmacro :: Monad m => Pos -> [SExpr Pos] -> m Macro+defmacro _ [L _ (name : args), body] =+    do+      name <- symbol name+      args <- mapM symbol args+      return $ Macro { name = name,+                       args = args,+                       body = body}+defmacro pos _ = fail (shows pos "Malformed macro")++symbol :: Monad m => SExpr Pos -> m String+symbol (S _ string) = return string+symbol x = fail (shows (annotation x) "Expecting a symbol")++-- Expand an S-expression using a given set of macros++expandAll :: Monad m => [Macro] -> SExpr Pos -> m (SExpr Pos)+expandAll macs sexpr =+    do+      sexpr <- macroExpand macs (annotation sexpr) limit sexpr+      case sexpr of+        L pos xs ->             -- Expand elements of list+            do+              xs <- mapM (expandAll macs) xs+              return (L pos xs)+        _ -> return sexpr++-- Expand one S-expression limiting the number of expansions.++macroExpand :: Monad m => [Macro] -> Pos ->  Int ->+               SExpr Pos -> m (SExpr Pos)+macroExpand _ pos limit _+    | limit <= 0 = fail (shows pos "Expansion limit exceded")+macroExpand macs pos limit sexpr@(L _ (S _ sym : xs)) =+    case macroExpand1 macs sym xs of+      Nothing -> return sexpr   -- Nothing to do+      Just sexpr -> macroExpand macs pos (limit - 1) sexpr+macroExpand _ _ _ sexpr = return sexpr++-- Expand one macro call or return Nothing++macroExpand1 :: [Macro] -> String -> [SExpr Pos] -> Maybe (SExpr Pos)+macroExpand1 [] _ _ = Nothing+macroExpand1 (mac : macs) sym xs+    | name mac == sym && length (args mac) == length xs =+        Just (apply mac xs)+    | otherwise =+        macroExpand1 macs sym xs++-- Apply a macro to some parameters++apply :: Macro -> [SExpr Pos] -> SExpr Pos+apply mac xs =+    subst (zip (args mac) xs) (body mac)++-- Substitute parameters into the macro body++subst :: [(String, SExpr Pos)] -> SExpr Pos -> SExpr Pos+subst env sexpr@(S _ sym) =+    maybe sexpr id (lookup sym env)+subst env (L pos sexprs) =+    L pos (map (subst env) sexprs)+subst _ sexpr = sexpr
+ src/CPSA/Lib/Loader.hs view
@@ -0,0 +1,422 @@+-- Loader for protocols and preskeletons++-- 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.Lib.Loader (loadSExprs) where++import Control.Monad+import qualified Data.List as L+import Data.Maybe (isJust)+import CPSA.Lib.Utilities+import CPSA.Lib.SExpr+import CPSA.Lib.Algebra+import CPSA.Lib.Protocol+import CPSA.Lib.Strand++{--+import System.IO.Unsafe+z :: Show a => a -> b -> b+z x y = seq (unsafePerformIO (print x)) y+--}++-- Load protocols and preskeletons from a list of S-expressions, and+-- then return a list of preskeletons.  The name of the algebra is+-- nom, and its variable generator is provided.++loadSExprs :: (Algebra t p g s e c, Monad m) => String -> g ->+              [SExpr Pos] -> m [Preskel t p g s e c]+loadSExprs nom origin xs =+    do+      (_, ks) <- foldM (loadSExpr nom origin) ([], []) xs+      return (reverse ks)++loadSExpr :: (Algebra t p g s e c, Monad m) => String -> g ->+             ([Prot t p g s e c], [Preskel t p g s e c]) -> SExpr Pos ->+             m ([Prot t p g s e c], [Preskel t p g s e c])+loadSExpr nom origin (ps, ks) (L pos (S _ "defprotocol" : xs)) =+    do+      p <- loadProt nom origin pos xs+      return (p : ps, ks)+loadSExpr _ _ (ps, ks) (L pos (S _ "defskeleton" : xs)) =+    do+      k <- findPreskel pos ps xs+      return (ps, k : ks)+loadSExpr nom origin (ps, ks) (L pos (S pos' "defpreskeleton" : xs)) =+    loadSExpr nom origin (ps, ks) (L pos (S pos' "defskeleton" : xs))+loadSExpr _ _ (ps, ks) (L _ (S _ "comment" : _)) = return (ps, ks)+loadSExpr _ _ _ x = fail (shows (annotation x) "Malformed input")++-- load a protocol++loadProt :: (Algebra t p g s e c, Monad m) => String -> g ->+            Pos -> [SExpr Pos] -> m (Prot t p g s e c)+loadProt nom origin pos (S _ name : S _ alg : x : xs)+    | alg /= nom =+        fail (shows pos $ "Expecting terms in algebra " ++ nom)+    | otherwise =+        do+          (gen, rs, comment) <- loadRoles origin (x : xs)+          -- Check for duplicate role names+          validate (mkProt name alg gen rs comment) rs+    where+      validate prot [] = return prot+      validate prot (r : rs) =+          case L.find (\r' -> rname r == rname r') rs of+            Nothing -> validate prot rs+            Just _ ->+                let msg = "Duplicate role " ++ rname r +++                          " in protocol " ++ name in+                fail (shows pos msg)+loadProt _ _ pos _ = fail (shows pos "Malformed protocol")++loadRoles :: (Algebra t p g s e c, Monad m) => g -> [SExpr Pos] ->+             m (g, [Role t p g s e c], [SExpr ()])+loadRoles gen (L pos (S _ "defrole" : x) : xs) =+    do+      (gen, r) <- loadRole gen pos x+      (gen, rs, comment) <- loadRoles gen xs+      return (gen, r : rs, comment)+loadRoles gen xs =+    do+      comment <- alist [] xs    -- Ensure remaining is an alist+      return (gen, [], comment)++loadRole :: (Algebra t p g s e c, Monad m) => g -> Pos ->+            [SExpr Pos] -> m (g, Role t p g s e c)+loadRole gen pos (S _ name :+	          L _ (S _ "vars" : vars) :+                  L _ (S _ "trace" : evt : c) :+                  rest) =+    do+      (gen, vars) <- loadVars gen vars+      c <- loadTrace vars (evt : c)+      n <- loadPosBaseTerms vars (assoc "non-orig" rest)+      u <- loadBaseTerms vars (assoc "uniq-orig" rest)+      comment <- alist ["non-orig", "uniq-orig"] rest+      let ts = tterms c+      case termsWellFormed (map snd n ++ u ++ ts) of+        False -> fail (shows pos "Terms in role not well formed")+        True -> return ()+      -- Drop unused variable declarations+      let vs = L.filter (\v->elem v (varsInTerms ts)) vars+      -- Drop rnons that refer to unused variable declarations+      let ns = L.filter (varsSeen vs . snd) n+      -- Drop runiques that refer to unused variable declarations+      let us = L.filter (varsSeen vs) u+      let r = mkRole name vs c ns us comment+      case roleWellFormed r of+        Return () -> return (gen, r)+        Fail msg -> fail (shows pos $ showString "Role not well formed: " msg)+loadRole _ pos _ = fail (shows pos "Malformed role")++data ReturnFail a+    = Return a+    | Fail String++instance Monad ReturnFail where+    return = Return+    Fail l >>= _ = Fail l+    Return r >>= k = k r+    fail s = Fail s++-- Are the vars in t a subset of ones in t.+varsSeen :: Algebra t p g s e c => [t] -> t -> Bool+varsSeen vs t =+    all (flip elem vs) (addVars [] t)++-- A role is well formed if all non-base variables are receive bound,+-- each atom declared to be uniquely-originating originates in+-- the trace, and every variable that occurs in each atom+-- declared to be non-originating occurs in some term in the trace,+-- and the atom must never be carried by any term in the trace.+roleWellFormed :: (Monad m, Algebra t p g s e c) => Role t p g s e c -> m ()+roleWellFormed role =+    do+      failwith "a variable in non-orig is not in trace"+                   $ varSubset (map snd $ rnon role) terms+      mapM_ nonCheck $ rnon role+      mapM_ lenCheck $ rnon role+      mapM_ uniqueCheck $ runique role+      mapM_ origVarCheck $ rvars role+    where+      terms = tterms (rtrace role)+      nonCheck (_, t) =+          failwith (showString "non-orig " $ showst t " carried")+                       $ all (not . carriedBy t) terms+      lenCheck (Nothing, _) = return ()+      lenCheck (Just len, t) =+          case usedPos t (rtrace role) of+            Just p | p < len -> return ()+            Just _ -> fail $ showst t+                      $ showString " appears after length " $ show len+            Nothing -> fail msg+          where+            msg = "no used position for non-originating atom " ++ showst t ""+      uniqueCheck t =+          failwith (showString "uniq-orig " $ showst  t " doesn't originate")+                       $ originates t (rtrace role)+      origVarCheck v =+          failwith (showString "variable " $ showst v " not acquired")+                       $ isBaseTerm v || isJust (acquiredPos v (rtrace role))++failwith :: Monad m => String -> Bool -> m ()+failwith msg test =+    case test of+      True -> return ()+      False -> fail msg++showst :: Algebra t p g s e c => t -> ShowS+showst t =+    shows $ displayTerm (addToContext emptyContext [t]) t++-- Association lists++-- Make an association list into a comment.  The first argument is the+-- set of keys of key-value pairs to be dropped from the comment.++alist :: Monad m => [String] -> [SExpr Pos] -> m [SExpr ()]+alist _ [] = return []+alist keys (a@(L _ (S _ key : _)) : xs)+    | elem key keys = alist keys xs+    | otherwise =+        do+          xs <- alist keys xs+          return $ strip a : xs+alist _ xs = fail (shows (annotation $ head xs) "Malformed association list")++-- 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)++-- Lookup value in alist, appending values with the same key+assoc :: String -> [SExpr a] -> [SExpr a]+assoc key alist =+    concat [ rest | L _ (S _ head : rest) <- alist, key == head ]++loadTrace :: (Algebra t p g s e c, Monad m) => [t] ->+             [SExpr Pos] -> m (Trace t p g s e c)+loadTrace vars xs = mapM (loadEvt vars) xs++loadEvt :: (Algebra t p g s e c, Monad m) => [t] ->+          SExpr Pos -> m (Event t p g s e c)+loadEvt vars (L _ [S _ "recv", t]) =+    do+      t <- loadTerm vars t+      return (In t)+loadEvt vars (L _ [S _ "send", t]) =+    do+      t <- loadTerm vars t+      return (Out t)+loadEvt _ (L pos [S _ dir, _]) =+    fail (shows pos $ "Unrecognized direction " ++ dir)+loadEvt _ x = fail (shows (annotation x) "Malformed direction")++loadBaseTerms :: (Algebra t p g s e c, Monad m) => [t] -> [SExpr Pos] -> m [t]+loadBaseTerms _ [] = return []+loadBaseTerms vars (x : xs) =+    do+      t <- loadBaseTerm vars x+      ts <- loadBaseTerms vars xs+      return (adjoin t ts)++loadBaseTerm :: (Algebra t p g s e c, Monad m) => [t] -> SExpr Pos -> m t+loadBaseTerm vars x =+    do+      t <- loadTerm vars x+      case isBaseTerm t of+        True -> return t+        False -> fail (shows (annotation x) "Expecting an atom")++loadPosBaseTerms :: (Algebra t p g s e c, Monad m) => [t] ->+                    [SExpr Pos] -> m [(Maybe Int, t)]+loadPosBaseTerms _ [] = return []+loadPosBaseTerms vars (x : xs) =+    do+      t <- loadPosBaseTerm vars x+      ts <- loadPosBaseTerms vars xs+      return (t:ts)++loadPosBaseTerm :: (Algebra t p g s e c, Monad m) => [t] ->+                   SExpr Pos -> m (Maybe Int, t)+loadPosBaseTerm vars x'@(L _ [N _ opos, x])+    | opos <= 0 =+        fail (shows (annotation x')+              "Expecting a positive non-origination trace length")+    | otherwise =+        do+          t <- loadBaseTerm vars x+          return (Just opos, t)+loadPosBaseTerm vars x =+    do+      t <- loadTerm vars x+      case isBaseTerm t of+        True -> return (Nothing, t)+        False -> fail (shows (annotation x) "Expecting an atom")++-- Find protocol and then load a preskeleton.++findPreskel :: (Algebra t p g s e c, Monad m) => Pos ->+               [Prot t p g s e c] -> [SExpr Pos] ->+               m (Preskel t p g s e c)+findPreskel pos ps (S _ name : xs) =+    case L.find (\p -> name == pname p) ps of+      Nothing -> fail (shows pos $ "Protocol " ++ name ++ " unknown")+      Just p -> loadPreskel pos p xs+findPreskel pos _ _ = fail (shows pos "Malformed skeleton")++loadPreskel :: (Algebra t p g s e c, Monad m) => Pos ->+               Prot t p g s e c -> [SExpr Pos] ->+               m (Preskel t p g s e c)+loadPreskel pos p (L _ (S _ "vars" : vars) : xs) =+    do+      (gen, kvars) <- loadVars (pgen p) vars+      loadInsts pos p kvars gen [] xs+loadPreskel pos _ _ = fail (shows pos "Malformed skeleton")++loadInsts :: (Algebra t p g s e c, Monad m) => Pos ->+             Prot t p g s e c -> [t] -> g -> [Instance t p g s e c] ->+             [SExpr Pos] -> m (Preskel t p g s e c)+loadInsts top p kvars gen insts (L pos (S _ "defstrand" : x) : xs) =+    case x of+      S _ role : N _ height : env ->+          do+            (gen, i) <- loadInst pos p kvars gen role height env+            loadInsts top p kvars gen (i : insts) xs+      _ ->+          fail (shows pos "Malformed defstrand")+loadInsts top p kvars gen insts (L pos (S _ "deflistener" : x) : xs) =+    case x of+      [term] ->+          do+            (gen, i) <- loadListener kvars gen term+            loadInsts top p kvars gen (i : insts) xs+      _ ->+          fail (shows pos "Malformed deflistener")+loadInsts top p kvars gen insts xs =+    do+      _ <- alist [] xs          -- Check syntax of xs+      loadRest top kvars p gen (reverse insts) order nr ur kcomment+    where+      order = assoc "precedes" xs+      nr = assoc "non-orig" xs+      ur = assoc "uniq-orig" xs+      comment = assoc "comment" xs+      kcomment =+          if null comment then+              []+          else+              [L () (S () "comment" : map strip comment)]++loadInst :: (Algebra t p g s e c, Monad m) => Pos ->+            Prot t p g s e c -> [t] -> g -> String -> Int ->+            [SExpr Pos] -> m (g, Instance t p g s e c)+loadInst pos p kvars gen role height env =+    do+      r <- lookupRole pos p role+      case height < 1 || height > length (rtrace r) of+        True -> fail (shows pos "Bad height")+        False ->+            do+              let vars = rvars r+              (gen', env') <- foldM (loadMaplet kvars vars) (gen, emptyEnv) env+              return (mkInstance gen' r env' height)++lookupRole :: (Algebra t p g s e c, Monad m) => Pos ->+              Prot t p g s e c -> String -> m (Role t p g s e c)+lookupRole pos p role =+    case L.find (\r -> role == rname r) (roles p) of+      Nothing ->+          fail (shows pos $ "Role " ++ role ++ " not found in " ++ pname p)+      Just r -> return r++loadMaplet :: (Algebra t p g s e c, Monad m) => [t] -> [t] ->+              (g, e) -> SExpr Pos -> m (g, e)+loadMaplet kvars vars env (L pos [domain, range]) =+    do+      t <- loadTerm vars domain+      t' <- loadTerm kvars range+      case match t t' env of+        Nothing -> fail (shows pos "Domain does not match range")+        Just env' -> return env'+loadMaplet _ _ _ x = fail (shows (annotation x) "Malformed maplet")++loadListener :: (Algebra t p g s e c, Monad m) => [t] -> g ->+                SExpr Pos -> m (g, Instance t p g s e c)+loadListener kvars gen x =+    do+      t <- loadTerm kvars x+      return (mkListener gen t)++loadRest :: (Algebra t p g s e c, Monad m) => Pos -> [t] ->+            Prot t p g s e c -> g -> [Instance t p g s e c] ->+            [SExpr Pos] -> [SExpr Pos] -> [SExpr Pos] ->+            [SExpr ()] -> m (Preskel t p g s e c)+loadRest pos vars p gen insts orderings nr ur comment =+    do+      case null insts of+        True -> fail (shows pos "No strands")+        False -> return ()+      let heights = map height insts+      o <- loadOrderings heights orderings+      nr <- loadBaseTerms vars nr+      ur <- loadBaseTerms vars ur+      let (nr', ur') = foldl addInstOrigs (nr, ur) insts+      let k = mkPreskel gen p insts o nr' ur' comment+      case termsWellFormed $ nr' ++ ur' ++ kterms k of+        False -> fail (shows pos "Terms in skeleton not well formed")+        True -> return ()+      case verbosePreskelWellFormed k of+        Return () -> return k+        Fail msg -> fail $ shows pos+                    $ showString "Skeleton not well formed: " msg++loadOrderings :: Monad m => [Int] -> [SExpr Pos] -> m [Pair]+loadOrderings heights x =+    foldM f [] x+    where+      f ns x =+          do+            np <- loadPair heights x+            return (adjoin np ns)++loadPair :: Monad m => [Int] -> SExpr Pos -> m Pair+loadPair heights (L pos [x0, x1]) =+    do+      n0 <- loadNode heights x0+      n1 <- loadNode heights x1+      case sameStrands n0 n1 of  -- Same strand+        True -> fail (shows pos "Malformed pair -- nodes in same strand")+        False -> return (n0, n1)+    where+      sameStrands (s0, _) (s1, _) = s0 == s1+loadPair _ x = fail (shows (annotation x) "Malformed pair")++loadNode :: Monad m => [Int] -> SExpr Pos -> m Node+loadNode heights (L pos [N _ s, N _ p])+    | s < 0 = fail (shows pos "Negative strand in node")+    | p < 0 = fail (shows pos "Negative position in node")+    | otherwise =+        case height heights s of+          Nothing -> fail (shows pos "Bad strand in node")+          Just h | p < h -> return (s, p)+          _ -> fail (shows pos "Bad position in node")+    where+      height [] _ = Nothing+      height (x: xs) s          -- Assume s non-negative+          | s == 0 = Just x+          | otherwise = height xs (s - 1)+loadNode _ x = fail (shows (annotation x) "Malformed node")++addInstOrigs :: Algebra t p g s e c => ([t], [t]) ->+                Instance t p g s e c -> ([t], [t])+addInstOrigs (nr, ur) i =+    (foldl (flip adjoin) nr $ inheritRnon i,+     foldl (flip adjoin) ur $ inheritRunique i)
+ src/CPSA/Lib/Main.hs view
@@ -0,0 +1,514 @@+-- Main routine for the CPSA solver.  Provides the top-level search loop++-- 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.++{-# LANGUAGE CPP #-}++module Main (main) where++import Numeric+import System.IO+import System.IO.Error+#if defined HAVE_PAR+import Control.Parallel+#endif+import qualified Data.List as L+import System.Console.GetOpt+import CPSA.Lib.SExpr+import CPSA.Lib.Entry+import CPSA.Lib.Algebra+import CPSA.Lib.Strand+import CPSA.Lib.Cohort+import CPSA.Lib.Loader+import CPSA.Lib.Displayer+import CPSA.Lib.Expand+import qualified CPSA.Basic.Algebra+import qualified CPSA.DiffieHellman.Algebra++-- Default limit on the number of steps used to solve one problem.+defaultStepLimit :: Int+defaultStepLimit = 2000++-- Default limit on the number of strands is a skeleton.+defaultStrandBound :: Int+defaultStrandBound = 8++-- Default algebra+defaultAlgebra :: String+defaultAlgebra = CPSA.Basic.Algebra.name++-- Runtime parameters++data Params = Params+    { file :: Maybe FilePath,   -- Nothing specifies standard output+      alg :: String,            -- Name of the algebra+      analyze :: Bool,          -- False when only expanding macros+      noIsoChk :: Bool,         -- True when not performing isomorphism checks+      limit :: Int,             -- Step count limit+      bound :: Int,             -- Strand cound bound+      margin :: Int }           -- Output line length+    deriving Show++-- Entry point+main :: IO ()+main =+    do+      (p, params) <- start options $ interp algs+      sexprs <- readSExprs p+      sexprs <- try (expand sexprs) -- Expand macros+      case sexprs of+        Left err -> abort (ioeGetErrorString err)+        Right sexprs ->+            if analyze params then+                select params sexprs+            else+                prettyPrint params sexprs++readSExprs :: PosHandle -> IO [SExpr Pos]+readSExprs p =+    loop []+    where+      loop xs =+          do+            x <- readSExpr p+            case x of+              Nothing ->+                  return $ reverse xs+              Just x ->+                  loop (x:xs)++-- Algebra specific section++-- Algebra names+algs :: [String]+algs = [CPSA.Basic.Algebra.name, CPSA.DiffieHellman.Algebra.name]++-- Select the algebra and go.+select :: Params -> [SExpr Pos] -> IO ()+select params sexprs =+    case alg params of+      name | name == CPSA.Basic.Algebra.name ->+               go name CPSA.Basic.Algebra.origin params sexprs+           | name == CPSA.DiffieHellman.Algebra.name ->+               go name CPSA.DiffieHellman.Algebra.origin params sexprs+           | otherwise ->+               abort ("Bad algebra: " ++ name)++-- Load protocols and preskeletons and print run time information+go :: Algebra t p g s e c => String -> g -> Params -> [SExpr Pos] -> IO ()+go name origin params sexprs =+    do+      preskels <- try (loadSExprs name origin sexprs)+      case preskels of          -- Load protocols and preskeletons+        Left err -> abort (ioeGetErrorString err)+        Right preskels ->+            do+              h <- outputHandle (file params)+              let m = margin params+              -- Print run time information+              writeComment h m cpsaVersion+              writeComment h m "All input read"+              case noIsoChk params of+                True -> writeComment h m "Isomorphism checking disabled"+                False -> return ()+              case limit params /= defaultStepLimit of+                True -> writeComment h m $+                        "Step count limited to " ++ show (limit params)+                False -> return ()+              case bound params /= defaultStrandBound of+                True -> writeComment h m $+                        "Strand count bounded at " ++ show (bound params)+                False -> return ()+              -- Analyze+              solve params h preskels 0++-- Just pretty the expanded macros+prettyPrint :: Params -> [SExpr a] -> IO ()+prettyPrint params sexprs =+    do+      let m = margin params+      h <- outputHandle (file params)+      writeComment h m cpsaVersion+      writeComment h m "Expanded macros"+      mapM_ (writeLnSEexpr h m) sexprs+      hClose h+      return ()++-- Command line option flags+data Flag+    = Output String             -- Output file name+    | Limit String              -- Step count limit+    | Bound String              -- Strand count bound+    | Margin String             -- Output line length+    | Expand                    -- Expand macros only+    | NoIsoChk                  -- Disable isomorphism checks+    | Algebra String            -- Algebra+    | Algebras                  -- Show algebras+    | Help                      -- Help+    | Info                      -- Version information+      deriving Show++options :: [OptDescr Flag]+options =+    [ Option ['o'] ["output"]   (ReqArg Output "FILE")  "output FILE",+      Option ['l'] ["limit"]    (ReqArg Limit "INT")+      ("step count limit (default " ++ show defaultStepLimit ++ ")"),+      Option ['b'] ["bound"]    (ReqArg Bound "INT")+      ("strand count bound (default " ++ show defaultStrandBound ++ ")"),+      Option ['m'] ["margin"]   (ReqArg Margin "INT")+      ("set output margin (default " ++ show defaultMargin ++ ")"),+      Option ['e'] ["expand"]   (NoArg Expand)+      "expand macros only; don't analyze",+      Option ['n'] ["noisochk"] (NoArg NoIsoChk)+      "disable isomorphism checks",+      Option ['a'] ["algebra"]  (ReqArg Algebra "STRING")+      ("algebra (default " ++ defaultAlgebra ++ ")"),+      Option ['s'] ["show-algebras"] (NoArg Algebras)  "show algebras",+      Option ['h'] ["help"]     (NoArg Help)      "show help message",+      Option ['v'] ["version"]  (NoArg Info)      "show version number" ]++-- Interpret option flags+interp :: [String] -> [Flag] -> IO Params+interp algs flags =+    loop flags Params { file = Nothing, -- Default parameter values+                        alg = defaultAlgebra,+                        analyze = True,+                        noIsoChk = False,+                        limit = defaultStepLimit,+                        bound = defaultStrandBound,+                        margin = defaultMargin }+    where+      loop [] params = return params+      loop (Output name : flags)  params+          | file params == Nothing =+              loop flags $ params { file = Just name }+      loop (Limit value : flags) params =+          case readDec value of+            [(limit, "")] ->+                loop flags $ params { limit = limit }+            _ ->+                do+                  msg <- usage options ["Bad value for step limit\n"]+                  abort msg+      loop (Bound value : flags) params =+          case readDec value of+            [(bound, "")] ->+                loop flags $ params { bound = bound }+            _ ->+                do+                  msg <- usage options ["Bad value for strand bound\n"]+                  abort msg+      loop (Margin value : flags) params =+          case readDec value of+            [(margin, "")] ->+                loop flags $ params { margin = margin }+            _ ->+                do+                  msg <- usage options ["Bad value for margin\n"]+                  abort msg+      loop (Expand : flags) params =+          loop flags $ params { analyze = False }+      loop (NoIsoChk : flags) params =+          loop flags $ params { noIsoChk = True }+      loop (Algebra name : flags) params+          | elem name algs = loop flags $ params { alg = name }+          | otherwise =+              abort ("Algebra " ++ name ++ " not one of\n" ++ unlines algs)+      loop (Algebras : _) _ =+          success $ unlines algs+      loop (Help : _) _ =+          do                    -- Show help then exit with success+            msg <- usage options []+            success msg+      loop (Info : _) _ =+          success cpsaVersion+      loop _ _ =+           do                   -- Show help then exit with failure+             msg <- usage options ["Bad option combination\n"]+             abort msg++-- Parameter driven S-expression printer+wrt :: Params -> Handle -> SExpr a -> IO ()+wrt p h sexpr =+    writeLnSEexpr h (margin p) sexpr++-- A labeled and linked preskeleton+data Algebra t p g s e c => LPreskel t p g s e c+    = LPreskel { content :: Preskel t p g s e c,+                 label :: Int,+                 parent :: Maybe (LPreskel t p g s e c) }+      deriving Show++-- A skeleton that has been seen before need not be reanalyzed.+-- Instead, one looks up the label of the skeleton seen before, and+-- returns it.  What follows is the data structure used to store+-- information in the seen history used for the isomorphism check.+-- The integer is the label of the seen skeleton.+type IPreskel t p g s e c = (Gist t p g s e c, Int)++-- Is the skeleton summarized by gist g isomorphic to one with the+-- given label?+wasSeen :: Algebra t p g s e c => Gist t p g s e c ->+           IPreskel t p g s e c -> Bool+wasSeen g (g', _) = g == g'++-- A seen history as a list.++newtype Algebra t p g s e c => Seen t p g s e c = Seen [IPreskel t p g s e c]++-- Create a singleton seen history+hist :: Algebra t p g s e c => IPreskel t p g s e c -> Seen t p g s e c+hist ik = Seen [ik]++-- Add an element to the seen history.+remember :: Algebra t p g s e c => IPreskel t p g s e c ->+            Seen t p g s e c -> Seen t p g s e c+remember ik (Seen seen) = Seen (ik : seen)++-- Find an element of the seen history that satisfies a predicate.+recall :: Algebra t p g s e c => (IPreskel t p g s e c -> Bool) ->+          Seen t p g s e c -> Maybe (IPreskel t p g s e c)+recall f (Seen seen) = L.find f seen++-- Create an empty seen history+void :: Algebra t p g s e c => Seen t p g s e c+void = Seen []++-- Merge two seen histories.+merge :: Algebra t p g s e c => Seen t p g s e c ->+         Seen t p g s e c -> Seen t p g s e c+merge (Seen xs) (Seen ys) = Seen (xs ++ ys)++-- Contains the result of applying the cohort reduction rule.  The+-- last position is used to hold the reverse of the labels of the+-- seen children+data Algebra t p g s e c => Reduct t p g s e c  =+    Reduct !(LPreskel t p g s e c) !Int !Bool ![Preskel t p g s e c] ![Int]++seqList :: [a] -> [a]+seqList xs =+    loop xs+    where+      loop [] = xs+      loop (y : ys) = seq y (loop ys)++#if defined HAVE_PAR++parMap :: (a -> b) -> [a] -> [b]+parMap _ [] = []+parMap f (x:xs) =+    par y (pseq ys (y:ys))+    where+      y = f x+      ys = parMap f xs++#else++parMap :: (a -> b) -> [a] -> [b]+parMap = map++#endif++-- Entry point for analysis+solve :: Algebra t p g s e c => Params -> Handle ->+         [Preskel t p g s e c] -> Int -> IO ()+solve _ h [] _ =                -- Done+    hClose h+solve p h (k : ks) n =+    do+      wrt p h (displayProt (protocol k)) -- show protocol+      case firstSkeleton k of+        Nothing ->              -- Input cannot be made into a skeleton+            do+              let lk = LPreskel k n Nothing+              wrt p h (commentPreskel lk [] (unrealized k) False+                       "Input cannot be made into a skeleton--nothing to do")+              solve p h ks (n + 1)+        Just k' ->+            if (gist k) == (gist k') then -- Input was a skeleton+                let lk' = LPreskel k' n Nothing in+                mode p h ks (n + limit p) (n + 1)+                         (hist (gist k', n)) [lk']+            else                -- Input was not a skeleton+                do+                  let lk = LPreskel k n Nothing+                  wrt p h (commentPreskel lk [] (unrealized k) False "")+                  let lk' = LPreskel k' (n + 1) (Just lk)+                  mode p h ks (n + limit p) (n + 2)+                           (hist (gist k', n + 1))  [lk']++-- Select reduction mode, noIsoChk or normal+mode :: Algebra t p g s e c => Params -> Handle ->+        [Preskel t p g s e c] -> Int -> Int -> Seen t p g s e c ->+        [LPreskel t p g s e c] -> IO ()+mode p h ks m n seen todo =+    if noIsoChk p then+        fast p h ks m n todo     -- Peform no isomorphism checks+    else+        breadth p h ks m n seen todo++-- Function breadth handles one level of the derivation tree.+-- This ensures a breadth first derivation order.+breadth :: Algebra t p g s e c => Params -> Handle ->+           [Preskel t p g s e c] -> Int -> Int -> Seen t p g s e c ->+           [LPreskel t p g s e c] -> IO ()+breadth p h ks _ n _ [] =       -- Empty todo list+    do+      wrt p h (comment "Nothing left to do")+      solve p h ks n            -- Solve next problem+breadth p h ks m n seen todo =+    step p h ks m seen n void [] (parMap (branch p seen) todo)++-- Function step handles one skeleton in one level of the tree.+step :: Algebra t p g s e c => Params -> Handle ->+        [Preskel t p g s e c] -> Int -> Seen t p g s e c -> Int ->+        Seen t p g s e c -> [LPreskel t p g s e c] ->+        [Reduct t p g s e c] -> IO ()+step p h ks m oseen n seen todo [] = -- Empty reducts+    breadth p h ks m n (merge seen oseen) (reverse todo)+step p h _ m _ n _ todo reducts+    | n > m =                   -- Check step count+        do+          wrt p h (comment "Step limit exceeded--aborting run")+          dump p h (mktodo reducts todo) "Step limit exceeded"+step p h _ _ _ _ _ todo reducts@(Reduct lk _ _  _  _ : _)+    | nstrands (content lk) >= bound p = -- Check strand count+        do+          wrt p h (comment "Strand bound exceeded--aborting run")+          dump p h (mktodo reducts todo)  "Strand bound exceeded"+step p h ks m oseen n seen todo (Reduct lk size cols kids dups : reducts)+    | size <= 0 =               -- Interpret empty reducts+        do+          let ns = unrealized (content lk)+          let shape = null ns+          wrt p h  (commentPreskel lk [] ns shape+                    (if shape then "" else "empty cohort"))+          step p h ks m oseen n seen todo reducts+    | otherwise =+        do+          let (n', seen', todo', dups') =+                  foldl (next lk) (n, seen, todo, dups) kids+          let ns = unrealized (content lk)+          let u = size - length dups'+          let msg = shows size $ showString " in cohort - " $+                         shows u " not yet seen"+          wrt p h  (commentPreskel lk (reverse dups') ns cols msg)+          step p h ks m oseen n' seen' todo' reducts++-- Expands one branch in the derivation tree.+branch :: Algebra t p g s e c => Params -> Seen t p g s e c ->+          LPreskel t p g s e c -> Reduct t p g s e c+branch p seen lk =+    Reduct lk (length kids) cols+               (seqList $ reverse unseen) (seqList dups)+    where+      kids = reduce (noIsoChk p) (content lk)+      cols = all collapsed kids+      (unseen, dups) =+          foldl (duplicates seen) ([], []) kids++-- Is preskeleton the result of a collapsing operation?+collapsed :: Algebra t p g s e c => Preskel t p g s e c -> Bool+collapsed k =+    case operation k of+      Collapsed _ _ -> True+      _ -> False++duplicates :: Algebra t p g s e c => Seen t p g s e c ->+              ([Preskel t p g s e c], [Int]) ->+                  Preskel t p g s e c -> ([Preskel t p g s e c], [Int])+duplicates seen (unseen, dups) kid =+    case recall (wasSeen $ gist kid) seen of+      Just (_, label) -> (unseen, label : dups)+      Nothing -> (kid : unseen, dups)++-- Make a todo list for dump+mktodo :: Algebra t p g s e c => [Reduct t p g s e c] ->+          [LPreskel t p g s e c] -> [LPreskel t p g s e c]+mktodo reducts todo =+    map (\(Reduct lk _ _ _ _) -> lk) reducts ++ reverse todo++type Next t p g s e c =+    (Int, Seen t p g s e c, [LPreskel t p g s e c], [Int])++-- Update state variables used by step.+next :: Algebra t p g s e c => LPreskel t p g s e c ->+        Next t p g s e c -> Preskel t p g s e c ->+        Next t p g s e c+next p (n, seen, todo, dups) k =+    let g = gist k in+    case recall (wasSeen g) seen of+      Just (_, label) ->+          (n, seen, todo, label : dups)+      Nothing ->+          (n + 1, remember (g, n) seen, lk : todo, dups)+          where+            lk = LPreskel k n (Just p) -- Label a preskeleton here++-- This function reduces without checking for isomorphisms+fast :: Algebra t p g s e c => Params -> Handle ->+        [Preskel t p g s e c] -> Int -> Int ->+        [LPreskel t p g s e c] -> IO ()+fast p h ks _ n [] =            -- Empty todo list+    do+      wrt p h (comment "Nothing left to do")+      solve p h ks n+fast p h _ m n todo+    | n > m =                   -- Check step count+        do+          wrt p h (comment "Step limit exceeded--aborting run")+          dump p h todo "Step limit exceeded"+fast p h _ _ _ todo@(lk : _)+    | nstrands (content lk) >= bound p = -- Check strand count+        do+          wrt p h (comment "Strand bound exceeded--aborting run")+          dump p h todo "Strand bound exceeded"+fast p h ks m n (lk : todo) =+    do+      let ns = unrealized (content lk)+      let ks' = reduce (noIsoChk p) (content lk)+      let msg = show (length ks') ++ " in cohort"+      wrt p h (commentPreskel lk [] ns (null ns) msg)+      let (n', todo') = foldl (children lk) (n, []) ks'+      fast p h ks m n' (todo ++ reverse todo')++children :: Algebra t p g s e c => LPreskel t p g s e c ->+            (Int, [LPreskel t p g s e c]) ->+            Preskel t p g s e c -> (Int, [LPreskel t p g s e c])+children p (n, todo) k =        -- Label a preskeleton here+    (n + 1, LPreskel k n (Just p) : todo)++-- Print partial results in a form that works with analysis tools+dump :: Algebra t p g s e c => Params -> Handle ->+        [LPreskel t p g s e c] -> String -> IO ()+dump _ h [] msg =+    do+      hClose h+      abort msg+dump p h (lk : lks) msg =+    do+      let ns = unrealized $ content lk+      wrt p h (commentPreskel lk [] ns False "aborted")+      dump p h lks msg++-- Add a label, maybe a parent, a list of seen preskeletons isomorphic+-- to some members of this skeleton's cohort, and a list of unrealized+-- nodes.  If it's a shape, note this fact.  Add a comment if present.+commentPreskel :: Algebra t p g s e c => LPreskel t p g s e c ->+                  [Int] -> [Node] -> Bool -> String -> SExpr ()+commentPreskel lk seen unrealized shape msg =+    displayPreskel (content lk) l+    where+      l = L () [S () "label", N () (label lk)] : p+      p = maybe s (\p -> L () [S () "parent", N () (label p)] : s) (parent lk)+      s | null seen = r+        | otherwise = L () (S () "seen" : kids) : r+      kids = map (N ()) (L.sort (L.nub seen))+      r = L () (S () "unrealized" : nodes) : notes+      nodes = map displayNode (L.sort unrealized)+      notes = if shape then L () [S () "shape"] : msgs else msgs+      msgs = if null msg then [] else [comment msg]
+ src/CPSA/Lib/Pretty.hs view
@@ -0,0 +1,134 @@+-- A simple pretty printer++-- The alogithm is by Lawrence C. Paulson, who simplified an algorithm+-- by Derek C. Oppen.++-- Derek C. Oppen, Prettyprinting, ACM Transactions on Programming+-- Languages and Systems, Vol 2, No. 4, October 1980, Pages 465-483.++-- 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.++{-- A pretty printer based on ML programs with the following copyright++(**** ML Programs from Chapter 8 of++  ML for the Working Programmer, 2nd edition+  by Lawrence C. Paulson, Computer Laboratory, University of Cambridge.+  (Cambridge University Press, 1996)++Copyright (C) 1996 by Cambridge University Press.+Permission to copy without fee is granted provided that this copyright+notice and the DISCLAIMER OF WARRANTY are included in any copy.++DISCLAIMER OF WARRANTY.  These programs are provided `as is' without+warranty of any kind.  We make no warranties, express or implied, that the+programs are free of error, or are consistent with any particular standard+of merchantability, or that they will meet your requirements for any+particular application.  They should not be relied upon for solving a+problem whose incorrect solution could result in injury to a person or loss+of property.  If you do use the programs or functions in such a manner, it+is at your own risk.  The author and publisher disclaim all liability for+direct, incidental or consequential damages resulting from your use of+these programs or functions.+****)++--}++module CPSA.Lib.Pretty (Pretty, pr, str, brk, blo, grp) where++data Pretty+    = Str !String+    | Brk !Int                  -- Int is the number of breakable spaces+    | Blo ![Pretty] !Int !Int   -- First int is the indent, second int+    --  is the number of chars and spaces for strings and breaks in block+    | Grp ![Pretty] !Int !Int   -- As above++-- Constructors++-- Strings+str :: String -> Pretty+str = Str++-- Break points+brk :: Int -> Pretty+brk = Brk++-- Indentation blocks+blo :: Int -> [Pretty] -> Pretty+blo indent es =+    Blo es indent (len es 0)++-- Indentation groups+grp :: Int -> [Pretty] -> Pretty+grp indent es =+    Grp es indent (len es 0)++len :: [Pretty] -> Int -> Int+len [] k = k+len (e:es) k = len es (size e + k)++size :: Pretty -> Int+size (Str s) = length s+size (Brk n) = n+size (Blo _ _ n) = n+size (Grp _ _ n) = n++-- Pretty prints the constructed object++pr :: Int -> Pretty -> ShowS+pr margin e s =+    s1+    where+      (_, s1) = printing margin [e] margin 0 False (margin, s)++-- The state of the computation is maintained as a pair consisting of+-- an integer and a string.  The integer is the number of unused+-- character positions in the current line of output.  The printer+-- adds content to the front of the given string.++printing :: Int -> [Pretty] -> Int -> Int -> Bool ->+            (Int, String) -> (Int, String)+printing _ [] _ _ _ p = p+printing margin (e:es) blockspace after force (space, s) =+    (space1, s1)+    where+      (space2, s1) =            -- Result of first item+          case e of+            Str str ->          -- Place a string+                 (space - length str, showString str s2)+            Brk n ->            -- Place breakable space+                 if not force && n + breakdist es after <= space then+                     blanks n (space, s2) -- Don't break+                 else+                     (space3, showChar '\n' s3) -- Break+                     where+                       (space3, s3) =+                           blanks (margin - blockspace) (margin, s2)+            Blo bes indent _ -> -- Place a block+                 printing margin bes (space - indent)+                    (breakdist es after) False (space, s2)+            Grp bes indent n -> -- Place a group+                 printing margin bes (space - indent)+                    dist (n + dist > space) (space, s2)+                where+                  dist = breakdist es after+      (space1, s2) =            -- Result of the remaining items+          printing margin es blockspace after force (space2, s)++-- Find the distance to the nearest breakable space.+breakdist :: [Pretty] -> Int -> Int+breakdist (Str s : es) after = length s + breakdist es after+breakdist (Brk _ : _) _ = 0+breakdist (Blo _ _ n : es) after = n + breakdist es after+breakdist (Grp _ _ n : es) after = n + breakdist es after+breakdist [] after = after++-- Place spaces+blanks :: Int -> (Int, String) -> (Int, String)+blanks n (space, s)+    | n <= 0 = (space, s)+    | otherwise = blanks (n - 1) (space - 1, showChar ' ' s)
+ src/CPSA/Lib/Printer.hs view
@@ -0,0 +1,60 @@+-- A CPSA specific pretty printer++-- 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.Lib.Printer (pp) where++import CPSA.Lib.Pretty+import CPSA.Lib.SExpr++-- Pretty printer within specified margin.+pp :: Int -> Int -> SExpr a -> String+pp margin indent sexpr =+    pr margin (pretty indent sexpr) ""++type Printer a = Int -> SExpr a -> Pretty++-- A pretty printer that indents a constant amount for each list.  The+-- top-level lists are laid out specially.  Whenever some breaks+-- occur, all breaks are forced.  Also, breaks are only placed before+-- strings and lists.  CPSA protocols are handled specially.  Each+-- defrole is handled as are top-level lists.+pretty :: Printer a+pretty indent (L _ (x@(S _ "defprotocol") : xs)) =+    loop [block indent x, str "("] xs+    where+      loop es [] = grp indent (reverse (str ")" : es))+      loop es (x@(S _ _):xs) = loop (block indent x : str " " : es) xs+      loop es (x@(Q _ _):xs) = loop (block indent x : brk 1 : es) xs+      loop es (x@(N _ _):xs) = loop (block indent x : str " " : es) xs+      loop es (x@(L _ (S _ "defrole": _)):xs) =+          loop (group indent x : brk 1 : es) xs+      loop es (x@(L _ _):xs) = loop (block indent x : brk 1 : es) xs+pretty indent x = group indent x++group :: Printer a+group indent (L _ (x:xs)) =+    loop [block indent x, str "("] xs+    where+      loop es [] = grp indent (reverse (str ")" : es))+      loop es (x@(S _ _):xs) = loop (block indent x : str " " : es) xs+      loop es (x@(Q _ _):xs) = loop (block indent x : brk 1 : es) xs+      loop es (x@(N _ _):xs) = loop (block indent x : str " " : es) xs+      loop es (x@(L _ _):xs) = loop (block indent x : brk 1 : es) xs+group indent x = block indent x++-- A pretty printer for interior lists using block style breaking.+block :: Printer a+block _ (S _ s) = str s+block _ (Q _ s) = str (showQuoted s "")+block _ (N _ n) = str (show n)+block _ (L _ []) = str "()"+block indent (L _ (x:xs)) =+    loop [block indent x, str "("] xs+    where+      loop es [] = blo indent (reverse (str ")" : es))+      loop es (x:xs) = loop (block indent x : brk 1 : es) xs
+ src/CPSA/Lib/Protocol.hs view
@@ -0,0 +1,223 @@+-- Protocol data structures++-- 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.Lib.Protocol (Event (..), evtTerm, evtMap, Trace, evt,+    tterms, originates, originationPos, acquiredPos, usedPos, Role,+    rname, rvars, rtrace, rnon, runique, rcomment, rnorig, ruorig,+    mkRole, varSubset, varsInTerms, addVars, Prot, mkProt, pname, alg,+    pgen, roles, pcomment, flow) where++import qualified Data.List as L+import qualified Data.Set as S+import Data.Set (Set)+import CPSA.Lib.Utilities+import CPSA.Lib.SExpr+import CPSA.Lib.Algebra++-- Useful operations on variables++-- Are the vars in ts a subset of the ones in ts'?+varSubset :: Algebra t p g s e c => [t] -> [t] -> Bool+varSubset ts ts' =+    all (flip elem (varsInTerms ts')) (varsInTerms ts)++varsInTerms :: Algebra t p g s e c => [t] -> [t]+varsInTerms ts =+    foldl addVars [] ts++addVars :: Algebra t p g s e c => [t] -> t -> [t]+addVars ts t = foldVars (flip adjoin) ts t++-- Message events and traces++data Algebra t p g s e c => Event t p g s e c+    = In !t                      -- Inbound message+    | Out !t                     -- Outbound messasge+      deriving (Show, Eq, Ord)++-- Dispatch to function based on direction.+evt :: Algebra t p g s e c => (t -> a) -> (t -> a) ->+       Event t p g s e c -> a+evt inDir outDir evt =+    case evt of+      In t -> inDir t+      Out t -> outDir t++-- Extract the term in a directed term (evt id id).+evtTerm :: Algebra t p g s e c => Event t p g s e c -> t+evtTerm (In t) = t+evtTerm (Out t) = t++-- Map the term in a directed term.+evtMap :: Algebra t p g s e c => (t -> t) ->+          Event t p g s e c -> Event t p g s e c+evtMap f (In t) = In (f t)+evtMap f (Out t) = Out (f t)++-- A trace is a list of directed terms.  The terms in the trace are+-- stored in causal order.+type Trace t p g s e c = [Event t p g s e c]++-- The set of terms in a trace.+tterms :: Algebra t p g s e c => Trace t p g s e c -> [t]+tterms c =+    foldl (\ts evt -> adjoin (evtTerm evt) ts) [] c++-- Is the term carried by a directed term, and is the first one outgoing?+originates :: Algebra t p g s e c => t -> Trace t p g s e c -> Bool+originates _ [] = False         -- Term is not carried+originates t (Out t' : c) = t `carriedBy` t' || originates t c+originates t (In t' : c) = not (t `carriedBy` t') && originates t c++-- At what position does a term originate in a trace?+originationPos :: Algebra t p g s e c => t ->+                  Trace t p g s e c -> Maybe Int+originationPos t c =+    loop 0 c+    where+      loop _ [] = Nothing       -- Term is not carried+      loop pos (Out t' : c)+          | t `carriedBy` t' = Just pos -- Found it+          | otherwise = loop (pos + 1) c+      loop pos (In t' : c)+          | t `carriedBy` t' = Nothing -- Term does not originate+          | otherwise = loop (pos + 1) c++-- At what position is a term acquired in a trace?+acquiredPos :: Algebra t p g s e c => t ->+               Trace t p g s e c -> Maybe Int+acquiredPos t c =+    loop 0 c+    where+      loop _ [] = Nothing       -- Term does not occur+      loop pos (In t' : c)+          | t `carriedBy` t' = Just pos -- Found it+          | t `occursIn` t' = Nothing   -- Occurs but is not carried+          | otherwise = loop (pos + 1) c+      loop pos (Out t' : c)+          | t `occursIn` t' = Nothing   -- Term occurs in outbound term+          | otherwise = loop (pos + 1) c++-- At what position do all of the variables in a term occur in a trace?+usedPos :: Algebra t p g s e c => t ->+           Trace t p g s e c -> Maybe Int+usedPos t c =+    loop 0 (varsInTerms [t]) c+    where+      loop _ _ [] = Nothing+      loop pos vars (e : c) =+          let vars' = [ x | x <- vars, notElem x (varsInTerms [evtTerm e]) ] in+          case vars' of+            [] -> Just pos+            _ -> loop (pos + 1) vars' c++-- Data flow analysis of a trace.++-- Return the minimal sets of parameters computed using traceFlow+flow :: Algebra t p g s e c => Trace t p g s e c -> [[t]]+flow c =+    toList $ filter minimal inits+    where+      inits = S.toList $ S.map fst $ traceFlow c (S.empty, S.empty)+      -- Is init minimal among sets in inits?+      minimal init = all (not . flip S.isProperSubsetOf init) inits+      -- Convert sets to lists and sort everything+      toList s = L.sort $ map (L.sort . S.toList) $ s++-- A flow rule maps an initial set of atoms and a set of available+-- terms to sets of pairs of the same sets.+type FlowRule t = (Set t, Set t) -> Set (Set t, Set t)++-- Analyze directed terms in a trace sequentially+traceFlow :: Algebra t p g s e c => Trace t p g s e c -> FlowRule t+traceFlow [] a = S.singleton a+traceFlow (d : c) a = comb (traceFlow c) (evtFlow d) a++-- Dispatch to algebra specific data flow routines+evtFlow :: Algebra t p g s e c => Event t p g s e c -> FlowRule t+evtFlow (In t) = inFlow t+evtFlow (Out t) = outFlow t++-- Combine flow rules sequentially+comb :: Algebra t p g s e c => FlowRule t -> FlowRule t -> FlowRule t+comb f g x =+    S.fold h S.empty (g x)+    where h a s = S.union (f a) s++data Algebra t p g s e c => Role t p g s e c = Role+    { rname :: !String,+      rvars :: ![t],            -- Set of role variables+                                -- Events in causal order+      rtrace :: ![Event t p g s e c],+      -- Set of non-originating atoms, possibly with a trace length+      rnon :: ![(Maybe Int, t)], -- that says when to inherit the atom+      runique :: ![t],          -- Set of uniquely originating atoms+      rcomment :: [SExpr ()],   -- Comments from the input+      rnorig :: [(t, Int)],     -- Nons plus origination position+      ruorig :: [(t, Int)] }    -- Uniques plus origination position+    deriving Show++-- The empty role name is used with listener strands.  All roles in a+-- protocol must have a name with more than one character.++-- The lists vars, non, and unique are sets and should never contain+-- duplicate terms.++-- Create a role+mkRole :: Algebra t p g s e c => String -> [t] ->+          Trace t p g s e c -> [(Maybe Int, t)] -> [t] ->+          [SExpr ()] -> Role t p g s e c+mkRole name vars trace non unique comment =+    Role { rname = name,+           rvars = L.nub vars,  -- Every variable here must+           rtrace = trace,      --  occur in the trace.+           rnon = non,+           runique = L.nub unique,+           rcomment = comment,+           rnorig = map addNonOrig $ nonNub non,+           ruorig = map addUniqueOrig $ L.nub unique+         }+    where+      addUniqueOrig t =+          case originationPos t trace of+            Just p -> (t, p)+            Nothing -> error "Protocol.mkRole: Atom does not uniquely originate"+      addNonOrig (len, t) =+          case usedPos t trace of+            Nothing -> error "Protocol.mkRole: Atom variables not in trace"+            Just p ->+                case len of+                  Nothing -> (t, p)+                  Just len | len > p -> (t, len - 1)+                           | otherwise -> error msg+          where+            msg = "Protocol.mkRole: Length for atom too early in trace"+      -- Drop non-origination assumptions for the same atom.+      nonNub nons =+          reverse $ foldl f [] nons+          where+            f acc non@(_, t)+                | any (\(_, t') -> t == t') acc = acc+                | otherwise = non : acc++-- Protocols++data Algebra t p g s e c => Prot t p g s e c+    = Prot { pname :: !String,  -- Name of the protocol+             alg :: !String,    -- Name of the algebra+             pgen :: !g,        -- Initial variable generator+             roles :: ![Role t p g s e c],+             pcomment :: [SExpr ()] }  -- Comments from the input+    deriving Show++-- Callers should ensure every role has a distinct name.+mkProt :: Algebra t p g s e c => String -> String ->+          g -> [Role t p g s e c] -> [SExpr ()] -> Prot t p g s e c+mkProt name alg gen roles comment =+    Prot { pname = name, alg = alg, pgen = gen,+           roles = roles, pcomment = comment }
+ src/CPSA/Lib/SExpr.hs view
@@ -0,0 +1,278 @@+-- A data structure for S-expressions, the ones that are called+-- proper lists.++-- 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.Lib.SExpr (SExpr(..), showQuoted, annotation, Pos,+                       PosHandle, posHandle, load) where++import Data.Char (isSpace, isDigit, isAlphaNum, isPrint, isAscii)+import Data.IORef (IORef, newIORef, readIORef, writeIORef)+import System.IO (Handle, hIsEOF, hGetChar, hLookAhead, hClose)++-- An S-expression--all of its constructors are strict.+data SExpr a+    = S !a !String                 -- A symbol+    | Q !a !String                 -- A quoted string+    | N !a !Int                    -- An integer+    | L !a ![SExpr a]              -- A proper list+      deriving Eq++-- Printing support++instance Show (SExpr a) where+    showsPrec _ (S _ s) = showString s+    showsPrec _ (Q _ s) = showChar '"' . showString s . showChar '"'+    showsPrec _ (N _ n) = shows n+    showsPrec _ (L _ []) = showString "()"+    showsPrec _ (L _ (x:xs)) =+        showChar '(' . shows x . showl xs . showChar ')'+        where+          showl [] = id+          showl (x:xs) = showChar ' ' . shows x . showl xs++showQuoted :: String -> ShowS+showQuoted s = showChar '"' . showString s . showChar '"'++-- Extract an S-expression's annotation.+annotation :: SExpr a -> a+annotation (S a _) = a+annotation (Q a _) = a+annotation (N a _) = a+annotation (L a _) = a++-- S-expression Reader++-- The reader returns objects of type SExpr Pos so that error messages+-- can include a location.+data Pos = Pos { file :: !String, line :: !Int, column :: !Int }++-- Show a position in a form Emacs can read.+instance Show Pos where+    showsPrec _ pos = showString (file pos) .+                      showString ":" .+                      shows (line pos) .+                      showString ":" .+                      shows (column pos) .+                      showString ": "++-- Bind a position to a handle+data PosHandle = PosHandle { pHandle :: Handle, pFile :: String,+                             pPosition :: IORef (Int, Int) }++posHandle :: FilePath -> Handle -> IO PosHandle+posHandle file handle =+    do+      pos <- newIORef (1, 1)    -- Set initial position in a file+      return $ PosHandle { pHandle = handle, pFile = file, pPosition = pos }++setPosHandle :: PosHandle -> Int -> Int -> IO ()+setPosHandle ph line column =+    writeIORef (pPosition ph) (line, column)++-- The result of scanning is a token.+data Token+    = Atom !(SExpr Pos)+    | Lparen !Pos+    | Rparen !Pos+    | Eof++-- Read one S-expression or return Nothing on EOF+load :: PosHandle -> IO (Maybe (SExpr Pos))+load p =+    do+      (l, c) <- readIORef $ pPosition p+      (l, c, t) <- scan p l c+      case t of+        Atom x ->+            do+              setPosHandle p l c+              return $ Just x+        Lparen pos ->+            do+              (l, c, x) <- list p pos l c []+              setPosHandle p l c+              return $ Just x+        Rparen pos ->+            fail (shows pos "Close of unopened list")+        Eof ->+            do+              hClose $ pHandle p+              return Nothing++-- A recursive decent parser+list :: PosHandle -> Pos -> Int -> Int -> [SExpr Pos] ->+        IO (Int, Int, SExpr Pos)+list p pos l c xs =+    do+      (l, c, t) <- scan p l c+      case t of+        Rparen _ ->+            return (l, c, L pos (seqrev xs))+        Atom x ->+            list p pos l c (x : xs)+        Lparen pos' ->+            do+              (l, c, x) <- list p pos' l c []+              list p pos l c (x : xs)+        Eof ->+            fail (shows pos "Unexpected end of input in list")++-- Read the next character returning Nothing on EOF+get :: PosHandle -> IO (Maybe Char)+get p =+    do+      let h = pHandle p+      eof <- hIsEOF h+      case eof of+        True ->+            return Nothing+        False ->+            do+              ch <- hGetChar h+              return $ Just ch++-- Peek at the next character returning Nothing on EOF+peek :: PosHandle -> IO (Maybe Char)+peek p =+    do+      let h = pHandle p+      eof <- hIsEOF h+      case eof of+        True ->+            return Nothing+        False ->+            do+              ch <- hLookAhead h+              return $ Just ch++-- Return the next token and update line and column information+scan :: PosHandle -> Int -> Int -> IO (Int, Int, Token)+scan p l c =+    do+      ch <- get p+      case ch of+        Nothing ->+            return (l, c, Eof)+        Just ch ->+            skip p l c ch++-- Skip whitespace and then handle first character of a token+skip :: PosHandle -> Int -> Int -> Char -> IO (Int, Int, Token)+skip p l _ '\n' = scan p (l + 1) 1+skip p l c ch | isSpace ch  = scan p l (c + 1)+skip p l c ';' = comment p l (c + 1)+skip p l c '(' =+    return (l, c + 1, Lparen $ pos p l c)+skip p l c ')' =+    return (l, c + 1, Rparen $ pos p l c)+skip p l c ch =+    atom p l (c + 1) (pos p l c) ch++pos :: PosHandle -> Int -> Int -> Pos+pos p l c =+    Pos { file = pFile p, line = l, column = c }++-- Consume a comment+comment :: PosHandle -> Int -> Int -> IO (Int, Int, Token)+comment p l c =+    do+      ch <- get p+      case ch of+        Nothing ->+            return (l, c, Eof)+        Just '\n' ->+            scan p (l + 1) 1+        Just _ ->+            comment p l (c + 1)++-- Scan a string, number, or a symbol+atom :: PosHandle -> Int -> Int -> Pos -> Char -> IO (Int, Int, Token)+atom p l c pos '"' = string p l c pos []+atom p l c pos ch | isDigit ch = number p l c pos [ch]+atom p l c pos ch | ch == '+' || ch == '-' = numOrSym p l c pos [ch]+atom p l c pos ch | isSym ch = symbol p l c pos [ch]+atom _ _ _ pos _ = fail (shows pos "Bad char in atom")++-- Scan a quoted string of characters+string :: PosHandle -> Int -> Int -> Pos -> String -> IO (Int, Int, Token)+string p l c pos s =+    do+      ch <- get p+      case ch of+        Nothing ->+            fail (shows pos "End of input in string")+        Just '"' ->+            return (l, c + 1, Atom (Q pos (seqrev s)))+        Just ch | isStr ch ->+            string p l (c + 1) pos (ch : s)+        Just _ ->+            fail (shows pos "Bad char for string")++-- Scan a sequence of digits+number :: PosHandle -> Int -> Int -> Pos -> String -> IO (Int, Int, Token)+number p l c pos s =+    do+      ch <- peek p+      case ch of+        Nothing ->+            return (l, c, Atom (N pos (read (seqrev s))))+        Just ch | isDigit ch ->+            do+              _ <- hGetChar $ pHandle p+              number p l (c + 1) pos (ch : s)+        Just ch | isSym ch ->+            fail (shows pos "Bad char after number")+        Just _ ->+            return (l, c, Atom (N pos (read (seqrev s))))++-- Scan a number that starts with a sign or a symbol+numOrSym :: PosHandle -> Int -> Int -> Pos -> String -> IO (Int, Int, Token)+numOrSym p l c pos s =+    do+      ch <- peek p+      case ch of+        Nothing ->+            symbol p l c pos s+        Just ch | isDigit ch ->+            number p l c pos s+        Just _ ->+            symbol p l c pos s++-- Scan a symbol+symbol :: PosHandle -> Int -> Int -> Pos -> String -> IO (Int, Int, Token)+symbol p l c pos s =+    do+      ch <- peek p+      case ch of+        Nothing ->+            return (l, c, Atom (S pos (seqrev s)))+        Just ch | isSym ch ->+            do+              _ <- hGetChar $ pHandle p+              symbol p l (c + 1) pos (ch : s)+        Just _ ->+            return (l, c, Atom (S pos (seqrev s)))++-- A reverse that evaluates the list elements.+seqrev :: [a] -> [a]+seqrev l =+    foldl (\xs x -> x `seq` xs `seq` (x:xs)) [] l++-- A symbol is made from alphanumeric characters or special+-- characters.  A symbol may not start with a digit, or with a plus or+-- minus sign followed by a digit.+isSym :: Char -> Bool+isSym c =  isAlphaNum c || elem c specialChars++specialChars :: String+specialChars = "+-*/<=>!?:$%_&~^"++-- A string is made from alphanumeric characters or an extension of the+-- special characters.+isStr :: Char -> Bool+isStr c = isPrint c && isAscii c && c /= '"' && c /= '\\'
+ src/CPSA/Lib/Strand.hs view
@@ -0,0 +1,1630 @@+-- Strand Space data structures++-- 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.Lib.Strand (Instance, mkInstance, bldInstance, mkListener,+    role, env, trace, height, listenerTerm, Sid, Node, mkPreskel,+    firstSkeleton, Pair, Preskel, gen, protocol, insts, orderings,+    pov, knon, kunique, kcomment, nstrands, kvars, kterms, uniqOrig,+    preskelWellFormed, verbosePreskelWellFormed, Strand, GraphStrand,+    nodes, Vertex, GraphNode, preds, event, graphNode, strands, Gist,+    gist, contract, contractAndOrder, copresent, augment, inheritRnon,+    inheritRunique, addListener, Cause (..), Direction (..), Method+    (..), Operation (..), operation, prob, homomorphism, toSkeleton,+    generalize, collapse) where++import Control.Monad+import qualified Data.List as L+import qualified Data.Set as S+import Data.Set (Set)+import qualified Data.Maybe as M+import CPSA.Lib.Utilities+import CPSA.Lib.SExpr+import CPSA.Lib.Algebra+import CPSA.Lib.Protocol++{--+import System.IO.Unsafe+z :: Show a => a -> b -> b+z x y = seq (unsafePerformIO (print x)) y++zz :: Show a => a -> a+zz x = z x x++zb :: Show a => a -> Bool -> Bool+zb a False = z a False+zb _ b = b++zn :: Show a => a -> Maybe b -> Maybe b+zn x Nothing = z x Nothing+zn _ y = y++zf :: Show a => a -> Bool -> Bool+zf x False = z x False+zf _ y = y++zt :: Show a => a -> Bool -> Bool+zt x True = z x True+zt _ y = y++zi :: Algebra t p g s e c => Instance t p g s e c -> String+zi inst =+    show (map f e)+    where+      domain = rvars (role inst)+      e = reify domain (env inst)+      range = map snd e+      f (x, t) = (displayTerm (context domain) x,+                  displayTerm (context range) t)+      context ts = addToContext emptyContext ts+--}++-- Instances and Strand Identifiers++-- An Instance is an instance of a role, in the sense that each+-- variable in the role's trace has been replaced by a term.  The+-- trace of the instance might be shorter that the role's trace, but+-- only truncating nodes from the end of the trace.++-- A preskeleton stores its strands as a ordered sequence of+-- instances.  A strand is the position of an instance in the+-- sequence.  Duplicates are allowed in the sequence, as two strands+-- can be instantiated from the same role in the same way.++type Sid = Int                  -- Strand Identifier++data Algebra t p g s e c => Instance t p g s e c = Instance+    { role :: Role t p g s e c, -- Role from which this was+                                -- instantiated++      env :: !e,                -- The environment used to build this+                                -- instance's trace from its role's+                                -- trace++      trace :: ![Event t p g s e c], -- Instance's trace++      height :: !Int }          -- Height of the instance+    deriving Show++-- Create a fresh instance of the given height.  The environment+-- specifies how to map some variables in the role's trace.  Unmapped+-- variables are instantiated with fresh variables to avoid naming+-- conflicts.+mkInstance :: Algebra t p g s e c => g -> Role t p g s e c ->+              e -> Int -> (g, Instance t p g s e c)+mkInstance gen role env height =+    let trace = rtrace role+        rheight = length trace in+    if height < 1 || height > rheight then+        error "Strand.mkInstance: Bad strand height"+    else+        let (gen', env') = grow (rvars role) gen env+            trace' = map (evtMap $ instantiate env') (take height trace) in+        -- Ensure every variable in the range of the environment+        -- occurs in the trace.+        case bldInstance role trace' gen' of+          Nothing -> error "Strand.mkInstance: Not an instance"+          Just (gen'', inst) -> (gen'', inst)++-- For each term that matches itself in the environment, extend the+-- mapping so that the term maps to one with a fresh set of variables.+-- It is an error if a variable in one of the terms is explicitly+-- mapped to itself in the initial environment.+grow :: Algebra t p g s e c => [t] -> g -> e -> (g, e)+grow [] gen env = (gen, env)+grow (t : ts) gen env =+    case match t t (gen, env) of+      Nothing -> grow ts gen env -- Term already mapped+      Just _ ->                  -- Otherwise make a fresh mapping+          let (gen', t') = clone gen t in+          case match t t' (gen', env) of+            Nothing -> error "Strand.grow: Internal error"+            Just (gen'', env') -> grow ts gen'' env'++-- Build an instance from a role and a trace.  Returns Nothing if the+-- trace is not an instance of the given role.+bldInstance :: Algebra t p g s e c => Role t p g s e c ->+               Trace t p g s e c -> g -> Maybe (g, Instance t p g s e c)+bldInstance _ [] _ = error "Strand.bldInstance: Bad trace"+bldInstance role trace gen =+    loop (rtrace role) trace (gen, emptyEnv) -- Loop builds env+    where+      loop _ [] (gen, env) =        -- Trace can be shorter than role's trace+          Just (gen, makeInstance role env trace)+      loop (In t : c) (In t' : c') ge =+          maybe Nothing (loop c c') (match t t' ge)+      loop (Out t : c) (Out t' : c') ge =+          maybe Nothing (loop c c') (match t t' ge)+      loop _ _ _ = Nothing++makeInstance :: Algebra t p g s e c => Role t p g s e c -> e ->+                Trace t p g s e c -> Instance t p g s e c+makeInstance role env trace =+    Instance { role = role,+               env = env,+               trace = trace,+               height = length trace }++-- This is the only place a role is generated with an empty name.+-- This is what marks a strand as a listener.+mkListener :: Algebra t p g s e c => g -> t ->+              (g, Instance t p g s e c)+mkListener gen term =+    (gen'', Instance { role = mkRole "" vars [In rterm, Out rterm] [] [] [],+                       env = env,+                       trace = [In term, Out term],+                       height = 2 })+    where+      (gen', rterm) = clone gen term -- Make role term+      vars = addVars [] rterm        -- Collect vars in role term+      (gen'', env) =+          case match rterm term (gen', emptyEnv) of+            Nothing -> error msg+            Just (gen'', env) -> (gen'', env)+      msg = "Strand.mkListener: cannot generate an environment."++listenerTerm :: Algebra t p g s e c => Instance t p g s e c -> Maybe t+listenerTerm inst =+    if "" /= rname (role inst) then+        Nothing                 -- Not a listener strand+    else+        Just $ evtTerm (trace inst !! 0)++-- Nodes, Pairs, and Graphs++-- A node is composed of two integers, a strand identifier and a+-- position.  The position identifies an event in the strand's trace.+-- The second integer must be non-negative and less than the strand's+-- height++type Node = (Sid, Int)++-- A pair gives an ordering of two nodes, meaning the first node is+-- before the second one.++type Pair = (Node, Node)++-- Graphs of preskeletons++-- A strand is what is referred to by a strand ID.++data GraphStrand e i                 -- e for event, i for instance+    = GraphStrand { inst :: i,+                    nodes :: [GraphNode e i],+                    sid :: Sid }++-- The Strand ID determines equality and orderings+instance Eq (GraphStrand e i) where+    s0 == s1 = sid s0 == sid s1++instance Ord (GraphStrand e i) where+    compare s0 s1 = compare (sid s0) (sid s1)++instance Show (GraphStrand e i) where+    showsPrec _ s = shows (sid s)++-- A vertex is what is referred to by a node.++data GraphNode e i                 -- e for event, i for instance+    = GraphNode { event :: e,+                  preds :: [GraphNode e i], -- Immediate preds including+                  strand :: GraphStrand e i,  -- strand succession edges+                  pos :: Int }  -- The position of the node in the strand++-- The node determines equality and orderings+instance Eq (GraphNode e i) where+    n0 == n1 = (strand n0, pos n0) == (strand n1, pos n1)++instance Ord (GraphNode e i) where+    compare n0 n1 = compare (strand n0, pos n0) (strand n1, pos n1)++instance Show (GraphNode e i) where+    showsPrec _ n = let (s, p) = graphNode n in+                    showChar '(' . shows s . showString ", " .+                    shows p . showChar ')'++-- The node of a vertex+graphNode :: GraphNode e i -> Node+graphNode n = (sid (strand n), pos n)++type GraphEdge e i = (GraphNode e i, GraphNode e i)++-- The pair of an edge+graphPair :: GraphEdge e i -> Pair+graphPair (n0, n1) = (graphNode n0, graphNode n1)++data Graph e i+    = Graph { gstrands :: [GraphStrand e i],+              gedges :: [GraphEdge e i] }++-- The graph associated with a preskeleton+graph :: (i -> [d]) -> (i -> Int) -> [i] -> [Pair] -> Graph d i+graph trace height insts pairs =+    Graph { gstrands = strands,+            gedges = map getEdge pairs }+    where+      strands = [ GraphStrand { inst = inst,+                                nodes = nodes !! sid,+                                sid = sid } |+                  (sid, inst) <- zip [0..] insts ]+      nodes = [ [ GraphNode { event = trace (inst strand) !! pos,+                              preds = preds (sid, pos),+                              strand = strand,+                              pos = pos } |+                  pos <- nats (height (inst strand)) ] |+                (sid, strand) <- zip [0..] strands ]+      preds n = map getNode (entry n)+      getNode (s, p) = nodes !! s !! p+      getEdge (n0, n1) = (getNode n0, getNode n1)+      entry n = enrich n [ n0 | (n0, n1) <- pairs, n1 == n ]+      -- add strand succession edges+      enrich (s, p) ns+          | p > 0 = (s, p - 1) : ns+          | otherwise = ns++-- Does start node precede end node?+graphPrecedes :: GraphNode e i -> GraphNode e i -> Bool+graphPrecedes start end =+    let predecessors = preds end in+    any (== start) predecessors || any (graphPrecedes start) predecessors++-- Compute the transitive reduction+graphReduce :: [GraphEdge e i] -> [GraphEdge e i]+graphReduce orderings =+    filter essential orderings+    where+      essential (dst, src) =+          loop dst (L.delete dst (preds src)) [src]+      loop _ [] _ = True        -- No other path found+      loop dst (n : ns) seen+          | n == dst = False    -- There is another path+          | elem n seen = loop dst ns seen+          | otherwise = loop dst (preds n ++ ns) (n : seen)++-- Compute the transitive closure+-- This routine returns pairs that are not well ordered.+-- Deal with it!+graphClose :: [GraphEdge e i] -> [GraphEdge e i]+graphClose orderings =+    filter (not . sameStrands) (loop orderings False orderings)+    where+      loop orderings False [] = orderings+      loop orderings True [] =+          loop orderings False orderings -- restart loop+      loop orderings repeat ((n0, n1) : pairs) =+          inner orderings repeat pairs [(n, n1) | n <- preds n0]+      inner orderings repeat pairs [] =+          loop orderings repeat pairs+      inner orderings repeat pairs (p : rest)+          | elem p orderings = inner orderings repeat pairs rest+          | otherwise = inner (p : orderings) True pairs rest+      sameStrands (n0, n1) = strand n0 == strand n1++-- Preskeltons++data Algebra t p g s e c => Preskel t p g s e c = Preskel+    { gen :: !g,+      protocol :: Prot t p g s e c,+      insts :: ![Instance t p g s e c],+      strands :: ![Strand t p g s e c],+      orderings :: ![Pair],+      edges :: ![Edge t p g s e c],+      knon :: ![t],             -- A list of atoms+      kunique :: ![t],          -- A list of atoms+      kcomment :: [SExpr ()],   -- Comments from the input+      korig :: ![(t, [Node])],  -- This is an association list with a+                                -- pair for each element of kunique.+                                -- The value associated with a term+                                -- is a list of the nodes at which it+                                -- originates--the term's provenance.+      pov :: Maybe (Preskel t p g s e c), -- Point of view, the+                                          -- original problem statement.+      strandids :: ![Sid],+      tc :: [Pair],             -- Transitive closure of orderings+                                -- Used only during generalization+      operation :: Operation t p g s e c,+      prob :: [Sid] }        -- A map from the strands in the original+    deriving Show               -- problem statement, the pov, into+                                -- these strands.++-- The pov skeleton is the only skeleton that should have Nothing in+-- its pov field.++type Strand t p g s e c+    = GraphStrand (Event t p g s e c) (Instance t p g s e c)++type Vertex t p g s e c+    = GraphNode (Event t p g s e c) (Instance t p g s e c)++type Edge t p g s e c+    = GraphEdge (Event t p g s e c) (Instance t p g s e c)++-- Data structure for tracking the causes for the creation of+-- preskeletons.++data Algebra t p g s e c => Cause t p g s e c+    = Cause Direction Node t (Set t)+    deriving Show++data Direction = Encryption | Nonce deriving Show++data Algebra t p g s e c => Method t p g s e c+    = Deleted Node+    | Weakened Pair+    | Separated t+    | Forgot t deriving Show++-- The operation used to generate the preskeleteton is either new via+-- the loader, a contraction, a regular augmentation, a listener+-- augmentation, or a mininization.  The augmentation includes a role+-- name and instance height.+data Algebra t p g s e c => Operation t p g s e c+    = New+    | Contracted s (Cause t p g s e c)+    | AddedOrdering Node (Cause t p g s e c)+    | AddedStrand String Int (Cause t p g s e c)+    | AddedListener t (Cause t p g s e c)+    | Generalized (Method t p g s e c)+    | Collapsed Int Int+      deriving Show++-- Create a preskeleton.  The point of view field is not filled in.+-- This version is exported for use by the loader.  This preskeleton+-- must be consumed by firstSkeleton.+mkPreskel :: Algebra t p g s e c => g -> Prot t p g s e c ->+             [Instance t p g s e c] -> [Pair] -> [t] -> [t] ->+             [SExpr ()] -> Preskel t p g s e c+mkPreskel gen protocol insts orderings non unique comment =+    k { kcomment = comment }+    where+      k = newPreskel gen protocol insts orderings non unique New prob Nothing+      prob = strandids k        -- Fixed point on k is okay.++-- Strand functions++strandInst :: Algebra t p g s e c => Preskel t p g s e c ->+              Sid -> Instance t p g s e c+strandInst k strand = insts k !! strand++nstrands :: Algebra t p g s e c => Preskel t p g s e c -> Int+nstrands k = length (strandids k)++-- Convert the preskeleton made by the loader into the first skeleton+-- used in the search.+firstSkeleton :: Algebra t p g s e c => Preskel t p g s e c ->+                 Maybe (Preskel t p g s e c)+firstSkeleton k =+    do+      k <- wellFormedPreskel k+      k' <- toSkeleton True k   -- only k' should have pov = Nothing+      return $ k' { prob = strandids k', pov = Just k' }++-- Create a preskeleton.  The node ordering relation is put into the+-- preds field of each instance in this function.  The maybe uniquely+-- originating term data is also filled in.  This version is used+-- within this module.+newPreskel :: Algebra t p g s e c => g -> Prot t p g s e c ->+             [Instance t p g s e c] -> [Pair] -> [t] -> [t] ->+             Operation t p g s e c -> [Sid] ->+             Maybe (Preskel t p g s e c) -> Preskel t p g s e c+newPreskel gen protocol insts orderings non unique oper prob pov =+    let orderings' = L.nub orderings+        unique' = L.nub unique+        g = graph trace height insts orderings'+        strands = gstrands g+        edges = gedges g+        orig = map (originationNodes strands) unique'+        edges' = addSuccessors strands edges+        tc = filter pairWellOrdered (graphClose edges') in+    Preskel { gen = gen,+              protocol = protocol,+              insts = insts,+              strands = strands,+              orderings = orderings',+              edges = edges,+              knon = L.nub non,+              kunique = unique',+              kcomment = [],+              korig = orig,+              tc = map graphPair tc,+              strandids = nats (length insts),+              operation = oper,+              prob = prob,+              pov = pov }++vertex  :: Algebra t p g s e c => Preskel t p g s e c -> Node ->+           Vertex t p g s e c+vertex k (s, p) =+    nodes (strands k !! s) !! p++originationNodes :: Algebra t p g s e c => [Strand t p g s e c] ->+                    t -> (t, [Node])+originationNodes strands u =+    (u, [ (sid strand, p) |+          strand <- reverse strands,+          p <- M.maybeToList $ originationPos u (trace (inst strand)) ])++uniqOrig :: Algebra t p g s e c => Preskel t p g s e c -> [t]+uniqOrig k =+    do+      (t, [_]) <- reverse (korig k)+      return t++-- A preskeleton is well formed if the ordering relation is acyclic,+-- each atom declared to be uniquely-originating is carried in+-- some preskeleton term, and every variable that occurs in each base+-- term declared to be non-originating occurs in some preskeleton+-- term, and the atom must never be carried by any term, and+-- every uniquely originating role term mapped by an instance is+-- mapped to a term that originates on the instance's strand.++preskelWellFormed :: Algebra t p g s e c => Preskel t p g s e c -> Bool+preskelWellFormed k =+    varSubset (knon k) terms &&+    all nonCheck (knon k) &&+    all uniqueCheck (kunique k) &&+    wellOrdered k && acyclicOrder k &&+    roleOrigCheck k+    where+      terms = kterms k+      nonCheck t = all (not . carriedBy t) terms+      uniqueCheck t = any (carriedBy t) terms++-- Do notation friendly preskeleton well formed check.+wellFormedPreskel :: Algebra t p g s e c => Preskel t p g s e c ->+                     Maybe (Preskel t p g s e c)+wellFormedPreskel k =+    assert preskelWellFormed k++-- A version of preskelWellFormed that explains why a preskeleton is+-- not well formed.+verbosePreskelWellFormed :: (Monad m, Algebra t p g s e c) =>+                            Preskel t p g s e c -> m ()+verbosePreskelWellFormed k =+    do+      failwith "a variable in non-orig is not in some trace"+                   $ varSubset (knon k) terms+      mapM_ nonCheck $ knon k+      mapM_ uniqueCheck $ kunique k+      failwith "ordered pairs not well formed" $ wellOrdered k+      failwith "cycle found in ordered pairs" $ acyclicOrder k+      failwith "an inherited unique doesn't originate in its strand"+                   $ roleOrigCheck k+    where+      terms = kterms k+      nonCheck t =+          failwith (showString "non-orig " $ showst t " carried")+                       $ all (not . carriedBy t) terms+      uniqueCheck t =+          failwith (showString "uniq-orig " $ showst t " not carried")+                       $ any (carriedBy t) terms++failwith :: Monad m => String -> Bool -> m ()+failwith msg test =+    case test of+      True -> return ()+      False -> fail msg++showst :: Algebra t p g s e c => t -> ShowS+showst t =+    shows $ displayTerm (addToContext emptyContext [t]) t++-- Do the nodes in the orderings have the right direction?+wellOrdered :: Algebra t p g s e c => Preskel t p g s e c -> Bool+wellOrdered k =+    all pairWellOrdered (edges k)++pairWellOrdered :: Algebra t p g s e c => Edge t p g s e c -> Bool+pairWellOrdered (n0, n1) =+    case (event n0, event n1) of+      (Out _, In _) -> True+      _ -> False++-- The terms used in the strands in this preskeleton.+-- Should this return a set, or a multiset?+kterms :: Algebra t p g s e c => Preskel t p g s e c -> [t]+kterms k = iterms (insts k)++-- The terms used in a list of instances.+iterms :: Algebra t p g s e c => [Instance t p g s e c] -> [t]+iterms insts =+    foldl addSTerms [] insts+    where+      addSTerms ts s =+          foldl (flip $ adjoin . evtTerm) ts (trace s)++-- The node orderings form an acyclic order if there are no cycles.+-- Use depth first search to detect cycles.  A graph with no node with+-- an indegree of zero is cyclic and must not be checked with depth+-- first search.+acyclicOrder :: Algebra t p g s e c => Preskel t p g s e c -> Bool+acyclicOrder k =+    all (not . backEdge numbering) (edges k)+    where+      -- The starting set contains the last node in every strand+      start = map (last . nodes) (strands k)+      -- Remove nodes that have non-zero indegree+      start' = foldl (flip L.delete) start (map fst (edges k))+      numbering = dfs preds start'++-- Variables in this preskeleton, excluding ones in roles, and ones+-- that only occur in a cause.+kvars :: Algebra t p g s e c => Preskel t p g s e c -> [t]+kvars k =+    S.elems $ foldl f S.empty (insts k)+    where+      f s i = foldl g s (reify (rvars (role i)) (env i))+      g s (_, t) = foldVars (flip S.insert) s t++{--+kvars :: Algebra t p g s e c => Preskel t p g s e c -> [t]+kvars k =+    S.elems $ foldl addInstVars S.empty (insts k)++addInstVars :: Algebra t p g s e c => Set t -> Instance t p g s e c -> Set t+addInstVars vars inst =+    foldl f vars (reify (rvars (role inst)) (env inst))+    where+      f s (_, t) = foldVars (flip S.insert) s t+--}++-- Ensure each role unique origination assumption mapped by an+-- instance originates in the instance's strand.+roleOrigCheck :: Algebra t p g s e c => Preskel t p g s e c -> Bool+roleOrigCheck k =+    all strandRoleOrig (strands k) -- Check each strand+    where+      strandRoleOrig strand =   -- Check each role unique used in strand+          all (uniqRoleOrig strand) $ ruorig $ role $ inst strand+      uniqRoleOrig strand (ru, pos)+          | pos < height (inst strand) =+              case lookup (instantiate (env $ inst strand) ru) (korig k) of+                Nothing -> True     -- role term not mapped+                Just ns -> any (\(s,_)-> sid strand == s) ns+          | otherwise = True++-- Support for preskeleton transitive closure computation++-- Add the successor edges from a list of strands to another list of edges.+addSuccessors :: [GraphStrand e i] -> [GraphEdge e i] -> [GraphEdge e i]+addSuccessors strands edges =+    foldl f edges strands+    where+      f edges strand =+          successors edges (nodes strand)++successors :: [(a, a)] -> [a] -> [(a, a)]+successors z (x : y : xs) =+    successors ((x, y) : z) (y : xs)+successors z _ = z++-- Isomorphism Check++-- Are two skeletons equivalent?  Two skeletons are equivalent if they+-- are isomorphic.  A key efficiency requirement in the implementation+-- of the cryptograhic protocol shapes analysis algorithm is to ensure+-- only one member of each equivalence class of skeletons is analyzed,+-- and the results of that analysis is immediately used for all other+-- members of the equivalence class.++-- To meet this requirement, a list of skeletons that have been seen+-- is maintained.  Before a skeleton is put on a to do list for+-- analysis, it is checked to see if it is ismorphic to one already+-- seen.  If so, the results of the analysis for the ismorphic+-- skeleton is used instead of putting the skeleton on the to do list.++-- Once a skeleton has been printed, the only reason for saving it is+-- for isomorphism checking.  The isomorphism check is performed+-- frequently, so an specialized data structure is used.  The gist of+-- a skeleton is all that is needed for the test for equivalence.++data Algebra t p g s e c => Gist t p g s e c = Gist+    { ggen :: g,+      gtraces :: [(Int, Trace t p g s e c)],+      gorderings :: [Pair],+      gnon :: [t],             -- A list of non-originating terms+      gunique :: [t],          -- A list of uniquely-originating terms+      nvars :: !Int,           -- Number of variables+      ntraces :: !Int,         -- Number of traces+      norderings :: !Int,      -- Number of orderings+      nnon :: !Int,            -- Number of non-originating terms+      nunique :: !Int }        -- Number of uniquely-originating terms+    deriving Show++gist :: Algebra t p g s e c => Preskel t p g s e c ->+        Gist t p g s e c+gist k =+    Gist { ggen = gen k,+           gtraces = gtraces,+           gorderings = gorderings,+           gnon = gnon,+           gunique = gunique,+           nvars = length (kvars k),+           ntraces = length gtraces,+           norderings = length gorderings,+           nnon = length gnon,+           nunique = length gunique }+    where+      gtraces = map (\i -> (height i, trace i)) (insts k)+      gorderings = orderings k+      gnon = knon k+      gunique = kunique k++-- Test to see if two preskeletons are isomorphic++-- First, ensure the two preskeletons have:+-- 1. The same number of variables+-- 2. The same number of strands+-- 3. The same number of node orderings+-- 4. The same number of terms in knon and kunique++-- Next compute the plausible permutations and substitutions.++-- Next, for each permutation of the strands, eliminate the ones that+-- map a strand to another of a different length, and don't cause the+-- node orderings to be equal.++-- For permutations that meet the previous conditions, see if there is+-- a renaming that maps every strand trace in one preskeleton into the+-- appropriate one in the other preskeleton.  Finally, check to see if+-- the renaming works in the nr and ur terms.++instance Algebra t p g s e c => Eq (Gist t p g s e c) where+    g == g' = isomorphic g g'++isomorphic :: Algebra t p g s e c => Gist t p g s e c ->+              Gist t p g s e c -> Bool+isomorphic g g' =+    nvars g == nvars g' &&+    ntraces g == ntraces g' &&+    norderings g == norderings g' &&+    nnon g == nnon g' &&+    nunique g == nunique g' &&+    any (tryPerm g g') (permutations g g')++-- Extend a permutation while extending a substitution+-- Extend by matching later strands first+permutations :: Algebra t p g s e c => Gist t p g s e c ->+                Gist t p g s e c -> [((g, e), [Sid])]+permutations g g' =+    map rev $ perms (ggen g', emptyEnv)+                    (reverse $ gtraces g)+                    (reverse $ nats $ ntraces g)+    where+      perms env [] [] = [(env, [])]+      perms env ((h, c):hcs) xs =+          [ (env'', x:ys) |+            x <- xs,+            let (h', c') = gtraces g' !! x,+            h == h',+            env' <- M.maybeToList $ jibeTraces c c' env,+            (env'', ys) <- perms env' hcs (L.delete x xs) ]+      perms _ _ _ = error "Strand.permutations: lists not same length"+      rev (env, xs) = (env, reverse xs)++-- Length of matched traces must agree.+jibeTraces :: Algebra t p g s e c => Trace t p g s e c ->+              Trace t p g s e c -> (g, e) -> Maybe (g, e)+jibeTraces [] [] ge = Just ge+jibeTraces (In t : c) (In t' : c') ge =+    maybe Nothing (jibeTraces c c') (match t t' ge)+jibeTraces (Out t : c) (Out t' : c') ge =+    maybe Nothing (jibeTraces c c') (match t t' ge)+jibeTraces _ _ _ = Nothing++{-+-- Here is the permutation algorithm used++permutations :: Int -> [[Int]]+permutations n =+    perms (nats n)+    where+      perms []  = [[]]+      perms xs = [ x:ys | x <- xs, ys <- perms (L.delete x xs) ]++-- Here is the usual algorithm++-- Returns a list of all the permutations of the natural numbers less+-- that the argument.  The identity permutation is the first one in+-- the returned list.  The code is based on a function in Haskell 1.3.+permutations :: Int -> [[Int]]+permutations n =+    perms (nats n)+    where+      perms [] = [[]]+      perms (x:xs) = [zs | ys <- perms xs, zs <- interleave x ys]+      interleave x [] = [[x]]+      interleave x (y:ys) = (x:y:ys) : map (y:) (interleave x ys)+-}++tryPerm :: Algebra t p g s e c => Gist t p g s e c ->+           Gist t p g s e c -> ((g, e), [Sid]) -> Bool+tryPerm g g' (env, perm) =+    checkOrigs g g' env &&+    containsMapped (permutePair perm) (gorderings g') (gorderings g)++-- containsMapped f xs ys is true when list xs contains each element+-- in ys after being mapped with function f.+containsMapped :: Eq a => (a -> a) -> [a] -> [a] -> Bool+containsMapped f xs ys =+    all (flip elem xs) (map f ys)++permutePair :: [Sid] -> Pair -> Pair+permutePair perm (n, n') = (permuteNode perm n, permuteNode perm n')++permuteNode :: [Sid] -> Node -> Node+permuteNode perm (strand, pos) = (perm !! strand, pos)++checkOrigs :: Algebra t p g s e c => Gist t p g s e c ->+              Gist t p g s e c -> (g, e) -> Bool+checkOrigs g g' env =+    not (null+         [ env'' |+           env' <- checkOrig env (gnon g) (gnon g'),+           env'' <- checkOrig env' (gunique g) (gunique g'),+           matchRenaming env'' ])++-- Try all permutations as done above+checkOrig :: Algebra t p g s e c => (g, e) -> [t] -> [t] -> [(g, e)]+checkOrig env [] [] = [env]+checkOrig env (t:ts) ts' =+    [ env'' |+      t' <- ts',+      env' <- M.maybeToList $ match t t' env,+      env'' <- checkOrig env' ts (L.delete t' ts') ]+checkOrig _ _ _ = error "Strand.checkOrig: lists not same length"++-- Preskeleton Reduction System (PRS)++-- The PRS reduces a preskeleton to skeleton or fails.  Along the way,+-- it applies the associtated homomorphism to a node and computes a+-- substitution.  Thus if skel (k, n, empty) = Just (k', n', sigma), then+-- pi,sigma is a homomorphism from k to k', n' = pi(n).++type PRS t p g s e c = (Preskel t p g s e c, Node, s)++-- Returns the preskeleton that results from applying a substitution+-- or nothing if fails to preserve the nodes at which each maybe+-- uniquely originating term originates, or produces a strand that is+-- not an instance of its role.++ksubst :: Algebra t p g s e c => PRS t p g s e c ->+          (g, s) -> Maybe (PRS t p g s e c)+ksubst (k, n, hsubst) (gen, subst) =+    do+      (gen', insts') <- foldMapM (substInst subst) gen (insts k)+      let non' = map (substitute subst) (knon k)+      let unique' = map (substitute subst) (kunique k)+      let operation' = substOper subst (operation k)+      let k' = newPreskel gen' (protocol k) insts'+               (orderings k) non' unique' operation' (prob k) (pov k)+      k' <- wellFormedPreskel k'+      case validateSubst k subst k' of+        True -> return (k', n, compose subst hsubst)+        False -> fail ""++-- Monad version of mapAccumR+foldMapM :: Monad m => (a -> b -> m (a, c)) -> a -> [b] -> m (a, [c])+foldMapM _ acc [] = return (acc, [])+foldMapM f acc (x:xs) =+    do+      (acc', xs') <- foldMapM f acc xs+      (acc'', x') <- f acc' x+      return (acc'', x':xs')++substInst :: Algebra t p g s e c => s -> g -> Instance t p g s e c ->+             Maybe (g, Instance t p g s e c)+substInst subst gen i =+    bldInstance (role i) (map (evtMap $ substitute subst) (trace i)) gen++substOper :: Algebra t p g s e c => s ->+             Operation t p g s e c ->+             Operation t p g s e c+substOper _ New = New+substOper subst (Contracted s cause) =+    Contracted (compose subst s) (substCause subst cause)+substOper subst (AddedOrdering node cause) =+    AddedOrdering node (substCause subst cause)+substOper subst (AddedStrand role height cause) =+    AddedStrand role height (substCause subst cause)+substOper subst (AddedListener t cause) =+    AddedListener (substitute subst t) (substCause subst cause)+substOper _ m@(Generalized _) = m+substOper _ m@(Collapsed _ _) = m++substCause :: Algebra t p g s e c => s ->+              Cause t p g s e c ->+              Cause t p g s e c+substCause subst (Cause dir n t escape) =+    Cause dir n (substitute subst t) (S.map (substitute subst) escape)++validateSubst :: Algebra t p g s e c => Preskel t p g s e c ->+                 s -> Preskel t p g s e c -> Bool+validateSubst k subst k' =+    all check (korig k)+    where+      check (u, ns) =+          case lookup (substitute subst u) (korig k') of+            Nothing -> False+            Just ns' -> all (flip elem ns') ns++-- A compression (s is to be eliminated)+compress :: Algebra t p g s e c => PRS t p g s e c ->+            Sid -> Sid -> Maybe (PRS t p g s e c)+compress (k, n, hsubst) s s' =+    do+      let perm = updatePerm s s' (strandids k)+      orderings' <- normalizeOrderings (permuteOrderings perm (orderings k))+      let k' =+              newPreskel+              (gen k)+              (protocol k)+              (deleteNth s (insts k))+              orderings'+              (knon k)+              (kunique k)+              (operation k)+              (updateProb perm (prob k))+              (pov k)+      k'' <- wellFormedPreskel k'+      return (k'', permuteNode perm n, hsubst)++permuteOrderings :: [Sid] -> [Pair] -> [Pair]+permuteOrderings perm orderings = map (permutePair perm) orderings++updatePerm :: Int -> Int -> [Sid] -> [Sid]+updatePerm old new perm =+    map f perm+    where+      f i =+          let j = if old == i then new else i in+          if j > old then j - 1 else j++-- Eliminates implied intrastrand orderings and fails if it finds a+-- reverse intrastrand ordering.+normalizeOrderings :: [Pair] -> Maybe [Pair]+normalizeOrderings orderings =+    loop [] orderings+    where+      loop acc [] = Just acc+      loop acc (p@((s0, p0), (s1, p1)) : ps)+          | s0 /= s1 = loop (p : acc) ps+          | p0 < p1 = loop acc ps+          | otherwise = Nothing++updateProb :: [Sid] -> [Sid] -> [Sid]+updateProb mapping prob =+    map (mapping !!) prob++-- Hulling or Ensuring Unique Origination++-- This is the starting point of the Preskeleton Reduction System+hull :: Algebra t p g s e c => Bool -> PRS t p g s e c ->+        Maybe (PRS t p g s e c)+hull prune (k, n, hsubst) =+    loop (kunique k)+    where+      loop [] = enrich prune (k, n, hsubst) -- No uniques originate+      loop (term : terms) =                 -- on more than one strand+          case findPair k term of+            Nothing -> loop terms+            Just (s, s') ->+                do+                  (s'', s''', subst) <- unifyStrands k s s'+                  prs <- ksubst (k, n, hsubst) subst+                  prs' <- compress prs s'' s'''+                  hull prune prs'+      findPair k term =+          case lookup term (korig k) of+            Just ((s, _) : (s', _) : _) -> Just (s, s')+            Just _ -> Nothing+            Nothing -> error "Strand.toSkeleton: term not in kunique"++-- See if two strands unify.  They can be of differing heights.  The+-- second strand returned may be longer.+unifyStrands :: Algebra t p g s e c => Preskel t p g s e c ->+                Sid -> Sid -> Maybe (Sid, Sid, (g, s))+unifyStrands k s s' =+    let i = strandInst k s+        i' = strandInst k s' in+    if height i > height i' then+        unifyStrands k s' s+    else+        do+          (gen', subst) <- unifyTraces (trace i) (trace i') (gen k, emptySubst)+          return (s, s', (gen', subst))++-- Unify traces where the first trace is allowed to be shorter than+-- the second trace.+unifyTraces :: Algebra t p g s e c => Trace t p g s e c ->+               Trace t p g s e c -> (g, s) -> Maybe (g, s)+unifyTraces [] _ subst = Just subst+unifyTraces (In t : c) (In t' : c') subst =+    maybe Nothing (unifyTraces c c') (unify t t' subst)+unifyTraces (Out t : c) (Out t' : c') subst =+    maybe Nothing (unifyTraces c c') (unify t t' subst)+unifyTraces _ _ _ = Nothing++-- Order Enrichment++-- Adds orderings so that a skeleton respects origination.++enrich :: Algebra t p g s e c => Bool -> PRS t p g s e c ->+          Maybe (PRS t p g s e c)+enrich prune (k, n, hsubst) =+    let o = foldl (addOrderings k) (orderings k) (kunique k) in+    if length o == length (orderings k) then+        maybePrune prune (k, n, hsubst)    -- Nothing to add+    else+        do+          let k' =+                  newPreskel+                  (gen k)+                  (protocol k)+                  (insts k)+                  o+                  (knon k)+                  (kunique k)+                  (operation k)+                  (prob k)+                  (pov k)+          k' <- wellFormedPreskel k'+          maybePrune prune (k', n, hsubst)++maybePrune :: Algebra t p g s e c => Bool -> PRS t p g s e c ->+              Maybe (PRS t p g s e c)+maybePrune True prs = prune prs+maybePrune False prs = reduce prs++origNode :: Algebra t p g s e c => Preskel t p g s e c ->+            t -> Maybe Node+origNode k t =+    case lookup t (korig k) of+      Nothing -> error "Strand.origNode: term not in kunique"+      Just [] -> Nothing+      Just [n] -> Just n+      Just _ -> error "Strand.origNode: not a hulled skeleton"++addOrderings :: Algebra t p g s e c => Preskel t p g s e c ->+                [Pair] -> t -> [Pair]+addOrderings k orderings t =+    case origNode k t of+      Nothing -> orderings+      Just n@(s, _) ->+          foldl f orderings (L.delete s (strandids k))+          where+            f orderings s =+                case acquiredPos t (trace (strandInst k s)) of+                  Nothing -> orderings+                  Just pos -> adjoin (n, (s, pos)) orderings++-- Redundant Strand Elimination (also known as pruning)++prune :: Algebra t p g s e c => PRS t p g s e c -> Maybe (PRS t p g s e c)+prune (k, n, hsubst) =+    pruneStrands (k, n, hsubst) (strandids k) (strandids k)++pruneStrands :: Algebra t p g s e c => PRS t p g s e c ->+                     [Sid] -> [Sid] -> Maybe (PRS t p g s e c)+pruneStrands prs [] _ =+    reduce prs                  -- No redundant strands found+pruneStrands prs@(k, _, _) (_:ss) [] =+    pruneStrands prs ss (strandids k)+pruneStrands prs (s:ss) (s':ss')+    | s == s' = pruneStrands prs (s:ss) ss'+    | otherwise =+        maybe (pruneStrands prs (s:ss) ss')       -- Try next pair+              prune                               -- Success+              (pruneStrand prs s s')+    where+      -- A strand is redundant if there is an environment that maps+      -- the trace of s into a prefix of the trace of s', but changes+      -- no other traces in the preskeleton.+      pruneStrand prs@(k, _, _) s s' =+          do+            env <- matchTraces+                   (trace (strandInst k s))+                   (trace (strandInst k s'))+                   (gen k, emptyEnv)+            (gen', env') <- idempotentEnvFor env+                            (concatMap (tterms . trace) $ deleteNth s $ insts k)+            case origCheck k env' of+              True -> return ()+              False -> Nothing+            case all (precedesCheck k s s') (edges k) of+              True -> return ()+              False -> Nothing+            prs <- ksubst prs (gen', substitution env')+            compress prs s s'++matchTraces :: Algebra t p g s e c => Trace t p g s e c ->+               Trace t p g s e c -> (g, e) -> Maybe (g, e)+matchTraces [] _ env = Just env -- Pattern can be shorter+matchTraces (In t : c) (In t' : c') env =+    maybe Nothing (matchTraces c c') (match t t' env)+matchTraces (Out t : c) (Out t' : c') env =+    maybe Nothing (matchTraces c c') (match t t' env)+matchTraces _ _ _ = Nothing++origCheck :: Algebra t p g s e c => Preskel t p g s e c -> e -> Bool+origCheck k env =+    check (kunique k) && check (knon k)+    where+      check orig =+          all (pred orig) orig+      pred set item =+          elem (instantiate env item) set++precedesCheck :: Algebra t p g s e c => Preskel t p g s e c ->+                 Sid -> Sid -> Edge t p g s e c -> Bool+precedesCheck k s s' (gn0, gn1)+    | s == sid (strand gn0) = graphPrecedes (vertex k (s', pos gn0)) gn1+    | s == sid (strand gn1) = graphPrecedes gn0 (vertex k (s', pos gn1))+    | otherwise = True++-- Transitive Reduction++-- An edge is essential if its removal eliminates all paths from its+-- source to its destination.  This function removes all non-essential+-- edges from the ordering relation.++reduce :: Algebra t p g s e c => PRS t p g s e c -> Maybe (PRS t p g s e c)+reduce (k, n, hsubst) =+    let o = map graphPair (graphReduce (edges k)) in+    if length o == length (orderings k) then+        Just (k, n, hsubst)     -- Nothing to take away+    else+        do+          let k' =+                  newPreskel+                  (gen k)+                  (protocol k)+                  (insts k)+                  o+                  (knon k)+                  (kunique k)+                  (operation k)+                  (prob k)+                  (pov k)+          k'' <- wellFormedPreskel k'+          return (k'', n, hsubst)++-- Returns the skeleton associated with a preskeleton or nothing when+-- there isn't one.  Manufacture a node and a term, and then drop them+-- afterwards.+toSkeleton :: Algebra t p g s e c => Bool -> Preskel t p g s e c ->+              Maybe (Preskel t p g s e c)+toSkeleton prune k =+    do+      (k, _, _) <- hull prune (k, (0, 0), emptySubst)+      return k++-- Contraction++contract :: Algebra t p g s e c => Preskel t p g s e c -> Node ->+            Cause t p g s e c -> (g, s) -> Maybe (PRS t p g s e c)+contract k n cause subst =+    do+      prs <- ksubst (k { operation = Contracted emptySubst cause },+                       n, emptySubst) subst+      hull True prs++-- Contract and add ordering++contractAndOrder :: Algebra t p g s e c => Preskel t p g s e c ->+                    Node -> Cause t p g s e c -> (g, s) -> Node ->+                    Maybe (PRS t p g s e c)+contractAndOrder k n cause subst n' =+    do+      prs <- ksubst (k { operation = AddedOrdering n' cause },+                       n, emptySubst) subst+      ord prs (n', n)++ord :: Algebra t p g s e c => PRS t p g s e c ->+       Pair -> Maybe (PRS t p g s e c)+ord (k, n, hsubst) pair =+    do+      k' <- wellFormedPreskel k'+      hull True (k', n, hsubst)+    where+      k' = newPreskel (gen k) (protocol k) (insts k)+           (pair : orderings k) (knon k) (kunique k)+           (operation k) (prob k) (pov k)++-- Return a list of triples containg a transmitting node copresent+-- with the argument, its message term, and the messages in its past+copresent :: Algebra t p g s e c => Preskel t p g s e c ->+             Node -> [(Node, t, [t])]+copresent k n =+    map f $ copresentVertices k n+    where+      f v =+          let n = (sid $ strand v, pos v)+              t = evtTerm $ event v+              past = copresentPast v in+          (n, t, past)++copresentVertices :: Algebra t p g s e c => Preskel t p g s e c ->+                     Node -> [Vertex t p g s e c]+copresentVertices k n =+    let v = vertex k n in+    [ v' | s <- strands k,+           v' <- nodes s,+           outbound $ event v',+           not $ graphPrecedes v v',+           not $ graphPrecedes v' v ]++outbound :: Algebra t p g s e c => Event t p g s e c -> Bool+outbound (In _) = False+outbound (Out _) = True++copresentPast :: Algebra t p g s e c => Vertex t p g s e c -> [t]+copresentPast v =+    S.elems $ foldl f S.empty $ preds v+    where+      f set v =+          foldl f (S.insert (evtTerm $ event v) set) $ preds v++-- Regular Augmentation++-- Apply a substitution and then augment.  Augmentations add an+-- instance and one ordered pair.++augment :: Algebra t p g s e c => Preskel t p g s e c -> Node ->+           Cause t p g s e c -> Role t p g s e c -> (g, s) ->+           Instance t p g s e c -> Maybe (PRS t p g s e c)+augment k n cause role subst inst =+    do+      let operation' = AddedStrand (rname role) (height inst) cause+      prs <- ksubst (k { operation = operation' }, n, emptySubst) subst+      aug prs inst++aug :: Algebra t p g s e c => PRS t p g s e c ->+       Instance t p g s e c -> Maybe (PRS t p g s e c)+aug (k, n, hsubst) inst =+    do+      k' <- wellFormedPreskel k'+      hull True (k', n, hsubst)+    where+      k' = newPreskel (gen k) (protocol k) insts'+           orderings' non' unique' (operation k) (prob k) (pov k)+      insts' = (insts k) ++ [inst]+      pair = ((length (insts k), height inst - 1), n)+      orderings' = pair : orderings k+      non' = inheritRnon inst ++ (knon k)+      unique' = inheritRunique inst ++ (kunique k)++-- Inherit non-originating atoms if the traces is long enough+inheritRnon :: Algebra t p g s e c => Instance t p g s e c -> [t]+inheritRnon i =+    inherit i (rnorig (role i))++-- Inherit uniquely originating atoms if the traces is long enough+inheritRunique :: Algebra t p g s e c => Instance t p g s e c -> [t]+inheritRunique i =+    inherit i (ruorig (role i))++inherit :: Algebra t p g s e c => Instance t p g s e c -> [(t, Int)] -> [t]+inherit i rorigs =+    map (instantiate (env i) . fst) $ filter f rorigs+    where+      f (_, pos) = pos < height i++-- Listener Augmentation++addListener :: Algebra t p g s e c => Preskel t p g s e c -> Node ->+               Cause t p g s e c -> t -> Maybe (PRS t p g s e c)+addListener k n cause t =+    do+      k' <- wellFormedPreskel k'+      hull True (k', n, emptySubst)+    where+      k' = newPreskel gen' (protocol k) insts' orderings'+           (knon k) (kunique k) (AddedListener t cause) (prob k) (pov k)+      (gen', inst) = mkListener (gen k) t+      insts' = insts k ++ [inst]+      pair = ((length (insts k), 1), n)+      orderings' = pair : orderings k++-- Homomorphisms++-- Find a substitution that demonstrates the existence of a+-- homomorphism between the two skeletons using the given+-- strand mapping function.++homomorphism :: Algebra t p g s e c => Preskel t p g s e c ->+                Preskel t p g s e c -> [Sid] -> Maybe e+homomorphism k k' mapping =+    do+      (_, env) <- findReplacement k k' mapping+      case validateEnv k k' mapping env of+        True -> Just env+        False -> Nothing++findReplacement :: Algebra t p g s e c => Preskel t p g s e c ->+                   Preskel t p g s e c -> [Sid] -> Maybe (g, e)+findReplacement k k' mapping =+    foldM (matchStrand k k' mapping) (gen k', emptyEnv) (strandids k)++matchStrand :: Algebra t p g s e c => Preskel t p g s e c ->+               Preskel t p g s e c -> [Sid] -> (g, e) -> Sid -> Maybe (g, e)+matchStrand k k' mapping env s =+    matchTraces (trace (strandInst k s)) (trace (strandInst k' s')) env+    where+      s' = mapping !! s++validateEnv :: Algebra t p g s e c => Preskel t p g s e c ->+               Preskel t p g s e c -> [Sid] -> e -> Bool+validateEnv k k' mapping env =+    all (flip elem (knon k')) (map (instantiate env) (knon k)) &&+    all (flip elem (kunique k')) (map (instantiate env) (kunique k)) &&+    validateEnvOrig k k' mapping env &&+    all (flip elem (tc k')) (permuteOrderings mapping (orderings k))++validateEnvOrig :: Algebra t p g s e c => Preskel t p g s e c ->+                   Preskel t p g s e c -> [Sid] -> e -> Bool+validateEnvOrig k k' mapping env =+    all check (korig k)+    where+      check (u, ns) =+          case lookup (instantiate env u) (korig k') of+            Nothing -> error "Strand.validateEnv: term not in kunique"+            Just ns' -> all (flip elem ns') (map (permuteNode mapping) ns)++-- Given a realized skeleton k, generate candidates for minimization.+-- A candidate is a preskeleton and a strand mapping from the+-- candidate to k.  The preskeleton need not be well formed, as that+-- test is applied elsewhere.++type Candidate t p g s e c = (Preskel t p g s e c, [Sid])++addIdentity :: Algebra t p g s e c => Preskel t p g s e c ->+               Candidate t p g s e c+addIdentity k = (k, strandids k)++generalize :: Algebra t p g s e c => Preskel t p g s e c ->+              [Candidate t p g s e c]+generalize k = deleteNodes k+               (weakenOrderings k+                (forgetAssumption k+                 (separateVariables k [])))++-- Node deletion++{-++delete node n in k++1. if (s, 0) part of prob return Nothing+2. if not initial node, truncate instance of node else delete instance+3. weaken ordering when filtering it (see shortenOrdering)+4. drop nons that aren't mentioned anywhere+5. drop uniques that aren't carried anywhere+6. update prob upon instance deletion+-}++deleteNodes :: Algebra t p g s e c => Preskel t p g s e c ->+               [Candidate t p g s e c] -> [Candidate t p g s e c]+deleteNodes k cs =+    foldr f cs [ node | strand <- strands k, node <- nodes strand ]+    where                       -- Function f called for each node+      f n cs = maybe cs (: cs) (deleteNode k n) --  in the skeleton++deleteNode :: Algebra t p g s e c => Preskel t p g s e c ->+              Vertex t p g s e c -> Maybe (Preskel t p g s e c, [Sid])+deleteNode k n+    | p == 0 && elem s (prob k) = Nothing+    | p == 0 =+        do+          let mapping = deleteNth s (strandids k)+          k' <- deleteNodeRest k (gen k) (s, p) (deleteNth s (insts k))+                (deleteOrderings s (tc k)) (updatePerm s s (prob k))+          return (k', mapping)+    | otherwise =+        do+          let mapping = strandids k+          let i = inst (strand n)+          (gen', i') <- bldInstance (role i) (take p (trace i)) (gen k)+          k' <- deleteNodeRest k gen' (s, p) (replaceNth i' s (insts k))+                (shortenOrderings (s, p) (tc k)) (prob k)+          return (k', mapping)+    where+      p = pos n+      s = sid (strand n)++-- Update orderings when a strand is eliminated (p == 0)+deleteOrderings :: Sid -> [Pair] -> [Pair]+deleteOrderings s ps =+    M.mapMaybe deleteOrdering ps+    where+      deleteOrdering (n0@(s0, _), n1@(s1, _))+          | s == s0 || s == s1 = Nothing+          | otherwise = Just (adjust n0, adjust n1)+      adjust n@(s', p')+          | s' > s = (s' - 1, p')+          | otherwise = n++-- Update orderings when a strand is shortened (p > 0)+shortenOrderings :: Node -> [Pair] -> [Pair]+shortenOrderings (s, p) ps =+    M.mapMaybe shortenOrdering ps+    where+      shortenOrdering (n0@(s0, p0), n1@(s1, p1))+          | s == s0 && p <= p0 = Nothing+          | s == s1 && p <= p1 = Nothing+          | otherwise = Just (n0, n1)++deleteNodeRest :: Algebra t p g s e c => Preskel t p g s e c ->+                  g -> Node -> [Instance t p g s e c] -> [Pair] ->+                  [Sid] -> Maybe (Preskel t p g s e c)+deleteNodeRest k gen n insts' orderings prob =+    Just k'+    where+      k' = newPreskel gen (protocol k) insts'+           orderings non' unique' (Generalized (Deleted n)) prob (pov k)+      -- Drop nons that aren't mentioned anywhere+      non' = filter mentionedIn (knon k)+      mentionedIn t = varSubset [t] terms+      terms = iterms insts'+      -- Drop uniques that aren't carried anywhere+      unique' = filter carriedIn (kunique k)+      carriedIn t = any (carriedBy t) terms++-- Node ordering weakening++-- To weaken, create a candidate for each element in the current+-- ordering, which is already the result of a transitive reduction.+-- Weaken by computing the transitive closure of the ordering, and+-- then remove the selected element from the current ordering.  After+-- computing the transitive closure, filter out the edges that are not+-- well ordered, i.e. originate at a reception node or terminate at a+-- transmission node.  Also, filter out edges that link nodes in the+-- same strand.  The preskeleton constructor function performs a+-- transitive reduction on the generated ordering.++weakenOrderings :: Algebra t p g s e c => Preskel t p g s e c ->+                   [Candidate t p g s e c] -> [Candidate t p g s e c]+weakenOrderings k cs =+    foldr (weakenOrdering k) cs (orderings k)++weakenOrdering :: Algebra t p g s e c => Preskel t p g s e c ->+                  Pair -> [Candidate t p g s e c] ->+                  [Candidate t p g s e c]+weakenOrdering k p cs =+    weaken k p (L.delete p (tc k)) : cs++weaken :: Algebra t p g s e c => Preskel t p g s e c ->+          Pair -> [Pair] -> Candidate t p g s e c+weaken k p orderings =+    addIdentity k'+    where+      k' = newPreskel (gen k) (protocol k) (insts k)+           orderings (knon k) (kunique k)+           (Generalized (Weakened p)) (prob k) (pov k)++-- Origination assumption forgetting++-- Delete each non-originating term that is not specified by a+-- role.  Do the same for each uniquely-originating term.++forgetAssumption :: Algebra t p g s e c => Preskel t p g s e c ->+                    [Candidate t p g s e c] -> [Candidate t p g s e c]+forgetAssumption k cs =+    forgetNonTerm k (skelNons k) (forgetUniqueTerm k (skelUniques k) cs)++-- Non-originating terms++forgetNonTerm :: Algebra t p g s e c => Preskel t p g s e c -> [t] ->+                    [Candidate t p g s e c] -> [Candidate t p g s e c]+forgetNonTerm _ [] cs = cs+forgetNonTerm k (t : ts) cs =+    addIdentity k' : forgetNonTerm k ts cs+    where+      k' = k { knon = knon', operation = Generalized (Forgot t) }+      knon' = L.delete t (knon k)++skelNons :: Algebra t p g s e c => Preskel t p g s e c -> [t]+skelNons k =+    filter (flip notElem ru) (knon k)+    where+      ru = [u | i <- insts k, u <- roleNons i]++roleNons :: Algebra t p g s e c => Instance t p g s e c -> [t]+roleNons i =+    map (instantiate (env i) . snd) (rnon (role i))++-- Uniquely-originating terms++forgetUniqueTerm :: Algebra t p g s e c => Preskel t p g s e c -> [t] ->+                    [Candidate t p g s e c] -> [Candidate t p g s e c]+forgetUniqueTerm _ [] cs = cs+forgetUniqueTerm k (t : ts) cs =+    addIdentity k' : forgetUniqueTerm k ts cs+    where+      k' = k { kunique = kunique', operation = Generalized (Forgot t) }+      kunique' = L.delete t (kunique k)++skelUniques :: Algebra t p g s e c => Preskel t p g s e c -> [t]+skelUniques k =+    filter (flip notElem ru) (kunique k)+    where+      ru = [u | i <- insts k, u <- roleUniques i]++roleUniques :: Algebra t p g s e c => Instance t p g s e c -> [t]+roleUniques i =+    map (instantiate (env i)) (runique (role i))++-- Variable separation++-- A location is a strand, a role variable, and a position in the term+-- associated with the role variable.++-- step one: extract places+--+-- for each maplet in each environment in each strand+--   for each variable V in the range of the maplet+--     let P be the places at which V occurs+--     associate V with the location described by each element in P+--+-- step two: generate preskeletons+--+-- for each variable V in the skeleton K+--  let V' be a clone of V+--  let L be the set of locations associated with V from above+--  for each subset L' of L+--    for each instance I in K+--      update the environment of I by replacing V' at the locations+--      given by L' that refer to I, and use the modified environment+--      to update the instance+--    let K' be the result of updating instances in K as above+--    if V occurs in non, add terms with V replaced by V' to+--      the non's of K'+--    if V occurs in unique, add terms with V replaced by V'+--      to the unique's of K'+--    add K' to the list of generated preskeletons++separateVariables :: Algebra t p g s e c => Preskel t p g s e c ->+                     [Candidate t p g s e c] -> [Candidate t p g s e c]+separateVariables k cs =+    foldr (separateVariable k (extractPlaces k)) cs (kvars k)++-- A location is a strand, a role variable, and a position in the term+-- associated with the role variable.++type Location t p g s e c = (Sid, t, p)++-- Returns a list of pairs.  For each occurrence of a preskeleton+-- variable in every instance, there is a pair where the first element+-- is the variable, and the second as the location at which it occurs.+extractPlaces :: Algebra t p g s e c => Preskel t p g s e c ->+                 [(t, Location t p g s e c)]+extractPlaces k =+    foldl extractPlacesFromStrand [] (strands k)++extractPlacesFromStrand :: Algebra t p g s e c =>+                           [(t, Location t p g s e c)] ->+                           Strand t p g s e c ->+                           [(t, Location t p g s e c)]+extractPlacesFromStrand ps s =+    foldl (extractPlacesFromMaplet (sid s)) ps (instAssocs (inst s))++instAssocs :: Algebra t p g s e c => Instance t p g s e c -> [(t, t)]+instAssocs i =+    reify (rvars (role i)) (env i)++extractPlacesFromMaplet :: Algebra t p g s e c => Sid ->+                           [(t, Location t p g s e c)] -> (t, t) ->+                           [(t, Location t p g s e c)]+extractPlacesFromMaplet s ps (v, t) =+    foldl f ps (foldVars (flip adjoin) [] t)+    where+      f ps var = foldl (g var) ps (places var t)+      g var ps p = (var, (s, v, p)) : ps++-- For each variable, generate candidates by generating a fresh+-- variable for subsets of the locations associated with the variable.+separateVariable :: Algebra t p g s e c => Preskel t p g s e c ->+                    [(t, Location t p g s e c)] -> t ->+                    [Candidate t p g s e c] -> [Candidate t p g s e c]+separateVariable k ps t cs =+    sepVar (locsFor ps t)+    where+      sepVar [] = cs+      sepVar [_] = cs+      sepVar locs = foldr (changeLocations k env gen'' t') cs (parts locs)+      (gen'', env) = matchAlways t t' (gen', emptyEnv)+      parts locs = map (map (locs !!)) (subsets (length locs))+      (gen', t') = clone (gen k) t++-- Extract the locations for a given variable+locsFor :: Algebra t p g s e c => [(t, Location t p g s e c)] ->+           t -> [Location t p g s e c]+locsFor ps t =+    map snd (filter (\(t', _) -> t == t') (reverse ps)) -- Why reverse?++matchAlways :: Algebra t p g s e c => t -> t -> (g, e) -> (g, e)+matchAlways t t' env =+      maybe envError id (match t t' env)+      where+        envError = error "Strand.matchAlways: bad match"++-- Change the given locations and create the resulting preskeleton+changeLocations :: Algebra t p g s e c => Preskel t p g s e c ->+                   e -> g -> t -> [Location t p g s e c] ->+                   [Candidate t p g s e c] -> [Candidate t p g s e c]+changeLocations k env gen t locs cs =+    addIdentity k0 : addIdentity k1 : cs+    where+      k0 = newPreskel gen' (protocol k) insts' (orderings k)+           non unique0 (Generalized (Separated t)) (prob k) (pov k)+      k1 = newPreskel gen' (protocol k) insts' (orderings k)+           non unique1 (Generalized (Separated t)) (prob k) (pov k)+      (gen', insts') = changeStrands locs t gen (strands k)+      non = knon k ++ map (instantiate env) (knon k)+      unique0 = kunique k ++ unique'+      unique1 = map (instantiate env) (kunique k) ++ unique'+      -- Ensure all role unique assumptions are in.+      unique' = concatMap inheritRunique insts'++changeStrands :: Algebra t p g s e c => [Location t p g s e c] -> t ->+                 g -> [Strand t p g s e c] -> (g, [Instance t p g s e c])+changeStrands locs copy gen strands =+    maybe err id (foldMapM (changeStrand locs copy) gen strands)+    where+      err = error "Strand.changeStrands: bad strand build"++-- Create an new environment incorporating changes, and from that,+-- create the new strand.+changeStrand :: Algebra t p g s e c => [Location t p g s e c] ->+                t -> g -> Strand t p g s e c -> Maybe (g, Instance t p g s e c)+changeStrand locs copy gen s =+    bldInstance (role i) trace'  gen'+    where+      i = inst s+      (gen', env') = foldl f (gen, emptyEnv)+             (map (changeMaplet locs copy (sid s)) (instAssocs i))+      f env (v, t) = matchAlways v t env+      trace' = map (evtMap $ instantiate env') trace+      trace = take (height i) (rtrace (role i))++-- Change a maplet+changeMaplet :: Algebra t p g s e c => [Location t p g s e c] ->+                t -> Sid -> (t, t) -> (t, t)+changeMaplet [] _ _ maplet = maplet+changeMaplet ((s', v', p) : locs) copy s (v, t) =+    changeMaplet locs copy s (v, t')+    where+      t' = if s' == s && v' == v then replace copy p t else t++-- Return the set of subsets of natural numbers less than n+subsets :: Int -> [[Int]]+subsets n+    | n < 0 = error $ "Utilities.subsets: Bad argument " ++ show n+    | n == 0 = []+    | otherwise =+        [n - 1] : subset ++ map (n - 1 :) subset+        where+          subset = subsets (n - 1)++-- Collapse a shape by unifying strands.++collapse :: Algebra t p g s e c => Preskel t p g s e c ->+            [Preskel t p g s e c]+collapse k =+    [k' | s <- strandids k, s' <- [0..(s-1)],+          k' <- M.maybeToList $ collapseStrands k s s']++collapseStrands :: Algebra t p g s e c => Preskel t p g s e c ->+                   Sid -> Sid -> Maybe (Preskel t p g s e c)+collapseStrands k s s' =+    do+      (s, s', subst) <- unifyStrands k s s'+      prs <- ksubst (k { operation = Collapsed s s' },+                     (0, 0), emptySubst) subst+      prs <- compress prs s s'+      (k, _, _) <- hull True prs+      return k
+ src/CPSA/Lib/Utilities.hs view
@@ -0,0 +1,87 @@+-- Generic list functions and cycle checking++-- 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.Lib.Utilities where++import qualified Data.Set as S++adjoin :: Eq a => a -> [a] -> [a]+adjoin x xs+    | x `elem` xs = xs+    | otherwise = x : xs++-- Delete the nth item in a list+deleteNth :: Int -> [a] -> [a]+deleteNth n (x : xs)+    | n == 0 = xs+    | n > 0 = x : deleteNth (n - 1) xs+deleteNth n _+    | n < 0 = error "Utilities.deleteNth: negative index"+    | otherwise = error "Utilities.deleteNth: index too large"++-- Replace the nth item in a list+replaceNth :: a -> Int -> [a] -> [a]+replaceNth z n (x : xs)+    | n == 0 = z : xs+    | n > 0 = x : replaceNth z (n - 1) xs+replaceNth _ n _+    | n < 0 = error "Utilities.replaceNth: negative index"+    | otherwise = error "Utilities.replaceNth: negative index"++-- Returns a list of the natural numbers less that the argument.+{-# INLINE nats #-}+nats :: Int -> [Int]+nats n = [0..(n - 1)]++{-# INLINE assert #-}+assert :: Monad m => (a -> Bool) -> a -> m a+assert pred x+    | pred x = return x+    | otherwise = fail "assertion failed"++-- Is graph acyclic?+isAcyclic :: Ord a => (a -> [a]) -> [a] -> Bool+isAcyclic adj nodes =+    all (not . backEdge numbering) (S.toList edges)+    where+      numbering = dfs adj (S.toList start)+      -- Remove nodes that have non-zero indegree+      start = S.difference (S.fromList nodes) (S.map fst edges)+      edges = foldl f S.empty nodes+      f edges src = foldl (g src) edges (adj src)+      g src edges dst = S.insert (dst, src) edges++-- Compute a depth first search numbering of nodes using postorder.+-- With postorder, only back edges go from a lower number to a higher+-- one.  Assumes nodes, the set of nodes with indegree zero, is not empty.+dfs :: Ord a => (a -> [a]) -> [a] -> [(a, Int)]+dfs adj nodes =+    alist+    where+      (_, alist, _) = foldl po (0, [], S.empty) nodes+      po a@(num, alist, seen) node+         | S.member node seen = a+         | otherwise =+             (num' + 1, (node, num') : alist', seen'')+             where  -- Search is postorder because nodes at the end of+               (num', alist', seen'') = -- edges are explored before+                   foldl po (num, alist, seen') nodes' -- the node+               seen' = S.insert node seen -- Insert node as soon as+               nodes' = adj node          -- it's seen++-- Is edge a back edge, meaning a cycle has been found?  If an edge+-- contains a node that is not in the alist, it means it was not+-- visited during the depth first seach.  This can happen when there+-- is a strong component that has no edges from other strong+-- components to it.  We report this edge to be a back edge so as to+-- get the correct overall result.+backEdge :: Eq a => [(a, Int)] -> (a, a) -> Bool+backEdge alist (node, node') =+    case (lookup node alist, lookup node' alist) of+      (Just n, Just n') -> n >= n'+      _ -> True
+ src/CPSA/Lib/Vector.hs view
@@ -0,0 +1,55 @@+-- Arrays using zero-based indexing++-- 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.Lib.Vector where++import Array++newtype Vector a = Vector (Array Int a)++-- Vector construction+vector :: [a] -> Vector a+vector vs = Vector (listArray (0, length vs - 1) vs)++-- The length of a vector+vlen :: Vector a -> Int+vlen (Vector a) = rangeSize (bounds a)++-- The value stored at a given index+vref :: Vector a -> Int -> a+vref (Vector a) i = a ! i++-- Update the vector with a new value at a given index+vmod :: Vector a -> Int -> a -> Vector a+vmod (Vector a) i v = Vector (a // [(i, v)])++-- The list of values in the vector.+vlist :: Vector a -> [a]+vlist (Vector a) = elems a++instance Eq a => Eq (Vector a) where+    Vector x == Vector y = x == y++instance Ord a => Ord (Vector a) where+    compare (Vector x) (Vector y) = compare x y++instance Show a => Show (Vector a) where+    showsPrec p (Vector a)+        = showParen (p > vecPrec)+          (showString "vector " .+           showsPrec (vecPrec + 1) (elems a))++instance Read a => Read (Vector a) where+    readsPrec p = readParen (p > vecPrec)+          (\r -> [ (vector vs, t) |+                   ("vector", s) <- lex r,+                   (vs, t)       <- readsPrec (vecPrec + 1) s])++-- Precedence of the 'vector' function is that of application itself+vecPrec :: Int+vecPrec = 10
+ src/CPSA/Parameters/Flow.hs view
@@ -0,0 +1,90 @@+-- Performs a data flow analysis of traces in protocol roles++-- 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.Parameters.Flow (dataFlow) where++import CPSA.Lib.CPSA++dataFlow :: (Algebra t p g s e c, Monad m) => String -> g ->+            SExpr Pos -> m (SExpr ())+dataFlow nom origin (L pos (S _ "defprotocol" :+                            S _ name :+                            S _ alg :+                            xs))+    | nom == alg =+        do+          xs <- mapM (mapRole origin) xs+          return (L () (S () "defprotocol" :+                        S () name :+                        S () alg :+                        xs))+    | otherwise = fail (shows pos $ "Expecting terms in algebra " ++ nom)+dataFlow _ _ x = return (strip x)++-- 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)++mapRole :: (Algebra t p g s e c, Monad m) => g ->+           SExpr Pos -> m (SExpr ())+mapRole gen (L _ (S _ "defrole" :+                  S _ name :+	          L _ (S _ "vars" : vars) :+                  L _ (S _ "trace" : trace) :+                  rest)) =+    do+      (_, vs) <- loadVars gen vars+      c <- loadTrace vs trace+      let rest' = addParams (displayParams vs (flow c)) (map strip rest)+      trace <- mapM stripEvt trace+      return (L () (S () "defrole" :+                    S () name :+	            L () (S () "vars" : map strip vars) :+                    L () (S () "trace" : trace) :+                    rest'))+mapRole _ x = return (strip x)++loadTrace :: (Algebra t p g s e c, Monad m) => [t] ->+             [SExpr Pos] -> m [Event t p g s e c]+loadTrace vars xs = mapM (loadEvt vars) xs++loadEvt :: (Algebra t p g s e c, Monad m) => [t] ->+          SExpr Pos -> m (Event t p g s e c)+loadEvt vars (L _ [S _ "recv", t]) =+    do+      t <- loadTerm vars t+      return (In t)+loadEvt vars (L _ [S _ "send", t]) =+    do+      t <- loadTerm vars t+      return (Out t)+loadEvt _ (L pos [S _ dir, _]) =+    fail (shows pos $ "Unrecognized direction " ++ dir)+loadEvt _ x = fail (shows (annotation x) "Malformed direction")++displayParams :: Algebra t p g s e c => [t] -> [[t]] -> [SExpr ()]+displayParams vs inits =+    map (L () . map (displayTerm ctx)) inits+    where+      ctx = addToContext emptyContext vs++addParams :: [SExpr ()] -> [SExpr ()] -> [SExpr ()]+addParams inits rest =+    filter notParams rest ++ [L () (S () "parameters" : inits)]+    where+      notParams (L () (S () "parameters" : _)) = False+      notParams _ = True++stripEvt ::Monad m => SExpr Pos -> m (SExpr ())+stripEvt (L _ [S _ "send", t]) = return (L () [S () "send", strip t])+stripEvt (L _ [S _ "recv", t]) = return (L () [S () "recv", strip t])+stripEvt x = fail (shows (annotation x) "Malformed direction")
+ src/CPSA/Parameters/Main.hs view
@@ -0,0 +1,68 @@+-- Compute the parameters of each protocol in the input++-- This module simply maps the function flow to S-expressions in the+-- file.++-- 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 System.IO.Error+import CPSA.Lib.CPSA+import CPSA.Lib.Entry+import CPSA.Parameters.Flow+import qualified CPSA.Basic.Algebra+import qualified CPSA.DiffieHellman.Algebra++-- Algebra names+algs :: [String]+algs = [CPSA.Basic.Algebra.name, CPSA.DiffieHellman.Algebra.name]++main :: IO ()+main =+    do+      let options = algOptions CPSA.Basic.Algebra.name+      let interp = algInterp CPSA.Basic.Algebra.name algs+      (p, (output, alg, margin)) <- start options interp+      h <- outputHandle output+      writeComment h margin cpsaVersion+      writeComment h margin "Protocols annotated with their parameters"+      case () of+        _ | alg == CPSA.Basic.Algebra.name ->+              go (step h alg CPSA.Basic.Algebra.origin margin) p+          | alg == CPSA.DiffieHellman.Algebra.name ->+              go (step h alg CPSA.DiffieHellman.Algebra.origin margin) p+          | otherwise ->+               abort ("Bad algebra: " ++ alg)+      hClose h++go :: (SExpr Pos -> IO ()) -> PosHandle -> IO ()+go f p =+    loop+    where+      loop =+          do+            x <- readSExpr p+            case x of+              Nothing ->+                  return ()+              Just sexpr ->+                  do+                    f sexpr+                    loop++step :: Algebra t p g s e c => Handle ->+        String -> g -> Int -> SExpr Pos -> IO ()+step output name origin margin sexpr =+    do+      sexpr <- try (dataFlow name origin sexpr)+      case sexpr of+        Right sexpr ->+            writeLnSEexpr output margin sexpr+        Left err ->+            abort (ioeGetErrorString err)
+ src/CPSA/Pretty/Main.hs view
@@ -0,0 +1,42 @@+-- Pretty print the input++-- 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.CPSA+import CPSA.Lib.Entry++main :: IO ()+main =+    do+      (p, (output, margin)) <- start filterOptions filterInterp+      h <- outputHandle output+      go (writeSEexprLn h margin) p+      hClose h++go :: (SExpr Pos -> IO ()) -> PosHandle -> IO ()+go f p =+    loop+    where+      loop =+          do+            x <- readSExpr p+            case x of+              Nothing ->+                  return ()+              Just sexpr ->+                  do+                    f sexpr+                    loop++writeSEexprLn :: Handle -> Int -> SExpr a -> IO ()+writeSEexprLn h margin sexpr =+    do+      writeSExpr h margin sexpr+      hPutStrLn h ""
+ src/CPSA/Shapes/Main.hs view
@@ -0,0 +1,59 @@+-- Extract the shapes from a CPSA run++-- This module simply maps the function shapes to S-expressions in the+-- file.++-- 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 System.IO.Error+import CPSA.Lib.CPSA (PosHandle, SExpr, Pos)+import CPSA.Lib.Entry+import CPSA.Shapes.Shapes++main :: IO ()+main =+    do+      (p, (output, margin)) <- start filterOptions filterInterp+      h <- outputHandle output+      writeComment h margin cpsaVersion+      writeComment h margin "Extracted shapes"+      go (step h margin) p empty+      hClose h++go :: (a -> SExpr Pos -> IO a) -> PosHandle -> a -> IO ()+go f p a =+    loop a+    where+      loop a =+          do+            x <- readSExpr p+            case x of+              Nothing ->+                  return ()+              Just sexpr ->+                  do+                    a <- f a sexpr+                    loop a++step :: Handle -> Int -> Map -> SExpr Pos -> IO Map+step output margin acc sexpr =+    do+      x <- try (shape acc sexpr)+      case x of+        Right (acc, sexpr) ->+            case sexpr of+              Nothing ->+                  return acc+              Just sexpr ->+                  do+                    writeLnSEexpr output margin sexpr+                    return acc+        Left err ->+            abort (ioeGetErrorString err)
+ src/CPSA/Shapes/Shapes.hs view
@@ -0,0 +1,107 @@+-- Filters the intermediate skeletons out of a CPSA run.++-- 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.Shapes.Shapes (Map, empty, shape) where++import qualified Data.IntMap as I+import Data.IntMap (IntMap)+import CPSA.Lib.CPSA++-- An int map is used to bind a skeleton to its parent.++type Map = IntMap Int++empty :: Map+empty = I.empty++-- Omit S-expressions for skeletons that are not the point-of-view+-- skeleton or a shape of a point-of-view skeleton.  The parent of a+-- skeleton is changed to reflect omitted skeletons, and its seen+-- children are deleted.++shape :: Monad m => Map -> SExpr Pos -> m (Map, Maybe (SExpr Pos))+shape map x@(L _ (S _ "defskeleton" : _ : _ : strands)) =+    do+      label <- nassoc "label" xs+      checkLabel label+    where+      xs = findAList strands   -- Association list part of preskeleton+      checkLabel Nothing =+          return (map, Just x) -- Not labeled, just add it to the answers+      checkLabel (Just label) =+          do                    -- Found a label+            parent <- nassoc "parent" xs+            checkParent label parent+      checkParent label Nothing = -- Point of view preskeleton+          return (I.singleton label label, Just $ reparent label x)+      checkParent label (Just parent) = -- Descendent of POV+          lookupParent label $ I.lookup parent map+      lookupParent _ Nothing =+          fail "parent unknown"+      lookupParent label (Just ancestor) =+          -- Ancestor is the label of POV preskeleton or of a shape+          let shape = maybe False (const True) (assoc "shape" xs) in+          if shape then+              return (I.insert label label map,+                      Just $ reparent ancestor x)+          else                  -- Drop S-expression here+              return (I.insert label ancestor map, Nothing)+shape map x = return (map, Just x)++findAList :: [SExpr Pos] -> [SExpr Pos]+findAList (L _ (S _ "defstrand" : _) : xs) = findAList xs+findAList (L _ (S _ "deflistener" : _) : xs) = findAList xs+findAList xs = xs++-- 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)++-- Look up a value known to be an Int+nassoc :: Monad 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 :: Monad m => SExpr Pos -> m Int+num (N _ n) = return n+num x = fail (shows (annotation x) "Expecting a number")++reparent :: Int -> SExpr Pos -> SExpr Pos+reparent n (L p0 (S p1 "defskeleton" : protocol : vars : strands)) =+    L p0 (S p1 "defskeleton" : protocol : vars : updateStrands n strands)+reparent _ x = x++updateStrands :: Int -> [SExpr Pos] -> [SExpr Pos]+updateStrands n (L p0 (S p1 "defstrand" : x) : xs) =+    L p0 (S p1 "defstrand" : x) : updateStrands n xs+updateStrands n (L p0 (S p1 "deflistener" : x) : xs) =+    L p0 (S p1 "deflistener" : x) : updateStrands n xs+updateStrands n xs = updateParent n xs++updateParent :: Int -> [SExpr Pos] -> [SExpr Pos]+updateParent n (L p0 [tag@(S _ "parent"), N p1 _] : xs) =+    L p0 [tag, N p1 n] : updateParent n xs+-- Handle the case of seen in the original problem, and dump it.+updateParent n (L _ (S _ "seen" : _) : xs) = updateParent n xs+updateParent n (x : xs) = x : updateParent n xs+updateParent _ [] = []
+ src/cpsa2svg.sh view
@@ -0,0 +1,296 @@+#! /bin/sh++# Generates an SVG diagram from CPSA preskeletons++# This program converts the preskeletons in the input into an SVG+# diagram using Scheme and the GraphVis program dot.  Terms are+# displayed as tooltips in the diagram.++PROG=`basename "$0"`++usage()+{+  echo "Usage: $PROG [OPTIONS] [FILE]"+  echo+  echo "Options:"+  echo "  -o FILE, --output=FILE"+  echo "         write output to FILE (default is standard output)"+  echo "  -h, --help"+  echo "         display this help and exit"+  echo "  -v, --version"+  echo "         output version information and exit"+}++OPTS=`getopt -o hvo: --long help,version,output: -n "$PROG" -- "$@"`++if [ $? -ne 0 ]+then+  echo+  usage+  exit 1+fi++eval set -- "$OPTS"++for o+do+  case "$o" in+    -h|--help)+      usage+      exit 0;;+    -v|--version)+      echo $PROG 1.0+      exit 0;;+    -o|--output)+      output="$2"+      shift 2;;+    --)+      shift+      break;;+  esac+done++SCRIPT='+;;; Converts the preskeletons in the input into GraphViz dot format.+;;; Terms are displayed as tooltips, so this output is usually+;;; converted to SVG.++;;; This program expects its input to be generated by another program,+;;; and therefore does not adequately check its input.++;;; The program reads from the standard input and writes to the+;;; standard output.++;;; The main routine+(define (main)+  (let ((input (get)))			 ; Read input+    (show-all (car input) (cdr input)))) ; Process in++;;; Get the list of preskeletons and the protocols as an alist+(define (get)+  (let loop ((prots '\''()) (skels '\''()))+    (let ((x (read)))+      (cond ((eof-object? x)+	     (cons (reverse prots) (reverse skels)))+	    ((or (not (pair? x))+		 (not (symbol? (car x)))+		 (not (pair? (cdr x)))+		 (not (symbol? (cadr x))))+	     (loop prots skels))+	    ((equal? '\''defprotocol (car x))+	     (loop (cons (cons (cadr x) x) prots) skels))+	    ((equal? '\''defskeleton (car x))+	     (loop prots (cons x skels)))+	    (else (loop prots skels))))))++(define (show-all prots skels)+  (display "digraph cpsa {")+  (newline)				; t is a tag number+  (let loop ((t 0) (skels skels))	; used for labeling+    (cond ((pair? skels)+	   (let ((prot (assoc (cadar skels) prots)))+	     (if prot (show-skel t (cdr prot) (car skels)))+	     (loop (+ t 1) (cdr skels))))+	  (else+	   (display "}")+	   (newline)))))+  +;;; Print graph header+(define (show-skel tag prot skel)+  (let* ((x (assoc '\''label (cddr skel)))	; Use value of the +	 (label (if x (cadr x) tag))	; label attribute+	 (y (assoc '\''parent (cddr skel))) ; when it appears+	 (parent (and y (cadr y)))+	 (name (cadr prot)))		+    (newline)+    (display-outline label parent)+    (display "subgraph cluster")+    (display label)+    (display " {")+    (newline)+    (display "  label = \"")+    (display name)+    (display " ")+    (display label)+    (display "\";")+    (newline)+    (show-strands label 0 (map extract-trace (cdddr prot)) (cdddr skel))))++(define (display-outline label parent)+  (display "c")+  (display label)+  (display " [label = \"")+  (display label)+  (display "\"]; ")+  (newline)+  (cond (parent +	 (display "c")+	 (display parent)+	 (display " -> c")+	 (display label)+	 (display ";")+	 (newline))))+	 +;;; Used to make an alist of role name and their trace+(define (extract-trace role)+  (cons (cadr role) (cdar (cdddr role))))++;;; Print the strands+(define (show-strands label s traces strands )+  (cond ((equal? '\''defstrand (caar strands))+	 (show-strand label s (cdar strands) traces (cdr strands)))+	((equal? '\''deflistener (caar strands))+	 (show-listener label s (cadar strands) traces (cdr strands)))+        (else+	 (let ((result (assoc '\''precedes strands)))+	   (show-order label (if (pair? result) (cdr result) '\''()))))))++;;; Show a non-listener strand+(define (show-strand label s strand traces strands)+  (let ((role (car strand))+	(height (cadr strand))+	(env (cddr strand)))+    (show-cluster label s)+    (display "    label = \"")		; Use role as+    (display role)			; cluster label+    (display "\";")+    (newline)+    (show-strand-nodes label s (assoc role traces) height env)+    (show-strand-edges label s height)+    (display "  }")+    (newline))+  (show-strands label (+ s 1) traces strands))++(define (show-cluster label s)+  (newline)+  (display "  subgraph cluster")+  (display label)+  (display "_")+  (display s)+  (display " {")+  (newline)				; Use strand for all+  (display "    node [label = \"")	; node labels in this+  (display s)				; cluster+  (display "\"];")+  (newline))++(define (show-strand-nodes label s trace height env)+  (if (not trace)+      (error "Bad role name")+      (let loop ((n 0) (trace (cdr trace)))+	(cond ((< n height)+	       (show-node label s n (subst (car trace) env))+	       (loop (+ n 1) (cdr trace)))))))++;;; Show a node with the term as a tooltip+(define (show-node label s n term)+  (display "    ")+  (display-node label s n)+  (display " [tooltip = \"")+  (show-term term)+  (display "\"];")+  (newline))++;;; Writes a term while quoting strings properly+(define (show-term term)+  (define (show-term-list terms)+    (cond ((pair? terms)+	   (display " ")+	   (show-term (car terms))+	   (show-term-list (cdr terms)))+	  (else+	   (display ")"))))+  (cond ((string? term)+	 (display "\"")+	 (display term)+	 (display "\""))+	((pair? term)+	 (display "(")+	 (show-term (car term))+	 (show-term-list (cdr term)))+	(else+	 (display term))))++(define (display-node label s n)+  (display "l")+  (display label)+  (display "s")+  (display s)+  (display "n")+  (display n))++;;; Substitute symbols for values in the given environment+(define (subst exp env)+  (define (substitute exp)+    (cond ((symbol? exp)+	   (let ((alist (assoc exp env)))+	     (if alist+		 (cadr alist)+		 exp)))+	  ((pair? exp)+	   (cons (car exp) (map substitute (cdr exp))))+	  (else exp)))+  (substitute exp))++(define (show-strand-edges label s height)+  (display "    ")+  (display-node label s 0)+  (let loop ((n 1))+    (cond ((>= n height)+	   (display ";")+	   (newline))+	  (else+	   (display " -> ")+	   (display-node label s n)+	   (loop (+ n 1))))))++(define (show-listener label s term traces strands)+  (show-cluster label s)+  (display "    label = \"\";")+  (newline)+  (show-node label s 0 (list '\''recv term))+  (display "  }")+  (newline)+  (show-strands label (+ s 1) traces strands))++(define (show-order label orderings)+  (cond ((pair? orderings)+	 (let ((hd (caar orderings))+	       (tl (cadar orderings)))+	   (display "  ")+	   (display-node label (car hd) (cadr hd))+	   (display " -> ")+	   (display-node label (car tl) (cadr tl))+	   (display ";")+	   (newline)+	   (show-order label (cdr orderings))))+	(else +	 (display "}")+	 (newline))))++(main)+'++case $# in+  0)+    if [ -z "$output" ]+    then +      guile -c "$SCRIPT" | dot -Tsvg+    else+      guile -c "$SCRIPT" | dot -Tsvg -o "$output"+    fi+    break;;+  1) +    if [ -z "$output" ]+    then +      guile -c "$SCRIPT" < "$1" | dot -Tsvg+    else+      guile -c "$SCRIPT" < "$1" | dot -Tsvg -o "$output"+    fi+    break;;+  *) +    echo Too many input files+    echo+    usage+    exit 1;;+esac
+ src/cpsacgi.py view
@@ -0,0 +1,223 @@+#! /usr/bin/python++"""Warning: this CGI script is for deployment in friendly +environments only!"""++import cgi+import sys+import subprocess+import cgitb; cgitb.enable()++# The command used to start cpsa limits memory usage+cpsa_command = ['./cpsa', '+RTS', '-M512m', '-RTS']+# Flag for using ps to determine if a copy of cpsa is already running+use_in_use_check = False++def main():+    shapes_cmd = './cpsashapes'+    graph_cmd = './cpsagraph -c'+    annotations_cmd = './cpsaannotations'+    xml_cmd = './cpsagraph -x'+    shapes_graph_cmd = shapes_cmd + ' | ' + graph_cmd+    shapes_xml_cmd = shapes_cmd + ' | ' + xml_cmd+    shapes_annotations_cmd = shapes_cmd + ' | ' + annotations_cmd+    shapes_annotations_xml_cmd = shapes_annotations_cmd + ' | ' + xml_cmd+    form = cgi.FieldStorage()+    if form.has_key('xml'):+        resp = xml(xml_cmd, form['xml'], None)+    elif form.has_key('shapes xml'):+        resp = xml(shapes_xml_cmd, form['shapes xml'], None)+    elif form.has_key('shapes annotations xml'):+        resp = xml(shapes_annotations_xml_cmd, +                   form['shapes annotations xml'], None)+    elif form.has_key('graph'):+        resp = graph(graph_cmd, form['graph'], None)+    elif form.has_key('shapes graph'):+        resp = graph(shapes_graph_cmd, form['shapes graph'], None)+    elif form.has_key('cpsa'):+        resp = cpsa(None, form['cpsa'])+    elif form.has_key('cpsa shapes'):+        resp = cpsa(shapes_cmd, form['cpsa shapes'])+    elif form.has_key('cpsa shapes annotations'):+        resp = cpsa(shapes_annotations_cmd, +                    form['cpsa shapes annotations'])+    elif form.has_key('cpsa xml'):+        resp = cpsa_xml(xml_cmd, form['cpsa xml'])+    elif form.has_key('cpsa shapes xml'):+        resp = cpsa_xml(shapes_xml_cmd, form['cpsa shapes xml'])+    elif form.has_key('cpsa shapes annotations xml'):+        resp = cpsa_xml(shapes_annotations_xml_cmd,+                        form['cpsa shapes annotations xml'])+    elif form.has_key('cpsa graph'):+        resp = cpsa_graph(graph_cmd, form['cpsa graph'])+    elif form.has_key('cpsa shapes graph'):+        resp = cpsa_graph(shapes_graph_cmd, form['cpsa shapes graph'])+    else:+        resp = 'Content-Type: text/plain\n\nBad form input\n'+    sys.stdout.write(resp)++def graph(command, data, source):+    if not source and not data.file:+        return 'Content-Type: text/plain\n\nBad form input--no file\n'+    p = subprocess.Popen(command, shell=True, stdin=subprocess.PIPE,+                         stdout=subprocess.PIPE, stderr=subprocess.PIPE)+    if source:+        p.stdin.write(source)+    else:+        p.stdin.write(data.value)+    p.stdin.close()+    out = bounded_read(p.stdout)+    err = p.stderr.read()+    if p.wait():+        resp = 'Content-Type: text/plain\n\n' + err+    elif not out:+        resp = 'Content-Type: text/plain\n\nSize limit exceeded'+    else:+        resp = 'Content-Type: image/svg+xml; charset=UTF-8\n'+        if source and data.filename: # Add content disposition+            name = data.filename+            i = name.rfind('.')+            if i > 0:+                name = name[0:i]+            fmt = 'Content-Disposition: attachment; filename=%s.svg\n\n'+            resp += fmt % name+        else:+            resp += '\n'+        resp += out+    return resp++def xml(command, data, source):+    if not source and not data.file:+        return 'Content-Type: text/plain\n\nBad form input--no file\n'+    p = subprocess.Popen(command, shell=True, stdin=subprocess.PIPE,+                         stdout=subprocess.PIPE, stderr=subprocess.PIPE)+    if source:+        p.stdin.write(source)+    else:+        p.stdin.write(data.value)+    p.stdin.close()+    out = bounded_read(p.stdout)+    err = p.stderr.read()+    if p.wait():+        resp = 'Content-Type: text/plain\n\n' + err+    elif not out:+        resp = 'Content-Type: text/plain\n\nSize limit exceeded'+    else:+        resp = 'Content-Type: text/xml; charset=UTF-8\n\n' + out+    return resp++def cpsa(command, data):+    global cpsa_command+    resp = 'Content-Type: text/plain; charset=US-ASCII\n\n'+    if not data.file:+        resp += 'Bad form input--no file\n'+        return resp+    busy = in_use()+    if busy:+        return busy+    p = subprocess.Popen(cpsa_command, stdin=subprocess.PIPE,+                         stdout=subprocess.PIPE, stderr=subprocess.PIPE)+    p.stdin.write(data.value)+    p.stdin.close()+    out = bounded_read(p.stdout)+    err = p.stderr.read()+    if p.wait():+        return resp + err+    elif not out:+        return resp + 'Size limit exceeded'+    elif not command:+        return resp + out+    p = subprocess.Popen(command, shell=True, stdin=subprocess.PIPE,+                         stdout=subprocess.PIPE, stderr=subprocess.PIPE)+    p.stdin.write(out)+    p.stdin.close()+    out = bounded_read(p.stdout)+    err = p.stderr.read()+    if p.wait():+        return resp + err+    elif not out:+        return resp + 'Size limit exceeded'+    else:+        return resp + out++def cpsa_graph(command, data):+    global cpsa_command+    if not data.file:+        resp = 'Content-Type: text/plain; charset=US-ASCII\n\n'+        resp += 'Bad form input--no file\n'+        return resp+    busy = in_use()+    if busy:+        return busy+    p = subprocess.Popen(cpsa_command, stdin=subprocess.PIPE,+                         stdout=subprocess.PIPE, stderr=subprocess.PIPE)+    p.stdin.write(data.value)+    p.stdin.close()+    out = bounded_read(p.stdout)+    err = p.stderr.read()+    if p.wait():+        resp = 'Content-Type: text/plain; charset=US-ASCII\n\n' + err+        return resp+    if not out:+        resp = 'Content-Type: text/plain\n\nSize limit exceeded'+        return resp+    resp = 'Content-Type: multipart/mixed; boundary="boundary"'+    resp += '\n\n--boundary\n'+    resp += graph(command, data, out)+    resp += '\n--boundary\n'+    resp += 'Content-Type: text/plain; charset=US-ASCII\n\n'+    resp += out+    resp += '\n--boundary--\n'+    return resp++def cpsa_xml(command, data):+    global cpsa_command+    if not data.file:+        resp = 'Content-Type: text/plain; charset=US-ASCII\n\n'+        resp += 'Bad form input--no file\n'+        return resp+    busy = in_use()+    if busy:+        return busy+    p = subprocess.Popen(cpsa_command, stdin=subprocess.PIPE,+                         stdout=subprocess.PIPE, stderr=subprocess.PIPE)+    p.stdin.write(data.value)+    p.stdin.close()+    out = bounded_read(p.stdout)+    err = p.stderr.read()+    if p.wait():+        resp = 'Content-Type: text/plain; charset=US-ASCII\n\n' + err+        return resp+    if not out:+        resp = 'Content-Type: text/plain\n\nSize limit exceeded'+        return resp+    return xml(command, data, out)++# Use ps to ensure at most one copy of cpsa is running.+def in_use():+    global use_in_use_check+    if not use_in_use_check:+        return False+    p = subprocess.Popen(['ps', '-ux'], stdin=subprocess.PIPE,+                         stdout=subprocess.PIPE, stderr=subprocess.PIPE)+    p.stdin.close()+    out = p.stdout.read()+    err = p.stderr.read()+    if p.wait():+        resp = 'Content-Type: text/plain; charset=US-ASCII\n\n' + err+        return resp+    if out.find("cpsa") >= 0:+        return 'Content-Type: text/plain\n\nServer busy'+    return False+    ++READ_BOUND = 2 << 20++# Return the empty string when the input is too big.+def bounded_read(f):+    buf = f.read(READ_BOUND)+    if f.read(1):+        return ""+    return buf++main()
+ src/cpsacgi.sh view
@@ -0,0 +1,17 @@+#! /bin/sh+if test -e /tmp/cpsacgi+then+  echo Content-type: text/plain+  echo+  echo Server busy+  exit 0+fi+ +trap '/bin/rm -f /tmp/cpsacgi; exit 1' 1 2 3 4 6 8 9 11 13 14 15+echo $! > /tmp/cpsacgi++# Run unlimited version of the script+/usr/bin/python cpsacgi.py+STATUS=$?+/bin/rm -f /tmp/cpsacgi+exit ${STATUS}
+ src/cpsaops.scm view
@@ -0,0 +1,102 @@+#!/usr/bin/guile \+-e main -s+!#+;;; For an R6RS script, add an import statement.++;; This program simply extracts the operation form in a preskeleton+;; and prints it.+(define (consume form)+  (let ((op (skel-assq 'operation form)))+    (cond (op (write op) (newline)))))++;;; Is form a defskeleton that can be used with assq?+ +(define (skel? form)+  (and (pair? form)+       (eq? 'defskeleton (car form))+       (pair? (cdr form))+       (alist? (cddr form))))++(define (alist? form)			; Is form a list of pairs?+  (or (null? form)+      (and (pair? form)+	   (pair? (car form))+	   (alist? (cdr form)))))++;;; Extract pieces from the top-level form++(define (skel-assq key form)+  (and (skel? form)+       (assq key (cddr form))))++(define (skel-label form)+  (and (skel? form)+       (let ((form (skel-assq 'label form)))+	 (and form+	      (pair? (cdr form))+	      (null? (cddr form))+	      (number? (cadr form))+	      (cadr form)))))++;;; The main driver loop and command-line processing++;;; The main loop calls consume on each S-expression read from the+;;; current input.++(define (filter)+  (do ((form (read) (read)))+      ((eof-object? form))+    (consume form)))++;;; A file description is #f for the standard port, or a file name+;;; that is a non-empty string that does not start with hyphen.++(define (file-description? file)+   (or (not file) +       (and (> (string-length file) 0) +	    (not (char=? #\- (string-ref file 0))))))++;;; After command-line processing, this routine opens files as needed.++(define (go input output)+  (cond ((not (file-description? input))+	 (display-error "bad input file name"))+	((not (file-description? output))+	 (display-error "bad output file name"))+	(input +	 (with-input-from-file input+	   (lambda ()+	     (if output+		 (with-output-to-file output filter)+		 (filter)))))+	(output+	 (with-output-to-file output filter))+	(else+	 (filter))))++;;; Parse command-line arguments and pass the result to the go function.++(define (main args)+  (let loop ((args (cdr args)) (output #f))+    (cond ((null? args) 		; No input file specified+	   (go #f output))+	  ((string=? (car args) "-h")+	   (display-help))		; Print help message+	  ((string=? (car args) "-o")+	   (if (null? (cdr args))+	       (display-error "bad args")+	       (loop (cddr args) (cadr args)))) ; Found an output file+	  ((null? (cdr args))		; An input file was specified+	   (go (car args) output))+	  (else+	   (display-error "bad args")))))++(define (display-help)+  (display-error "cpsaops [-h] [-o FILE] [FILE]"))++(define (display-error obj)+  (display obj (current-error-port))+  (newline (current-error-port)))++;;; For an R6RS script, add the following:+;;; (main (command-line))
+ src/httpd_allow_execmem.te view
@@ -0,0 +1,23 @@+policy_module(httpd_allow_execmem, 1.0)++########################################+#+# Declarations+#++gen_tunable(httpd_allow_execmem,true)++########################################+#+# Local policy+#++gen_require(`+	type httpd_sys_script_t;+')++tunable_policy(`httpd_allow_execmem',`+	# Allow making anonymous memory executable, e.g. +	# for runtime-code generation or executable stack.+	allow httpd_sys_script_t self:process execmem;+')
+ src/index.html view
@@ -0,0 +1,67 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"+      "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">+<html xmlns="http://www.w3.org/1999/xhtml">+<head>+  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />+  <title>CPSA</title>+  <meta name="generator" content="Amaya 9.54, see http://www.w3.org/Amaya/" />+</head>++<body>+<h1>CPSA</h1>+<ul>+  <li><a href="cpsauser.html">CPSA User Guide</a></li>+  <li><a href="cpsaprimer.pdf">CPSA Primer</a></li>+  <li><a href="examples/">Examples</a></li>+</ul>++<h2>CPSA Shapes as XML</h2>++<form action="/cgi-bin/cpsacgi" method="post" enctype="multipart/form-data">+  <input type="file" name="cpsa shapes xml" /> +  <input type="submit" value="Send" /> </form>++<h2>CPSA as XML</h2>++<form action="/cgi-bin/cpsacgi" method="post" enctype="multipart/form-data">+  <input type="file" name="cpsa xml" /> +  <input type="submit" value="Send" /> </form>++<h2>Annotated CPSA Shapes as XML</h2>++<form action="/cgi-bin/cpsacgi" method="post" enctype="multipart/form-data">+  <input type="file" name="cpsa shapes annotations xml" /> +  <input type="submit" value="Send" /> </form>++<h2>CPSA Shapes and Graph</h2>++<form action="/cgi-bin/cpsacgi" method="post" enctype="multipart/form-data">+  <input type="file" name="cpsa shapes graph" /> +  <input type="submit" value="Send" /> </form>++<h2>CPSA and Graph</h2>++<form action="/cgi-bin/cpsacgi" method="post" enctype="multipart/form-data">+  <input type="file" name="cpsa graph" /> +  <input type="submit" value="Send" /> </form>++<h2>CPSA Shapes as Text</h2>++<form action="/cgi-bin/cpsacgi" method="post" enctype="multipart/form-data">+  <input type="file" name="cpsa shapes" /> +  <input type="submit" value="Send" /> </form>++<h2>CPSA as Text</h2>++<form action="/cgi-bin/cpsacgi" method="post" enctype="multipart/form-data">+  <input type="file" name="cpsa" /> +  <input type="submit" value="Send" /> </form>++<h2>Annotated CPSA Shapes as Text</h2>++<form action="/cgi-bin/cpsacgi" method="post" enctype="multipart/form-data">+  <input type="file" name="cpsa shapes annotations" /> +  <input type="submit" value="Send" /> </form>+</body>+</html>
+ src/preskel.sh view
@@ -0,0 +1,11 @@+#! /bin/sh+# replaces defpreskeleton with defskeleton++for i+do+  if test -f "$i" -a -w "$i"+  then+    mv "$i" "$i".bak+    sed 's/defpreskeleton/defskeleton/g' "$i".bak > "$i" +  fi+done
+ src/sexpr.pl view
@@ -0,0 +1,295 @@+% -*- mode: prolog -*-++% Converts lists of character codes to Prolog style S-Expressions.++% Known to work in SWI-Prolog, but not with GNU Prolog.++:- module(sexpr,+	  [codes_sexpr/2, codes_sexpr_list/2, sexpr_term/2,+	   read_sexpr_list/2, read_sexpr_term_list/2]).++% codes_sexpr(+Codes, -Sexpr)++% Convert a list of character codes to a Prolog style S-Expression.++codes_sexpr(Codes, Sexpr) :-+	phrase(sexpr_top(Sexpr), Codes).++sexpr_top(S) -->+	sexpr(S),+	sexpr_white_spaces.++% codes_sexpr_list(+Codes, -Sexprs)++% Convert a list of character codes to a Prolog style list of+% S-Expressions.++codes_sexpr_list(Codes, Sexprs) :-+	phrase(sexpr_list_top(Sexprs), Codes).++sexpr_list_top(S) -->+	sexpr_list(S),+	sexpr_white_spaces.++% Supporting predicates follow.++% Parse an S-Expression.++sexpr(S) -->+	sexpr_white_space,+	!,+	sexpr(S).++sexpr(S) -->+	sexpr_open,+	!,+	sexpr_list(S),+	sexpr_close.++sexpr(_) -->+	sexpr_close,+	!,+	{ fail }.++sexpr(S) -->+	sexpr_digit(C),+	!,+	sexpr_number(C, S).++sexpr(S) -->+	sexpr_string_start,+	!,+	sexpr_string(S).++sexpr(S) -->+	sexpr_symbol(S).++% Parse a list minus the opening parenthesis.++sexpr_list(L) -->+	sexpr_white_space,+	!,+	sexpr_list(L).++sexpr_list([S|L]) -->+	sexpr(S),+	!,+	sexpr_list(L).++sexpr_list([]) -->+	[].++% Parse a number.++sexpr_number(C, S) -->+	sexpr_digits(L),+	{ number_codes(S, [C|L]) }.++sexpr_digits([]) -->+	sexpr_atom_end,+	!.++sexpr_digits([C|L]) -->+	sexpr_digit(C),+	sexpr_digits(L).++% Parse a string minus the opening quote.++sexpr_string(S) -->+	sexpr_string_rest(L),+	{ string_to_list(S, L) }.++sexpr_string_rest(L) -->+	sexpr_string_start,+	!,+	{ L = [] }.++sexpr_string_rest([C|L]) -->+	[C],+	sexpr_string_rest(L).++sexpr_string_start -->+	sexpr_quote.++% Symbols++sexpr_symbol(S) -->+	sexpr_symbol_code(C),+	sexpr_symbol_codes(L),+	{ atom_codes(S, [C|L]) }.++sexpr_symbol_codes([C|L]) -->+	sexpr_symbol_code(C),+	!,+	sexpr_symbol_codes(L).++sexpr_symbol_codes([]) -->+	sexpr_atom_end,+	!.++sexpr_symbol_code(C) -->+	sexpr_other(C).++% Character recognizers.++sexpr_white_space -->+	[C],+	{ sexpr_token(C, space) }.++sexpr_white_space -->+	sexpr_semicolon, +	!,+	sexpr_comment.++sexpr_semicolon -->+	[C],+	{ sexpr_token(C, semicolon) }.++sexpr_comment -->+	sexpr_comment_char,+	!,+	sexpr_comment.++sexpr_comment -->+	[].++sexpr_comment_char -->+	[C],+	{ \+ code_type(C, newline) }.++sexpr_open -->+	[C],+	{ sexpr_token(C, open) }.++sexpr_close -->+	[C],+	{ sexpr_token(C, close) }.++sexpr_digit(C) -->+	[C],+	{ code_type(C, digit) }.++sexpr_quote -->+	[C],+	{ sexpr_token(C, quote) }.++sexpr_other(C) -->+	[C],+	{ sexpr_token_other(C) }.++sexpr_token_other(C) :-+	sexpr_token(C, _),+	!,+	fail.++sexpr_token_other(_).++% Atomic S-Expressions end with EOF, white space, or a parenthesis.++sexpr_atom_end([], []) :-+	!.++sexpr_atom_end([C|L], [C|L]) :-+	sexpr_token(C, space),+	!.++sexpr_atom_end([C|L], [C|L]) :-+	sexpr_token(C, open),+	!.++sexpr_atom_end([C|L], [C|L]) :-+	sexpr_token(C, close).++% S-Expression character classes.++sexpr_token(Code, space) :-+	code_type(Code, space),+	!.++sexpr_token(Code, open) :-+	char_code('(', Code),+	!.++sexpr_token(Code, close) :-+	char_code(')', Code),+	!.++sexpr_token(Code, semicolon) :-+	char_code(';', Code),+	!.++sexpr_token(Code, quote) :-+	char_code('"', Code).++% Check for trailing white space in a list of character codes.++sexpr_white_spaces -->+	sexpr_white_space,+	!,+	sexpr_white_spaces.++sexpr_white_spaces -->+	[].++% Other predicates used in conjunction with the parser.++% sexpr_term(+Sexpr, -Term)++% Convert S-Expression into a more convenient form of term.  When the+% first element of a list is an atom, convert it to a function symbol+% applied to the remaining terms.++sexpr_term(A, A) :-+	atomic(A),+	!.++sexpr_term([F|L], T) :-+	atom(F),+	!,+	sexpr_term_list(L, S),+	T =.. [F|S].++sexpr_term(L, T) :-+	sexpr_term_list(L, T).++% sexpr_term_list(+Sexprs, -Terms)++sexpr_term_list(L, T) :-+	maplist(sexpr_term, L, T).++% --------------I/O--------------++% read_file(+Name, -Codes)++read_file(Name, Codes) :-+	open(Name, read, Stream),+	get_codes(Stream, Codes).++% Get characters from a stream and return them as a list.++get_codes(Stream, []) :-+	at_end_of_stream(Stream),+	!,+	close(Stream).++get_codes(Stream, [Code|Codes]) :-+	get_code(Stream, Code),+	get_codes(Stream, Codes).++% read_sexpr_list(+Name, -Sexprs)++% Intrepret the character codes from a file as a list of S-Expressions.++read_sexpr_list(Name, Sexprs) :-+	read_file(Name, Codes),+	codes_sexpr_list(Codes, Sexprs).++% read_sexpr_term_list(+Name, -Terms)++% Intrepret the character codes from a file as a list of S-Expressions+% in which lists that start with an atom have been converted to a+% function application.++read_sexpr_term_list(Name, Terms) :-+	read_sexpr_list(Name, Sexprs),+	sexpr_term_list(Sexprs, Terms).
+ tst/Make.hs view
@@ -0,0 +1,299 @@+-- A simple, CPSA specific make system++module Make (cpsa, shapes, annos, cleanse, get, set,+             build, clean, roots) where++{- Place a copy of this source file in the directory used to store+CPSA problem statements, edit it to suit your needs, and load it into+a Haskell interpreter.++Normally, just the build and the clean command are used.  It's the+build command that you usually modify.++To analyze a problem in prob.scm, type:++*Make> cpsa "prob"++If successful, the analysis is in the file prob.xml, which can be+viewed with a standards-compliant browser.++To analyze a problem in prob.sch using the Diffie-Hellman algebra, type:++*Make> cpsa "prob"++For a shapes only version of the analysis, type:++*Make> shapes "prob"++If successful, the shapes are in the file prob_shapes.xml.++When the protocol is annotated with rely-guarantee formulas, type:++*Make> annos "prob"++If successful, the annotated shapes are in the file prob_annotations.xml.++To remove the files generated from source files, type:++*Make> cleanse "prob"++To see the command-line options used by CPSA, type:++*Make> get++To change the command-line options used by CPSA to "-b 15", type:++*Make> set "-b 15"++To analyze all source files in the directory, type:++*Make> build++To remove the files generated from source files in the directory, type:++*Make> clean++-}++import Control.Monad (mapM_)+import Data.List (sort)+import Data.IORef (IORef, newIORef, readIORef, writeIORef)+import System (ExitCode (..), system)+import System.IO (putStrLn)+import System.IO.Unsafe (unsafePerformIO)+import System.FilePath (FilePath, splitExtension)+import System.Directory (removeFile, doesFileExist, getModificationTime,+                         getCurrentDirectory, getDirectoryContents)++-- Flags for CPSA++initialCpsaFlags :: String+initialCpsaFlags = "+RTS -M512m -RTS"++-- A mutable location for CPSA flags+cpsaFlags :: IORef String+cpsaFlags = unsafePerformIO $ newIORef initialCpsaFlags++-- Get the CPSA flags+get :: IO String+get =+    readIORef cpsaFlags++-- Set the CPSA flags+set :: String -> IO ()+set flags =+    writeIORef cpsaFlags flags++-- Transformation rules++data Rule = Rule+    { prog :: String,           -- program to run+      inputExt :: String,       -- input file name extension+      outputExt :: String }     -- output file name extension++-- Graph Rule++graph :: FilePath -> IO ()+graph root =+    make graphRule root         -- make graph using given rule++graphRule :: Rule+graphRule =+    Rule { prog = "cpsagraph -x",+           inputExt = cpsaExt,+           outputExt = graphExt }++-- CPSA Rule++cpsa :: FilePath -> IO ()+cpsa root =+    do+      cpsaAll root+      shapes root+      graph root++cpsaAll :: FilePath -> IO ()+cpsaAll root =+    do+      exists <- doesFileExist (root ++ sourceDhExt)+      case exists of+        True -> cpsaDh root+        False -> cpsaBasic root++-- CPSA using Basic rule++cpsaBasic :: FilePath -> IO ()+cpsaBasic root =+    do+      flags <- get               -- get CPSA flags+      make (cpsaBasicRule flags) root -- make CPSA output using given rule++cpsaBasicRule :: String -> Rule+cpsaBasicRule flags =+    Rule { prog = "cpsa " ++ flags,+           inputExt = sourceBasicExt,+           outputExt = cpsaExt }++-- CPSA using Diffie-Hellman Rule++cpsaDh :: FilePath -> IO ()+cpsaDh root =+    do+      flags <- get               -- get CPSA flags+      make (cpsaDhRule flags) root -- make CPSA output using given rule++cpsaDhRule :: String -> Rule+cpsaDhRule flags =+    Rule { prog = "cpsa -a diffie-hellman " ++ flags,+           inputExt = sourceDhExt,+           outputExt = cpsaExt }++-- Shapes Rule++shapes :: FilePath -> IO ()+shapes root =+    do+      cpsaAll root              -- Run CPSA if need be+      make shapesRule root+      graph $ root ++ shapesRoot++shapesRule :: Rule+shapesRule =+    Rule { prog = "cpsashapes",+           inputExt = cpsaExt,+           outputExt = shapesRoot ++ cpsaExt }++-- Annotations Rule++annos :: FilePath -> IO ()+annos root =+    do+      cpsa root                 -- Run CPSA and make shapes+      make annosRule root+      graph $ root ++ annosRoot++annosRule :: Rule+annosRule =+    Rule { prog = "cpsaannotations",+           inputExt = shapesRoot ++ cpsaExt,+           outputExt = annosRoot ++ cpsaExt }++-- Clean generated files++cleanse :: FilePath -> IO ()+cleanse root =+    do+      rm $ root ++ cpsaExt+      rm $ root ++ graphExt+      rm $ root ++ shapesRoot ++ cpsaExt+      rm $ root ++ shapesRoot ++ graphExt+      rm $ root ++ annosRoot ++ cpsaExt+      rm $ root ++ annosRoot ++ graphExt++-- File Extensions++sourceBasicExt :: String+sourceBasicExt = ".scm"++-- Diffie-hellman source file+sourceDhExt :: String+sourceDhExt = ".sch"++cpsaExt :: String+cpsaExt = ".txt"++shapesRoot :: String+shapesRoot = "_shapes"++annosRoot :: String+annosRoot = "_annotations"++graphExt :: String+graphExt = ".xml"++-- Rule Interpreters++-- Make output for root using rule+make :: Rule -> FilePath -> IO ()+make rule root =+    do+      let input = root ++ inputExt rule+      let output = root ++ outputExt rule+      done <- made input output+      case done of+        True -> return ()       -- Nothing to do+        False -> run (prog rule) input output++-- See if an output file is up-to-date+made :: FilePath -> FilePath -> IO Bool+made input output =+    do+      src <- doesFileExist input+      dst <- doesFileExist output+      case src && dst of+        False -> return False+        True ->+            do+              src <- getModificationTime input+              dst <- getModificationTime output+              return $ src < dst++-- Run a program with input and output from files++-- Print the command before running it.  Delete the output when the+-- command fails.+run :: String -> FilePath -> FilePath -> IO ()+run prog input output =+    do+      let cmd = prog ++ " -o " ++ output ++ " " ++ input+      putStrLn cmd+      code <- system cmd+      case code of+        ExitSuccess -> return ()+        ExitFailure _ ->+            do+              rm output+              fail "Command failed"++-- Remove a file++-- Prints the command when there is a file to be deleted.+rm :: FilePath -> IO ()+rm output =+    do+      exists <- doesFileExist output+      case exists of+        False -> return ()      -- File doesn't exist+        True ->+            do                  -- Print command before removal+              putStrLn $ "rm " ++ output+              removeFile output++-- Return the roots of the CPSA source files in the current directory.++roots :: [String] -> IO [FilePath]+roots exts =+    do+      dir <- getCurrentDirectory+      files <- getDirectoryContents dir+      let roots = [ root |+                    file <- files,+                    let (root, ext) = splitExtension file,+                    elem ext exts ] -- Filter for source files+      return $ sort roots++-- Build the shapes for all the source files in the current directory.++build :: IO ()+build =+    do+      probs <- roots [sourceBasicExt, sourceDhExt]+      mapM_ cpsa probs++-- Clean files generated for all the source files in the current directory.++clean :: IO ()+clean =+    do+      probs <- roots [sourceBasicExt, sourceDhExt]+      mapM_ cleanse probs
+ tst/Makefile view
@@ -0,0 +1,50 @@+# When the binary changes, run the test suite, and look for changes in+# the output.  The changes are not fatal errors, but for a *.sc{m,h} input+# file, an error produced by the binary is fatal.++TSTS	:= $(patsubst %.scm,%.txt,$(wildcard *.scm)) \+		$(patsubst %.lsp,%.txt,$(wildcard *.lsp)) \+		$(patsubst %.sch,%.txt,$(wildcard *.sch))+PROG	= ../dist/build/cpsa/cpsa+CPSAFLAGS = +RTS -M512m -RTS++# The expected answers are in files with the .tst extension.++# Analyze protocols for shapes expecting success+%.txt:	%.scm $(PROG)+	$(PROG) $(CPSAFLAGS) -o $@ $*.scm+	-diff -u $*.tst $*.txt++# Analyze protocols for shapes expecting failure+%.txt:	%.lsp $(PROG)+	-$(PROG) $(CPSAFLAGS) -o $@ $*.lsp+	-diff -u $*.tst $*.txt++# Analyze protocols for shapes expecting success using Diffie-Hellman+%.txt:	%.sch $(PROG)+	$(PROG) $(CPSAFLAGS) -a diffie-hellman -o $@ $*.sch+	-diff -u $*.tst $*.txt++# Extract shapes+%_shapes.txt:	%.txt+	../dist/build/cpsashapes/cpsashapes -o $@ $<++# Annotate shapes+%_annotations.txt:	%_shapes.txt+	../dist/build/cpsaannotations/cpsaannotations -o $@ $<++# Visualize output+%.svg:		%.txt+	../dist/build/cpsagraph/cpsagraph -c -o $@ $<++# Visualize output using the expanded format+%.xml:		%.txt+	../dist/build/cpsagraph/cpsagraph -o $@ $<++.PRECIOUS:	%.txt %_shapes.txt %_annotations.txt++all:	$(TSTS) $(patsubst %.txt,%.xml,$(TSTS)) \+		$(patsubst %.txt,%_shapes.xml,$(TSTS))++clean:+	-rm *.txt *.xml
+ tst/README view
@@ -0,0 +1,20 @@+This directory contains the test suite for CPSA.  Files with a .scm+extension are expected to succeed, ones with a .lsp extension expected+are expected to fail, and ones with a .lisp are not run.  The .lisp+files may run for a long time and succeed or maybe they fail.  The+test suite is usually run by typing "sh cpsatst.sh" in the parent+directory.++After running the test suite, you will note files with the extension+.xml.  These are XHTML/SVG compound documents that can be viewed by+standards compliant browsers such as Firefox and Safari.++New users should study CPSA's analysis of the following protocols in+order, Needham-Schroeder (ns.xml), Woo-Lam (woolan.xml), Yahalom+(yahalom.xml), ffgg (ffgg.xml), and finally Otway-Rees (or.xml).  When+studying the full output, simultaneously display the extracted shapes.+The shapes file has an extension of _shapes.xml.++On the first pass, just look at the first two problems in the analysis+of the Needham-Schroeder Protocol, and return to this test case when+reading about role origination assumptions in the primer.
+ tst/checktst.sh view
@@ -0,0 +1,10 @@+#! /bin/sh++for f in *.tst+do+  b=`basename $f .tst`+  if test ! -f $b.scm -a ! -f $b.lsp+  then+    echo $f+  fi+done
+ tst/completeness-test.scm view
@@ -0,0 +1,56 @@+;; In this protocol an initiator verifies the liveness+;; of a responder via the first two messages of a+;; Needham-Schroeder exchange.  The initiator then+;; sends an ok message to a probe who is waiting+;; to hear if the responder is live.++(defprotocol completeness-test basic+ (defrole init+   (vars (a b name) (n text) (s skey))+   (trace+    (send (enc a n (pubk b)))+    (recv (enc n (pubk a)))+    (send (enc "ok" s))))+ (defrole resp+   (vars (a b name) (n text))+   (trace+    (recv (enc a n (pubk b)))+    (send (enc n (pubk a)))))+ (defrole probe+   (vars (s skey))+   (trace+    (recv (enc "ok" s)))))++;; These first two skeletons should be compared to+;; each other.  They only differ in the order in which+;; the strands are listed.  CPSA should find the same+;; shapes for both of them.  However, CPSA 1.5.3+;; only finds one shape for the first one.++(defskeleton completeness-test+  (vars (b name) (n text) (s skey))+  (defstrand init 3 (b b) (n n))+  (defstrand probe 1 (s s))+  (non-orig s (privk b))+  (uniq-orig n))++(defskeleton completeness-test+  (vars (b name) (n text) (s skey))+  (defstrand probe 1 (s s))+  (defstrand init 3 (b b) (n n))+  (non-orig s (privk b))+  (uniq-orig n))++(defskeleton completeness-test+  (vars (b name) (n text) (s skey))+  (defstrand init 2 (b b) (n n))+  (defstrand probe 1 (s s))+  (non-orig s (privk b))+  (uniq-orig n))++(defskeleton completeness-test+  (vars (b name) (n text) (s skey))+  (defstrand probe 1 (s s))+  (defstrand init 2 (b b) (n n))+  (non-orig s (privk b))+  (uniq-orig n))
+ tst/completeness-test.tst view
@@ -0,0 +1,334 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol completeness-test basic+  (defrole init+    (vars (a b name) (n text) (s skey))+    (trace (send (enc a n (pubk b))) (recv (enc n (pubk a)))+      (send (enc "ok" s))))+  (defrole resp+    (vars (a b name) (n text))+    (trace (recv (enc a n (pubk b))) (send (enc n (pubk a)))))+  (defrole probe (vars (s skey)) (trace (recv (enc "ok" s)))))++(defskeleton completeness-test+  (vars (n text) (b a name) (s s-0 skey))+  (defstrand init 3 (n n) (a a) (b b) (s s-0))+  (defstrand probe 1 (s s))+  (non-orig s (privk b))+  (uniq-orig n)+  (traces+    ((send (enc a n (pubk b))) (recv (enc n (pubk a)))+      (send (enc "ok" s-0))) ((recv (enc "ok" s))))+  (label 0)+  (unrealized (0 1) (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton completeness-test+  (vars (n n-0 text) (b a a-0 b-0 name) (s s-0 skey))+  (defstrand init 3 (n n) (a a) (b b) (s s-0))+  (defstrand probe 1 (s s))+  (defstrand init 3 (n n-0) (a a-0) (b b-0) (s s))+  (precedes ((2 2) (1 0)))+  (non-orig s (privk b))+  (uniq-orig n)+  (operation encryption-test (added-strand init 3) (enc "ok" s) (1 0))+  (traces+    ((send (enc a n (pubk b))) (recv (enc n (pubk a)))+      (send (enc "ok" s-0))) ((recv (enc "ok" s)))+    ((send (enc a-0 n-0 (pubk b-0))) (recv (enc n-0 (pubk a-0)))+      (send (enc "ok" s))))+  (label 1)+  (parent 0)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton completeness-test+  (vars (n n-0 text) (b a a-0 b-0 name) (s s-0 skey))+  (defstrand init 3 (n n) (a a) (b b) (s s-0))+  (defstrand probe 1 (s s))+  (defstrand init 3 (n n-0) (a a-0) (b b-0) (s s))+  (defstrand resp 2 (n n) (a a) (b b))+  (precedes ((0 0) (3 0)) ((2 2) (1 0)) ((3 1) (0 1)))+  (non-orig s (privk b))+  (uniq-orig n)+  (operation nonce-test (added-strand resp 2) n (0 1)+    (enc a n (pubk b)))+  (traces+    ((send (enc a n (pubk b))) (recv (enc n (pubk a)))+      (send (enc "ok" s-0))) ((recv (enc "ok" s)))+    ((send (enc a-0 n-0 (pubk b-0))) (recv (enc n-0 (pubk a-0)))+      (send (enc "ok" s)))+    ((recv (enc a n (pubk b))) (send (enc n (pubk a)))))+  (label 2)+  (parent 1)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton completeness-test+  (vars (n text) (b a name) (s skey))+  (defstrand init 3 (n n) (a a) (b b) (s s))+  (defstrand probe 1 (s s))+  (defstrand resp 2 (n n) (a a) (b b))+  (precedes ((0 0) (2 0)) ((0 2) (1 0)) ((2 1) (0 1)))+  (non-orig s (privk b))+  (uniq-orig n)+  (operation collapsed 2 0)+  (traces+    ((send (enc a n (pubk b))) (recv (enc n (pubk a)))+      (send (enc "ok" s))) ((recv (enc "ok" s)))+    ((recv (enc a n (pubk b))) (send (enc n (pubk a)))))+  (label 3)+  (parent 2)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol completeness-test basic+  (defrole init+    (vars (a b name) (n text) (s skey))+    (trace (send (enc a n (pubk b))) (recv (enc n (pubk a)))+      (send (enc "ok" s))))+  (defrole resp+    (vars (a b name) (n text))+    (trace (recv (enc a n (pubk b))) (send (enc n (pubk a)))))+  (defrole probe (vars (s skey)) (trace (recv (enc "ok" s)))))++(defskeleton completeness-test+  (vars (n text) (b a name) (s s-0 skey))+  (defstrand probe 1 (s s))+  (defstrand init 3 (n n) (a a) (b b) (s s-0))+  (non-orig s (privk b))+  (uniq-orig n)+  (traces ((recv (enc "ok" s)))+    ((send (enc a n (pubk b))) (recv (enc n (pubk a)))+      (send (enc "ok" s-0))))+  (label 4)+  (unrealized (0 0) (1 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton completeness-test+  (vars (n text) (b a name) (s s-0 skey))+  (defstrand probe 1 (s s))+  (defstrand init 3 (n n) (a a) (b b) (s s-0))+  (defstrand resp 2 (n n) (a a) (b b))+  (precedes ((1 0) (2 0)) ((2 1) (1 1)))+  (non-orig s (privk b))+  (uniq-orig n)+  (operation nonce-test (added-strand resp 2) n (1 1)+    (enc a n (pubk b)))+  (traces ((recv (enc "ok" s)))+    ((send (enc a n (pubk b))) (recv (enc n (pubk a)))+      (send (enc "ok" s-0)))+    ((recv (enc a n (pubk b))) (send (enc n (pubk a)))))+  (label 5)+  (parent 4)+  (unrealized (0 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton completeness-test+  (vars (n n-0 text) (b a a-0 b-0 name) (s s-0 skey))+  (defstrand probe 1 (s s))+  (defstrand init 3 (n n) (a a) (b b) (s s-0))+  (defstrand resp 2 (n n) (a a) (b b))+  (defstrand init 3 (n n-0) (a a-0) (b b-0) (s s))+  (precedes ((1 0) (2 0)) ((2 1) (1 1)) ((3 2) (0 0)))+  (non-orig s (privk b))+  (uniq-orig n)+  (operation encryption-test (added-strand init 3) (enc "ok" s) (0 0))+  (traces ((recv (enc "ok" s)))+    ((send (enc a n (pubk b))) (recv (enc n (pubk a)))+      (send (enc "ok" s-0)))+    ((recv (enc a n (pubk b))) (send (enc n (pubk a))))+    ((send (enc a-0 n-0 (pubk b-0))) (recv (enc n-0 (pubk a-0)))+      (send (enc "ok" s))))+  (label 6)+  (parent 5)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton completeness-test+  (vars (n text) (b a name) (s skey))+  (defstrand probe 1 (s s))+  (defstrand init 3 (n n) (a a) (b b) (s s))+  (defstrand resp 2 (n n) (a a) (b b))+  (precedes ((1 0) (2 0)) ((1 2) (0 0)) ((2 1) (1 1)))+  (non-orig s (privk b))+  (uniq-orig n)+  (operation collapsed 3 1)+  (traces ((recv (enc "ok" s)))+    ((send (enc a n (pubk b))) (recv (enc n (pubk a)))+      (send (enc "ok" s)))+    ((recv (enc a n (pubk b))) (send (enc n (pubk a)))))+  (label 7)+  (parent 6)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol completeness-test basic+  (defrole init+    (vars (a b name) (n text) (s skey))+    (trace (send (enc a n (pubk b))) (recv (enc n (pubk a)))+      (send (enc "ok" s))))+  (defrole resp+    (vars (a b name) (n text))+    (trace (recv (enc a n (pubk b))) (send (enc n (pubk a)))))+  (defrole probe (vars (s skey)) (trace (recv (enc "ok" s)))))++(defskeleton completeness-test+  (vars (n text) (b a name) (s skey))+  (defstrand init 2 (n n) (a a) (b b))+  (defstrand probe 1 (s s))+  (non-orig s (privk b))+  (uniq-orig n)+  (traces ((send (enc a n (pubk b))) (recv (enc n (pubk a))))+    ((recv (enc "ok" s))))+  (label 8)+  (unrealized (0 1) (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton completeness-test+  (vars (n n-0 text) (b a a-0 b-0 name) (s skey))+  (defstrand init 2 (n n) (a a) (b b))+  (defstrand probe 1 (s s))+  (defstrand init 3 (n n-0) (a a-0) (b b-0) (s s))+  (precedes ((2 2) (1 0)))+  (non-orig s (privk b))+  (uniq-orig n)+  (operation encryption-test (added-strand init 3) (enc "ok" s) (1 0))+  (traces ((send (enc a n (pubk b))) (recv (enc n (pubk a))))+    ((recv (enc "ok" s)))+    ((send (enc a-0 n-0 (pubk b-0))) (recv (enc n-0 (pubk a-0)))+      (send (enc "ok" s))))+  (label 9)+  (parent 8)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton completeness-test+  (vars (n n-0 text) (b a a-0 b-0 name) (s skey))+  (defstrand init 2 (n n) (a a) (b b))+  (defstrand probe 1 (s s))+  (defstrand init 3 (n n-0) (a a-0) (b b-0) (s s))+  (defstrand resp 2 (n n) (a a) (b b))+  (precedes ((0 0) (3 0)) ((2 2) (1 0)) ((3 1) (0 1)))+  (non-orig s (privk b))+  (uniq-orig n)+  (operation nonce-test (added-strand resp 2) n (0 1)+    (enc a n (pubk b)))+  (traces ((send (enc a n (pubk b))) (recv (enc n (pubk a))))+    ((recv (enc "ok" s)))+    ((send (enc a-0 n-0 (pubk b-0))) (recv (enc n-0 (pubk a-0)))+      (send (enc "ok" s)))+    ((recv (enc a n (pubk b))) (send (enc n (pubk a)))))+  (label 10)+  (parent 9)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton completeness-test+  (vars (n text) (a b name) (s skey))+  (defstrand probe 1 (s s))+  (defstrand init 3 (n n) (a a) (b b) (s s))+  (defstrand resp 2 (n n) (a a) (b b))+  (precedes ((1 0) (2 0)) ((1 2) (0 0)) ((2 1) (1 1)))+  (non-orig s (privk b))+  (uniq-orig n)+  (operation collapsed 0 2)+  (traces ((recv (enc "ok" s)))+    ((send (enc a n (pubk b))) (recv (enc n (pubk a)))+      (send (enc "ok" s)))+    ((recv (enc a n (pubk b))) (send (enc n (pubk a)))))+  (label 11)+  (parent 10)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol completeness-test basic+  (defrole init+    (vars (a b name) (n text) (s skey))+    (trace (send (enc a n (pubk b))) (recv (enc n (pubk a)))+      (send (enc "ok" s))))+  (defrole resp+    (vars (a b name) (n text))+    (trace (recv (enc a n (pubk b))) (send (enc n (pubk a)))))+  (defrole probe (vars (s skey)) (trace (recv (enc "ok" s)))))++(defskeleton completeness-test+  (vars (n text) (b a name) (s skey))+  (defstrand probe 1 (s s))+  (defstrand init 2 (n n) (a a) (b b))+  (non-orig s (privk b))+  (uniq-orig n)+  (traces ((recv (enc "ok" s)))+    ((send (enc a n (pubk b))) (recv (enc n (pubk a)))))+  (label 12)+  (unrealized (0 0) (1 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton completeness-test+  (vars (n text) (b a name) (s skey))+  (defstrand probe 1 (s s))+  (defstrand init 2 (n n) (a a) (b b))+  (defstrand resp 2 (n n) (a a) (b b))+  (precedes ((1 0) (2 0)) ((2 1) (1 1)))+  (non-orig s (privk b))+  (uniq-orig n)+  (operation nonce-test (added-strand resp 2) n (1 1)+    (enc a n (pubk b)))+  (traces ((recv (enc "ok" s)))+    ((send (enc a n (pubk b))) (recv (enc n (pubk a))))+    ((recv (enc a n (pubk b))) (send (enc n (pubk a)))))+  (label 13)+  (parent 12)+  (unrealized (0 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton completeness-test+  (vars (n n-0 text) (b a a-0 b-0 name) (s skey))+  (defstrand probe 1 (s s))+  (defstrand init 2 (n n) (a a) (b b))+  (defstrand resp 2 (n n) (a a) (b b))+  (defstrand init 3 (n n-0) (a a-0) (b b-0) (s s))+  (precedes ((1 0) (2 0)) ((2 1) (1 1)) ((3 2) (0 0)))+  (non-orig s (privk b))+  (uniq-orig n)+  (operation encryption-test (added-strand init 3) (enc "ok" s) (0 0))+  (traces ((recv (enc "ok" s)))+    ((send (enc a n (pubk b))) (recv (enc n (pubk a))))+    ((recv (enc a n (pubk b))) (send (enc n (pubk a))))+    ((send (enc a-0 n-0 (pubk b-0))) (recv (enc n-0 (pubk a-0)))+      (send (enc "ok" s))))+  (label 14)+  (parent 13)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton completeness-test+  (vars (n text) (a b name) (s skey))+  (defstrand probe 1 (s s))+  (defstrand resp 2 (n n) (a a) (b b))+  (defstrand init 3 (n n) (a a) (b b) (s s))+  (precedes ((1 1) (2 1)) ((2 0) (1 0)) ((2 2) (0 0)))+  (non-orig s (privk b))+  (uniq-orig n)+  (operation collapsed 1 3)+  (traces ((recv (enc "ok" s)))+    ((recv (enc a n (pubk b))) (send (enc n (pubk a))))+    ((send (enc a n (pubk b))) (recv (enc n (pubk a)))+      (send (enc "ok" s))))+  (label 15)+  (parent 14)+  (unrealized)+  (shape))++(comment "Nothing left to do")
+ tst/cpsagraphall.sh view
@@ -0,0 +1,12 @@+#! /bin/sh++# Graph all test output.++PROG=../dist/build/cpsagraph/cpsagraph++for i in *.txt+do+  o=`basename $i .txt`.svg+  echo $PROG -o $o $i+  $PROG -o $o $i+done
+ tst/cpsashapesall.sh view
@@ -0,0 +1,15 @@+#! /bin/sh++# Find the shapes associated with all test output.++PROG=../dist/build/cpsashapes/cpsashapes++for i in *.txt+do+  if echo $i | grep -v shapes > /dev/null+  then+    o=`basename $i .txt`_shapes.txt+    echo $PROG -o $o $i+    $PROG -o $o $i+  fi+done
+ tst/dass-mod.lisp view
@@ -0,0 +1,31 @@+(defprotocol dass basic+  (defrole init+    (vars (a name) (b name) (ks name) (k skey) (l text) (ta text) (tb text))+    (trace (send b)+	   (recv (enc (cat b (pubk b)) (privk ks)))+	   (send (enc (cat (enc ta k) l a (enc k (pubk b))) (privk a)))+	   (recv (enc tb k))))+  (defrole resp+    (vars (a name) (b name) (ks name) (k skey) (l text) (ta text) (tb text))+    (trace (recv (enc (cat (enc ta k) l a (enc k (pubk b))) (privk a)))+	   (send a)+	   (recv (enc (cat a (pubk a)) (privk ks)))+	   (send (enc tb k))))+  (defrole keyserver+    (vars (a name) (b name) (ks name))+    (trace (recv b)+	   (send (enc (cat b (pubk b)) (privk ks)))+	   (recv a)+	   (send (enc (cat a (pubk a)) (privk ks))))))++(defskeleton dass+  (vars (a name) (b name) (ks name) (k skey))+  (defstrand init 4 (a a) (b b) (ks ks) (k k))+  (non-orig (privk a) (privk b) (privk ks))+  (uniq-orig k))++(defskeleton dass+  (vars (a name) (b name) (ks name) (k skey))+  (defstrand resp 4 (a a) (b b) (ks ks) (k k))+  (non-orig (privk a) (privk b) (privk ks))+  (uniq-orig k))
+ tst/dass.lisp view
@@ -0,0 +1,31 @@+(defprotocol dass basic+  (defrole init+    (vars (a name) (b name) (ks name) (k skey) (l text) (ta text) (kp akey) (tb text))+    (trace (send b)+	   (recv (enc (cat b (pubk b)) (privk ks)))+	   (send (cat (enc ta k) (enc (cat l a kp) (privk a)) (enc (enc k (pubk b)) kp)))+	   (recv (enc tb k))))+  (defrole resp+    (vars (a name) (b name) (ks name) (k skey) (l text) (ta text) (kp akey) (tb text))+    (trace (recv (cat (enc ta k) (enc (cat l a kp) (privk a)) (enc (enc k (pubk b)) kp)))+	   (send a)+	   (recv (enc (cat a (pubk a)) (privk ks)))+	   (send (enc tb k))))+  (defrole keyserver+    (vars (a name) (b name) (ks name))+    (trace (recv b)+	   (send (enc (cat b (pubk b)) (privk ks)))+	   (recv a)+	   (send (enc (cat a (pubk a)) (privk ks))))))++(defskeleton dass+  (vars (a name) (b name) (ks name) (k skey) (kp akey))+  (defstrand init 4 (a a) (b b) (ks ks) (k k) (kp kp))+  (non-orig (privk a) (privk b) (privk ks))+  (uniq-orig k kp))++(defskeleton dass+  (vars (a name) (b name) (ks name) (k skey) (kp akey))+  (defstrand resp 4 (a a) (b b) (ks ks) (k k) (kp kp))+  (non-orig (privk a) (privk b) (privk ks))+  (uniq-orig k kp))
+ tst/dass_simple.scm view
@@ -0,0 +1,55 @@+(defprotocol dass basic+  (defrole init (vars (a b name) (k skey) (ta text) (kp akey) (tb text))+    (trace (send (cat (enc "init" ta k)+		      (enc a kp (privk a))+		      (enc (enc k (pubk b)) (invk kp))))+	   (recv (enc "resp" tb k))))+  (defrole resp (vars (a b name) (k skey) (ta text) (kp akey) (tb text))+    (trace (recv (cat (enc "init" ta k)+		      (enc a kp (privk a))+		      (enc (enc k (pubk b)) (invk kp))))+	   (send (enc "resp" tb k))))+  (comment "In this version of the protocol ")+  (comment "b might interact with a compromised initiator.")+  (comment "That is why a is not authenticated to b."))++(defprotocol dass+ basic+  (defrole init (vars (a b name) (k skey) (ta text) (kp akey) (tb text))+    (trace (send (cat (enc "init" ta k)+		      (enc a kp (privk a))+		      (enc (enc k (pubk b)) (invk kp))))+	   (recv (enc "resp" tb k))))+  (defrole resp (vars (a b name) (k skey) (ta text) (kp akey) (tb text))+    (trace (recv (cat (enc "init" ta k)+		      (enc a kp (privk a))+		      (enc (enc k (pubk b)) (invk kp))))+	   (send (enc "resp" tb k)))+    (non-orig (privk a)))+  (comment "In this version of the protocol ")+  (comment "b never interacts with a compromised initiator.")+  (comment "That is why a is properly authenticated to b."))++(defskeleton dass+  (vars (a name) (b name) (k skey) (kp akey) (ta text)(tb text))+  (defstrand init 2 (a a) (b b) (k k) (kp kp) (ta ta) (tb tb))+  (non-orig (privk a) (privk b) (invk kp))+  (uniq-orig k kp))++(defskeleton dass++  (vars (a name) (b name) (k skey) (kp akey) (ta text)(tb text))+  (defstrand init 2 (a a) (b b) (k k) (kp kp) (ta ta) (tb tb))+  (non-orig (privk a) (privk b) (invk kp))+  (uniq-orig k kp))++(comment+ (defskeleton dass+   (vars (a name) (b name) (ks name) (k skey) (kp akey))+   (defstrand init 4 (a a) (b b) (ks ks) (k k) (kp kp))+   (non-orig (privk a) (privk b) (privk ks))+   (uniq-orig k kp))++ (defskeleton dass+   (vars (a name) (b name) (ks name) (k skey) (kp akey))+   (defstrand resp 4 (a a) (b b) (ks ks) (k k) (kp kp))+   (non-orig (privk a) (privk b) (privk ks))+   (uniq-orig k kp)))
+ tst/dass_simple.tst view
@@ -0,0 +1,330 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol dass basic+  (defrole init+    (vars (a b name) (k skey) (ta text) (kp akey) (tb text))+    (trace+      (send+        (cat (enc "init" ta k) (enc a kp (privk a))+          (enc (enc k (pubk b)) (invk kp)))) (recv (enc "resp" tb k))))+  (defrole resp+    (vars (a b name) (k skey) (ta text) (kp akey) (tb text))+    (trace+      (recv+        (cat (enc "init" ta k) (enc a kp (privk a))+          (enc (enc k (pubk b)) (invk kp)))) (send (enc "resp" tb k))))+  (comment "In this version of the protocol ")+  (comment "b might interact with a compromised initiator.")+  (comment "That is why a is not authenticated to b."))++(defskeleton dass+  (vars (ta tb text) (a b name) (k skey) (kp akey))+  (defstrand init 2 (ta ta) (tb tb) (a a) (b b) (k k) (kp kp))+  (non-orig (invk kp) (privk a) (privk b))+  (uniq-orig k kp)+  (traces+    ((send+       (cat (enc "init" ta k) (enc a kp (privk a))+         (enc (enc k (pubk b)) (invk kp)))) (recv (enc "resp" tb k))))+  (label 0)+  (unrealized (0 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton dass+  (vars (ta tb ta-0 text) (a b a-0 b-0 name) (k skey) (kp kp-0 akey))+  (defstrand init 2 (ta ta) (tb tb) (a a) (b b) (k k) (kp kp))+  (defstrand resp 2 (ta ta-0) (tb tb) (a a-0) (b b-0) (k k) (kp kp-0))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (invk kp) (privk a) (privk b))+  (uniq-orig k kp)+  (operation encryption-test (added-strand resp 2) (enc "resp" tb k)+    (0 1))+  (traces+    ((send+       (cat (enc "init" ta k) (enc a kp (privk a))+         (enc (enc k (pubk b)) (invk kp)))) (recv (enc "resp" tb k)))+    ((recv+       (cat (enc "init" ta-0 k) (enc a-0 kp-0 (privk a-0))+         (enc (enc k (pubk b-0)) (invk kp-0))))+      (send (enc "resp" tb k))))+  (label 1)+  (parent 0)+  (unrealized (1 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton dass+  (vars (ta tb text) (a b name) (k skey) (kp akey))+  (defstrand init 2 (ta ta) (tb tb) (a a) (b b) (k k) (kp kp))+  (deflistener k)+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (invk kp) (privk a) (privk b))+  (uniq-orig k kp)+  (operation encryption-test (added-listener k) (enc "resp" tb k) (0 1))+  (traces+    ((send+       (cat (enc "init" ta k) (enc a kp (privk a))+         (enc (enc k (pubk b)) (invk kp)))) (recv (enc "resp" tb k)))+    ((recv k) (send k)))+  (label 2)+  (parent 0)+  (unrealized (1 0))+  (comment "empty cohort"))++(defskeleton dass+  (vars (ta tb text) (a b a-0 b-0 name) (k skey) (kp kp-0 akey))+  (defstrand init 2 (ta ta) (tb tb) (a a) (b b) (k k) (kp kp))+  (defstrand resp 2 (ta ta) (tb tb) (a a-0) (b b-0) (k k) (kp kp-0))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (invk kp) (privk a) (privk b))+  (uniq-orig k kp)+  (operation encryption-test (added-strand init 1) (enc "init" ta k)+    (1 0))+  (traces+    ((send+       (cat (enc "init" ta k) (enc a kp (privk a))+         (enc (enc k (pubk b)) (invk kp)))) (recv (enc "resp" tb k)))+    ((recv+       (cat (enc "init" ta k) (enc a-0 kp-0 (privk a-0))+         (enc (enc k (pubk b-0)) (invk kp-0))))+      (send (enc "resp" tb k))))+  (label 3)+  (parent 1)+  (unrealized (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dass+  (vars (ta tb ta-0 text) (a b a-0 b-0 name) (k skey) (kp kp-0 akey))+  (defstrand init 2 (ta ta) (tb tb) (a a) (b b) (k k) (kp kp))+  (defstrand resp 2 (ta ta-0) (tb tb) (a a-0) (b b-0) (k k) (kp kp-0))+  (deflistener k)+  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)))+  (non-orig (invk kp) (privk a) (privk b))+  (uniq-orig k kp)+  (operation encryption-test (added-listener k) (enc "init" ta-0 k)+    (1 0))+  (traces+    ((send+       (cat (enc "init" ta k) (enc a kp (privk a))+         (enc (enc k (pubk b)) (invk kp)))) (recv (enc "resp" tb k)))+    ((recv+       (cat (enc "init" ta-0 k) (enc a-0 kp-0 (privk a-0))+         (enc (enc k (pubk b-0)) (invk kp-0))))+      (send (enc "resp" tb k))) ((recv k) (send k)))+  (label 4)+  (parent 1)+  (unrealized (2 0))+  (comment "empty cohort"))++(defskeleton dass+  (vars (ta tb text) (a b a-0 name) (k skey) (kp kp-0 akey))+  (defstrand init 2 (ta ta) (tb tb) (a a) (b b) (k k) (kp kp))+  (defstrand resp 2 (ta ta) (tb tb) (a a-0) (b b) (k k) (kp kp-0))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (invk kp) (privk a) (privk b))+  (uniq-orig k kp)+  (operation nonce-test (contracted (b-0 b)) k (1 0) (enc k (pubk b)))+  (traces+    ((send+       (cat (enc "init" ta k) (enc a kp (privk a))+         (enc (enc k (pubk b)) (invk kp)))) (recv (enc "resp" tb k)))+    ((recv+       (cat (enc "init" ta k) (enc a-0 kp-0 (privk a-0))+         (enc (enc k (pubk b)) (invk kp-0)))) (send (enc "resp" tb k))))+  (label 5)+  (parent 3)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol dass+ basic+  (defrole init+    (vars (a b name) (k skey) (ta text) (kp akey) (tb text))+    (trace+      (send+        (cat (enc "init" ta k) (enc a kp (privk a))+          (enc (enc k (pubk b)) (invk kp)))) (recv (enc "resp" tb k))))+  (defrole resp+    (vars (a b name) (k skey) (ta text) (kp akey) (tb text))+    (trace+      (recv+        (cat (enc "init" ta k) (enc a kp (privk a))+          (enc (enc k (pubk b)) (invk kp)))) (send (enc "resp" tb k)))+    (non-orig (privk a)))+  (comment "In this version of the protocol ")+  (comment "b never interacts with a compromised initiator.")+  (comment "That is why a is properly authenticated to b."))++(defskeleton dass++  (vars (ta tb text) (a b name) (k skey) (kp akey))+  (defstrand init 2 (ta ta) (tb tb) (a a) (b b) (k k) (kp kp))+  (non-orig (invk kp) (privk a) (privk b))+  (uniq-orig k kp)+  (traces+    ((send+       (cat (enc "init" ta k) (enc a kp (privk a))+         (enc (enc k (pubk b)) (invk kp)))) (recv (enc "resp" tb k))))+  (label 6)+  (unrealized (0 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton dass++  (vars (ta tb ta-0 text) (a b a-0 b-0 name) (k skey) (kp kp-0 akey))+  (defstrand init 2 (ta ta) (tb tb) (a a) (b b) (k k) (kp kp))+  (defstrand resp 2 (ta ta-0) (tb tb) (a a-0) (b b-0) (k k) (kp kp-0))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (invk kp) (privk a) (privk b) (privk a-0))+  (uniq-orig k kp)+  (operation encryption-test (added-strand resp 2) (enc "resp" tb k)+    (0 1))+  (traces+    ((send+       (cat (enc "init" ta k) (enc a kp (privk a))+         (enc (enc k (pubk b)) (invk kp)))) (recv (enc "resp" tb k)))+    ((recv+       (cat (enc "init" ta-0 k) (enc a-0 kp-0 (privk a-0))+         (enc (enc k (pubk b-0)) (invk kp-0))))+      (send (enc "resp" tb k))))+  (label 7)+  (parent 6)+  (unrealized (1 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton dass++  (vars (ta tb text) (a b name) (k skey) (kp akey))+  (defstrand init 2 (ta ta) (tb tb) (a a) (b b) (k k) (kp kp))+  (deflistener k)+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (invk kp) (privk a) (privk b))+  (uniq-orig k kp)+  (operation encryption-test (added-listener k) (enc "resp" tb k) (0 1))+  (traces+    ((send+       (cat (enc "init" ta k) (enc a kp (privk a))+         (enc (enc k (pubk b)) (invk kp)))) (recv (enc "resp" tb k)))+    ((recv k) (send k)))+  (label 8)+  (parent 6)+  (unrealized (1 0))+  (comment "empty cohort"))++(defskeleton dass++  (vars (ta tb text) (a b a-0 b-0 name) (k skey) (kp kp-0 akey))+  (defstrand init 2 (ta ta) (tb tb) (a a) (b b) (k k) (kp kp))+  (defstrand resp 2 (ta ta) (tb tb) (a a-0) (b b-0) (k k) (kp kp-0))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (invk kp) (privk a) (privk b) (privk a-0))+  (uniq-orig k kp)+  (operation encryption-test (added-strand init 1) (enc "init" ta k)+    (1 0))+  (traces+    ((send+       (cat (enc "init" ta k) (enc a kp (privk a))+         (enc (enc k (pubk b)) (invk kp)))) (recv (enc "resp" tb k)))+    ((recv+       (cat (enc "init" ta k) (enc a-0 kp-0 (privk a-0))+         (enc (enc k (pubk b-0)) (invk kp-0))))+      (send (enc "resp" tb k))))+  (label 9)+  (parent 7)+  (unrealized (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dass++  (vars (ta tb ta-0 text) (a b a-0 b-0 name) (k skey) (kp kp-0 akey))+  (defstrand init 2 (ta ta) (tb tb) (a a) (b b) (k k) (kp kp))+  (defstrand resp 2 (ta ta-0) (tb tb) (a a-0) (b b-0) (k k) (kp kp-0))+  (deflistener k)+  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)))+  (non-orig (invk kp) (privk a) (privk b) (privk a-0))+  (uniq-orig k kp)+  (operation encryption-test (added-listener k) (enc "init" ta-0 k)+    (1 0))+  (traces+    ((send+       (cat (enc "init" ta k) (enc a kp (privk a))+         (enc (enc k (pubk b)) (invk kp)))) (recv (enc "resp" tb k)))+    ((recv+       (cat (enc "init" ta-0 k) (enc a-0 kp-0 (privk a-0))+         (enc (enc k (pubk b-0)) (invk kp-0))))+      (send (enc "resp" tb k))) ((recv k) (send k)))+  (label 10)+  (parent 7)+  (unrealized (1 0) (2 0))+  (comment "empty cohort"))++(defskeleton dass++  (vars (ta tb ta-0 text) (a b a-0 b-0 b-1 name) (k k-0 skey)+    (kp kp-0 akey))+  (defstrand init 2 (ta ta) (tb tb) (a a) (b b) (k k) (kp kp))+  (defstrand resp 2 (ta ta) (tb tb) (a a-0) (b b-0) (k k) (kp kp-0))+  (defstrand init 1 (ta ta-0) (a a-0) (b b-1) (k k-0) (kp kp-0))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((2 0) (1 0)))+  (non-orig (invk kp) (privk a) (privk b) (privk a-0))+  (uniq-orig k kp)+  (operation encryption-test (added-strand init 1)+    (enc a-0 kp-0 (privk a-0)) (1 0))+  (traces+    ((send+       (cat (enc "init" ta k) (enc a kp (privk a))+         (enc (enc k (pubk b)) (invk kp)))) (recv (enc "resp" tb k)))+    ((recv+       (cat (enc "init" ta k) (enc a-0 kp-0 (privk a-0))+         (enc (enc k (pubk b-0)) (invk kp-0))))+      (send (enc "resp" tb k)))+    ((send+       (cat (enc "init" ta-0 k-0) (enc a-0 kp-0 (privk a-0))+         (enc (enc k-0 (pubk b-1)) (invk kp-0))))))+  (label 11)+  (parent 9)+  (unrealized (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dass++  (vars (ta tb ta-0 text) (a b a-0 b-0 name) (k k-0 skey)+    (kp kp-0 akey))+  (defstrand init 2 (ta ta) (tb tb) (a a) (b b) (k k) (kp kp))+  (defstrand resp 2 (ta ta) (tb tb) (a a-0) (b b) (k k) (kp kp-0))+  (defstrand init 1 (ta ta-0) (a a-0) (b b-0) (k k-0) (kp kp-0))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((2 0) (1 0)))+  (non-orig (invk kp) (privk a) (privk b) (privk a-0))+  (uniq-orig k kp)+  (operation nonce-test (contracted (b-1 b)) k (1 0) (enc k (pubk b)))+  (traces+    ((send+       (cat (enc "init" ta k) (enc a kp (privk a))+         (enc (enc k (pubk b)) (invk kp)))) (recv (enc "resp" tb k)))+    ((recv+       (cat (enc "init" ta k) (enc a-0 kp-0 (privk a-0))+         (enc (enc k (pubk b)) (invk kp-0)))) (send (enc "resp" tb k)))+    ((send+       (cat (enc "init" ta-0 k-0) (enc a-0 kp-0 (privk a-0))+         (enc (enc k-0 (pubk b-0)) (invk kp-0))))))+  (label 12)+  (parent 11)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dass++  (vars (ta tb text) (a b name) (k skey) (kp akey))+  (defstrand init 2 (ta ta) (tb tb) (a a) (b b) (k k) (kp kp))+  (defstrand resp 2 (ta ta) (tb tb) (a a) (b b) (k k) (kp kp))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (invk kp) (privk a) (privk b))+  (uniq-orig k kp)+  (operation collapsed 2 0)+  (traces+    ((send+       (cat (enc "init" ta k) (enc a kp (privk a))+         (enc (enc k (pubk b)) (invk kp)))) (recv (enc "resp" tb k)))+    ((recv+       (cat (enc "init" ta k) (enc a kp (privk a))+         (enc (enc k (pubk b)) (invk kp)))) (send (enc "resp" tb k))))+  (label 13)+  (parent 12)+  (unrealized)+  (shape))++(comment "Nothing left to do")
+ tst/denning-sacco.scm view
@@ -0,0 +1,25 @@+(defprotocol denning-sacco basic+  (defrole init (vars (a b ks name) (k skey) (ta text))+    (trace+     (send (cat a b))+     (recv (cat (enc b (pubk b) (privk ks))+		(enc a (pubk a) (privk ks))))+     (send (enc (enc a b k ta (privk a))+		(enc b (pubk b) (privk ks))+		(enc a (pubk a) (privk ks)) (pubk b)))))+  (defrole resp (vars (a b ks name) (k skey) (ta text))+    (trace+     (recv (enc (enc a b k ta (privk a))+		(enc b (pubk b) (privk ks))+		(enc a (pubk a) (privk ks)) (pubk b)))))+  (defrole keyserver (vars (a b ks name))+    (trace+     (recv (cat a b))+     (send (cat (enc b (pubk b) (privk ks))+		(enc a (pubk a) (privk ks)))))))++(defskeleton denning-sacco+  (vars (a b ks name) (k skey))+  (defstrand resp 1 (a a) (b b) (ks ks) (k k))+  (non-orig (privk b) (privk a) (privk ks))+  (uniq-orig k))
+ tst/denning-sacco.tst view
@@ -0,0 +1,399 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol denning-sacco basic+  (defrole init+    (vars (a b ks name) (k skey) (ta text))+    (trace (send (cat a b))+      (recv+        (cat (enc b (pubk b) (privk ks)) (enc a (pubk a) (privk ks))))+      (send+        (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+          (enc a (pubk a) (privk ks)) (pubk b)))))+  (defrole resp+    (vars (a b ks name) (k skey) (ta text))+    (trace+      (recv+        (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+          (enc a (pubk a) (privk ks)) (pubk b)))))+  (defrole keyserver+    (vars (a b ks name))+    (trace (recv (cat a b))+      (send+        (cat (enc b (pubk b) (privk ks))+          (enc a (pubk a) (privk ks)))))))++(defskeleton denning-sacco+  (vars (ta text) (a b ks name) (k skey))+  (defstrand resp 1 (ta ta) (a a) (b b) (ks ks) (k k))+  (non-orig (privk a) (privk b) (privk ks))+  (uniq-orig k)+  (traces+    ((recv+       (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+         (enc a (pubk a) (privk ks)) (pubk b)))))+  (label 0)+  (unrealized (0 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton denning-sacco+  (vars (ta text) (a b ks ks-0 name) (k skey))+  (defstrand resp 1 (ta ta) (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ta ta) (a a) (b b) (ks ks-0) (k k))+  (precedes ((1 2) (0 0)))+  (non-orig (privk a) (privk b) (privk ks))+  (uniq-orig k)+  (operation encryption-test (added-strand init 3)+    (enc a b k ta (privk a)) (0 0))+  (traces+    ((recv+       (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+         (enc a (pubk a) (privk ks)) (pubk b))))+    ((send (cat a b))+      (recv+        (cat (enc b (pubk b) (privk ks-0))+          (enc a (pubk a) (privk ks-0))))+      (send+        (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks-0))+          (enc a (pubk a) (privk ks-0)) (pubk b)))))+  (label 1)+  (parent 0)+  (unrealized (0 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton denning-sacco+  (vars (ta text) (a b ks name) (k skey))+  (defstrand resp 1 (ta ta) (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ta ta) (a a) (b b) (ks ks) (k k))+  (precedes ((1 2) (0 0)))+  (non-orig (privk a) (privk b) (privk ks))+  (uniq-orig k)+  (operation encryption-test (contracted (ks-0 ks))+    (enc a b k ta (privk a)) (0 0)+    (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+      (enc a (pubk a) (privk ks)) (pubk b)))+  (traces+    ((recv+       (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+         (enc a (pubk a) (privk ks)) (pubk b))))+    ((send (cat a b))+      (recv+        (cat (enc b (pubk b) (privk ks)) (enc a (pubk a) (privk ks))))+      (send+        (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+          (enc a (pubk a) (privk ks)) (pubk b)))))+  (label 2)+  (parent 1)+  (unrealized (1 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton denning-sacco+  (vars (ta text) (a b ks a-0 name) (k skey))+  (defstrand resp 1 (ta ta) (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ta ta) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (a a-0) (b b) (ks ks))+  (precedes ((1 2) (0 0)) ((2 1) (1 1)))+  (non-orig (privk a) (privk b) (privk ks))+  (uniq-orig k)+  (operation encryption-test (added-strand keyserver 2)+    (enc b (pubk b) (privk ks)) (1 1))+  (traces+    ((recv+       (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+         (enc a (pubk a) (privk ks)) (pubk b))))+    ((send (cat a b))+      (recv+        (cat (enc b (pubk b) (privk ks)) (enc a (pubk a) (privk ks))))+      (send+        (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+          (enc a (pubk a) (privk ks)) (pubk b))))+    ((recv (cat a-0 b))+      (send+        (cat (enc b (pubk b) (privk ks))+          (enc a-0 (pubk a-0) (privk ks))))))+  (label 3)+  (parent 2)+  (unrealized (1 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton denning-sacco+  (vars (ta text) (a b ks b-0 name) (k skey))+  (defstrand resp 1 (ta ta) (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ta ta) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (a b) (b b-0) (ks ks))+  (precedes ((1 2) (0 0)) ((2 1) (1 1)))+  (non-orig (privk a) (privk b) (privk ks))+  (uniq-orig k)+  (operation encryption-test (added-strand keyserver 2)+    (enc b (pubk b) (privk ks)) (1 1))+  (traces+    ((recv+       (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+         (enc a (pubk a) (privk ks)) (pubk b))))+    ((send (cat a b))+      (recv+        (cat (enc b (pubk b) (privk ks)) (enc a (pubk a) (privk ks))))+      (send+        (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+          (enc a (pubk a) (privk ks)) (pubk b))))+    ((recv (cat b b-0))+      (send+        (cat (enc b-0 (pubk b-0) (privk ks))+          (enc b (pubk b) (privk ks))))))+  (label 4)+  (parent 2)+  (unrealized (1 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton denning-sacco+  (vars (ta text) (a b ks a-0 a-1 name) (k skey))+  (defstrand resp 1 (ta ta) (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ta ta) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (a a-0) (b b) (ks ks))+  (defstrand keyserver 2 (a a-1) (b a) (ks ks))+  (precedes ((1 2) (0 0)) ((2 1) (1 1)) ((3 1) (1 1)))+  (non-orig (privk a) (privk b) (privk ks))+  (uniq-orig k)+  (operation encryption-test (added-strand keyserver 2)+    (enc a (pubk a) (privk ks)) (1 1))+  (traces+    ((recv+       (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+         (enc a (pubk a) (privk ks)) (pubk b))))+    ((send (cat a b))+      (recv+        (cat (enc b (pubk b) (privk ks)) (enc a (pubk a) (privk ks))))+      (send+        (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+          (enc a (pubk a) (privk ks)) (pubk b))))+    ((recv (cat a-0 b))+      (send+        (cat (enc b (pubk b) (privk ks))+          (enc a-0 (pubk a-0) (privk ks)))))+    ((recv (cat a-1 a))+      (send+        (cat (enc a (pubk a) (privk ks))+          (enc a-1 (pubk a-1) (privk ks))))))+  (label 5)+  (parent 3)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton denning-sacco+  (vars (ta text) (a b ks a-0 b-0 name) (k skey))+  (defstrand resp 1 (ta ta) (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ta ta) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (a a-0) (b b) (ks ks))+  (defstrand keyserver 2 (a a) (b b-0) (ks ks))+  (precedes ((1 2) (0 0)) ((2 1) (1 1)) ((3 1) (1 1)))+  (non-orig (privk a) (privk b) (privk ks))+  (uniq-orig k)+  (operation encryption-test (added-strand keyserver 2)+    (enc a (pubk a) (privk ks)) (1 1))+  (traces+    ((recv+       (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+         (enc a (pubk a) (privk ks)) (pubk b))))+    ((send (cat a b))+      (recv+        (cat (enc b (pubk b) (privk ks)) (enc a (pubk a) (privk ks))))+      (send+        (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+          (enc a (pubk a) (privk ks)) (pubk b))))+    ((recv (cat a-0 b))+      (send+        (cat (enc b (pubk b) (privk ks))+          (enc a-0 (pubk a-0) (privk ks)))))+    ((recv (cat a b-0))+      (send+        (cat (enc b-0 (pubk b-0) (privk ks))+          (enc a (pubk a) (privk ks))))))+  (label 6)+  (parent 3)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton denning-sacco+  (vars (ta text) (a b ks b-0 a-0 name) (k skey))+  (defstrand resp 1 (ta ta) (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ta ta) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (a b) (b b-0) (ks ks))+  (defstrand keyserver 2 (a a-0) (b a) (ks ks))+  (precedes ((1 2) (0 0)) ((2 1) (1 1)) ((3 1) (1 1)))+  (non-orig (privk a) (privk b) (privk ks))+  (uniq-orig k)+  (operation encryption-test (added-strand keyserver 2)+    (enc a (pubk a) (privk ks)) (1 1))+  (traces+    ((recv+       (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+         (enc a (pubk a) (privk ks)) (pubk b))))+    ((send (cat a b))+      (recv+        (cat (enc b (pubk b) (privk ks)) (enc a (pubk a) (privk ks))))+      (send+        (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+          (enc a (pubk a) (privk ks)) (pubk b))))+    ((recv (cat b b-0))+      (send+        (cat (enc b-0 (pubk b-0) (privk ks))+          (enc b (pubk b) (privk ks)))))+    ((recv (cat a-0 a))+      (send+        (cat (enc a (pubk a) (privk ks))+          (enc a-0 (pubk a-0) (privk ks))))))+  (label 7)+  (parent 4)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton denning-sacco+  (vars (ta text) (a b ks b-0 b-1 name) (k skey))+  (defstrand resp 1 (ta ta) (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ta ta) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (a b) (b b-0) (ks ks))+  (defstrand keyserver 2 (a a) (b b-1) (ks ks))+  (precedes ((1 2) (0 0)) ((2 1) (1 1)) ((3 1) (1 1)))+  (non-orig (privk a) (privk b) (privk ks))+  (uniq-orig k)+  (operation encryption-test (added-strand keyserver 2)+    (enc a (pubk a) (privk ks)) (1 1))+  (traces+    ((recv+       (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+         (enc a (pubk a) (privk ks)) (pubk b))))+    ((send (cat a b))+      (recv+        (cat (enc b (pubk b) (privk ks)) (enc a (pubk a) (privk ks))))+      (send+        (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+          (enc a (pubk a) (privk ks)) (pubk b))))+    ((recv (cat b b-0))+      (send+        (cat (enc b-0 (pubk b-0) (privk ks))+          (enc b (pubk b) (privk ks)))))+    ((recv (cat a b-1))+      (send+        (cat (enc b-1 (pubk b-1) (privk ks))+          (enc a (pubk a) (privk ks))))))+  (label 8)+  (parent 4)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton denning-sacco+  (vars (ta text) (b ks a name) (k skey))+  (defstrand resp 1 (ta ta) (a b) (b b) (ks ks) (k k))+  (defstrand init 3 (ta ta) (a b) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (a a) (b b) (ks ks))+  (precedes ((1 2) (0 0)) ((2 1) (1 1)))+  (non-orig (privk b) (privk ks))+  (uniq-orig k)+  (operation collapsed 3 2)+  (traces+    ((recv+       (enc (enc b b k ta (privk b)) (enc b (pubk b) (privk ks))+         (enc b (pubk b) (privk ks)) (pubk b))))+    ((send (cat b b))+      (recv+        (cat (enc b (pubk b) (privk ks)) (enc b (pubk b) (privk ks))))+      (send+        (enc (enc b b k ta (privk b)) (enc b (pubk b) (privk ks))+          (enc b (pubk b) (privk ks)) (pubk b))))+    ((recv (cat a b))+      (send+        (cat (enc b (pubk b) (privk ks)) (enc a (pubk a) (privk ks))))))+  (label 9)+  (parent 5)+  (unrealized)+  (shape))++(defskeleton denning-sacco+  (vars (ta text) (b ks a name) (k skey))+  (defstrand resp 1 (ta ta) (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ta ta) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (a a) (b b) (ks ks))+  (precedes ((1 2) (0 0)) ((2 1) (1 1)))+  (non-orig (privk b) (privk ks) (privk a))+  (uniq-orig k)+  (operation collapsed 3 2)+  (traces+    ((recv+       (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+         (enc a (pubk a) (privk ks)) (pubk b))))+    ((send (cat a b))+      (recv+        (cat (enc b (pubk b) (privk ks)) (enc a (pubk a) (privk ks))))+      (send+        (enc (enc a b k ta (privk a)) (enc b (pubk b) (privk ks))+          (enc a (pubk a) (privk ks)) (pubk b))))+    ((recv (cat a b))+      (send+        (cat (enc b (pubk b) (privk ks)) (enc a (pubk a) (privk ks))))))+  (label 10)+  (parent 6)+  (unrealized)+  (shape))++(defskeleton denning-sacco+  (vars (ta text) (b ks b-0 name) (k skey))+  (defstrand resp 1 (ta ta) (a b-0) (b b) (ks ks) (k k))+  (defstrand init 3 (ta ta) (a b-0) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (a b) (b b-0) (ks ks))+  (precedes ((1 2) (0 0)) ((2 1) (1 1)))+  (non-orig (privk b) (privk ks) (privk b-0))+  (uniq-orig k)+  (operation collapsed 3 2)+  (traces+    ((recv+       (enc (enc b-0 b k ta (privk b-0)) (enc b (pubk b) (privk ks))+         (enc b-0 (pubk b-0) (privk ks)) (pubk b))))+    ((send (cat b-0 b))+      (recv+        (cat (enc b (pubk b) (privk ks))+          (enc b-0 (pubk b-0) (privk ks))))+      (send+        (enc (enc b-0 b k ta (privk b-0)) (enc b (pubk b) (privk ks))+          (enc b-0 (pubk b-0) (privk ks)) (pubk b))))+    ((recv (cat b b-0))+      (send+        (cat (enc b-0 (pubk b-0) (privk ks))+          (enc b (pubk b) (privk ks))))))+  (label 11)+  (parent 7)+  (unrealized)+  (shape))++(defskeleton denning-sacco+  (vars (ta text) (b ks b-0 name) (k skey))+  (defstrand resp 1 (ta ta) (a b) (b b) (ks ks) (k k))+  (defstrand init 3 (ta ta) (a b) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (a b) (b b-0) (ks ks))+  (precedes ((1 2) (0 0)) ((2 1) (1 1)))+  (non-orig (privk b) (privk ks))+  (uniq-orig k)+  (operation collapsed 3 2)+  (traces+    ((recv+       (enc (enc b b k ta (privk b)) (enc b (pubk b) (privk ks))+         (enc b (pubk b) (privk ks)) (pubk b))))+    ((send (cat b b))+      (recv+        (cat (enc b (pubk b) (privk ks)) (enc b (pubk b) (privk ks))))+      (send+        (enc (enc b b k ta (privk b)) (enc b (pubk b) (privk ks))+          (enc b (pubk b) (privk ks)) (pubk b))))+    ((recv (cat b b-0))+      (send+        (cat (enc b-0 (pubk b-0) (privk ks))+          (enc b (pubk b) (privk ks))))))+  (label 12)+  (parent 8)+  (unrealized)+  (shape))++(comment "Nothing left to do")
+ tst/dh.sch view
@@ -0,0 +1,26 @@+;; Diffie-Hellman Key Exchange++;; The Diffie-Hellman problem is given (exp (gen) m), and (exp (gen) n),+;; compute the value of (exp (gen) (mul m n)).++(defprotocol dhke diffie-hellman+  (defrole init (vars (a b name) (g base) (m expn))+    (trace+     (send (cat a (enc "i" (exp (gen) m) (privk a))))+     (recv (cat b (enc g (privk b)) (enc "r" a b (exp g m))))+     (send (enc "i" a b (exp g m))))+    (uniq-orig (exp (gen) m)))+  (defrole resp (vars (a b name) (h base) (n expn))+    (trace+     (recv (cat a (enc "i" h (privk a))))+     (send (cat b (enc (exp (gen) n) (privk b)) (enc "r" a b (exp h n))))+     (recv (enc "i" a b (exp h n))))+    (uniq-orig (exp (gen) n))))++(defskeleton dhke (vars (a b name) (h base) (n expn))+  (defstrand resp 3 (a a) (b b) (h h) (n n))+  (non-orig (privk a) (privk b) (exp h n)))++(defskeleton dhke (vars (a b name))+  (defstrand resp 3 (a a) (b b))+  (non-orig (privk a) (privk b)))
+ tst/dh.tst view
@@ -0,0 +1,384 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol dhke diffie-hellman+  (defrole init+    (vars (a b name) (g base) (m expn))+    (trace (send (cat a (enc "i" (exp (gen) m) (privk a))))+      (recv (cat b (enc g (privk b)) (enc "r" a b (exp g m))))+      (send (enc "i" a b (exp g m))))+    (uniq-orig (exp (gen) m)))+  (defrole resp+    (vars (a b name) (h base) (n expn))+    (trace (recv (cat a (enc "i" h (privk a))))+      (send+        (cat b (enc (exp (gen) n) (privk b)) (enc "r" a b (exp h n))))+      (recv (enc "i" a b (exp h n))))+    (uniq-orig (exp (gen) n))))++(defskeleton dhke+  (vars (a b name) (h base) (n expn))+  (defstrand resp 3 (a a) (b b) (h h) (n n))+  (non-orig (exp h n) (privk a) (privk b))+  (uniq-orig (exp (gen) n))+  (traces+    ((recv (cat a (enc "i" h (privk a))))+      (send+        (cat b (enc (exp (gen) n) (privk b)) (enc "r" a b (exp h n))))+      (recv (enc "i" a b (exp h n)))))+  (label 0)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dhke+  (vars (a b name) (n m expn))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) m)) (n n))+  (defstrand init 1 (a a) (m m))+  (precedes ((1 0) (0 0)))+  (non-orig (exp (gen) (mul n m)) (privk a) (privk b))+  (uniq-orig (exp (gen) n) (exp (gen) m))+  (operation encryption-test (added-strand init 1)+    (enc "i" (exp (gen) m) (privk a)) (0 0))+  (traces+    ((recv (cat a (enc "i" (exp (gen) m) (privk a))))+      (send+        (cat b (enc (exp (gen) n) (privk b))+          (enc "r" a b (exp (gen) (mul n m)))))+      (recv (enc "i" a b (exp (gen) (mul n m)))))+    ((send (cat a (enc "i" (exp (gen) m) (privk a))))))+  (label 1)+  (parent 0)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dhke+  (vars (a b name) (n m m-0 expn))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) m)) (n n))+  (defstrand init 1 (a a) (m m))+  (defstrand init 3 (a a) (b b) (g (exp (gen) (mul n m (rec m-0))))+    (m m-0))+  (precedes ((1 0) (0 0)) ((2 2) (0 2)))+  (non-orig (exp (gen) (mul n m)) (privk a) (privk b))+  (uniq-orig (exp (gen) n) (exp (gen) m) (exp (gen) m-0))+  (operation encryption-test (added-strand init 3)+    (enc "i" a b (exp (gen) (mul n m))) (0 2))+  (traces+    ((recv (cat a (enc "i" (exp (gen) m) (privk a))))+      (send+        (cat b (enc (exp (gen) n) (privk b))+          (enc "r" a b (exp (gen) (mul n m)))))+      (recv (enc "i" a b (exp (gen) (mul n m)))))+    ((send (cat a (enc "i" (exp (gen) m) (privk a)))))+    ((send (cat a (enc "i" (exp (gen) m-0) (privk a))))+      (recv+        (cat b (enc (exp (gen) (mul n m (rec m-0))) (privk b))+          (enc "r" a b (exp (gen) (mul n m)))))+      (send (enc "i" a b (exp (gen) (mul n m))))))+  (label 2)+  (parent 1)+  (unrealized (2 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dhke+  (vars (a b a-0 name) (h base) (n m m-0 expn))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) m-0))+    (n (mul n m (rec m-0))))+  (defstrand init 1 (a a) (m m-0))+  (defstrand init 3 (a a) (b b) (g (exp (gen) n)) (m m))+  (defstrand resp 2 (a a-0) (b b) (h h) (n n))+  (precedes ((1 0) (0 0)) ((2 2) (0 2)) ((3 1) (2 1)))+  (non-orig (exp (gen) (mul n m)) (privk a) (privk b))+  (uniq-orig (exp (gen) n) (exp (gen) (mul n m (rec m-0))) (exp (gen) m)+    (exp (gen) m-0))+  (operation encryption-test (added-strand resp 2)+    (enc (exp (gen) n) (privk b)) (2 1))+  (traces+    ((recv (cat a (enc "i" (exp (gen) m-0) (privk a))))+      (send+        (cat b (enc (exp (gen) (mul n m (rec m-0))) (privk b))+          (enc "r" a b (exp (gen) (mul n m)))))+      (recv (enc "i" a b (exp (gen) (mul n m)))))+    ((send (cat a (enc "i" (exp (gen) m-0) (privk a)))))+    ((send (cat a (enc "i" (exp (gen) m) (privk a))))+      (recv+        (cat b (enc (exp (gen) n) (privk b))+          (enc "r" a b (exp (gen) (mul n m)))))+      (send (enc "i" a b (exp (gen) (mul n m)))))+    ((recv (cat a-0 (enc "i" h (privk a-0))))+      (send+        (cat b (enc (exp (gen) n) (privk b))+          (enc "r" a-0 b (exp h n))))))+  (label 3)+  (parent 2)+  (unrealized (2 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dhke+  (vars (a b a-0 name) (h base) (n m m-0 n-0 expn))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) m-0))+    (n (mul n m (rec m-0))))+  (defstrand init 1 (a a) (m m-0))+  (defstrand init 3 (a a) (b b) (g (exp (gen) n)) (m m))+  (defstrand resp 2 (a a-0) (b b) (h h) (n n))+  (defstrand resp 2 (a a) (b b) (h (exp (gen) (mul n m (rec n-0))))+    (n n-0))+  (precedes ((1 0) (0 0)) ((2 2) (0 2)) ((3 1) (2 1)) ((4 1) (2 1)))+  (non-orig (exp (gen) (mul n m)) (privk a) (privk b))+  (uniq-orig (exp (gen) n) (exp (gen) (mul n m (rec m-0))) (exp (gen) m)+    (exp (gen) m-0) (exp (gen) n-0))+  (operation encryption-test (added-strand resp 2)+    (enc "r" a b (exp (gen) (mul n m))) (2 1))+  (traces+    ((recv (cat a (enc "i" (exp (gen) m-0) (privk a))))+      (send+        (cat b (enc (exp (gen) (mul n m (rec m-0))) (privk b))+          (enc "r" a b (exp (gen) (mul n m)))))+      (recv (enc "i" a b (exp (gen) (mul n m)))))+    ((send (cat a (enc "i" (exp (gen) m-0) (privk a)))))+    ((send (cat a (enc "i" (exp (gen) m) (privk a))))+      (recv+        (cat b (enc (exp (gen) n) (privk b))+          (enc "r" a b (exp (gen) (mul n m)))))+      (send (enc "i" a b (exp (gen) (mul n m)))))+    ((recv (cat a-0 (enc "i" h (privk a-0))))+      (send+        (cat b (enc (exp (gen) n) (privk b))+          (enc "r" a-0 b (exp h n)))))+    ((recv (cat a (enc "i" (exp (gen) (mul n m (rec n-0))) (privk a))))+      (send+        (cat b (enc (exp (gen) n-0) (privk b))+          (enc "r" a b (exp (gen) (mul n m)))))))+  (label 4)+  (parent 3)+  (unrealized (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dhke+  (vars (a b a-0 name) (h base) (m n m-0 n-0 expn))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) m))+    (n (mul (rec m) n m-0)))+  (defstrand init 1 (a a) (m m))+  (defstrand init 3 (a a) (b b) (g (exp (gen) (mul n m-0 (rec n-0))))+    (m n-0))+  (defstrand resp 2 (a a-0) (b b) (h h) (n (mul n m-0 (rec n-0))))+  (defstrand resp 2 (a a) (b b) (h (exp (gen) n)) (n m-0))+  (defstrand init 1 (a a) (m n))+  (precedes ((1 0) (0 0)) ((2 2) (0 2)) ((3 1) (2 1)) ((4 1) (2 1))+    ((5 0) (4 0)))+  (non-orig (exp (gen) (mul n m-0)) (privk a) (privk b))+  (uniq-orig (exp (gen) (mul (rec m) n m-0)) (exp (gen) m) (exp (gen) n)+    (exp (gen) (mul n m-0 (rec n-0))) (exp (gen) m-0) (exp (gen) n-0))+  (operation encryption-test (added-strand init 1)+    (enc "i" (exp (gen) n) (privk a)) (4 0))+  (traces+    ((recv (cat a (enc "i" (exp (gen) m) (privk a))))+      (send+        (cat b (enc (exp (gen) (mul (rec m) n m-0)) (privk b))+          (enc "r" a b (exp (gen) (mul n m-0)))))+      (recv (enc "i" a b (exp (gen) (mul n m-0)))))+    ((send (cat a (enc "i" (exp (gen) m) (privk a)))))+    ((send (cat a (enc "i" (exp (gen) n-0) (privk a))))+      (recv+        (cat b (enc (exp (gen) (mul n m-0 (rec n-0))) (privk b))+          (enc "r" a b (exp (gen) (mul n m-0)))))+      (send (enc "i" a b (exp (gen) (mul n m-0)))))+    ((recv (cat a-0 (enc "i" h (privk a-0))))+      (send+        (cat b (enc (exp (gen) (mul n m-0 (rec n-0))) (privk b))+          (enc "r" a-0 b (exp h (mul n m-0 (rec n-0)))))))+    ((recv (cat a (enc "i" (exp (gen) n) (privk a))))+      (send+        (cat b (enc (exp (gen) m-0) (privk b))+          (enc "r" a b (exp (gen) (mul n m-0))))))+    ((send (cat a (enc "i" (exp (gen) n) (privk a))))))+  (label 5)+  (parent 4)+  (seen 6 7 8)+  (unrealized)+  (shape)+  (comment "6 in cohort - 3 not yet seen"))++(defskeleton dhke+  (vars (a b name) (n m m-0 expn))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) m-0))+    (n (mul n m (rec m-0))))+  (defstrand init 3 (a a) (b b) (g (exp (gen) (mul n m (rec m-0))))+    (m m-0))+  (defstrand resp 2 (a a) (b b) (h (exp (gen) n)) (n m))+  (defstrand init 1 (a a) (m n))+  (precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)) ((2 1) (1 1))+    ((3 0) (2 0)))+  (non-orig (exp (gen) (mul n m)) (privk a) (privk b))+  (uniq-orig (exp (gen) n) (exp (gen) (mul n m (rec m-0))) (exp (gen) m)+    (exp (gen) m-0))+  (operation collapsed 1 2)+  (traces+    ((recv (cat a (enc "i" (exp (gen) m-0) (privk a))))+      (send+        (cat b (enc (exp (gen) (mul n m (rec m-0))) (privk b))+          (enc "r" a b (exp (gen) (mul n m)))))+      (recv (enc "i" a b (exp (gen) (mul n m)))))+    ((send (cat a (enc "i" (exp (gen) m-0) (privk a))))+      (recv+        (cat b (enc (exp (gen) (mul n m (rec m-0))) (privk b))+          (enc "r" a b (exp (gen) (mul n m)))))+      (send (enc "i" a b (exp (gen) (mul n m)))))+    ((recv (cat a (enc "i" (exp (gen) n) (privk a))))+      (send+        (cat b (enc (exp (gen) m) (privk b))+          (enc "r" a b (exp (gen) (mul n m))))))+    ((send (cat a (enc "i" (exp (gen) n) (privk a))))))+  (label 6)+  (parent 5)+  (seen 9)+  (unrealized)+  (shape)+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton dhke+  (vars (a b a-0 name) (h base) (m n m-0 expn))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) m-0)) (n m))+  (defstrand init 1 (a a) (m m-0))+  (defstrand init 3 (a a) (b b) (g (exp (gen) (mul m (rec n) m-0)))+    (m n))+  (defstrand resp 2 (a a-0) (b b) (h h) (n (mul m (rec n) m-0)))+  (precedes ((0 1) (2 1)) ((1 0) (0 0)) ((2 2) (0 2)) ((3 1) (2 1)))+  (non-orig (exp (gen) (mul m m-0)) (privk a) (privk b))+  (uniq-orig (exp (gen) m) (exp (gen) (mul m (rec n) m-0)) (exp (gen) n)+    (exp (gen) m-0))+  (operation collapsed 4 0)+  (traces+    ((recv (cat a (enc "i" (exp (gen) m-0) (privk a))))+      (send+        (cat b (enc (exp (gen) m) (privk b))+          (enc "r" a b (exp (gen) (mul m m-0)))))+      (recv (enc "i" a b (exp (gen) (mul m m-0)))))+    ((send (cat a (enc "i" (exp (gen) m-0) (privk a)))))+    ((send (cat a (enc "i" (exp (gen) n) (privk a))))+      (recv+        (cat b (enc (exp (gen) (mul m (rec n) m-0)) (privk b))+          (enc "r" a b (exp (gen) (mul m m-0)))))+      (send (enc "i" a b (exp (gen) (mul m m-0)))))+    ((recv (cat a-0 (enc "i" h (privk a-0))))+      (send+        (cat b (enc (exp (gen) (mul m (rec n) m-0)) (privk b))+          (enc "r" a-0 b (exp h (mul m (rec n) m-0)))))))+  (label 7)+  (parent 5)+  (seen 9)+  (unrealized)+  (shape)+  (comment "2 in cohort - 0 not yet seen"))++(defskeleton dhke+  (vars (b a name) (m m-0 n expn))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) m))+    (n (mul (rec m) m-0 n)))+  (defstrand init 1 (a a) (m m))+  (defstrand init 3 (a a) (b b) (g (exp (gen) m-0)) (m n))+  (defstrand resp 2 (a a) (b b) (h (exp (gen) n)) (n m-0))+  (precedes ((1 0) (0 0)) ((2 0) (3 0)) ((2 2) (0 2)) ((3 1) (2 1)))+  (non-orig (exp (gen) (mul m-0 n)) (privk b) (privk a))+  (uniq-orig (exp (gen) (mul (rec m) m-0 n)) (exp (gen) m)+    (exp (gen) m-0) (exp (gen) n))+  (operation collapsed 4 3)+  (traces+    ((recv (cat a (enc "i" (exp (gen) m) (privk a))))+      (send+        (cat b (enc (exp (gen) (mul (rec m) m-0 n)) (privk b))+          (enc "r" a b (exp (gen) (mul m-0 n)))))+      (recv (enc "i" a b (exp (gen) (mul m-0 n)))))+    ((send (cat a (enc "i" (exp (gen) m) (privk a)))))+    ((send (cat a (enc "i" (exp (gen) n) (privk a))))+      (recv+        (cat b (enc (exp (gen) m-0) (privk b))+          (enc "r" a b (exp (gen) (mul m-0 n)))))+      (send (enc "i" a b (exp (gen) (mul m-0 n)))))+    ((recv (cat a (enc "i" (exp (gen) n) (privk a))))+      (send+        (cat b (enc (exp (gen) m-0) (privk b))+          (enc "r" a b (exp (gen) (mul m-0 n)))))))+  (label 8)+  (parent 5)+  (seen 9)+  (unrealized)+  (shape)+  (comment "2 in cohort - 0 not yet seen"))++(defskeleton dhke+  (vars (a b name) (m n expn))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) n)) (n m))+  (defstrand init 3 (a a) (b b) (g (exp (gen) m)) (m n))+  (precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))+  (non-orig (exp (gen) (mul m n)) (privk a) (privk b))+  (uniq-orig (exp (gen) m) (exp (gen) n))+  (operation collapsed 2 0)+  (traces+    ((recv (cat a (enc "i" (exp (gen) n) (privk a))))+      (send+        (cat b (enc (exp (gen) m) (privk b))+          (enc "r" a b (exp (gen) (mul m n)))))+      (recv (enc "i" a b (exp (gen) (mul m n)))))+    ((send (cat a (enc "i" (exp (gen) n) (privk a))))+      (recv+        (cat b (enc (exp (gen) m) (privk b))+          (enc "r" a b (exp (gen) (mul m n)))))+      (send (enc "i" a b (exp (gen) (mul m n))))))+  (label 9)+  (parent 6)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol dhke diffie-hellman+  (defrole init+    (vars (a b name) (g base) (m expn))+    (trace (send (cat a (enc "i" (exp (gen) m) (privk a))))+      (recv (cat b (enc g (privk b)) (enc "r" a b (exp g m))))+      (send (enc "i" a b (exp g m))))+    (uniq-orig (exp (gen) m)))+  (defrole resp+    (vars (a b name) (h base) (n expn))+    (trace (recv (cat a (enc "i" h (privk a))))+      (send+        (cat b (enc (exp (gen) n) (privk b)) (enc "r" a b (exp h n))))+      (recv (enc "i" a b (exp h n))))+    (uniq-orig (exp (gen) n))))++(defskeleton dhke+  (vars (a b name) (h base) (n expn))+  (defstrand resp 3 (a a) (b b) (h h) (n n))+  (non-orig (privk a) (privk b))+  (uniq-orig (exp (gen) n))+  (traces+    ((recv (cat a (enc "i" h (privk a))))+      (send+        (cat b (enc (exp (gen) n) (privk b)) (enc "r" a b (exp h n))))+      (recv (enc "i" a b (exp h n)))))+  (label 10)+  (unrealized (0 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dhke+  (vars (a b name) (n m expn))+  (defstrand resp 3 (a a) (b b) (h (exp (gen) m)) (n n))+  (defstrand init 1 (a a) (m m))+  (precedes ((1 0) (0 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig (exp (gen) n) (exp (gen) m))+  (operation encryption-test (added-strand init 1)+    (enc "i" (exp (gen) m) (privk a)) (0 0))+  (traces+    ((recv (cat a (enc "i" (exp (gen) m) (privk a))))+      (send+        (cat b (enc (exp (gen) n) (privk b))+          (enc "r" a b (exp (gen) (mul n m)))))+      (recv (enc "i" a b (exp (gen) (mul n m)))))+    ((send (cat a (enc "i" (exp (gen) m) (privk a))))))+  (label 11)+  (parent 10)+  (unrealized)+  (shape))++(comment "Nothing left to do")
+ tst/ds-short.lisp view
@@ -0,0 +1,33 @@+;;; This is something like the Denning Sacco protocol with+;;; public keys as described by Clark and Jacob, but without+;;; timestamps.  Since the whole point of the protocol was to+;;; show how timestamps could be used, this is a funny thing to do!++(defprotocol denning-sacco-with-pk basic+  (defrole init ; A+    (vars (a name) (b name) (ks name) (k skey))+    (trace (send (cat a b))+	   (recv (cat (enc (cat b (pubk b)) (privk ks)) ; certB+		      (enc (cat a (pubk a)) (privk ks)))) ; cert A+	   (send (cat (enc (enc k (privk a)) (pubk b)) ; sign & encr k+		      (enc (cat b (pubk b)) (privk ks))+		      (enc (cat a  (pubk a)) (privk ks))))))+  (defrole resp ; B+    (vars (a name) (b name) (ks name) (k skey))+    (trace (recv (cat (enc (enc k (privk a)) (pubk b))+		      (enc (cat b (pubk b)) (privk ks))+		      (enc (cat a (pubk a)) (privk ks))))))+  (defrole keyserver+    (vars (a name) (b name) (ks name))+    (trace (recv (cat a b))+	   (send (cat (enc (cat b (pubk b)) (privk ks))+		      (enc (cat a (pubk a)) (privk ks)))))))++;;; For the preskeleton, I'd like to require every initiator and+;;; respondent to use the same ks.  How can that be done?++(defskeleton denning-sacco-with-pk+  (vars (a name) (b name) (ks name) (k skey))+  (defstrand resp 1 (a a) (b b) (ks ks) (k k))+  (non-orig (privk b) (privk a) (privk ks))+  (uniq-orig k))
+ tst/dy.lsp view
@@ -0,0 +1,35 @@+;; Example 1.3 in the 1983 Dolev-Yao paper.++; This protocol, from Example 1.3 in 1983 Dolev-Yao paper, is known to+; be vulnerable to the following attack.++; A->E : {{M}KB, A}KB+; E->B : {{{M}KB, A}KB, E}KB+; B->E : {{{M}KB, A}KE, B}KE+; E->B : {{M}KB, E}KB+; B->E : {{M}KE, B}KE++; So E gets M.++(defprotocol dy basic+  (defrole init (vars (a b name) (m text))+    (trace+     (send (enc (enc m (pubk b)) a (pubk b)))+     (recv (enc (enc m (pubk a)) b (pubk a)))))+  (defrole resp (vars (a b name) (m mesg))+    (trace+     (recv (enc (enc m (pubk b)) a (pubk b)))+     (send (enc (enc m (pubk a)) b (pubk a))))))++(defskeleton dy+  (vars (a b name) (m text))+  (defstrand init 2 (a a) (b b) (m m))+  (uniq-orig m)+  (non-orig (privk a) (privk b)))++(defskeleton dy+  (vars (a b name) (m text))+  (defstrand init 1 (a a) (b b) (m m))+  (deflistener m)+  (uniq-orig m)+  (non-orig (privk a) (privk b)))
+ tst/dy.tst view
@@ -0,0 +1,1733 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol dy basic+  (defrole init+    (vars (a b name) (m text))+    (trace (send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a)))))+  (defrole resp+    (vars (a b name) (m mesg))+    (trace (recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))))++(defskeleton dy+  (vars (m text) (a b name))+  (defstrand init 2 (m m) (a a) (b b))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a)))))+  (label 0)+  (unrealized (0 1))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton dy+  (vars (m text) (b name))+  (defstrand init 2 (m m) (a b) (b b))+  (non-orig (privk b))+  (uniq-orig m)+  (operation nonce-test (contracted (a b)) m (0 1)+    (enc (enc m (pubk b)) b (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) b (pubk b)))+      (recv (enc (enc m (pubk b)) b (pubk b)))))+  (label 1)+  (parent 0)+  (unrealized)+  (shape))++(defskeleton dy+  (vars (m text) (a b a-0 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-0) (b b))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (0 1)+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-0)) b (pubk a-0)))))+  (label 2)+  (parent 0)+  (unrealized (0 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton dy+  (vars (m text) (a b name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (0 1)+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 3)+  (parent 0)+  (unrealized)+  (shape))++(defskeleton dy+  (vars (m text) (b a name))+  (defstrand init 2 (m m) (a b) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) b)) (a a) (b b))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk b))+  (uniq-orig m)+  (operation nonce-test (contracted (a-0 b)) m (0 1) (enc m (pubk b))+    (enc (enc m (pubk b)) b (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) b (pubk b)))+      (recv (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc (enc m (pubk b)) b (pubk b)) a (pubk b)))+      (send (enc (enc (enc m (pubk b)) b (pubk a)) b (pubk a)))))+  (label 4)+  (parent 2)+  (seen 1)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-0) (b b))+  (defstrand resp 2 (m m) (a a-1) (b b))+  (precedes ((0 0) (1 0)) ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (0 1)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (0 1) (enc m (pubk b))+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a-1 (pubk b)))+      (send (enc (enc m (pubk a-1)) b (pubk a-1)))))+  (label 5)+  (parent 2)+  (unrealized (2 0))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-0) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (1 0)) ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (0 1)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (contracted (a-1 a)) m (2 0)+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 6)+  (parent 5)+  (seen 3)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-1) (b b))+  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (2 0)+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-1 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-1)) b (pubk a-1)))))+  (label 7)+  (parent 5)+  (unrealized)+  (shape))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-0) (b b))+  (defstrand resp 2 (m m) (a a-1) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (0 1))+    ((3 1) (2 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (2 0)+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a-1 (pubk b)))+      (send (enc (enc m (pubk a-1)) b (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 8)+  (parent 5)+  (unrealized (2 0))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-0) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (0 1))+    ((3 1) (2 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (contracted (a-1 a)) m (2 0)+    (enc (enc m (pubk a)) b (pubk a)) (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 9)+  (parent 8)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-1) (b b))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (2 0)+    (enc (enc m (pubk a)) b (pubk a)) (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-1 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-1)) b (pubk a-1)))))+  (label 10)+  (parent 8)+  (seen 6)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-0) (b b))+  (defstrand resp 2 (m m) (a a-1) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-2) (b a))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (2 0)+    (enc (enc m (pubk a)) b (pubk a)) (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a-1 (pubk b)))+      (send (enc (enc m (pubk a-1)) b (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-2 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-2)) a (pubk a-2)))))+  (label 11)+  (parent 8)+  (unrealized (2 0) (4 0))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton dy+  (vars (m text) (a b name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation generalization deleted (1 0))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 12)+  (parent 9)+  (seen 3)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton dy+  (vars (m text) (b a a-0 name))+  (defstrand init 2 (m m) (a b) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a b) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) b)) (a a-0) (b b))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)))+  (non-orig (privk b))+  (uniq-orig m)+  (operation nonce-test (contracted (a-1 b) (a-2 a-0)) m (4 0)+    (enc (enc m (pubk b)) b (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) b (pubk b)))+      (recv (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) b (pubk b)))+      (send (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc (enc m (pubk b)) b (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) b (pubk a-0)) b (pubk a-0)))))+  (label 13)+  (parent 11)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-2) (b b))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (4 0)+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-2 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-2)) b (pubk a-2)))))+  (label 14)+  (parent 11)+  (unrealized (3 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-0) (b b))+  (defstrand resp 2 (m m) (a a-1) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-2) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (0 1))+    ((3 1) (2 0)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (4 0)+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a-1 (pubk b)))+      (send (enc (enc m (pubk a-1)) b (pubk a-1))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-2 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-2)) a (pubk a-2))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 15)+  (parent 11)+  (unrealized (2 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton dy+  (vars (m text) (b a name))+  (defstrand init 2 (m m) (a b) (b b))+  (defstrand resp 2 (m m) (a b) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) b)) (a a) (b b))+  (precedes ((0 0) (1 0)) ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (0 1)))+  (non-orig (privk b))+  (uniq-orig m)+  (operation generalization deleted (1 0))+  (traces+    ((send (enc (enc m (pubk b)) b (pubk b)))+      (recv (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc m (pubk b)) b (pubk b)))+      (send (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc (enc m (pubk b)) b (pubk b)) a (pubk b)))+      (send (enc (enc (enc m (pubk b)) b (pubk a)) b (pubk a)))))+  (label 16)+  (parent 13)+  (seen 4)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton dy+  (vars (m text) (b a a-0 a-1 name))+  (defstrand init 2 (m m) (a b) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a b) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) b)) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) b)) (a a-1) (b b))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)) ((4 1) (3 0)))+  (non-orig (privk b))+  (uniq-orig m)+  (operation nonce-test (contracted (a-2 b)) m (3 0) (enc m (pubk b))+    (enc (enc m (pubk b)) b (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) b (pubk b)))+      (recv (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) b (pubk b)))+      (send (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc (enc m (pubk b)) b (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) b (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk b)) b (pubk b)) a-1 (pubk b)))+      (send (enc (enc (enc m (pubk b)) b (pubk a-1)) b (pubk a-1)))))+  (label 17)+  (parent 14)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 a-3 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-2) (b b))+  (defstrand resp 2 (m m) (a a-3) (b b))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (3 0) (enc m (pubk b))+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-2 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-2)) b (pubk a-2))))+    ((recv (enc (enc m (pubk b)) a-3 (pubk b)))+      (send (enc (enc m (pubk a-3)) b (pubk a-3)))))+  (label 18)+  (parent 14)+  (unrealized (5 0))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-0) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (0 1))+    ((3 1) (2 0)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (contracted (a-2 a)) m (2 0) (enc m (pubk a))+    (enc (enc m (pubk a)) b (pubk a)) (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 19)+  (parent 15)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dy+  (vars (m text) (a a-0 a-1 name))+  (defstrand init 2 (m m) (a a) (b a))+  (defstrand resp 2 (m m) (a a-0) (b a))+  (defstrand resp 2 (m (cat (enc m (pubk a)) a)) (a a-1) (b a))+  (defstrand resp 2 (m m) (a a) (b a))+  (precedes ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0)))+  (non-orig (privk a))+  (uniq-orig m)+  (operation nonce-test (contracted (b a) (a-2 a-1)) m (2 0)+    (enc m (pubk a)) (enc (enc m (pubk a)) a (pubk a)))+  (traces+    ((send (enc (enc m (pubk a)) a (pubk a)))+      (recv (enc (enc m (pubk a)) a (pubk a))))+    ((recv (enc (enc m (pubk a)) a-0 (pubk a)))+      (send (enc (enc m (pubk a-0)) a (pubk a-0))))+    ((recv (enc (enc (enc m (pubk a)) a (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) a (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc m (pubk a)) a (pubk a)))+      (send (enc (enc m (pubk a)) a (pubk a)))))+  (label 20)+  (parent 15)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-2) (b b))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (2 0) (enc m (pubk a))+    (enc (enc m (pubk a)) b (pubk a)) (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-2 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-2)) b (pubk a-2)))))+  (label 21)+  (parent 15)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 a-3 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-0) (b b))+  (defstrand resp 2 (m m) (a a-1) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-2) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-3) (b a))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (2 0) (enc m (pubk a))+    (enc (enc m (pubk a)) b (pubk a)) (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a-1 (pubk b)))+      (send (enc (enc m (pubk a-1)) b (pubk a-1))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-2 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-2)) a (pubk a-2))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk a)) a-3 (pubk a)))+      (send (enc (enc m (pubk a-3)) a (pubk a-3)))))+  (label 22)+  (parent 15)+  (seen 20)+  (unrealized (5 0))+  (comment "3 in cohort - 2 not yet seen"))++(defskeleton dy+  (vars (m text) (b a a-0 name))+  (defstrand init 2 (m m) (a b) (b b))+  (defstrand resp 2 (m m) (a b) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) b)) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) b)) (a a-0) (b b))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (0 1))+    ((3 1) (2 0)))+  (non-orig (privk b))+  (uniq-orig m)+  (operation generalization deleted (1 0))+  (traces+    ((send (enc (enc m (pubk b)) b (pubk b)))+      (recv (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc m (pubk b)) b (pubk b)))+      (send (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc (enc m (pubk b)) b (pubk b)) a (pubk b)))+      (send (enc (enc (enc m (pubk b)) b (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) b (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) b (pubk a-0)) b (pubk a-0)))))+  (label 23)+  (parent 17)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-2) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (contracted (a-3 a)) m (5 0)+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-2 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-2)) b (pubk a-2))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 24)+  (parent 18)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 a-3 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m m) (a a-2) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-3) (b b))+  (precedes ((0 0) (2 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (5 0)+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a-2 (pubk b)))+      (send (enc (enc m (pubk a-2)) b (pubk a-2))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-3 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-3)) b (pubk a-3)))))+  (label 25)+  (parent 18)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 a-3 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-2) (b b))+  (defstrand resp 2 (m m) (a a-3) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (5 0)+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-2 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-2)) b (pubk a-2))))+    ((recv (enc (enc m (pubk b)) a-3 (pubk b)))+      (send (enc (enc m (pubk a-3)) b (pubk a-3))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 26)+  (parent 18)+  (unrealized (4 0))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-0) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation generalization deleted (1 0))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-0 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-0)) a (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 27)+  (parent 19)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dy+  (vars (m text) (a a-0 name))+  (defstrand init 2 (m m) (a a) (b a))+  (defstrand resp 2 (m (cat (enc m (pubk a)) a)) (a a-0) (b a))+  (defstrand resp 2 (m m) (a a) (b a))+  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)))+  (non-orig (privk a))+  (uniq-orig m)+  (operation generalization deleted (1 0))+  (traces+    ((send (enc (enc m (pubk a)) a (pubk a)))+      (recv (enc (enc m (pubk a)) a (pubk a))))+    ((recv (enc (enc (enc m (pubk a)) a (pubk a)) a-0 (pubk a)))+      (send (enc (enc (enc m (pubk a)) a (pubk a-0)) a (pubk a-0))))+    ((recv (enc (enc m (pubk a)) a (pubk a)))+      (send (enc (enc m (pubk a)) a (pubk a)))))+  (label 28)+  (parent 20)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-0) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-1) (b b))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (0 1)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation generalization deleted (1 0))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-0 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-0)) a (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-1 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-1)) b (pubk a-1)))))+  (label 29)+  (parent 21)+  (seen 6)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 a-3 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-2) (b a))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-3) (b b))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (1 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (5 0)+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk a)) a-2 (pubk a)))+      (send (enc (enc m (pubk a-2)) a (pubk a-2))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-3 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-3)) b (pubk a-3)))))+  (label 30)+  (parent 22)+  (unrealized (4 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 a-3 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-0) (b b))+  (defstrand resp 2 (m m) (a a-1) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-2) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-3) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (5 0)+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a-1 (pubk b)))+      (send (enc (enc m (pubk a-1)) b (pubk a-1))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-2 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-2)) a (pubk a-2))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk a)) a-3 (pubk a)))+      (send (enc (enc m (pubk a-3)) a (pubk a-3))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 31)+  (parent 22)+  (unrealized (5 0))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton dy+  (vars (m text) (b a a-0 name))+  (defstrand init 2 (m m) (a b) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) b)) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) b)) (a a-0) (b b))+  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)))+  (non-orig (privk b))+  (uniq-orig m)+  (operation generalization deleted (1 0))+  (traces+    ((send (enc (enc m (pubk b)) b (pubk b)))+      (recv (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc (enc m (pubk b)) b (pubk b)) a (pubk b)))+      (send (enc (enc (enc m (pubk b)) b (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) b (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) b (pubk a-0)) b (pubk a-0)))))+  (label 32)+  (parent 23)+  (seen 4)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-0) (b a))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-1) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation generalization deleted (1 0))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-0 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-0)) a (pubk a-0))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-1 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-1)) b (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 33)+  (parent 24)+  (seen 6)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-0) (b a))+  (defstrand resp 2 (m m) (a a-1) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-2) (b b))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (0 1))+    ((3 1) (2 0)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation generalization deleted (1 0))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-0 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-0)) a (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a-1 (pubk b)))+      (send (enc (enc m (pubk a-1)) b (pubk a-1))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-2 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-2)) b (pubk a-2)))))+  (label 34)+  (parent 25)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-2) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (contracted (a-3 a)) m (4 0)+    (enc (enc m (pubk a)) b (pubk a)) (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-2 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-2)) b (pubk a-2))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 35)+  (parent 26)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 a-3 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m m) (a a-2) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-3) (b b))+  (precedes ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (4 0)+    (enc (enc m (pubk a)) b (pubk a)) (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a-2 (pubk b)))+      (send (enc (enc m (pubk a-2)) b (pubk a-2))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-3 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-3)) b (pubk a-3)))))+  (label 36)+  (parent 26)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 a-3 a-4 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-2) (b b))+  (defstrand resp 2 (m m) (a a-3) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-4) (b a))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0))+    ((6 1) (4 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (4 0)+    (enc (enc m (pubk a)) b (pubk a)) (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-2 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-2)) b (pubk a-2))))+    ((recv (enc (enc m (pubk b)) a-3 (pubk b)))+      (send (enc (enc m (pubk a-3)) b (pubk a-3))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-4 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-4)) a (pubk a-4)))))+  (label 37)+  (parent 26)+  (unrealized (4 0) (6 0))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-0) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation generalization deleted (1 0))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-0 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-0)) a (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 38)+  (parent 27)+  (seen 3)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton dy+  (vars (m text) (a name))+  (defstrand init 2 (m m) (a a) (b a))+  (defstrand resp 2 (m m) (a a) (b a))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk a))+  (uniq-orig m)+  (operation generalization deleted (1 0))+  (traces+    ((send (enc (enc m (pubk a)) a (pubk a)))+      (recv (enc (enc m (pubk a)) a (pubk a))))+    ((recv (enc (enc m (pubk a)) a (pubk a)))+      (send (enc (enc m (pubk a)) a (pubk a)))))+  (label 39)+  (parent 28)+  (seen 1)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton dy+  (vars (m text) (b a a-0 a-1 a-2 name))+  (defstrand init 2 (m m) (a b) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) b)) (a a-0) (b b))+  (defstrand resp 2 (m m) (a b) (b b))+  (defstrand resp 2 (m m) (a a-1) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) b)) (a a-2) (b b))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (1 0)) ((5 1) (4 0)))+  (non-orig (privk b))+  (uniq-orig m)+  (operation nonce-test (contracted (a-3 b)) m (4 0) (enc m (pubk b))+    (enc (enc m (pubk b)) b (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) b (pubk b)))+      (recv (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) b (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) b (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) b (pubk b)))+      (send (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc m (pubk b)) a-1 (pubk b)))+      (send (enc (enc m (pubk a-1)) b (pubk a-1))))+    ((recv (enc (enc (enc m (pubk b)) b (pubk b)) a-2 (pubk b)))+      (send (enc (enc (enc m (pubk b)) b (pubk a-2)) b (pubk a-2)))))+  (label 40)+  (parent 30)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 a-3 a-4 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-2) (b a))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-3) (b b))+  (defstrand resp 2 (m m) (a a-4) (b b))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (1 0)) ((5 1) (4 0))+    ((6 1) (4 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (4 0) (enc m (pubk b))+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk a)) a-2 (pubk a)))+      (send (enc (enc m (pubk a-2)) a (pubk a-2))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-3 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-3)) b (pubk a-3))))+    ((recv (enc (enc m (pubk b)) a-4 (pubk b)))+      (send (enc (enc m (pubk a-4)) b (pubk a-4)))))+  (label 41)+  (parent 30)+  (seen 43)+  (unrealized (6 0))+  (comment "3 in cohort - 2 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-0) (b b))+  (defstrand resp 2 (m m) (a a-1) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-2) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a b) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (contracted (a-3 b)) m (5 0)+    (enc (enc m (pubk a)) b (pubk a)) (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a-1 (pubk b)))+      (send (enc (enc m (pubk a-1)) b (pubk a-1))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-2 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-2)) a (pubk a-2))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk a)) b (pubk a)))+      (send (enc (enc m (pubk b)) a (pubk b))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 42)+  (parent 31)+  (unrealized (2 0))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 a-3 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-2) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-3) (b b))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (1 0)) ((5 1) (4 0))+    ((6 1) (4 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (5 0)+    (enc (enc m (pubk a)) b (pubk a)) (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk a)) a-2 (pubk a)))+      (send (enc (enc m (pubk a-2)) a (pubk a-2))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-3 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-3)) b (pubk a-3)))))+  (label 43)+  (parent 31)+  (seen 58)+  (unrealized (4 0))+  (comment "4 in cohort - 3 not yet seen"))++(comment "Strand bound exceeded--aborting run")++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 a-3 a-4 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-0) (b b))+  (defstrand resp 2 (m m) (a a-1) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-2) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-3) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-4) (b a))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((0 0) (7 0))+    ((1 1) (0 1)) ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0))+    ((5 1) (2 0)) ((6 1) (5 0)) ((7 1) (5 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (5 0)+    (enc (enc m (pubk a)) b (pubk a)) (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a-1 (pubk b)))+      (send (enc (enc m (pubk a-1)) b (pubk a-1))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-2 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-2)) a (pubk a-2))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk a)) a-3 (pubk a)))+      (send (enc (enc m (pubk a-3)) a (pubk a-3))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-4 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-4)) a (pubk a-4)))))+  (label 44)+  (parent 31)+  (unrealized (7 0))+  (comment "aborted"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-0) (b a))+  (defstrand resp 2 (m m) (a a-1) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-2) (b b))+  (precedes ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation generalization deleted (1 0))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-0 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-0)) a (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a-1 (pubk b)))+      (send (enc (enc m (pubk a-1)) b (pubk a-1))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-2 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-2)) b (pubk a-2)))))+  (label 45)+  (parent 34)+  (unrealized)+  (comment "aborted"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-0) (b a))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-1) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation generalization deleted (1 0))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-0 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-0)) a (pubk a-0))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-1 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-1)) b (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 46)+  (parent 35)+  (unrealized)+  (comment "aborted"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-0) (b a))+  (defstrand resp 2 (m m) (a a-1) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-2) (b b))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation generalization deleted (1 0))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-0 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-0)) a (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a-1 (pubk b)))+      (send (enc (enc m (pubk a-1)) b (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-2 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-2)) b (pubk a-2)))))+  (label 47)+  (parent 36)+  (unrealized)+  (comment "aborted"))++(defskeleton dy+  (vars (m text) (b a a-0 a-1 a-2 name))+  (defstrand init 2 (m m) (a b) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) b)) (a a-0) (b b))+  (defstrand resp 2 (m m) (a a-1) (b b))+  (defstrand resp 2 (m m) (a b) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) b)) (a a-2) (b b))+  (precedes ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk b))+  (uniq-orig m)+  (operation nonce-test (contracted (a-3 b) (a-4 a-2)) m (6 0)+    (enc (enc m (pubk b)) b (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) b (pubk b)))+      (recv (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) b (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) b (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a-1 (pubk b)))+      (send (enc (enc m (pubk a-1)) b (pubk a-1))))+    ((recv (enc (enc m (pubk b)) b (pubk b)))+      (send (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc (enc m (pubk b)) b (pubk b)) a-2 (pubk b)))+      (send (enc (enc (enc m (pubk b)) b (pubk a-2)) b (pubk a-2)))))+  (label 48)+  (parent 37)+  (unrealized)+  (comment "aborted"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 a-3 a-4 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m m) (a a-2) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-3) (b a))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-4) (b b))+  (precedes ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0)) ((6 1) (5 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (6 0)+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a-2 (pubk b)))+      (send (enc (enc m (pubk a-2)) b (pubk a-2))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-3 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-3)) a (pubk a-3))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-4 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-4)) b (pubk a-4)))))+  (label 49)+  (parent 37)+  (unrealized (5 0))+  (comment "aborted"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 a-3 a-4 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-2) (b b))+  (defstrand resp 2 (m m) (a a-3) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-4) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (3 0)) ((0 0) (6 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0)) ((6 1) (5 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (6 0)+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-2 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-2)) b (pubk a-2))))+    ((recv (enc (enc m (pubk b)) a-3 (pubk b)))+      (send (enc (enc m (pubk a-3)) b (pubk a-3))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-4 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-4)) a (pubk a-4))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 50)+  (parent 37)+  (unrealized (4 0))+  (comment "aborted"))++(defskeleton dy+  (vars (m text) (b a a-0 a-1 name))+  (defstrand init 2 (m m) (a b) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) b)) (a a) (b b))+  (defstrand resp 2 (m m) (a b) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) b)) (a a-1) (b b))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (0 1)) ((4 1) (3 0)))+  (non-orig (privk b))+  (uniq-orig m)+  (operation generalization deleted (1 0))+  (traces+    ((send (enc (enc m (pubk b)) b (pubk b)))+      (recv (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc (enc m (pubk b)) b (pubk b)) a (pubk b)))+      (send (enc (enc (enc m (pubk b)) b (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) b (pubk b)))+      (send (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk b)) b (pubk b)) a-1 (pubk b)))+      (send (enc (enc (enc m (pubk b)) b (pubk a-1)) b (pubk a-1)))))+  (label 51)+  (parent 40)+  (unrealized)+  (comment "aborted"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 a-3 a-4 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-2) (b a))+  (defstrand resp 2 (m m) (a a-3) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-4) (b b))+  (precedes ((0 0) (3 0)) ((0 0) (6 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (1 0)) ((5 1) (4 0)) ((6 1) (5 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (6 0)+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk a)) a-2 (pubk a)))+      (send (enc (enc m (pubk a-2)) a (pubk a-2))))+    ((recv (enc (enc m (pubk b)) a-3 (pubk b)))+      (send (enc (enc m (pubk a-3)) b (pubk a-3))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-4 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-4)) b (pubk a-4)))))+  (label 52)+  (parent 41)+  (unrealized)+  (comment "aborted"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 a-3 a-4 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-2) (b a))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-3) (b b))+  (defstrand resp 2 (m m) (a a-4) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (7 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (1 0)) ((5 1) (4 0))+    ((6 1) (4 0)) ((7 1) (6 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (6 0)+    (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk a)) a-2 (pubk a)))+      (send (enc (enc m (pubk a-2)) a (pubk a-2))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-3 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-3)) b (pubk a-3))))+    ((recv (enc (enc m (pubk b)) a-4 (pubk b)))+      (send (enc (enc m (pubk a-4)) b (pubk a-4))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 53)+  (parent 41)+  (unrealized (6 0))+  (comment "aborted"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-0) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a b) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (contracted (a-2 a)) m (2 0) (enc m (pubk a))+    (enc (enc m (pubk a)) b (pubk a)) (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk a)) b (pubk a)))+      (send (enc (enc m (pubk b)) a (pubk b))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a)))))+  (label 54)+  (parent 42)+  (unrealized)+  (comment "aborted"))++(defskeleton dy+  (vars (m text) (a a-0 a-1 name))+  (defstrand init 2 (m m) (a a) (b a))+  (defstrand resp 2 (m m) (a a-0) (b a))+  (defstrand resp 2 (m (cat (enc m (pubk a)) a)) (a a-1) (b a))+  (defstrand resp 2 (m m) (a a) (b a))+  (defstrand resp 2 (m m) (a a) (b a))+  (defstrand resp 2 (m m) (a a) (b a))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (1 0)) ((5 1) (4 0)))+  (non-orig (privk a))+  (uniq-orig m)+  (operation nonce-test (contracted (b a) (a-2 a-1)) m (2 0)+    (enc m (pubk a)) (enc (enc m (pubk a)) a (pubk a)))+  (traces+    ((send (enc (enc m (pubk a)) a (pubk a)))+      (recv (enc (enc m (pubk a)) a (pubk a))))+    ((recv (enc (enc m (pubk a)) a-0 (pubk a)))+      (send (enc (enc m (pubk a-0)) a (pubk a-0))))+    ((recv (enc (enc (enc m (pubk a)) a (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) a (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc m (pubk a)) a (pubk a)))+      (send (enc (enc m (pubk a)) a (pubk a))))+    ((recv (enc (enc m (pubk a)) a (pubk a)))+      (send (enc (enc m (pubk a)) a (pubk a))))+    ((recv (enc (enc m (pubk a)) a (pubk a)))+      (send (enc (enc m (pubk a)) a (pubk a)))))+  (label 55)+  (parent 42)+  (unrealized)+  (comment "aborted"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a b) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-2) (b b))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (1 0)) ((5 1) (4 0))+    ((6 1) (1 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (2 0) (enc m (pubk a))+    (enc (enc m (pubk a)) b (pubk a)) (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk a)) b (pubk a)))+      (send (enc (enc m (pubk b)) a (pubk b))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-2 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-2)) b (pubk a-2)))))+  (label 56)+  (parent 42)+  (unrealized)+  (comment "aborted"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a b) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-2) (b b))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (1 0)) ((5 1) (4 0))+    ((6 1) (4 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (contracted (a-3 b)) m (4 0) (enc m (pubk b))+    (enc (enc m (pubk a)) b (pubk a)) (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk a)) b (pubk a)))+      (send (enc (enc m (pubk b)) a (pubk b))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-2 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-2)) b (pubk a-2)))))+  (label 57)+  (parent 43)+  (unrealized)+  (comment "aborted"))++(defskeleton dy+  (vars (m text) (b a a-0 a-1 a-2 name))+  (defstrand init 2 (m m) (a b) (b b))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) b)) (a a-0) (b b))+  (defstrand resp 2 (m m) (a b) (b b))+  (defstrand resp 2 (m m) (a a-1) (b b))+  (defstrand resp 2 (m m) (a b) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) b)) (a a-2) (b b))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (1 0)) ((5 1) (4 0))+    ((6 1) (4 0)))+  (non-orig (privk b))+  (uniq-orig m)+  (operation nonce-test (contracted (a-3 b)) m (4 0) (enc m (pubk b))+    (enc (enc m (pubk b)) b (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) b (pubk b)))+      (recv (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) b (pubk b)) a-0 (pubk b)))+      (send (enc (enc (enc m (pubk b)) b (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc m (pubk b)) b (pubk b)))+      (send (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc m (pubk b)) a-1 (pubk b)))+      (send (enc (enc m (pubk a-1)) b (pubk a-1))))+    ((recv (enc (enc m (pubk b)) b (pubk b)))+      (send (enc (enc m (pubk b)) b (pubk b))))+    ((recv (enc (enc (enc m (pubk b)) b (pubk b)) a-2 (pubk b)))+      (send (enc (enc (enc m (pubk b)) b (pubk a-2)) b (pubk a-2)))))+  (label 58)+  (parent 43)+  (unrealized)+  (comment "aborted"))++(defskeleton dy+  (vars (m text) (a b a-0 a-1 a-2 a-3 a-4 name))+  (defstrand init 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-0) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-1) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m m) (a a-2) (b a))+  (defstrand resp 2 (m m) (a a) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk b)) a)) (a a-3) (b b))+  (defstrand resp 2 (m (cat (enc m (pubk a)) b)) (a a-4) (b a))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((0 0) (7 0))+    ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (1 0))+    ((5 1) (4 0)) ((6 1) (4 0)) ((7 1) (4 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig m)+  (operation nonce-test (added-strand resp 2) m (4 0) (enc m (pubk b))+    (enc (enc m (pubk a)) b (pubk a)) (enc (enc m (pubk b)) a (pubk b)))+  (traces+    ((send (enc (enc m (pubk b)) a (pubk b)))+      (recv (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk b)) a-0 (pubk b)))+      (send (enc (enc m (pubk a-0)) b (pubk a-0))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-1 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-1)) a (pubk a-1))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc m (pubk a)) a-2 (pubk a)))+      (send (enc (enc m (pubk a-2)) a (pubk a-2))))+    ((recv (enc (enc m (pubk b)) a (pubk b)))+      (send (enc (enc m (pubk a)) b (pubk a))))+    ((recv (enc (enc (enc m (pubk b)) a (pubk b)) a-3 (pubk b)))+      (send (enc (enc (enc m (pubk b)) a (pubk a-3)) b (pubk a-3))))+    ((recv (enc (enc (enc m (pubk a)) b (pubk a)) a-4 (pubk a)))+      (send (enc (enc (enc m (pubk a)) b (pubk a-4)) a (pubk a-4)))))+  (label 59)+  (parent 43)+  (unrealized (7 0))+  (comment "aborted"))
+ tst/encsig.scm view
@@ -0,0 +1,41 @@+(defprotocol mult-keys-enc-sig basic+   (defrole init+    (vars (a b name) (n1 n2 text))+    (trace+     (send (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+     (recv (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+     (send (enc (enc n2 (pubk "enc" b)) (privk "sig" a)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace+     (recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+     (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+     (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))))++;;; The initiator point-of-view+(defskeleton mult-keys-enc-sig+   (vars (a b name) (n1 text))+   (defstrand init 3 (a a) (b b) (n1 n1))+   (non-orig (privk "enc" a) (privk "sig" a) (privk "sig" b))+   (uniq-orig n1))++;;; The responder point-of-view trusting only a's signature key+(defskeleton mult-keys-enc-sig+  (vars (a b name) (n2 text))+  (defstrand resp 3 (a a) (b b) (n2 n2))+  (non-orig (privk "sig" a))+  (uniq-orig n2))++;;; The responder point-of-view trusting only a's encryption key+(defskeleton mult-keys-enc-sig+  (vars (a b name) (n2 text))+  (defstrand resp 3 (a a) (b b) (n2 n2))+  (non-orig (privk "enc" a))+  (uniq-orig n2))++;;; The responder point-of-view trusting both of a's keys+(defskeleton mult-keys-enc-sig+  (vars (a b name) (n2 text))+  (defstrand resp 3 (a a) (b b) (n2 n2))+  (non-orig (privk "sig" a) (privk "enc" a))+  (uniq-orig n2))
+ tst/encsig.tst view
@@ -0,0 +1,378 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol mult-keys-enc-sig basic+  (defrole init+    (vars (a b name) (n1 n2 text))+    (trace (send (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (recv (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (send (enc (enc n2 (pubk "enc" b)) (privk "sig" a)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace (recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))))++(defskeleton mult-keys-enc-sig+  (vars (n1 n2 text) (a b name))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (non-orig (privk "enc" a) (privk "sig" a) (privk "sig" b))+  (uniq-orig n1)+  (traces+    ((send (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (recv (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (send (enc (enc n2 (pubk "enc" b)) (privk "sig" a)))))+  (label 0)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton mult-keys-enc-sig+  (vars (n1 n2 text) (a b name))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (defstrand resp 2 (n2 n2) (n1 n1) (b b) (a a))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk "enc" a) (privk "sig" a) (privk "sig" b))+  (uniq-orig n1)+  (operation encryption-test (added-strand resp 2)+    (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)) (0 1))+  (traces+    ((send (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (recv (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (send (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))+    ((recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))))+  (label 1)+  (parent 0)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol mult-keys-enc-sig basic+  (defrole init+    (vars (a b name) (n1 n2 text))+    (trace (send (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (recv (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (send (enc (enc n2 (pubk "enc" b)) (privk "sig" a)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace (recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))))++(defskeleton mult-keys-enc-sig+  (vars (n2 n1 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (non-orig (privk "sig" a))+  (uniq-orig n2)+  (traces+    ((recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a)))))+  (label 2)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton mult-keys-enc-sig+  (vars (n2 n1 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 1 (n1 n1) (a a) (b b))+  (precedes ((1 0) (0 0)))+  (non-orig (privk "sig" a))+  (uniq-orig n2)+  (operation encryption-test (added-strand init 1)+    (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)) (0 0))+  (traces+    ((recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))+    ((send (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))))+  (label 3)+  (parent 2)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton mult-keys-enc-sig+  (vars (n2 n1 n1-0 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 1 (n1 n1) (a a) (b b))+  (defstrand init 3 (n1 n1-0) (n2 n2) (a a) (b b))+  (precedes ((0 1) (2 1)) ((1 0) (0 0)) ((2 2) (0 2)))+  (non-orig (privk "sig" a))+  (uniq-orig n2)+  (operation encryption-test (added-strand init 3)+    (enc (enc n2 (pubk "enc" b)) (privk "sig" a)) (0 2))+  (traces+    ((recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))+    ((send (enc (enc n1 a (pubk "enc" b)) (privk "sig" a))))+    ((send (enc (enc n1-0 a (pubk "enc" b)) (privk "sig" a)))+      (recv (enc (enc n1-0 n2 (pubk "enc" a)) (privk "sig" b)))+      (send (enc (enc n2 (pubk "enc" b)) (privk "sig" a)))))+  (label 4)+  (parent 3)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton mult-keys-enc-sig+  (vars (n2 n1 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))+  (non-orig (privk "sig" a))+  (uniq-orig n2)+  (operation collapsed 1 2)+  (traces+    ((recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))+    ((send (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (recv (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (send (enc (enc n2 (pubk "enc" b)) (privk "sig" a)))))+  (label 5)+  (parent 4)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol mult-keys-enc-sig basic+  (defrole init+    (vars (a b name) (n1 n2 text))+    (trace (send (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (recv (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (send (enc (enc n2 (pubk "enc" b)) (privk "sig" a)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace (recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))))++(defskeleton mult-keys-enc-sig+  (vars (n2 n1 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (non-orig (privk "enc" a))+  (uniq-orig n2)+  (traces+    ((recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a)))))+  (label 6)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton mult-keys-enc-sig+  (vars (n2 n1 text) (a b b-0 name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b-0))+  (precedes ((0 1) (1 1)) ((1 2) (0 2)))+  (non-orig (privk "enc" a))+  (uniq-orig n2)+  (operation nonce-test (added-strand init 3) n2 (0 2)+    (enc n1 n2 (pubk "enc" a)))+  (traces+    ((recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))+    ((send (enc (enc n1 a (pubk "enc" b-0)) (privk "sig" a)))+      (recv (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b-0)))+      (send (enc (enc n2 (pubk "enc" b-0)) (privk "sig" a)))))+  (label 7)+  (parent 6)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol mult-keys-enc-sig basic+  (defrole init+    (vars (a b name) (n1 n2 text))+    (trace (send (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (recv (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (send (enc (enc n2 (pubk "enc" b)) (privk "sig" a)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace (recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))))++(defskeleton mult-keys-enc-sig+  (vars (n2 n1 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (non-orig (privk "enc" a) (privk "sig" a))+  (uniq-orig n2)+  (traces+    ((recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a)))))+  (label 8)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton mult-keys-enc-sig+  (vars (n2 n1 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 1 (n1 n1) (a a) (b b))+  (precedes ((1 0) (0 0)))+  (non-orig (privk "enc" a) (privk "sig" a))+  (uniq-orig n2)+  (operation encryption-test (added-strand init 1)+    (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)) (0 0))+  (traces+    ((recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))+    ((send (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))))+  (label 9)+  (parent 8)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton mult-keys-enc-sig+  (vars (n2 n1 n1-0 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 1 (n1 n1) (a a) (b b))+  (defstrand init 3 (n1 n1-0) (n2 n2) (a a) (b b))+  (precedes ((0 1) (2 1)) ((1 0) (0 0)) ((2 2) (0 2)))+  (non-orig (privk "enc" a) (privk "sig" a))+  (uniq-orig n2)+  (operation encryption-test (added-strand init 3)+    (enc (enc n2 (pubk "enc" b)) (privk "sig" a)) (0 2))+  (traces+    ((recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))+    ((send (enc (enc n1 a (pubk "enc" b)) (privk "sig" a))))+    ((send (enc (enc n1-0 a (pubk "enc" b)) (privk "sig" a)))+      (recv (enc (enc n1-0 n2 (pubk "enc" a)) (privk "sig" b)))+      (send (enc (enc n2 (pubk "enc" b)) (privk "sig" a)))))+  (label 10)+  (parent 9)+  (unrealized (2 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton mult-keys-enc-sig+  (vars (n2 n1 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 1 (n1 n1) (a a) (b b))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (precedes ((0 1) (2 1)) ((1 0) (0 0)) ((2 2) (0 2)))+  (non-orig (privk "enc" a) (privk "sig" a))+  (uniq-orig n2)+  (operation nonce-test (contracted (n1-0 n1)) n2 (2 1)+    (enc n1 n2 (pubk "enc" a)))+  (traces+    ((recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))+    ((send (enc (enc n1 a (pubk "enc" b)) (privk "sig" a))))+    ((send (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (recv (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (send (enc (enc n2 (pubk "enc" b)) (privk "sig" a)))))+  (label 11)+  (parent 10)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton mult-keys-enc-sig+  (vars (n2 n1 n1-0 text) (a b b-0 name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 1 (n1 n1) (a a) (b b))+  (defstrand init 3 (n1 n1-0) (n2 n2) (a a) (b b))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b-0))+  (precedes ((0 1) (3 1)) ((1 0) (0 0)) ((2 2) (0 2)) ((3 2) (2 1)))+  (non-orig (privk "enc" a) (privk "sig" a))+  (uniq-orig n2)+  (operation nonce-test (added-strand init 3) n2 (2 1)+    (enc n1 n2 (pubk "enc" a)))+  (traces+    ((recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))+    ((send (enc (enc n1 a (pubk "enc" b)) (privk "sig" a))))+    ((send (enc (enc n1-0 a (pubk "enc" b)) (privk "sig" a)))+      (recv (enc (enc n1-0 n2 (pubk "enc" a)) (privk "sig" b)))+      (send (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))+    ((send (enc (enc n1 a (pubk "enc" b-0)) (privk "sig" a)))+      (recv (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b-0)))+      (send (enc (enc n2 (pubk "enc" b-0)) (privk "sig" a)))))+  (label 12)+  (parent 10)+  (unrealized)+  (shape)+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton mult-keys-enc-sig+  (vars (n2 n1 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))+  (non-orig (privk "enc" a) (privk "sig" a))+  (uniq-orig n2)+  (operation collapsed 1 2)+  (traces+    ((recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))+    ((send (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (recv (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (send (enc (enc n2 (pubk "enc" b)) (privk "sig" a)))))+  (label 13)+  (parent 11)+  (unrealized)+  (shape))++(defskeleton mult-keys-enc-sig+  (vars (n2 n1 text) (a b b-0 name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b-0))+  (precedes ((0 1) (2 1)) ((1 0) (0 0)) ((1 2) (0 2)) ((2 2) (1 1)))+  (non-orig (privk "enc" a) (privk "sig" a))+  (uniq-orig n2)+  (operation collapsed 1 2)+  (traces+    ((recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))+    ((send (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (recv (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (send (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))+    ((send (enc (enc n1 a (pubk "enc" b-0)) (privk "sig" a)))+      (recv (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b-0)))+      (send (enc (enc n2 (pubk "enc" b-0)) (privk "sig" a)))))+  (label 14)+  (parent 12)+  (seen 13)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton mult-keys-enc-sig+  (vars (n2 n1 n1-0 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 3 (n1 n1-0) (n2 n2) (a a) (b b))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (precedes ((0 1) (2 1)) ((1 2) (0 2)) ((2 0) (0 0)) ((2 2) (1 1)))+  (non-orig (privk "enc" a) (privk "sig" a))+  (uniq-orig n2)+  (operation collapsed 1 3)+  (traces+    ((recv (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (send (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (recv (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))+    ((send (enc (enc n1-0 a (pubk "enc" b)) (privk "sig" a)))+      (recv (enc (enc n1-0 n2 (pubk "enc" a)) (privk "sig" b)))+      (send (enc (enc n2 (pubk "enc" b)) (privk "sig" a))))+    ((send (enc (enc n1 a (pubk "enc" b)) (privk "sig" a)))+      (recv (enc (enc n1 n2 (pubk "enc" a)) (privk "sig" b)))+      (send (enc (enc n2 (pubk "enc" b)) (privk "sig" a)))))+  (label 15)+  (parent 12)+  (seen 13)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(comment "Nothing left to do")
+ tst/epmo.scm view
@@ -0,0 +1,80 @@+;;; Electronic Purchase with Money Order protocol annotated with trust+;;; management formulas.++(defprotocol epmo basic+  (defrole bank+    (vars (b c m name) (hash akey) (nc nm nb data) (price text))+    (trace+     (recv (enc c nc nm price (pubk b)))+     (send (cat (enc (enc c nc nb nm price hash) (privk b))+		(enc nc nb (pubk c))))+     (recv (enc (enc b nb nm hash) (privk m))))+    (non-orig (invk hash))+    (uniq-orig nb)+    (annotations b+      (1+        (implies+          (and (forall ((pm name)) (says c (transfer b price pm nm)))+            (forall ((pm name)) (says pm (transfer b price pm nm))))+          (forall ((pm name)) (transfer b price pm nm))))+      (2+        (and (says c (transfer b price m nm))+          (says m (transfer b price m nm))))))+  (defrole customer+    (vars (b c m name) (hash akey) (nb nc nm data) (goods price text))+    (trace+     (send (enc c nc goods price (pubk m)))+     (recv (enc nc nm m goods price (pubk c)))+     (send (enc c nc nm price (pubk b)))+     (recv (cat (enc (enc c nc nb nm price hash) (privk b))+		(enc nc nb (pubk c))))+     (send (cat (enc (enc c nc nb nm price hash) (privk b)) nb)))+    (non-orig (invk hash))+    (uniq-orig nc)+    (annotations c+      (2+        (says m+          (forall ((pb name))+            (implies (transfer pb price m nm) (ship m goods c)))))+      (4+        (says b+          (implies+            (and (forall ((pm name)) (says c (transfer b price pm nm)))+              (forall ((pm name)) (says m (transfer b price pm nm))))+            (transfer b price pm nm))))+      (5 (transfer b price m nm))))+  (defrole merchant+    (vars (b c m name) (hash akey) (nb nc nm data) (goods price text))+    (trace+     (recv (enc c nc goods price (pubk m)))+     (send (enc nc nm m goods price (pubk c)))+     (recv (cat (enc (enc c nc nb nm price hash) (privk b)) nb))+     (send (enc (enc b nb nm hash) (privk m))))+    (non-orig (invk hash))+    (uniq-orig nm)+    (annotations m+      (2+        (forall ((pb name))+          (implies (transfer pb price m nm) (ship m goods c))))+      (3+        (and+          (says b+            (implies+              (and+                (forall ((pm name)) (says c (transfer b price pm nm)))+                (forall ((pm name)) (says m (transfer b price pm nm))))+              (transfer b price pm nm)))+          (says c (transfer b price m nm))))+      (4 (and (transfer b price m nm) (ship m goods c))))))++(defskeleton epmo (vars (b c m name))+  (defstrand customer 5 (b b) (c c) (m m))+  (non-orig (privk b) (privk c) (privk m)))++(defskeleton epmo (vars (b c m name) (goods name))+  (defstrand bank 3 (b b) (c c) (m m))+  (non-orig (privk b) (privk c) (privk m)))++(defskeleton epmo (vars (b c m name))+  (defstrand merchant 4 (b b) (c c) (m m))+  (non-orig (privk b) (privk c) (privk m)))
+ tst/epmo.tst view
@@ -0,0 +1,620 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol epmo basic+  (defrole bank+    (vars (b c m name) (hash akey) (nc nm nb data) (price text))+    (trace (recv (enc c nc nm price (pubk b)))+      (send+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc b nb nm hash) (privk m))))+    (non-orig (invk hash))+    (uniq-orig nb)+    (annotations b+      (1+        (implies+          (and (forall ((pm name)) (says c (transfer b price pm nm)))+            (forall ((pm name)) (says pm (transfer b price pm nm))))+          (forall ((pm name)) (transfer b price pm nm))))+      (2+        (and (says c (transfer b price m nm))+          (says m (transfer b price m nm))))))+  (defrole customer+    (vars (b c m name) (hash akey) (nb nc nm data) (goods price text))+    (trace (send (enc c nc goods price (pubk m)))+      (recv (enc nc nm m goods price (pubk c)))+      (send (enc c nc nm price (pubk b)))+      (recv+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))+      (send (cat (enc (enc c nc nb nm price hash) (privk b)) nb)))+    (non-orig (invk hash))+    (uniq-orig nc)+    (annotations c+      (2+        (says m+          (forall ((pb name))+            (implies (transfer pb price m nm) (ship m goods c)))))+      (4+        (says b+          (implies+            (and (forall ((pm name)) (says c (transfer b price pm nm)))+              (forall ((pm name)) (says m (transfer b price pm nm))))+            (transfer b price pm nm)))) (5 (transfer b price m nm))))+  (defrole merchant+    (vars (b c m name) (hash akey) (nb nc nm data) (goods price text))+    (trace (recv (enc c nc goods price (pubk m)))+      (send (enc nc nm m goods price (pubk c)))+      (recv (cat (enc (enc c nc nb nm price hash) (privk b)) nb))+      (send (enc (enc b nb nm hash) (privk m))))+    (non-orig (invk hash))+    (uniq-orig nm)+    (annotations m+      (2+        (forall ((pb name))+          (implies (transfer pb price m nm) (ship m goods c))))+      (3+        (and+          (says b+            (implies+              (and+                (forall ((pm name)) (says c (transfer b price pm nm)))+                (forall ((pm name)) (says m (transfer b price pm nm))))+              (transfer b price pm nm)))+          (says c (transfer b price m nm))))+      (4 (and (transfer b price m nm) (ship m goods c))))))++(defskeleton epmo+  (vars (goods price text) (nb nc nm data) (b c m name) (hash akey))+  (defstrand customer 5 (goods goods) (price price) (nb nb) (nc nc)+    (nm nm) (b b) (c c) (m m) (hash hash))+  (non-orig (invk hash) (privk b) (privk c) (privk m))+  (uniq-orig nc)+  (traces+    ((send (enc c nc goods price (pubk m)))+      (recv (enc nc nm m goods price (pubk c)))+      (send (enc c nc nm price (pubk b)))+      (recv+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))+      (send (cat (enc (enc c nc nb nm price hash) (privk b)) nb))))+  (label 0)+  (unrealized (0 1) (0 3))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo+  (vars (goods price text) (nb nc nm nm-0 data) (b c m name)+    (hash akey))+  (defstrand customer 5 (goods goods) (price price) (nb nb) (nc nc)+    (nm nm) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (goods goods) (price price) (nc nc) (nm nm-0)+    (c c) (m m))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (invk hash) (privk b) (privk c) (privk m))+  (uniq-orig nc nm-0)+  (operation nonce-test (added-strand merchant 2) nc (0 1)+    (enc c nc goods price (pubk m)))+  (traces+    ((send (enc c nc goods price (pubk m)))+      (recv (enc nc nm m goods price (pubk c)))+      (send (enc c nc nm price (pubk b)))+      (recv+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))+      (send (cat (enc (enc c nc nb nm price hash) (privk b)) nb)))+    ((recv (enc c nc goods price (pubk m)))+      (send (enc nc nm-0 m goods price (pubk c)))))+  (label 1)+  (parent 0)+  (unrealized (0 1) (0 3))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo+  (vars (goods price text) (nb nc nm data) (b c m name) (hash akey))+  (defstrand customer 5 (goods goods) (price price) (nb nb) (nc nc)+    (nm nm) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (goods goods) (price price) (nc nc) (nm nm)+    (c c) (m m))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (invk hash) (privk b) (privk c) (privk m))+  (uniq-orig nc nm)+  (operation nonce-test (contracted (nm-0 nm)) nc (0 1)+    (enc nc nm m goods price (pubk c)) (enc c nc goods price (pubk m)))+  (traces+    ((send (enc c nc goods price (pubk m)))+      (recv (enc nc nm m goods price (pubk c)))+      (send (enc c nc nm price (pubk b)))+      (recv+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))+      (send (cat (enc (enc c nc nb nm price hash) (privk b)) nb)))+    ((recv (enc c nc goods price (pubk m)))+      (send (enc nc nm m goods price (pubk c)))))+  (label 2)+  (parent 1)+  (unrealized (0 3))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo+  (vars (goods price text) (nb nc nm data) (b c m name) (hash akey))+  (defstrand customer 5 (goods goods) (price price) (nb nb) (nc nc)+    (nm nm) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (goods goods) (price price) (nc nc) (nm nm)+    (c c) (m m))+  (defstrand bank 2 (price price) (nc nc) (nm nm) (nb nb) (b b) (c c)+    (hash hash))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)) ((1 1) (2 0)) ((2 1) (0 3)))+  (non-orig (invk hash) (privk b) (privk c) (privk m))+  (uniq-orig nb nc nm)+  (operation encryption-test (added-strand bank 2)+    (enc (enc c nc nb nm price hash) (privk b)) (0 3))+  (traces+    ((send (enc c nc goods price (pubk m)))+      (recv (enc nc nm m goods price (pubk c)))+      (send (enc c nc nm price (pubk b)))+      (recv+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))+      (send (cat (enc (enc c nc nb nm price hash) (privk b)) nb)))+    ((recv (enc c nc goods price (pubk m)))+      (send (enc nc nm m goods price (pubk c))))+    ((recv (enc c nc nm price (pubk b)))+      (send+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))))+  (label 3)+  (parent 2)+  (unrealized (2 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo+  (vars (goods price text) (nb nc nm data) (b c m name) (hash akey))+  (defstrand customer 5 (goods goods) (price price) (nb nb) (nc nc)+    (nm nm) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (goods goods) (price price) (nc nc) (nm nm)+    (c c) (m m))+  (defstrand bank 2 (price price) (nc nc) (nm nm) (nb nb) (b b) (c c)+    (hash hash))+  (precedes ((0 0) (1 0)) ((0 2) (2 0)) ((1 1) (0 1)) ((2 1) (0 3)))+  (non-orig (invk hash) (privk b) (privk c) (privk m))+  (uniq-orig nb nc nm)+  (operation nonce-test (added-strand customer 3) nc (2 0)+    (enc nc nm m goods price (pubk c)) (enc c nc goods price (pubk m)))+  (traces+    ((send (enc c nc goods price (pubk m)))+      (recv (enc nc nm m goods price (pubk c)))+      (send (enc c nc nm price (pubk b)))+      (recv+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))+      (send (cat (enc (enc c nc nb nm price hash) (privk b)) nb)))+    ((recv (enc c nc goods price (pubk m)))+      (send (enc nc nm m goods price (pubk c))))+    ((recv (enc c nc nm price (pubk b)))+      (send+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))))+  (label 4)+  (parent 3)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol epmo basic+  (defrole bank+    (vars (b c m name) (hash akey) (nc nm nb data) (price text))+    (trace (recv (enc c nc nm price (pubk b)))+      (send+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc b nb nm hash) (privk m))))+    (non-orig (invk hash))+    (uniq-orig nb)+    (annotations b+      (1+        (implies+          (and (forall ((pm name)) (says c (transfer b price pm nm)))+            (forall ((pm name)) (says pm (transfer b price pm nm))))+          (forall ((pm name)) (transfer b price pm nm))))+      (2+        (and (says c (transfer b price m nm))+          (says m (transfer b price m nm))))))+  (defrole customer+    (vars (b c m name) (hash akey) (nb nc nm data) (goods price text))+    (trace (send (enc c nc goods price (pubk m)))+      (recv (enc nc nm m goods price (pubk c)))+      (send (enc c nc nm price (pubk b)))+      (recv+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))+      (send (cat (enc (enc c nc nb nm price hash) (privk b)) nb)))+    (non-orig (invk hash))+    (uniq-orig nc)+    (annotations c+      (2+        (says m+          (forall ((pb name))+            (implies (transfer pb price m nm) (ship m goods c)))))+      (4+        (says b+          (implies+            (and (forall ((pm name)) (says c (transfer b price pm nm)))+              (forall ((pm name)) (says m (transfer b price pm nm))))+            (transfer b price pm nm)))) (5 (transfer b price m nm))))+  (defrole merchant+    (vars (b c m name) (hash akey) (nb nc nm data) (goods price text))+    (trace (recv (enc c nc goods price (pubk m)))+      (send (enc nc nm m goods price (pubk c)))+      (recv (cat (enc (enc c nc nb nm price hash) (privk b)) nb))+      (send (enc (enc b nb nm hash) (privk m))))+    (non-orig (invk hash))+    (uniq-orig nm)+    (annotations m+      (2+        (forall ((pb name))+          (implies (transfer pb price m nm) (ship m goods c))))+      (3+        (and+          (says b+            (implies+              (and+                (forall ((pm name)) (says c (transfer b price pm nm)))+                (forall ((pm name)) (says m (transfer b price pm nm))))+              (transfer b price pm nm)))+          (says c (transfer b price m nm))))+      (4 (and (transfer b price m nm) (ship m goods c))))))++(defskeleton epmo+  (vars (price text) (nc nm nb data) (b c m name) (hash akey))+  (defstrand bank 3 (price price) (nc nc) (nm nm) (nb nb) (b b) (c c)+    (m m) (hash hash))+  (non-orig (invk hash) (privk b) (privk c) (privk m))+  (uniq-orig nb)+  (traces+    ((recv (enc c nc nm price (pubk b)))+      (send+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc b nb nm hash) (privk m)))))+  (label 5)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo+  (vars (price goods price-0 text) (nc nm nb nc-0 data) (b c m c-0 name)+    (hash akey))+  (defstrand bank 3 (price price) (nc nc) (nm nm) (nb nb) (b b) (c c)+    (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price-0) (nb nb) (nc nc-0)+    (nm nm) (b b) (c c-0) (m m) (hash hash))+  (precedes ((0 1) (1 2)) ((1 1) (0 0)) ((1 3) (0 2)))+  (non-orig (invk hash) (privk b) (privk c) (privk m))+  (uniq-orig nm nb)+  (operation encryption-test (added-strand merchant 4)+    (enc (enc b nb nm hash) (privk m)) (0 2))+  (traces+    ((recv (enc c nc nm price (pubk b)))+      (send+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc b nb nm hash) (privk m))))+    ((recv (enc c-0 nc-0 goods price-0 (pubk m)))+      (send (enc nc-0 nm m goods price-0 (pubk c-0)))+      (recv (cat (enc (enc c-0 nc-0 nb nm price-0 hash) (privk b)) nb))+      (send (enc (enc b nb nm hash) (privk m)))))+  (label 6)+  (parent 5)+  (unrealized (1 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo+  (vars (price goods text) (nc nm nb data) (b c m name) (hash akey))+  (defstrand bank 3 (price price) (nc nc) (nm nm) (nb nb) (b b) (c c)+    (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nb nb) (nc nc)+    (nm nm) (b b) (c c) (m m) (hash hash))+  (precedes ((0 1) (1 2)) ((1 1) (0 0)) ((1 3) (0 2)))+  (non-orig (invk hash) (privk b) (privk c) (privk m))+  (uniq-orig nm nb)+  (operation encryption-test (added-strand bank 2)+    (enc (enc c nc nb nm price hash) (privk b)) (1 2))+  (traces+    ((recv (enc c nc nm price (pubk b)))+      (send+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc b nb nm hash) (privk m))))+    ((recv (enc c nc goods price (pubk m)))+      (send (enc nc nm m goods price (pubk c)))+      (recv (cat (enc (enc c nc nb nm price hash) (privk b)) nb))+      (send (enc (enc b nb nm hash) (privk m)))))+  (label 7)+  (parent 6)+  (seen 8)+  (unrealized (0 0) (1 2))+  (comment "4 in cohort - 1 not yet seen"))++(defskeleton epmo+  (vars (price goods goods-0 text) (nc nm nb data) (b c m b-0 m-0 name)+    (hash akey))+  (defstrand bank 3 (price price) (nc nc) (nm nm) (nb nb) (b b) (c c)+    (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nb nb) (nc nc)+    (nm nm) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (goods goods-0) (price price) (nb nb) (nc nc)+    (nm nm) (b b-0) (c c) (m m-0) (hash hash))+  (precedes ((0 1) (2 3)) ((1 1) (0 0)) ((1 1) (2 1)) ((1 3) (0 2))+    ((2 0) (1 0)) ((2 4) (1 2)))+  (non-orig (invk hash) (privk b) (privk c) (privk m))+  (uniq-orig nc nm nb)+  (operation nonce-test (added-strand customer 5) nb (1 2)+    (enc nc nb (pubk c)) (enc c nc nb nm price hash))+  (traces+    ((recv (enc c nc nm price (pubk b)))+      (send+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc b nb nm hash) (privk m))))+    ((recv (enc c nc goods price (pubk m)))+      (send (enc nc nm m goods price (pubk c)))+      (recv (cat (enc (enc c nc nb nm price hash) (privk b)) nb))+      (send (enc (enc b nb nm hash) (privk m))))+    ((send (enc c nc goods-0 price (pubk m-0)))+      (recv (enc nc nm m-0 goods-0 price (pubk c)))+      (send (enc c nc nm price (pubk b-0)))+      (recv+        (cat (enc (enc c nc nb nm price hash) (privk b-0))+          (enc nc nb (pubk c))))+      (send (cat (enc (enc c nc nb nm price hash) (privk b-0)) nb))))+  (label 8)+  (parent 7)+  (unrealized (0 0) (2 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo+  (vars (price goods text) (nc nm nb data) (b c m b-0 name) (hash akey))+  (defstrand bank 3 (price price) (nc nc) (nm nm) (nb nb) (b b) (c c)+    (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nb nb) (nc nc)+    (nm nm) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (goods goods) (price price) (nb nb) (nc nc)+    (nm nm) (b b-0) (c c) (m m) (hash hash))+  (precedes ((0 1) (2 3)) ((1 1) (0 0)) ((1 1) (2 1)) ((1 3) (0 2))+    ((2 0) (1 0)) ((2 4) (1 2)))+  (non-orig (invk hash) (privk b) (privk c) (privk m))+  (uniq-orig nc nm nb)+  (operation nonce-test (contracted (m-0 m) (goods-0 goods)) nm (2 1)+    (enc nc nm m goods price (pubk c)))+  (traces+    ((recv (enc c nc nm price (pubk b)))+      (send+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc b nb nm hash) (privk m))))+    ((recv (enc c nc goods price (pubk m)))+      (send (enc nc nm m goods price (pubk c)))+      (recv (cat (enc (enc c nc nb nm price hash) (privk b)) nb))+      (send (enc (enc b nb nm hash) (privk m))))+    ((send (enc c nc goods price (pubk m)))+      (recv (enc nc nm m goods price (pubk c)))+      (send (enc c nc nm price (pubk b-0)))+      (recv+        (cat (enc (enc c nc nb nm price hash) (privk b-0))+          (enc nc nb (pubk c))))+      (send (cat (enc (enc c nc nb nm price hash) (privk b-0)) nb))))+  (label 9)+  (parent 8)+  (unrealized (0 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo+  (vars (price goods text) (nc nm nb data) (b c m b-0 name) (hash akey))+  (defstrand bank 3 (price price) (nc nc) (nm nm) (nb nb) (b b) (c c)+    (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nb nb) (nc nc)+    (nm nm) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (goods goods) (price price) (nb nb) (nc nc)+    (nm nm) (b b-0) (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 (invk hash) (privk b) (privk c) (privk m))+  (uniq-orig nc nm nb)+  (operation nonce-test (added-strand customer 3) nm (0 0)+    (enc nc nm m goods price (pubk c)))+  (traces+    ((recv (enc c nc nm price (pubk b)))+      (send+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc b nb nm hash) (privk m))))+    ((recv (enc c nc goods price (pubk m)))+      (send (enc nc nm m goods price (pubk c)))+      (recv (cat (enc (enc c nc nb nm price hash) (privk b)) nb))+      (send (enc (enc b nb nm hash) (privk m))))+    ((send (enc c nc goods price (pubk m)))+      (recv (enc nc nm m goods price (pubk c)))+      (send (enc c nc nm price (pubk b-0)))+      (recv+        (cat (enc (enc c nc nb nm price hash) (privk b-0))+          (enc nc nb (pubk c))))+      (send (cat (enc (enc c nc nb nm price hash) (privk b-0)) nb))))+  (label 10)+  (parent 9)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol epmo basic+  (defrole bank+    (vars (b c m name) (hash akey) (nc nm nb data) (price text))+    (trace (recv (enc c nc nm price (pubk b)))+      (send+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc b nb nm hash) (privk m))))+    (non-orig (invk hash))+    (uniq-orig nb)+    (annotations b+      (1+        (implies+          (and (forall ((pm name)) (says c (transfer b price pm nm)))+            (forall ((pm name)) (says pm (transfer b price pm nm))))+          (forall ((pm name)) (transfer b price pm nm))))+      (2+        (and (says c (transfer b price m nm))+          (says m (transfer b price m nm))))))+  (defrole customer+    (vars (b c m name) (hash akey) (nb nc nm data) (goods price text))+    (trace (send (enc c nc goods price (pubk m)))+      (recv (enc nc nm m goods price (pubk c)))+      (send (enc c nc nm price (pubk b)))+      (recv+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))+      (send (cat (enc (enc c nc nb nm price hash) (privk b)) nb)))+    (non-orig (invk hash))+    (uniq-orig nc)+    (annotations c+      (2+        (says m+          (forall ((pb name))+            (implies (transfer pb price m nm) (ship m goods c)))))+      (4+        (says b+          (implies+            (and (forall ((pm name)) (says c (transfer b price pm nm)))+              (forall ((pm name)) (says m (transfer b price pm nm))))+            (transfer b price pm nm)))) (5 (transfer b price m nm))))+  (defrole merchant+    (vars (b c m name) (hash akey) (nb nc nm data) (goods price text))+    (trace (recv (enc c nc goods price (pubk m)))+      (send (enc nc nm m goods price (pubk c)))+      (recv (cat (enc (enc c nc nb nm price hash) (privk b)) nb))+      (send (enc (enc b nb nm hash) (privk m))))+    (non-orig (invk hash))+    (uniq-orig nm)+    (annotations m+      (2+        (forall ((pb name))+          (implies (transfer pb price m nm) (ship m goods c))))+      (3+        (and+          (says b+            (implies+              (and+                (forall ((pm name)) (says c (transfer b price pm nm)))+                (forall ((pm name)) (says m (transfer b price pm nm))))+              (transfer b price pm nm)))+          (says c (transfer b price m nm))))+      (4 (and (transfer b price m nm) (ship m goods c))))))++(defskeleton epmo+  (vars (goods price text) (nb nc nm data) (b c m name) (hash akey))+  (defstrand merchant 4 (goods goods) (price price) (nb nb) (nc nc)+    (nm nm) (b b) (c c) (m m) (hash hash))+  (non-orig (invk hash) (privk b) (privk c) (privk m))+  (uniq-orig nm)+  (traces+    ((recv (enc c nc goods price (pubk m)))+      (send (enc nc nm m goods price (pubk c)))+      (recv (cat (enc (enc c nc nb nm price hash) (privk b)) nb))+      (send (enc (enc b nb nm hash) (privk m)))))+  (label 11)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo+  (vars (goods price text) (nb nc nm data) (b c m name) (hash akey))+  (defstrand merchant 4 (goods goods) (price price) (nb nb) (nc nc)+    (nm nm) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (price price) (nc nc) (nm nm) (nb nb) (b b) (c c)+    (hash hash))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (invk hash) (privk b) (privk c) (privk m))+  (uniq-orig nb nm)+  (operation encryption-test (added-strand bank 2)+    (enc (enc c nc nb nm price hash) (privk b)) (0 2))+  (traces+    ((recv (enc c nc goods price (pubk m)))+      (send (enc nc nm m goods price (pubk c)))+      (recv (cat (enc (enc c nc nb nm price hash) (privk b)) nb))+      (send (enc (enc b nb nm hash) (privk m))))+    ((recv (enc c nc nm price (pubk b)))+      (send+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c))))))+  (label 12)+  (parent 11)+  (unrealized (0 2) (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo+  (vars (goods price text) (nb nc nm data) (b c m b-0 name) (hash akey))+  (defstrand merchant 4 (goods goods) (price price) (nb nb) (nc nc)+    (nm nm) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (price price) (nc nc) (nm nm) (nb nb) (b b) (c c)+    (hash hash))+  (defstrand customer 3 (goods goods) (price price) (nc nc) (nm nm)+    (b b-0) (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (1 0)))+  (non-orig (invk hash) (privk b) (privk c) (privk m))+  (uniq-orig nb nc nm)+  (operation nonce-test (added-strand customer 3) nm (1 0)+    (enc nc nm m goods price (pubk c)))+  (traces+    ((recv (enc c nc goods price (pubk m)))+      (send (enc nc nm m goods price (pubk c)))+      (recv (cat (enc (enc c nc nb nm price hash) (privk b)) nb))+      (send (enc (enc b nb nm hash) (privk m))))+    ((recv (enc c nc nm price (pubk b)))+      (send+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods price (pubk m)))+      (recv (enc nc nm m goods price (pubk c)))+      (send (enc c nc nm price (pubk b-0)))))+  (label 13)+  (parent 12)+  (seen 14)+  (unrealized (0 2))+  (comment "4 in cohort - 1 not yet seen"))++(defskeleton epmo+  (vars (price goods text) (nb nc nm data) (b c b-0 m name) (hash akey))+  (defstrand merchant 4 (goods goods) (price price) (nb nb) (nc nc)+    (nm nm) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (price price) (nc nc) (nm nm) (nb nb) (b b) (c c)+    (hash hash))+  (defstrand customer 5 (goods goods) (price price) (nb nb) (nc nc)+    (nm nm) (b b-0) (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 (invk hash) (privk b) (privk c) (privk m))+  (uniq-orig nb nc nm)+  (operation nonce-test (added-strand customer 5) nb (0 2)+    (enc nc nb (pubk c)) (enc c nc nb nm price hash))+  (traces+    ((recv (enc c nc goods price (pubk m)))+      (send (enc nc nm m goods price (pubk c)))+      (recv (cat (enc (enc c nc nb nm price hash) (privk b)) nb))+      (send (enc (enc b nb nm hash) (privk m))))+    ((recv (enc c nc nm price (pubk b)))+      (send+        (cat (enc (enc c nc nb nm price hash) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods price (pubk m)))+      (recv (enc nc nm m goods price (pubk c)))+      (send (enc c nc nm price (pubk b-0)))+      (recv+        (cat (enc (enc c nc nb nm price hash) (privk b-0))+          (enc nc nb (pubk c))))+      (send (cat (enc (enc c nc nb nm price hash) (privk b-0)) nb))))+  (label 14)+  (parent 13)+  (unrealized)+  (shape))++(comment "Nothing left to do")
+ tst/epmo_acctnum.lsp view
@@ -0,0 +1,99 @@+;; The results of running CPSA on this input produces interesting+;; output.  One of the shapes is produced only as a result of+;; generalization, not cohort reduction.  It is a counterexample to+;; the hypthesis that all shapes are produced by cohort reduction, and+;; the purpose of generalization is to distinguish the shapes from the+;; other realized skeletons produced by cohort reduction.++;; The shape in question identifies the bank's nonce with price of the+;; goods.  The variable cannot be separated because the uniquely+;; originating variable originates on the merchant strand, but after+;; separation, it would originate on the bank's strand.++;; Adding a role unique origination assumption to the bank role for+;; its nonce eliminates the undesired shape.++(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 (b m c name) (nm nc nb text) (hash name))+  (defstrand merchant 4 (b b) (m m) (c c) (nm nm) (nc nc) (nb nb) (hash hash))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nc nb))++(defskeleton epmo_acctnum+  (vars (b m c name) (nm nb nc text) (hash name) (price acctnum text))+  (defstrand bank 3 (b b) (m m) (c c) (nm nm) (nb nb) (nc nc) (hash hash))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nc nb))
+ tst/epmo_acctnum.tst view
@@ -0,0 +1,8312 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(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))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nc nb goods price acctnum 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))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm nm) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nc nb)+  (operation encryption-test (added-strand bank 2)+    (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b)) (0 2))+  (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))))))+  (label 1)+  (parent 0)+  (unrealized (0 2) (1 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum acctnum-0 goods-0 text)+    (b m c hash b-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum-0) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand customer 3) price (1 0)+    (enc nc price m price (pubk c)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum-0 price (pubk b-0)))))+  (label 2)+  (parent 1)+  (seen 5 7)+  (unrealized (0 0) (0 2) (1 0))+  (comment "7 in cohort - 4 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nc nb goods price acctnum acctnum-0 goods-0 text)+    (b m c hash b-0 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 3 (acctnum acctnum-0) (nc nc) (nm nm)+    (goods goods-0) (price price) (b b-0) (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0))+  (uniq-orig nm nc nb)+  (operation nonce-test (added-strand customer 3) nm (1 0)+    (enc nc nm m price (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum-0 price (pubk b-0)))))+  (label 3)+  (parent 1)+  (seen 7)+  (unrealized (0 0) (0 2) (1 0))+  (comment "3 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 text) (m c hash b name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (b-0 b) (acctnum-0 acctnum)) price+    (1 0) (enc nc price m price (pubk c))+    (enc c nc price acctnum price (pubk b)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum price (pubk b)))))+  (label 4)+  (parent 2)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 text)+    (b m c hash b-0 hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((0 1) (3 0)) ((1 1) (0 2)) ((2 0) (0 0))+    ((2 2) (1 0)) ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand bank 2) price (1 0)+    (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))))+  (label 5)+  (parent 2)+  (seen 12)+  (unrealized (0 0) (0 2) (1 0) (3 0))+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 nb-0 text)+    (b m c hash b-0 hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b-0) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((0 1) (3 0)) ((1 1) (0 2)) ((2 0) (0 0))+    ((2 2) (1 0)) ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand bank 2) price (1 0)+    (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b-0)) (enc nc nb-0 (pubk c))))))+  (label 6)+  (parent 2)+  (seen 13)+  (unrealized (0 0) (0 2) (1 0) (3 0))+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum acctnum-0 goods-0 nb-0 text)+    (b m c hash b-0 hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum-0) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm price) (nb nb-0)+    (price price) (b b-0) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((0 1) (3 0)) ((1 1) (0 2)) ((2 0) (0 0))+    ((2 2) (1 0)) ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand bank 2) price (1 0)+    (enc nc price m price (pubk c))+    (enc c nc price acctnum-0 price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum-0 price (pubk b-0))))+    ((recv (enc c nc price acctnum-0 price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b-0)) (enc nc nb-0 (pubk c))))))+  (label 7)+  (parent 2)+  (seen 14)+  (unrealized (0 0) (0 2) (1 0) (3 0))+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nc nb goods price acctnum goods-0 text) (m c hash b 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 3 (acctnum acctnum) (nc nc) (nm nm)+    (goods goods-0) (price price) (b b) (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b))+  (uniq-orig nm nc nb)+  (operation nonce-test (contracted (b-0 b) (acctnum-0 acctnum)) nm+    (1 0) (enc nc nm m price (pubk c))+    (enc c nc nm acctnum price (pubk b)))+  (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum price (pubk b)))))+  (label 8)+  (parent 3)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nc nb goods price acctnum acctnum-0 goods-0 nb-0 text)+    (b m c hash b-0 hash-0 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 3 (acctnum acctnum-0) (nc nc) (nm nm)+    (goods goods-0) (price price) (b b-0) (c c) (m m))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm nm) (nb nb-0)+    (price price) (b b-0) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((0 1) (3 0)) ((1 1) (0 2)) ((2 0) (0 0))+    ((2 2) (1 0)) ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0))+  (uniq-orig nm nc nb)+  (operation nonce-test (added-strand bank 2) nm (1 0)+    (enc nc nm m price (pubk c))+    (enc c nc nm acctnum-0 price (pubk b-0)))+  (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum-0 price (pubk b-0))))+    ((recv (enc c nc nm acctnum-0 price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0))+            (privk b-0)) (enc nc nb-0 (pubk c))))))+  (label 9)+  (parent 3)+  (seen 14)+  (unrealized (0 0) (0 2) (1 0) (3 0))+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price acctnum goods text) (m c hash b name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum price (pubk b)))))+  (label 10)+  (parent 4)+  (seen 18)+  (unrealized (0 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 nm price-0 text)+    (m c hash b name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (3 0)) ((2 2) (1 0))+    ((3 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand merchant 2) nc (0 0)+    (enc c nc goods-0 (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum price (pubk b))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 11)+  (parent 4)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 text)+    (b m c hash b-0 hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand customer 3) price (3 0)+    (enc nc price m price (pubk c)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))))+  (label 12)+  (parent 5)+  (seen 21)+  (unrealized (0 0) (0 2) (1 0))+  (comment "9 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 nb-0 text)+    (b m c hash b-0 hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b-0) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand customer 3) price (3 0)+    (enc nc price m price (pubk c)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b-0)) (enc nc nb-0 (pubk c))))))+  (label 13)+  (parent 6)+  (seen 12 23)+  (unrealized (0 0) (0 2) (1 0))+  (comment "7 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum acctnum-0 goods-0 nb-0 text)+    (b m c hash b-0 hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum-0) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm price) (nb nb-0)+    (price price) (b b-0) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand customer 3) price (3 0)+    (enc nc price m price (pubk c)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum-0 price (pubk b-0))))+    ((recv (enc c nc price acctnum-0 price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b-0)) (enc nc nb-0 (pubk c))))))+  (label 14)+  (parent 7)+  (seen 12 23)+  (unrealized (0 0) (0 2) (1 0))+  (comment "7 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nc nb price acctnum goods text) (m c hash b 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 3 (acctnum acctnum) (nc nc) (nm nm) (goods goods)+    (price price) (b b) (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b))+  (uniq-orig nm nc nb)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc c nc goods (pubk m)))+  (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)))))+  (label 15)+  (parent 8)+  (seen 25)+  (unrealized (0 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nc nb goods price acctnum goods-0 nm-0 price-0 text)+    (m c hash b 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 3 (acctnum acctnum) (nc nc) (nm nm)+    (goods goods-0) (price price) (b b) (c c) (m m))+  (defstrand merchant 2 (nc nc) (nm nm-0) (goods goods-0)+    (price price-0) (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (3 0)) ((2 2) (1 0))+    ((3 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b))+  (uniq-orig nm nc nb nm-0)+  (operation nonce-test (added-strand merchant 2) nc (0 0)+    (enc c nc goods-0 (pubk m)))+  (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum price (pubk b))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c)))))+  (label 16)+  (parent 8)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nc nb goods price acctnum acctnum-0 goods-0 nb-0 text)+    (b m c hash b-0 hash-0 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 3 (acctnum acctnum-0) (nc nc) (nm nm)+    (goods goods-0) (price price) (b b-0) (c c) (m m))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm nm) (nb nb-0)+    (price price) (b b-0) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0))+  (uniq-orig nm nc nb)+  (operation nonce-test (added-strand customer 3) nm (3 0)+    (enc nc nm m price (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum-0 price (pubk b-0))))+    ((recv (enc c nc nm acctnum-0 price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0))+            (privk b-0)) (enc nc nb-0 (pubk c))))))+  (label 17)+  (parent 9)+  (unrealized (0 0) (0 2) (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price acctnum goods text) (c hash b m name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum acctnum) (nb nb) (nc nc) (nm price)+    (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 nc nb price)+  (operation nonce-test (added-strand customer 5) nb (0 2)+    (enc "hash" c nc nb price price (pubk hash)) (enc nc nb (pubk c)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))))+  (label 18)+  (parent 10)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price acctnum goods nm price-0 text) (m c hash b name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (3 0)) ((2 2) (1 0))+    ((3 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b))+  (uniq-orig nc nb price nm)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc nc nm m price-0 (pubk c)) (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum price (pubk b))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 19)+  (parent 11)+  (seen 29)+  (unrealized (0 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 text) (m c hash b hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((3 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (b-0 b) (acctnum price)) price (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc nc price (pubk c)) (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))))+  (label 20)+  (parent 12)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 text)+    (b m c hash b-0 hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (precedes ((0 1) (3 1)) ((1 1) (0 2)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (2 0)) ((3 4) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand customer 5) price (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc nc price (pubk c)) (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price))))+  (label 21)+  (parent 12)+  (unrealized (0 0) (0 2) (1 0) (3 3))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 nb-0 text) (m c hash b hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((3 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (b-0 b) (acctnum price)) price (1 0)+    (enc "hash" c nc nb-0 price price (pubk hash-0))+    (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c))))))+  (label 22)+  (parent 13)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 nb-0 text)+    (b m c hash b-0 hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-1))+  (precedes ((0 1) (2 1)) ((0 1) (4 0)) ((1 1) (0 2)) ((2 0) (0 0))+    ((2 2) (3 0)) ((3 1) (1 0)) ((4 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand bank 2) price (1 0)+    (enc "hash" c nc nb-0 price price (pubk hash-0))+    (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b-0)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b-0)) (enc nc price (pubk c))))))+  (label 23)+  (parent 13)+  (seen 12)+  (unrealized (0 0) (0 2) (1 0) (4 0))+  (comment "2 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 nb-0 text)+    (m c hash b hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((3 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (b-0 b) (acctnum-0 acctnum)) price+    (1 0) (enc "hash" c nc nb-0 price price (pubk hash-0))+    (enc nc price m price (pubk c))+    (enc c nc price acctnum price (pubk b)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum price (pubk b))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c))))))+  (label 24)+  (parent 14)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 2 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 (added-strand 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 25)+  (parent 15)+  (unrealized)+  (shape))++(defskeleton epmo_acctnum+  (vars (nm nc nb price acctnum goods nm-0 price-0 text)+    (m c hash b 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 3 (acctnum acctnum) (nc nc) (nm nm) (goods goods)+    (price price) (b b) (c c) (m m))+  (defstrand merchant 2 (nc nc) (nm nm-0) (goods goods) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (3 0)) ((2 2) (1 0))+    ((3 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b))+  (uniq-orig nm nc nb nm-0)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc nc nm-0 m price-0 (pubk c)) (enc c nc goods (pubk m)))+  (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 (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c)))))+  (label 26)+  (parent 16)+  (seen 37)+  (unrealized (0 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nc nb goods price acctnum goods-0 nb-0 text)+    (m c hash b hash-0 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 3 (acctnum acctnum) (nc nc) (nm nm)+    (goods goods-0) (price price) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm nm) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((3 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nm nc nb)+  (operation nonce-test (contracted (b-0 b) (acctnum-0 acctnum)) nm+    (1 0) (enc "hash" c nc nb-0 nm price (pubk hash-0))+    (enc nc nm m price (pubk c)) (enc c nc nm acctnum price (pubk b)))+  (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum price (pubk b))))+    ((recv (enc c nc nm acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c))))))+  (label 27)+  (parent 17)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price acctnum goods price-0 text) (c hash b m name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price-0) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price-0) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum acctnum) (nb nb) (nc nc) (nm price-0)+    (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 nc nb price price-0)+  (operation generalization separated price-0)+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price-0 m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price-0 price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price-0 (pubk hash)) (privk m))))+    ((recv (enc c nc price-0 acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price-0 price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price-0 m price (pubk c)))+      (send (enc c nc price-0 acctnum price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price-0 price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price-0 price (pubk hash)) (privk b))+          nb))))+  (label 28)+  (parent 18)+  (seen 25)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price nm price-0 acctnum goods text) (c hash b m name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (defstrand customer 5 (acctnum acctnum) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (precedes ((0 1) (3 1)) ((1 1) (3 3)) ((2 1) (0 0)) ((3 0) (2 0))+    ((3 2) (1 0)) ((3 4) (0 2)))+  (non-orig (privk c) (privk hash) (privk b) (privk m))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand customer 5) nb (0 2)+    (enc "hash" c nc nb price price (pubk hash)) (enc nc nb (pubk c)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))))+  (label 29)+  (parent 19)+  (seen 18)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price goods text) (m c hash b hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum price) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((3 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))))+  (label 30)+  (parent 20)+  (seen 40)+  (unrealized (0 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 nm price-0 text)+    (m c hash b hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (4 0)) ((2 2) (3 0))+    ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand merchant 2) nc (0 0)+    (enc c nc goods-0 (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 31)+  (parent 20)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 acctnum-0 text)+    (b m c hash b-0 hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (precedes ((0 1) (3 1)) ((0 1) (4 0)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (2 0)) ((3 4) (1 0)) ((4 1) (3 3)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0))+  (uniq-orig nc nb price)+  (operation encryption-test (added-strand bank 2)+    (enc (enc "hash" c nc price price price (pubk hash-0)) (privk b-0))+    (3 3))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price acctnum-0 price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))))+  (label 32)+  (parent 21)+  (seen 42)+  (unrealized (0 0) (0 2) (1 0) (4 0))+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price goods nb-0 text) (m c hash b hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum price) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((3 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c))))))+  (label 33)+  (parent 22)+  (seen 43)+  (unrealized (0 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 nb-0 nm price-0 text)+    (m c hash b hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (4 0)) ((2 2) (3 0))+    ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand merchant 2) nc (0 0)+    (enc c nc goods-0 (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 34)+  (parent 22)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price acctnum goods nb-0 text) (m c hash b hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((3 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum price (pubk b))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c))))))+  (label 35)+  (parent 24)+  (seen 45)+  (unrealized (0 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 nb-0 nm price-0 text)+    (m c hash b hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (4 0)) ((2 2) (3 0))+    ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand merchant 2) nc (0 0)+    (enc c nc goods-0 (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum price (pubk b))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 36)+  (parent 24)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nc nb price nm-0 price-0 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 merchant 2 (nc nc) (nm nm-0) (goods goods) (price price-0)+    (c c) (m m))+  (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) (3 1)) ((1 1) (3 3)) ((2 1) (0 0)) ((3 0) (2 0))+    ((3 2) (1 0)) ((3 4) (0 2)))+  (non-orig (privk c) (privk hash) (privk b) (privk m))+  (uniq-orig nm nc nb nm-0)+  (operation nonce-test (added-strand 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)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (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 37)+  (parent 26)+  (seen 25)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nc nb price acctnum goods nb-0 text)+    (m c hash b hash-0 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 3 (acctnum acctnum) (nc nc) (nm nm) (goods goods)+    (price price) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm nm) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((3 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nm nc nb)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc c nc goods (pubk m)))+  (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 (enc c nc nm acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c))))))+  (label 38)+  (parent 27)+  (seen 47)+  (unrealized (0 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nc nb goods price acctnum goods-0 nb-0 nm-0 price-0 text)+    (m c hash b hash-0 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 3 (acctnum acctnum) (nc nc) (nm nm)+    (goods goods-0) (price price) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm nm) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand merchant 2 (nc nc) (nm nm-0) (goods goods-0)+    (price price-0) (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (4 0)) ((2 2) (3 0))+    ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nm nc nb nm-0)+  (operation nonce-test (added-strand merchant 2) nc (0 0)+    (enc c nc goods-0 (pubk m)))+  (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum price (pubk b))))+    ((recv (enc c nc nm acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c)))))+  (label 39)+  (parent 27)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb acctnum goods text) (c hash hash-0 b m name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm acctnum) (goods goods)+    (price acctnum) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm acctnum) (nb nb)+    (price acctnum) (b b) (c c) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm acctnum) (nb acctnum)+    (price acctnum) (b b) (c c) (hash hash-0))+  (defstrand customer 5 (acctnum acctnum) (nb nb) (nc nc) (nm acctnum)+    (goods goods) (price acctnum) (b b) (c c) (m m) (hash hash))+  (precedes ((0 1) (3 1)) ((1 1) (3 3)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (2 0)) ((3 4) (0 2)))+  (non-orig (privk c) (privk hash) (privk hash-0) (privk b) (privk m))+  (uniq-orig nc nb acctnum)+  (operation nonce-test (added-strand customer 5) nb (0 2)+    (enc "hash" c nc nb acctnum acctnum (pubk hash))+    (enc nc nb (pubk c)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc acctnum m acctnum (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) nb))+      (send (enc (enc "hash" b m nb acctnum (pubk hash)) (privk m))))+    ((recv (enc c nc acctnum acctnum acctnum (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) (enc nc nb (pubk c)))))+    ((recv (enc c nc acctnum acctnum acctnum (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc acctnum acctnum acctnum (pubk hash-0))+            (privk b)) (enc nc acctnum (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc acctnum m acctnum (pubk c)))+      (send (enc c nc acctnum acctnum acctnum (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) nb))))+  (label 40)+  (parent 30)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price goods nm price-0 text) (m c hash b hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum price) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (4 0)) ((2 2) (3 0))+    ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nc nb price nm)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc nc nm m price-0 (pubk c)) (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 41)+  (parent 31)+  (seen 50)+  (unrealized (0 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 acctnum-0 text)+    (b m c hash b-0 hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (precedes ((0 1) (3 1)) ((1 1) (0 2)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (2 0)) ((3 2) (4 0)) ((3 4) (1 0)) ((4 1) (3 3)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand customer 3) price (4 0)+    (enc nc price m price (pubk c)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price acctnum-0 price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))))+  (label 42)+  (parent 32)+  (seen 52 53)+  (unrealized (0 0) (0 2) (1 0) (4 0))+  (comment "7 in cohort - 3 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb nb-0 acctnum goods text) (c hash hash-0 b m name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm acctnum) (goods goods)+    (price acctnum) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm acctnum) (nb nb)+    (price acctnum) (b b) (c c) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm acctnum) (nb nb-0)+    (price acctnum) (b b) (c c) (hash hash-0))+  (defstrand customer 5 (acctnum acctnum) (nb nb) (nc nc) (nm acctnum)+    (goods goods) (price acctnum) (b b) (c c) (m m) (hash hash))+  (precedes ((0 1) (3 1)) ((1 1) (3 3)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (2 0)) ((3 4) (0 2)))+  (non-orig (privk c) (privk hash) (privk hash-0) (privk b) (privk m))+  (uniq-orig nc nb acctnum)+  (operation nonce-test (added-strand customer 5) nb (0 2)+    (enc "hash" c nc nb acctnum acctnum (pubk hash))+    (enc nc nb (pubk c)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc acctnum m acctnum (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) nb))+      (send (enc (enc "hash" b m nb acctnum (pubk hash)) (privk m))))+    ((recv (enc c nc acctnum acctnum acctnum (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) (enc nc nb (pubk c)))))+    ((recv (enc c nc acctnum acctnum acctnum (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 acctnum acctnum (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc acctnum m acctnum (pubk c)))+      (send (enc c nc acctnum acctnum acctnum (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) nb))))+  (label 43)+  (parent 33)+  (seen 49)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price goods nb-0 nm price-0 text)+    (m c hash b hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum price) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (4 0)) ((2 2) (3 0))+    ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nc nb price nm)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc nc nm m price-0 (pubk c)) (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 44)+  (parent 34)+  (seen 54)+  (unrealized (0 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price nb-0 acctnum goods text) (c hash hash-0 b m name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand customer 5 (acctnum acctnum) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (precedes ((0 1) (3 1)) ((1 1) (3 3)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (2 0)) ((3 4) (0 2)))+  (non-orig (privk c) (privk hash) (privk hash-0) (privk b) (privk m))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand customer 5) nb (0 2)+    (enc "hash" c nc nb price price (pubk hash)) (enc nc nb (pubk c)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))))+  (label 45)+  (parent 35)+  (seen 18)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price acctnum goods nb-0 nm price-0 text)+    (m c hash b hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (4 0)) ((2 2) (3 0))+    ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nc nb price nm)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc nc nm m price-0 (pubk c)) (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum price (pubk b))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 46)+  (parent 36)+  (seen 55)+  (unrealized (0 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nc nb price nb-0 acctnum goods text)+    (c hash hash-0 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 bank 2 (acctnum acctnum) (nc nc) (nm nm) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (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) (3 1)) ((1 1) (3 3)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (2 0)) ((3 4) (0 2)))+  (non-orig (privk c) (privk hash) (privk hash-0) (privk b) (privk m))+  (uniq-orig nm nc nb)+  (operation nonce-test (added-strand 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)))))+    ((recv (enc c nc nm acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (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 47)+  (parent 38)+  (seen 25)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nc nb price acctnum goods nb-0 nm-0 price-0 text)+    (m c hash b hash-0 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 3 (acctnum acctnum) (nc nc) (nm nm) (goods goods)+    (price price) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm nm) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand merchant 2 (nc nc) (nm nm-0) (goods goods) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (4 0)) ((2 2) (3 0))+    ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nm nc nb nm-0)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc nc nm-0 m price-0 (pubk c)) (enc c nc goods (pubk m)))+  (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 (enc c nc nm acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c)))))+  (label 48)+  (parent 39)+  (seen 56)+  (unrealized (0 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb acctnum goods text) (c hash b m name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm acctnum) (goods goods)+    (price acctnum) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm acctnum) (nb nb)+    (price acctnum) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum acctnum) (nb nb) (nc nc) (nm acctnum)+    (goods goods) (price acctnum) (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 nc nb acctnum)+  (operation generalization deleted (2 0))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc acctnum m acctnum (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) nb))+      (send (enc (enc "hash" b m nb acctnum (pubk hash)) (privk m))))+    ((recv (enc c nc acctnum acctnum acctnum (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc acctnum m acctnum (pubk c)))+      (send (enc c nc acctnum acctnum acctnum (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) nb))))+  (label 49)+  (parent 40)+  (seen 18)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb nm price acctnum goods text) (c hash hash-0 b m name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm acctnum) (goods goods)+    (price acctnum) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm acctnum) (nb nb)+    (price acctnum) (b b) (c c) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm acctnum) (nb acctnum)+    (price acctnum) (b b) (c c) (hash hash-0))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price)+    (c c) (m m))+  (defstrand customer 5 (acctnum acctnum) (nb nb) (nc nc) (nm acctnum)+    (goods goods) (price acctnum) (b b) (c c) (m m) (hash hash))+  (precedes ((0 1) (4 1)) ((1 1) (4 3)) ((2 1) (1 0)) ((3 1) (0 0))+    ((4 0) (3 0)) ((4 2) (2 0)) ((4 4) (0 2)))+  (non-orig (privk c) (privk hash) (privk hash-0) (privk b) (privk m))+  (uniq-orig nc nb nm acctnum)+  (operation nonce-test (added-strand customer 5) nb (0 2)+    (enc "hash" c nc nb acctnum acctnum (pubk hash))+    (enc nc nb (pubk c)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc acctnum m acctnum (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) nb))+      (send (enc (enc "hash" b m nb acctnum (pubk hash)) (privk m))))+    ((recv (enc c nc acctnum acctnum acctnum (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) (enc nc nb (pubk c)))))+    ((recv (enc c nc acctnum acctnum acctnum (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc acctnum acctnum acctnum (pubk hash-0))+            (privk b)) (enc nc acctnum (pubk c)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price (pubk c))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc acctnum m acctnum (pubk c)))+      (send (enc c nc acctnum acctnum acctnum (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) nb))))+  (label 50)+  (parent 41)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 text)+    (b m c hash b-0 hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((2 4) (1 0)) ((3 1) (2 3)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (acctnum-0 price)) price (4 0)+    (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))))+  (label 51)+  (parent 42)+  (unrealized (0 0) (0 2) (1 0))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 acctnum-0 text)+    (b m c hash b-0 hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-1))+  (precedes ((0 1) (3 1)) ((0 1) (5 0)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (2 0)) ((3 2) (4 0)) ((3 4) (1 0))+    ((4 1) (3 3)) ((5 1) (4 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand bank 2) price (4 0)+    (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price acctnum-0 price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b-0)) (enc nc price (pubk c))))))+  (label 52)+  (parent 42)+  (seen 61)+  (unrealized (0 0) (0 2) (1 0) (4 0) (5 0))+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 acctnum-0 nb-0 text)+    (b m c hash b-0 hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b-0) (c c) (hash hash-1))+  (precedes ((0 1) (3 1)) ((0 1) (5 0)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (2 0)) ((3 2) (4 0)) ((3 4) (1 0))+    ((4 1) (3 3)) ((5 1) (4 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand bank 2) price (4 0)+    (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price acctnum-0 price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b-0)) (enc nc nb-0 (pubk c))))))+  (label 53)+  (parent 42)+  (seen 62)+  (unrealized (0 0) (0 2) (1 0) (4 0) (5 0))+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb nb-0 nm price acctnum goods text)+    (c hash hash-0 b m name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm acctnum) (goods goods)+    (price acctnum) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm acctnum) (nb nb)+    (price acctnum) (b b) (c c) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm acctnum) (nb nb-0)+    (price acctnum) (b b) (c c) (hash hash-0))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price)+    (c c) (m m))+  (defstrand customer 5 (acctnum acctnum) (nb nb) (nc nc) (nm acctnum)+    (goods goods) (price acctnum) (b b) (c c) (m m) (hash hash))+  (precedes ((0 1) (4 1)) ((1 1) (4 3)) ((2 1) (1 0)) ((3 1) (0 0))+    ((4 0) (3 0)) ((4 2) (2 0)) ((4 4) (0 2)))+  (non-orig (privk c) (privk hash) (privk hash-0) (privk b) (privk m))+  (uniq-orig nc nb nm acctnum)+  (operation nonce-test (added-strand customer 5) nb (0 2)+    (enc "hash" c nc nb acctnum acctnum (pubk hash))+    (enc nc nb (pubk c)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc acctnum m acctnum (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) nb))+      (send (enc (enc "hash" b m nb acctnum (pubk hash)) (privk m))))+    ((recv (enc c nc acctnum acctnum acctnum (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) (enc nc nb (pubk c)))))+    ((recv (enc c nc acctnum acctnum acctnum (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 acctnum acctnum (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price (pubk c))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc acctnum m acctnum (pubk c)))+      (send (enc c nc acctnum acctnum acctnum (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) nb))))+  (label 54)+  (parent 44)+  (seen 57)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price nb-0 nm price-0 acctnum goods text)+    (c hash hash-0 b m name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (defstrand customer 5 (acctnum acctnum) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (precedes ((0 1) (4 1)) ((1 1) (4 3)) ((2 1) (1 0)) ((3 1) (0 0))+    ((4 0) (3 0)) ((4 2) (2 0)) ((4 4) (0 2)))+  (non-orig (privk c) (privk hash) (privk hash-0) (privk b) (privk m))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand customer 5) nb (0 2)+    (enc "hash" c nc nb price price (pubk hash)) (enc nc nb (pubk c)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))))+  (label 55)+  (parent 46)+  (seen 29)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nc nb price nb-0 nm-0 price-0 acctnum goods text)+    (c hash hash-0 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 bank 2 (acctnum acctnum) (nc nc) (nm nm) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand merchant 2 (nc nc) (nm nm-0) (goods goods) (price price-0)+    (c c) (m m))+  (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) (4 1)) ((1 1) (4 3)) ((2 1) (1 0)) ((3 1) (0 0))+    ((4 0) (3 0)) ((4 2) (2 0)) ((4 4) (0 2)))+  (non-orig (privk c) (privk hash) (privk hash-0) (privk b) (privk m))+  (uniq-orig nm nc nb nm-0)+  (operation nonce-test (added-strand 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)))))+    ((recv (enc c nc nm acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (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 56)+  (parent 48)+  (seen 37)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb nm price acctnum goods text) (c hash b m name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm acctnum) (goods goods)+    (price acctnum) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm acctnum) (nb nb)+    (price acctnum) (b b) (c c) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price)+    (c c) (m m))+  (defstrand customer 5 (acctnum acctnum) (nb nb) (nc nc) (nm acctnum)+    (goods goods) (price acctnum) (b b) (c c) (m m) (hash hash))+  (precedes ((0 1) (3 1)) ((1 1) (3 3)) ((2 1) (0 0)) ((3 0) (2 0))+    ((3 2) (1 0)) ((3 4) (0 2)))+  (non-orig (privk c) (privk hash) (privk b) (privk m))+  (uniq-orig nc nb nm acctnum)+  (operation generalization deleted (2 0))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc acctnum m acctnum (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) nb))+      (send (enc (enc "hash" b m nb acctnum (pubk hash)) (privk m))))+    ((recv (enc c nc acctnum acctnum acctnum (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) (enc nc nb (pubk c)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price (pubk c))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc acctnum m acctnum (pubk c)))+      (send (enc c nc acctnum acctnum acctnum (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb acctnum acctnum (pubk hash))+            (privk b)) nb))))+  (label 57)+  (parent 50)+  (seen 49)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 text) (m c hash b hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((2 4) (1 0)) ((3 1) (2 3)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (b-0 b) (acctnum price)) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc nc price (pubk c)) (enc nc price m price (pubk c))+    (enc c nc goods-0 (pubk m)) (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))))+  (label 58)+  (parent 51)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 text)+    (b m c hash b-0 hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b-0) (c c) (hash hash-1))+  (precedes ((0 1) (2 1)) ((0 1) (4 0)) ((1 1) (0 2)) ((2 0) (0 0))+    ((2 2) (3 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand bank 2) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc nc price (pubk c)) (enc nc price m price (pubk c))+    (enc c nc goods-0 (pubk m)) (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-1))+            (privk b-0)) (enc nc goods-0 (pubk c))))))+  (label 59)+  (parent 51)+  (seen 65)+  (unrealized (0 0) (0 2) (1 0) (4 0))+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 nm price-0 text)+    (b m c hash b-0 hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 0) (4 0))+    ((2 2) (3 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand merchant 2) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc nc price (pubk c)) (enc nc price m price (pubk c))+    (enc c nc goods-0 (pubk m)) (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 60)+  (parent 51)+  (unrealized (0 0) (0 2) (1 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 acctnum-0 text)+    (b m c hash b-0 hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-1))+  (precedes ((0 1) (3 1)) ((1 1) (0 2)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (2 0)) ((3 2) (5 0)) ((3 4) (1 0)) ((4 1) (3 3))+    ((5 1) (4 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand customer 3) price (5 0)+    (enc nc price m price (pubk c)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price acctnum-0 price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b-0)) (enc nc price (pubk c))))))+  (label 61)+  (parent 52)+  (unrealized (0 0) (0 2) (1 0) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 acctnum-0 nb-0 text)+    (b m c hash b-0 hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b-0) (c c) (hash hash-1))+  (precedes ((0 1) (3 1)) ((1 1) (0 2)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (2 0)) ((3 2) (5 0)) ((3 4) (1 0)) ((4 1) (3 3))+    ((5 1) (4 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand customer 3) price (5 0)+    (enc nc price m price (pubk c)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price acctnum-0 price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b-0)) (enc nc nb-0 (pubk c))))))+  (label 62)+  (parent 53)+  (seen 61 70)+  (unrealized (0 0) (0 2) (1 0) (4 0))+  (comment "7 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price goods text) (m c hash b hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((2 4) (1 0)) ((3 1) (2 3)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))))+  (label 63)+  (parent 58)+  (unrealized (0 2))+  (comment "empty cohort"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 nm price-0 text)+    (m c hash b hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (4 0)) ((2 2) (3 0))+    ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand merchant 2) nc (0 0)+    (enc c nc goods-0 (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 64)+  (parent 58)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 text)+    (b m c hash b-0 hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b-0) (c c) (hash hash-1))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((2 2) (4 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand customer 3) price (4 0)+    (enc nc price m price (pubk c)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-1))+            (privk b-0)) (enc nc goods-0 (pubk c))))))+  (label 65)+  (parent 59)+  (unrealized (0 0) (0 2) (1 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 nm price-0 text)+    (m c hash b hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 0) (4 0))+    ((2 2) (3 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nc nb price nm)+  (operation nonce-test (contracted (b-0 b) (acctnum price)) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc nc price (pubk c)) (enc nc price m price (pubk c))+    (enc nc nm m price-0 (pubk c)) (enc c nc goods-0 (pubk m))+    (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 66)+  (parent 60)+  (seen 63 64)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 nm price-0 text)+    (b m c hash b-0 hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b-0) (c c) (hash hash-1))+  (precedes ((0 1) (2 1)) ((0 1) (5 0)) ((1 1) (0 2)) ((2 0) (0 0))+    ((2 0) (4 0)) ((2 2) (3 0)) ((2 4) (1 0)) ((3 1) (2 3))+    ((4 1) (1 0)) ((5 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand bank 2) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc nc price (pubk c)) (enc nc price m price (pubk c))+    (enc nc nm m price-0 (pubk c)) (enc c nc goods-0 (pubk m))+    (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-1))+            (privk b-0)) (enc nc goods-0 (pubk c))))))+  (label 67)+  (parent 60)+  (seen 73)+  (unrealized (0 0) (0 2) (1 0) (5 0))+  (comment "2 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 text)+    (b m c hash b-0 hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-1))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (4 0))+    ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (acctnum-0 price)) price (4 0)+    (enc "hash" c nc price price price (pubk hash-1))+    (enc nc price (pubk c)) (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b-0)) (enc nc price (pubk c))))))+  (label 68)+  (parent 61)+  (unrealized (0 0) (0 2) (1 0))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 nb-0 text)+    (b m c hash b-0 hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b-0) (c c) (hash hash-1))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (4 0))+    ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (acctnum-0 price)) price (4 0)+    (enc "hash" c nc nb-0 price price (pubk hash-1))+    (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b-0)) (enc nc nb-0 (pubk c))))))+  (label 69)+  (parent 62)+  (unrealized (0 0) (0 2) (1 0))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 acctnum-0 nb-0 text)+    (b m c hash b-0 hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b-0) (c c) (hash hash-1))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-2))+  (precedes ((0 1) (3 1)) ((0 1) (6 0)) ((1 1) (0 2)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (2 0)) ((3 2) (5 0)) ((3 4) (1 0))+    ((4 1) (3 3)) ((5 1) (4 0)) ((6 1) (4 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand bank 2) price (4 0)+    (enc "hash" c nc nb-0 price price (pubk hash-1))+    (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price acctnum-0 price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b-0)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-2))+            (privk b-0)) (enc nc price (pubk c))))))+  (label 70)+  (parent 62)+  (seen 61)+  (unrealized (0 0) (0 2) (1 0) (4 0) (6 0))+  (comment "2 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price goods nm price-0 text) (m c hash b hash-0 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (4 0)) ((2 2) (3 0))+    ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nc nb price nm)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc nc nm m price-0 (pubk c)) (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 71)+  (parent 64)+  (unrealized (0 2))+  (comment "empty cohort"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 text)+    (m c hash b hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b) (c c) (hash hash-1))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((2 2) (4 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (b-0 b) (acctnum price)) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc goods-0 price price (pubk hash-1))+    (enc nc price (pubk c)) (enc nc goods-0 (pubk c))+    (enc nc price m price (pubk c)) (enc c nc goods-0 (pubk m))+    (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-1))+            (privk b)) (enc nc goods-0 (pubk c))))))+  (label 72)+  (parent 65)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 nm price-0 text)+    (b m c hash b-0 hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b-0) (c c) (hash hash-1))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 0) (5 0))+    ((2 2) (3 0)) ((2 2) (4 0)) ((2 4) (1 0)) ((3 1) (2 3))+    ((4 1) (1 0)) ((5 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand merchant 2) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc goods-0 price price (pubk hash-1))+    (enc nc price (pubk c)) (enc nc goods-0 (pubk c))+    (enc nc price m price (pubk c)) (enc c nc goods-0 (pubk m))+    (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-1))+            (privk b-0)) (enc nc goods-0 (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 73)+  (parent 65)+  (unrealized (0 0) (0 2) (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 text)+    (m c hash b hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-1))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (4 0))+    ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (b-0 b) (acctnum price)) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc price price price (pubk hash-1))+    (enc nc price (pubk c)) (enc nc price m price (pubk c))+    (enc c nc goods-0 (pubk m)) (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b)) (enc nc price (pubk c))))))+  (label 74)+  (parent 68)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 text)+    (b m c hash b-0 hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-1))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b-0) (c c) (hash hash-2))+  (precedes ((0 1) (2 1)) ((0 1) (5 0)) ((1 1) (0 2)) ((2 0) (0 0))+    ((2 2) (4 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0))+    ((5 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand bank 2) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc price price price (pubk hash-1))+    (enc nc price (pubk c)) (enc nc price m price (pubk c))+    (enc c nc goods-0 (pubk m)) (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-2))+            (privk b-0)) (enc nc goods-0 (pubk c))))))+  (label 75)+  (parent 68)+  (seen 85)+  (unrealized (0 0) (0 2) (1 0) (5 0))+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 nm price-0 text)+    (b m c hash b-0 hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-1))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 0) (5 0))+    ((2 2) (4 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0))+    ((5 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand merchant 2) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc price price price (pubk hash-1))+    (enc nc price (pubk c)) (enc nc price m price (pubk c))+    (enc c nc goods-0 (pubk m)) (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 76)+  (parent 68)+  (unrealized (0 0) (0 2) (1 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 nb-0 text)+    (m c hash b hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-1))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (4 0))+    ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (b-0 b) (acctnum price)) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc nb-0 price price (pubk hash-1))+    (enc nc price (pubk c)) (enc nc nb-0 (pubk c))+    (enc nc price m price (pubk c)) (enc c nc goods-0 (pubk m))+    (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b)) (enc nc nb-0 (pubk c))))))+  (label 77)+  (parent 69)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 nb-0 text)+    (b m c hash b-0 hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b-0) (c c) (hash hash-1))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b-0) (c c) (hash hash-2))+  (precedes ((0 1) (2 1)) ((0 1) (5 0)) ((1 1) (0 2)) ((2 0) (0 0))+    ((2 2) (4 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0))+    ((5 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand bank 2) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc nb-0 price price (pubk hash-1))+    (enc nc price (pubk c)) (enc nc nb-0 (pubk c))+    (enc nc price m price (pubk c)) (enc c nc goods-0 (pubk m))+    (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b-0)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-2))+            (privk b-0)) (enc nc goods-0 (pubk c))))))+  (label 78)+  (parent 69)+  (seen 90)+  (unrealized (0 0) (0 2) (1 0) (5 0))+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 nb-0 nm price-0 text)+    (b m c hash b-0 hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b-0) (c c) (hash hash-1))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 0) (5 0))+    ((2 2) (4 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0))+    ((5 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand merchant 2) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc nb-0 price price (pubk hash-1))+    (enc nc price (pubk c)) (enc nc nb-0 (pubk c))+    (enc nc price m price (pubk c)) (enc c nc goods-0 (pubk m))+    (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b-0)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 79)+  (parent 69)+  (unrealized (0 0) (0 2) (1 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price goods text) (m c hash b hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods)+    (price price) (b b) (c c) (hash hash-1))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((2 2) (4 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc goods price price (pubk hash-1))+            (privk b)) (enc nc goods (pubk c))))))+  (label 80)+  (parent 72)+  (unrealized (0 2))+  (comment "empty cohort"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 nm price-0 text)+    (m c hash b hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (5 0)) ((2 2) (3 0))+    ((2 2) (4 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (1 0))+    ((5 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand merchant 2) nc (0 0)+    (enc c nc goods-0 (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-1))+            (privk b)) (enc nc goods-0 (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 81)+  (parent 72)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 nm price-0 text)+    (m c hash b hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 0) (5 0))+    ((2 2) (3 0)) ((2 2) (4 0)) ((2 4) (1 0)) ((3 1) (2 3))+    ((4 1) (1 0)) ((5 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1))+  (uniq-orig nc nb price nm)+  (operation nonce-test (contracted (b-0 b) (acctnum price)) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc goods-0 price price (pubk hash-1))+    (enc nc price (pubk c)) (enc nc goods-0 (pubk c))+    (enc nc price m price (pubk c)) (enc nc nm m price-0 (pubk c))+    (enc c nc goods-0 (pubk m)) (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-1))+            (privk b)) (enc nc goods-0 (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 82)+  (parent 73)+  (seen 80 81)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price goods text) (m c hash b hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-1))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (4 0))+    ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b)) (enc nc price (pubk c))))))+  (label 83)+  (parent 74)+  (unrealized (0 2))+  (comment "empty cohort"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 nm price-0 text)+    (m c hash b hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (5 0)) ((2 2) (4 0))+    ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0)) ((5 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand merchant 2) nc (0 0)+    (enc c nc goods-0 (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 84)+  (parent 74)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 text)+    (b m c hash b-0 hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-1))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b-0) (c c) (hash hash-2))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (4 0))+    ((2 2) (5 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0))+    ((5 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand customer 3) price (5 0)+    (enc nc price m price (pubk c)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-2))+            (privk b-0)) (enc nc goods-0 (pubk c))))))+  (label 85)+  (parent 75)+  (unrealized (0 0) (0 2) (1 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 nm price-0 text)+    (m c hash b hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 0) (5 0))+    ((2 2) (4 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0))+    ((5 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1))+  (uniq-orig nc nb price nm)+  (operation nonce-test (contracted (b-0 b) (acctnum price)) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc price price price (pubk hash-1))+    (enc nc price (pubk c)) (enc nc price m price (pubk c))+    (enc nc nm m price-0 (pubk c)) (enc c nc goods-0 (pubk m))+    (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 86)+  (parent 76)+  (seen 83 84)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 nm price-0 text)+    (b m c hash b-0 hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-1))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b-0) (c c) (hash hash-2))+  (precedes ((0 1) (2 1)) ((0 1) (6 0)) ((1 1) (0 2)) ((2 0) (0 0))+    ((2 0) (5 0)) ((2 2) (4 0)) ((2 4) (1 0)) ((3 1) (2 3))+    ((4 1) (3 0)) ((5 1) (1 0)) ((6 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand bank 2) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc price price price (pubk hash-1))+    (enc nc price (pubk c)) (enc nc price m price (pubk c))+    (enc nc nm m price-0 (pubk c)) (enc c nc goods-0 (pubk m))+    (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-2))+            (privk b-0)) (enc nc goods-0 (pubk c))))))+  (label 87)+  (parent 76)+  (seen 96)+  (unrealized (0 0) (0 2) (1 0) (6 0))+  (comment "2 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price goods nb-0 text) (m c hash b hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-1))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (4 0))+    ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b)) (enc nc nb-0 (pubk c))))))+  (label 88)+  (parent 77)+  (unrealized (0 2))+  (comment "empty cohort"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 nb-0 nm price-0 text)+    (m c hash b hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (5 0)) ((2 2) (4 0))+    ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0)) ((5 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand merchant 2) nc (0 0)+    (enc c nc goods-0 (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 89)+  (parent 77)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 nb-0 text)+    (b m c hash b-0 hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b-0) (c c) (hash hash-1))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b-0) (c c) (hash hash-2))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (4 0))+    ((2 2) (5 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0))+    ((5 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price)+  (operation nonce-test (added-strand customer 3) price (5 0)+    (enc nc price m price (pubk c)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b-0)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-2))+            (privk b-0)) (enc nc goods-0 (pubk c))))))+  (label 90)+  (parent 78)+  (unrealized (0 0) (0 2) (1 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 nb-0 nm price-0 text)+    (m c hash b hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 0) (5 0))+    ((2 2) (4 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0))+    ((5 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1))+  (uniq-orig nc nb price nm)+  (operation nonce-test (contracted (b-0 b) (acctnum price)) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc nb-0 price price (pubk hash-1))+    (enc nc price (pubk c)) (enc nc nb-0 (pubk c))+    (enc nc price m price (pubk c)) (enc nc nm m price-0 (pubk c))+    (enc c nc goods-0 (pubk m)) (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 91)+  (parent 79)+  (seen 88 89)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 nb-0 nm price-0 text)+    (b m c hash b-0 hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b-0) (c c) (hash hash-1))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b-0) (c c) (hash hash-2))+  (precedes ((0 1) (2 1)) ((0 1) (6 0)) ((1 1) (0 2)) ((2 0) (0 0))+    ((2 0) (5 0)) ((2 2) (4 0)) ((2 4) (1 0)) ((3 1) (2 3))+    ((4 1) (3 0)) ((5 1) (1 0)) ((6 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand bank 2) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc nb-0 price price (pubk hash-1))+    (enc nc price (pubk c)) (enc nc nb-0 (pubk c))+    (enc nc price m price (pubk c)) (enc nc nm m price-0 (pubk c))+    (enc c nc goods-0 (pubk m)) (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b-0)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-2))+            (privk b-0)) (enc nc goods-0 (pubk c))))))+  (label 92)+  (parent 79)+  (seen 99)+  (unrealized (0 0) (0 2) (1 0) (6 0))+  (comment "2 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price goods nm price-0 text)+    (m c hash b hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (5 0)) ((2 2) (3 0))+    ((2 2) (4 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (1 0))+    ((5 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1))+  (uniq-orig nc nb price nm)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc nc nm m price-0 (pubk c)) (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc goods price price (pubk hash-1))+            (privk b)) (enc nc goods (pubk c)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 93)+  (parent 81)+  (unrealized (0 2))+  (comment "empty cohort"))++(defskeleton epmo_acctnum+  (vars (nc nb price goods nm price-0 text)+    (m c hash b hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (5 0)) ((2 2) (4 0))+    ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0)) ((5 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1))+  (uniq-orig nc nb price nm)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc nc nm m price-0 (pubk c)) (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 94)+  (parent 84)+  (unrealized (0 2))+  (comment "empty cohort"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 text)+    (m c hash b hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b) (c c) (hash hash-2))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (4 0))+    ((2 2) (5 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0))+    ((5 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (b-0 b) (acctnum price)) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc price price price (pubk hash-1))+    (enc "hash" c nc goods-0 price price (pubk hash-2))+    (enc nc price (pubk c)) (enc nc goods-0 (pubk c))+    (enc nc price m price (pubk c)) (enc c nc goods-0 (pubk m))+    (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-2))+            (privk b)) (enc nc goods-0 (pubk c))))))+  (label 95)+  (parent 85)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 nm price-0 text)+    (b m c hash b-0 hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-1))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b-0) (c c) (hash hash-2))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 0) (6 0))+    ((2 2) (4 0)) ((2 2) (5 0)) ((2 4) (1 0)) ((3 1) (2 3))+    ((4 1) (3 0)) ((5 1) (1 0)) ((6 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand merchant 2) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc price price price (pubk hash-1))+    (enc "hash" c nc goods-0 price price (pubk hash-2))+    (enc nc price (pubk c)) (enc nc goods-0 (pubk c))+    (enc nc price m price (pubk c)) (enc c nc goods-0 (pubk m))+    (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-2))+            (privk b-0)) (enc nc goods-0 (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 96)+  (parent 85)+  (unrealized (0 0) (0 2) (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price goods nb-0 nm price-0 text)+    (m c hash b hash-0 hash-1 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (5 0)) ((2 2) (4 0))+    ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0)) ((5 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1))+  (uniq-orig nc nb price nm)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc nc nm m price-0 (pubk c)) (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 97)+  (parent 89)+  (unrealized (0 2))+  (comment "empty cohort"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 nb-0 text)+    (m c hash b hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b) (c c) (hash hash-2))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (4 0))+    ((2 2) (5 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0))+    ((5 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (b-0 b) (acctnum price)) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc goods-0 price price (pubk hash-2))+    (enc "hash" c nc nb-0 price price (pubk hash-1))+    (enc nc price (pubk c)) (enc nc goods-0 (pubk c))+    (enc nc nb-0 (pubk c)) (enc nc price m price (pubk c))+    (enc c nc goods-0 (pubk m)) (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-2))+            (privk b)) (enc nc goods-0 (pubk c))))))+  (label 98)+  (parent 90)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price acctnum goods-0 nb-0 nm price-0 text)+    (b m c hash b-0 hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b-0) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b-0) (c c) (hash hash-1))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b-0) (c c) (hash hash-2))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 0) (6 0))+    ((2 2) (4 0)) ((2 2) (5 0)) ((2 4) (1 0)) ((3 1) (2 3))+    ((4 1) (3 0)) ((5 1) (1 0)) ((6 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0) (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand merchant 2) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc goods-0 price price (pubk hash-2))+    (enc "hash" c nc nb-0 price price (pubk hash-1))+    (enc nc price (pubk c)) (enc nc goods-0 (pubk c))+    (enc nc nb-0 (pubk c)) (enc nc price m price (pubk c))+    (enc c nc goods-0 (pubk m)) (enc c nc price price price (pubk b-0)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b-0)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) price)))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b-0)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b-0)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc price price price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-2))+            (privk b-0)) (enc nc goods-0 (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 99)+  (parent 90)+  (unrealized (0 0) (0 2) (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price goods text) (m c hash b hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods)+    (price price) (b b) (c c) (hash hash-2))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (4 0))+    ((2 2) (5 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0))+    ((5 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc goods price price (pubk hash-2))+            (privk b)) (enc nc goods (pubk c))))))+  (label 100)+  (parent 95)+  (unrealized (0 2))+  (comment "empty cohort"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 nm price-0 text)+    (m c hash b hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b) (c c) (hash hash-2))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (6 0)) ((2 2) (4 0))+    ((2 2) (5 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0))+    ((5 1) (1 0)) ((6 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand merchant 2) nc (0 0)+    (enc c nc goods-0 (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-2))+            (privk b)) (enc nc goods-0 (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 101)+  (parent 95)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 nm price-0 text)+    (m c hash b hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b) (c c) (hash hash-2))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 0) (6 0))+    ((2 2) (4 0)) ((2 2) (5 0)) ((2 4) (1 0)) ((3 1) (2 3))+    ((4 1) (3 0)) ((5 1) (1 0)) ((6 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price nm)+  (operation nonce-test (contracted (b-0 b) (acctnum price)) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc price price price (pubk hash-1))+    (enc "hash" c nc goods-0 price price (pubk hash-2))+    (enc nc price (pubk c)) (enc nc goods-0 (pubk c))+    (enc nc price m price (pubk c)) (enc nc nm m price-0 (pubk c))+    (enc c nc goods-0 (pubk m)) (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-2))+            (privk b)) (enc nc goods-0 (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 102)+  (parent 96)+  (seen 100 101)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price goods nb-0 text)+    (m c hash b hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods)+    (price price) (b b) (c c) (hash hash-2))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (4 0))+    ((2 2) (5 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0))+    ((5 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc goods price price (pubk hash-2))+            (privk b)) (enc nc goods (pubk c))))))+  (label 103)+  (parent 98)+  (unrealized (0 2))+  (comment "empty cohort"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 nb-0 nm price-0 text)+    (m c hash b hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b) (c c) (hash hash-2))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (6 0)) ((2 2) (4 0))+    ((2 2) (5 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0))+    ((5 1) (1 0)) ((6 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price nm)+  (operation nonce-test (added-strand merchant 2) nc (0 0)+    (enc c nc goods-0 (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-2))+            (privk b)) (enc nc goods-0 (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 104)+  (parent 98)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb goods price goods-0 nb-0 nm price-0 text)+    (m c hash b hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods-0)+    (price price) (b b) (c c) (hash hash-2))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods-0) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 0) (6 0))+    ((2 2) (4 0)) ((2 2) (5 0)) ((2 4) (1 0)) ((3 1) (2 3))+    ((4 1) (3 0)) ((5 1) (1 0)) ((6 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price nm)+  (operation nonce-test (contracted (b-0 b) (acctnum price)) nc (1 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc "hash" c nc goods-0 price price (pubk hash-2))+    (enc "hash" c nc nb-0 price price (pubk hash-1))+    (enc nc price (pubk c)) (enc nc goods-0 (pubk c))+    (enc nc nb-0 (pubk c)) (enc nc price m price (pubk c))+    (enc nc nm m price-0 (pubk c)) (enc c nc goods-0 (pubk m))+    (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods-0 (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc goods-0 price price (pubk hash-2))+            (privk b)) (enc nc goods-0 (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 105)+  (parent 99)+  (seen 103 104)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nc nb price goods nm price-0 text)+    (m c hash b hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods)+    (price price) (b b) (c c) (hash hash-2))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (6 0)) ((2 2) (4 0))+    ((2 2) (5 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0))+    ((5 1) (1 0)) ((6 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price nm)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc nc nm m price-0 (pubk c)) (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc goods price price (pubk hash-2))+            (privk b)) (enc nc goods (pubk c)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 106)+  (parent 101)+  (unrealized (0 2))+  (comment "empty cohort"))++(defskeleton epmo_acctnum+  (vars (nc nb price goods nb-0 nm price-0 text)+    (m c hash b hash-0 hash-1 hash-2 name))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum price) (nb price) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-1))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb goods)+    (price price) (b b) (c c) (hash hash-2))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (6 0)) ((2 2) (4 0))+    ((2 2) (5 0)) ((2 4) (1 0)) ((3 1) (2 3)) ((4 1) (3 0))+    ((5 1) (1 0)) ((6 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0)+    (privk hash-1) (privk hash-2))+  (uniq-orig nc nb price nm)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc nc nm m price-0 (pubk c)) (enc c nc goods (pubk m)))+  (traces+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c)))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) price)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-1))+            (privk b)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc goods price price (pubk hash-2))+            (privk b)) (enc nc goods (pubk c)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 107)+  (parent 104)+  (unrealized (0 2))+  (comment "empty cohort"))++(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 108)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nb nc acctnum price nc-0 goods price-0 text)+    (b m c hash c-0 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-0) (nm nm) (goods goods)+    (price price-0) (b b) (c c-0) (m m) (hash hash))+  (precedes ((0 1) (1 2)) ((1 1) (0 0)) ((1 3) (0 2)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nb nc)+  (operation encryption-test (added-strand merchant 4)+    (enc (enc "hash" b m nb nm (pubk hash)) (privk m)) (0 2))+  (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-0 nc-0 goods (pubk m)))+      (send (enc nc-0 nm m price-0 (pubk c-0)))+      (recv+        (cat+          (enc (enc "hash" c-0 nc-0 nb nm price-0 (pubk hash))+            (privk b)) nb))+      (send (enc (enc "hash" b m nb nm (pubk hash)) (privk m)))))+  (label 109)+  (parent 108)+  (unrealized (1 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nb nc acctnum price 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))+  (precedes ((0 1) (1 2)) ((1 1) (0 0)) ((1 3) (0 2)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nb nc)+  (operation encryption-test (added-strand bank 2)+    (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b)) (1 2))+  (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)))))+  (label 110)+  (parent 109)+  (seen 111)+  (unrealized (0 0) (1 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nb nc acctnum price goods acctnum-0 goods-0 text)+    (b m c hash b-0 m-0 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-0) (nb nb) (nc nc) (nm nm)+    (goods goods-0) (price price) (b b-0) (c c) (m m-0) (hash hash))+  (precedes ((0 1) (2 3)) ((1 1) (0 0)) ((1 1) (2 1)) ((1 3) (0 2))+    ((2 0) (1 0)) ((2 4) (1 2)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0))+  (uniq-orig nm nb nc)+  (operation nonce-test (added-strand customer 5) nb (1 2)+    (enc "hash" c nc nb nm price (pubk hash)) (enc nc nb (pubk c)))+  (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-0 (pubk m-0)))+      (recv (enc nc nm m-0 price (pubk c)))+      (send (enc c nc nm acctnum-0 price (pubk b-0)))+      (recv+        (cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b-0))+          (enc nc nb (pubk c))))+      (send+        (cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b-0))+          nb))))+  (label 111)+  (parent 110)+  (unrealized (0 0) (2 1) (2 3))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nb nc acctnum price goods acctnum-0 goods-0 text)+    (b m c hash b-0 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-0) (nb nb) (nc nc) (nm nm)+    (goods goods-0) (price price) (b b-0) (c c) (m m) (hash hash))+  (precedes ((0 1) (2 3)) ((1 1) (0 0)) ((1 1) (2 1)) ((1 3) (0 2))+    ((2 0) (1 0)) ((2 4) (1 2)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0))+  (uniq-orig nm nb nc)+  (operation nonce-test (contracted (m-0 m)) nm (2 1)+    (enc nc nm m price (pubk c)))+  (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum-0 price (pubk b-0)))+      (recv+        (cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b-0))+          (enc nc nb (pubk c))))+      (send+        (cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b-0))+          nb))))+  (label 112)+  (parent 111)+  (unrealized (0 0) (1 0) (2 3))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nb nc acctnum price goods acctnum-0 goods-0 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-0) (nb nb) (nc nc) (nm nm)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash))+  (precedes ((0 1) (2 3)) ((1 1) (0 0)) ((1 1) (2 1)) ((1 3) (0 2))+    ((2 0) (1 0)) ((2 4) (1 2)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nb nc)+  (operation encryption-test (added-strand bank 2)+    (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b)) (2 3))+  (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum-0 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 113)+  (parent 112)+  (unrealized (0 0) (1 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nb nc acctnum price acctnum-0 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-0) (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) (0 0)) ((1 1) (2 1)) ((1 3) (0 2))+    ((2 0) (1 0)) ((2 4) (1 2)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nb nc)+  (operation nonce-test (contracted (goods-0 goods)) nc (1 0)+    (enc c nc goods (pubk m)))+  (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-0 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 114)+  (parent 113)+  (unrealized (0 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars+    (nm nb nc acctnum price goods acctnum-0 goods-0 nm-0 price-0 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-0) (nb nb) (nc nc) (nm nm)+    (goods goods-0) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm-0) (goods goods-0)+    (price price-0) (c c) (m m))+  (precedes ((0 1) (2 3)) ((1 1) (0 0)) ((1 1) (2 1)) ((1 3) (0 2))+    ((2 0) (3 0)) ((2 4) (1 2)) ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nb nc nm-0)+  (operation nonce-test (added-strand merchant 2) nc (1 0)+    (enc c nc goods-0 (pubk m)))+  (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum-0 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)))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c)))))+  (label 115)+  (parent 113)+  (unrealized (0 0) (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc acctnum price acctnum-0 goods text) (b m c hash name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum-0) (nb nb) (nc nc) (nm price)+    (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 nb nc price)+  (operation nonce-test (added-strand customer 3) price (0 0)+    (enc nc price m price (pubk c)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum-0 price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))))+  (label 116)+  (parent 114)+  (seen 120 122)+  (unrealized (0 0))+  (comment "7 in cohort - 4 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nb nc acctnum price acctnum-0 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-0) (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 (added-strand customer 3) nm (0 0)+    (enc nc nm m price (pubk c)))+  (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-0 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 117)+  (parent 114)+  (seen 122)+  (unrealized (0 0))+  (comment "3 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nb nc acctnum price acctnum-0 goods nm-0 price-0 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-0) (nb nb) (nc nc) (nm nm)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm-0) (goods goods) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 3)) ((1 1) (0 0)) ((1 1) (2 1)) ((1 3) (0 2))+    ((2 0) (3 0)) ((2 4) (1 2)) ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nb nc nm-0)+  (operation nonce-test (contracted (goods-0 goods)) nc (1 0)+    (enc nc nm-0 m price-0 (pubk c)) (enc c nc goods (pubk m)))+  (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-0 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)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c)))))+  (label 118)+  (parent 115)+  (unrealized (0 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc price acctnum goods text) (b m c hash name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum) (nb nb) (nc nc) (nm price)+    (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 nb nc price)+  (operation nonce-test (contracted (acctnum-0 acctnum)) price (0 0)+    (enc nc price m price (pubk c))+    (enc c nc price acctnum price (pubk b)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))))+  (label 119)+  (parent 116)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc acctnum price goods text) (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum price) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 1) (3 0)) ((1 3) (0 2))+    ((2 0) (1 0)) ((2 2) (0 0)) ((2 4) (1 2)) ((3 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nb nc price)+  (operation nonce-test (added-strand bank 2) price (0 0)+    (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))))+  (label 120)+  (parent 116)+  (seen 128)+  (unrealized (0 0) (3 0))+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc acctnum price goods nb-0 text) (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum price) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 1) (3 0)) ((1 3) (0 2))+    ((2 0) (1 0)) ((2 2) (0 0)) ((2 4) (1 2)) ((3 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nb nc price)+  (operation nonce-test (added-strand bank 2) price (0 0)+    (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c))))))+  (label 121)+  (parent 116)+  (seen 129)+  (unrealized (0 0) (3 0))+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc acctnum price acctnum-0 goods nb-0 text)+    (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum-0) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 1) (3 0)) ((1 3) (0 2))+    ((2 0) (1 0)) ((2 2) (0 0)) ((2 4) (1 2)) ((3 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nb nc price)+  (operation nonce-test (added-strand bank 2) price (0 0)+    (enc nc price m price (pubk c))+    (enc c nc price acctnum-0 price (pubk b)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum-0 price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc price acctnum-0 price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c))))))+  (label 122)+  (parent 116)+  (seen 130)+  (unrealized (0 0) (3 0))+  (comment "2 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 123)+  (parent 117)+  (unrealized)+  (shape))++(defskeleton epmo_acctnum+  (vars (nm nb nc acctnum price acctnum-0 goods nb-0 text)+    (b m c hash hash-0 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-0) (nb nb) (nc nc) (nm nm)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm nm) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 1) (3 0)) ((1 3) (0 2))+    ((2 0) (1 0)) ((2 2) (0 0)) ((2 4) (1 2)) ((3 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nm nb nc)+  (operation nonce-test (added-strand bank 2) nm (0 0)+    (enc nc nm m price (pubk c)) (enc c nc nm acctnum-0 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-0 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)))+    ((recv (enc c nc nm acctnum-0 price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c))))))+  (label 124)+  (parent 117)+  (seen 130)+  (unrealized (0 0) (3 0))+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc acctnum price acctnum-0 goods nm price-0 text)+    (b m c hash name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum-0) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (3 0))+    ((2 2) (0 0)) ((2 4) (1 2)) ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nb nc price nm)+  (operation nonce-test (added-strand customer 3) price (0 0)+    (enc nc price m price (pubk c)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum-0 price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 125)+  (parent 118)+  (seen 133 135)+  (unrealized (0 0))+  (comment "7 in cohort - 4 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nb nc acctnum price acctnum-0 goods nm-0 price-0 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-0) (nb nb) (nc nc) (nm nm)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm-0) (goods goods) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (3 0))+    ((2 2) (0 0)) ((2 4) (1 2)) ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nb nc nm-0)+  (operation nonce-test (added-strand customer 3) nm (0 0)+    (enc nc nm m price (pubk c)))+  (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-0 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)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c)))))+  (label 126)+  (parent 118)+  (seen 135)+  (unrealized (0 0))+  (comment "3 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc price acctnum goods price-0 text) (b m c hash name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price-0) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price-0) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum) (nb nb) (nc nc) (nm price-0)+    (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 nb nc price price-0)+  (operation generalization separated price-0)+  (traces+    ((recv (enc c nc price-0 acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price-0 price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price-0 (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price-0 m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price-0 price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price-0 (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price-0 m price (pubk c)))+      (send (enc c nc price-0 acctnum price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price-0 price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price-0 price (pubk hash)) (privk b))+          nb))))+  (label 127)+  (parent 119)+  (seen 123)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc acctnum price goods text) (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum price) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (1 0))+    ((2 2) (3 0)) ((2 4) (1 2)) ((3 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nb nc price)+  (operation nonce-test (added-strand customer 3) price (3 0)+    (enc nc price m price (pubk c)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))))+  (label 128)+  (parent 120)+  (unrealized (0 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc acctnum price goods nb-0 text) (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum price) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (1 0))+    ((2 2) (3 0)) ((2 4) (1 2)) ((3 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nb nc price)+  (operation nonce-test (added-strand customer 3) price (3 0)+    (enc nc price m price (pubk c)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c))))))+  (label 129)+  (parent 121)+  (seen 128 140)+  (unrealized (0 0))+  (comment "7 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc acctnum price acctnum-0 goods nb-0 text)+    (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum-0) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (1 0))+    ((2 2) (3 0)) ((2 4) (1 2)) ((3 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nb nc price)+  (operation nonce-test (added-strand customer 3) price (3 0)+    (enc nc price m price (pubk c)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum-0 price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc price acctnum-0 price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c))))))+  (label 130)+  (parent 122)+  (seen 128 140)+  (unrealized (0 0))+  (comment "7 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nb nc acctnum price acctnum-0 goods nb-0 text)+    (b m c hash hash-0 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-0) (nb nb) (nc nc) (nm nm)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm nm) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (1 0))+    ((2 2) (3 0)) ((2 4) (1 2)) ((3 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nm nb nc)+  (operation nonce-test (added-strand customer 3) nm (3 0)+    (enc nc nm m price (pubk c)))+  (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-0 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)))+    ((recv (enc c nc nm acctnum-0 price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c))))))+  (label 131)+  (parent 124)+  (unrealized (0 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc price acctnum goods nm price-0 text) (b m c hash name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (3 0))+    ((2 2) (0 0)) ((2 4) (1 2)) ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nb nc price nm)+  (operation nonce-test (contracted (acctnum-0 acctnum)) price (0 0)+    (enc nc price m price (pubk c))+    (enc c nc price acctnum price (pubk b)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c)))))+  (label 132)+  (parent 125)+  (seen 119)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc acctnum price goods nm price-0 text)+    (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum price) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 1) (4 0)) ((1 3) (0 2))+    ((2 0) (3 0)) ((2 2) (0 0)) ((2 4) (1 2)) ((3 1) (1 0))+    ((4 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nb nc price nm)+  (operation nonce-test (added-strand bank 2) price (0 0)+    (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))))+  (label 133)+  (parent 125)+  (seen 143)+  (unrealized (0 0) (4 0))+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc acctnum price goods nm price-0 nb-0 text)+    (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum price) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 1) (4 0)) ((1 3) (0 2))+    ((2 0) (3 0)) ((2 2) (0 0)) ((2 4) (1 2)) ((3 1) (1 0))+    ((4 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nb nc price nm)+  (operation nonce-test (added-strand bank 2) price (0 0)+    (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c))))))+  (label 134)+  (parent 125)+  (seen 144)+  (unrealized (0 0) (4 0))+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc acctnum price acctnum-0 goods nm price-0 nb-0 text)+    (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum-0) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 1) (4 0)) ((1 3) (0 2))+    ((2 0) (3 0)) ((2 2) (0 0)) ((2 4) (1 2)) ((3 1) (1 0))+    ((4 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nb nc price nm)+  (operation nonce-test (added-strand bank 2) price (0 0)+    (enc nc price m price (pubk c))+    (enc c nc price acctnum-0 price (pubk b)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum-0 price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c))))+    ((recv (enc c nc price acctnum-0 price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c))))))+  (label 135)+  (parent 125)+  (seen 145)+  (unrealized (0 0) (4 0))+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nb nc price acctnum goods nm-0 price-0 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))+  (defstrand merchant 2 (nc nc) (nm nm-0) (goods goods) (price price-0)+    (c c) (m m))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (3 0))+    ((2 2) (0 0)) ((2 4) (1 2)) ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nb nc nm-0)+  (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)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c)))))+  (label 136)+  (parent 126)+  (seen 123)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nb nc acctnum price acctnum-0 goods nm-0 price-0 nb-0 text)+    (b m c hash hash-0 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-0) (nb nb) (nc nc) (nm nm)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm-0) (goods goods) (price price-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm nm) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 1) (4 0)) ((1 3) (0 2))+    ((2 0) (3 0)) ((2 2) (0 0)) ((2 4) (1 2)) ((3 1) (1 0))+    ((4 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nm nb nc nm-0)+  (operation nonce-test (added-strand bank 2) nm (0 0)+    (enc nc nm m price (pubk c)) (enc c nc nm acctnum-0 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-0 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)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c))))+    ((recv (enc c nc nm acctnum-0 price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c))))))+  (label 137)+  (parent 126)+  (seen 145)+  (unrealized (0 0) (4 0))+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc price goods text) (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum price) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (1 0))+    ((2 2) (3 0)) ((2 4) (1 2)) ((3 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nb nc price)+  (operation nonce-test (contracted (acctnum price)) price (0 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc nc price (pubk c)) (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))))+  (label 138)+  (parent 128)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc price goods nb-0 text) (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum price) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (1 0))+    ((2 2) (3 0)) ((2 4) (1 2)) ((3 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nb nc price)+  (operation nonce-test (contracted (acctnum price)) price (0 0)+    (enc "hash" c nc nb-0 price price (pubk hash-0))+    (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c))))))+  (label 139)+  (parent 129)+  (seen 147)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc acctnum price goods nb-0 text)+    (b m c hash hash-0 hash-1 name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum price) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-1))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 1) (4 0)) ((1 3) (0 2))+    ((2 0) (1 0)) ((2 2) (3 0)) ((2 4) (1 2)) ((3 1) (0 0))+    ((4 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0)+    (privk hash-1))+  (uniq-orig nb nc price)+  (operation nonce-test (added-strand bank 2) price (0 0)+    (enc "hash" c nc nb-0 price price (pubk hash-0))+    (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b)) (enc nc price (pubk c))))))+  (label 140)+  (parent 129)+  (seen 128)+  (unrealized (0 0) (4 0))+  (comment "2 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc price acctnum goods nb-0 text) (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (1 0))+    ((2 2) (3 0)) ((2 4) (1 2)) ((3 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nb nc price)+  (operation nonce-test (contracted (acctnum-0 acctnum)) price (0 0)+    (enc "hash" c nc nb-0 price price (pubk hash-0))+    (enc nc price m price (pubk c))+    (enc c nc price acctnum price (pubk b)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c))))))+  (label 141)+  (parent 130)+  (seen 119)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nb nc price acctnum goods nb-0 text)+    (b m c hash hash-0 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))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm nm) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (1 0))+    ((2 2) (3 0)) ((2 4) (1 2)) ((3 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nm nb nc)+  (operation nonce-test (contracted (acctnum-0 acctnum)) nm (0 0)+    (enc "hash" c nc nb-0 nm price (pubk hash-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)))+    ((recv (enc c nc nm acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c))))))+  (label 142)+  (parent 131)+  (seen 123)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc acctnum price goods nm price-0 text)+    (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum price) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (3 0))+    ((2 2) (4 0)) ((2 4) (1 2)) ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nb nc price nm)+  (operation nonce-test (added-strand customer 3) price (4 0)+    (enc nc price m price (pubk c)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))))+  (label 143)+  (parent 133)+  (unrealized (0 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc acctnum price goods nm price-0 nb-0 text)+    (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum price) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (3 0))+    ((2 2) (4 0)) ((2 4) (1 2)) ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nb nc price nm)+  (operation nonce-test (added-strand customer 3) price (4 0)+    (enc nc price m price (pubk c)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c))))))+  (label 144)+  (parent 134)+  (seen 143 150)+  (unrealized (0 0))+  (comment "7 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc acctnum price acctnum-0 goods nm price-0 nb-0 text)+    (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum-0) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (3 0))+    ((2 2) (4 0)) ((2 4) (1 2)) ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nb nc price nm)+  (operation nonce-test (added-strand customer 3) price (4 0)+    (enc nc price m price (pubk c)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum-0 price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c))))+    ((recv (enc c nc price acctnum-0 price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c))))))+  (label 145)+  (parent 135)+  (seen 143 150)+  (unrealized (0 0))+  (comment "7 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nb nc acctnum price acctnum-0 goods nm-0 price-0 nb-0 text)+    (b m c hash hash-0 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-0) (nb nb) (nc nc) (nm nm)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm-0) (goods goods) (price price-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum acctnum-0) (nc nc) (nm nm) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (3 0))+    ((2 2) (4 0)) ((2 4) (1 2)) ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nm nb nc nm-0)+  (operation nonce-test (added-strand customer 3) nm (4 0)+    (enc nc nm m price (pubk c)))+  (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-0 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)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c))))+    ((recv (enc c nc nm acctnum-0 price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c))))))+  (label 146)+  (parent 137)+  (unrealized (0 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc price goods text) (b m c hash name))+  (defstrand bank 3 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum price) (nb nb) (nc nc) (nm price)+    (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 nb nc price)+  (operation generalization deleted (3 0))+  (traces+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))))+  (label 147)+  (parent 138)+  (seen 119)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc price goods nm price-0 text) (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum price) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (3 0))+    ((2 2) (4 0)) ((2 4) (1 2)) ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nb nc price nm)+  (operation nonce-test (contracted (acctnum price)) price (0 0)+    (enc "hash" c nc price price price (pubk hash-0))+    (enc nc price (pubk c)) (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-0))+            (privk b)) (enc nc price (pubk c))))))+  (label 148)+  (parent 143)+  (seen 138)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc price goods nm price-0 nb-0 text)+    (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum price) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum price) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (3 0))+    ((2 2) (4 0)) ((2 4) (1 2)) ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nb nc price nm)+  (operation nonce-test (contracted (acctnum price)) price (0 0)+    (enc "hash" c nc nb-0 price price (pubk hash-0))+    (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c))))))+  (label 149)+  (parent 144)+  (seen 139)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc acctnum price goods nm price-0 nb-0 text)+    (b m c hash hash-0 hash-1 name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum price) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (defstrand bank 2 (acctnum price) (nc nc) (nm price) (nb price)+    (price price) (b b) (c c) (hash hash-1))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 1) (5 0)) ((1 3) (0 2))+    ((2 0) (3 0)) ((2 2) (4 0)) ((2 4) (1 2)) ((3 1) (1 0))+    ((4 1) (0 0)) ((5 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0)+    (privk hash-1))+  (uniq-orig nb nc price nm)+  (operation nonce-test (added-strand bank 2) price (0 0)+    (enc "hash" c nc nb-0 price price (pubk hash-0))+    (enc nc price m price (pubk c))+    (enc c nc price price price (pubk b)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price price price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc price price price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc price price price (pubk hash-1))+            (privk b)) (enc nc price (pubk c))))))+  (label 150)+  (parent 144)+  (seen 143)+  (unrealized (0 0) (5 0))+  (comment "2 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nb nc price acctnum goods nm price-0 nb-0 text)+    (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (nc nc) (nm price) (nb nb)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (nb nb) (nc nc) (nm price) (goods goods)+    (price price) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum) (nb nb) (nc nc) (nm price)+    (goods goods) (price price) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (nc nc) (nm nm) (goods goods) (price price-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm price) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (3 0))+    ((2 2) (4 0)) ((2 4) (1 2)) ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nb nc price nm)+  (operation nonce-test (contracted (acctnum-0 acctnum)) price (0 0)+    (enc "hash" c nc nb-0 price price (pubk hash-0))+    (enc nc price m price (pubk c))+    (enc c nc price acctnum price (pubk b)))+  (traces+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (recv (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc price m price (pubk c)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb))+      (send (enc (enc "hash" b m nb price (pubk hash)) (privk m))))+    ((send (enc c nc goods (pubk m)))+      (recv (enc nc price m price (pubk c)))+      (send (enc c nc price acctnum price (pubk b)))+      (recv+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          (enc nc nb (pubk c))))+      (send+        (cat+          (enc (enc "hash" c nc nb price price (pubk hash)) (privk b))+          nb)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm m price-0 (pubk c))))+    ((recv (enc c nc price acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 price price (pubk hash-0))+            (privk b)) (enc nc nb-0 (pubk c))))))+  (label 151)+  (parent 145)+  (seen 141)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (nm nb nc price acctnum goods nm-0 price-0 nb-0 text)+    (b m c hash hash-0 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))+  (defstrand merchant 2 (nc nc) (nm nm-0) (goods goods) (price price-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum acctnum) (nc nc) (nm nm) (nb nb-0)+    (price price) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (3 0))+    ((2 2) (4 0)) ((2 4) (1 2)) ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nm nb nc nm-0)+  (operation nonce-test (contracted (acctnum-0 acctnum)) nm (0 0)+    (enc "hash" c nc nb-0 nm price (pubk hash-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)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c))))+    ((recv (enc c nc nm acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c))))))+  (label 152)+  (parent 146)+  (seen 142)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(comment "Nothing left to do")
+ tst/ffgg.scm view
@@ -0,0 +1,23 @@+;;; The ffgg  Protocol++(defprotocol ffgg basic+  (defrole init (vars (a b name) (n1 n2 m x y text))+    (trace+     (send a)+     (recv (cat b n1 n2))+     (send (cat a (enc n1 n2 m (pubk b))))+     (recv (cat n1 x (enc x y n1 (pubk b))))))+  (defrole resp (vars (b a name) (n1 n2 x y text))+    (trace+     (recv a)+     (send (cat b n1 n2))+     (recv (cat a (enc n1 x y (pubk b))))+     (send (cat n1 x (enc x y n1 (pubk b)))))+    (uniq-orig n1 n2)))++(defskeleton ffgg+  (vars (b name) (n1 n2 m text))+  (defstrand init 4 (b b) (m m))+  (deflistener m)+  (uniq-orig m)+  (non-orig (privk b)))
+ tst/ffgg.tst view
@@ -0,0 +1,117 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol ffgg basic+  (defrole init+    (vars (a b name) (n1 n2 m x y text))+    (trace (send a) (recv (cat b n1 n2))+      (send (cat a (enc n1 n2 m (pubk b))))+      (recv (cat n1 x (enc x y n1 (pubk b))))))+  (defrole resp+    (vars (b a name) (n1 n2 x y text))+    (trace (recv a) (send (cat b n1 n2))+      (recv (cat a (enc n1 x y (pubk b))))+      (send (cat n1 x (enc x y n1 (pubk b)))))+    (uniq-orig n1 n2)))++(defskeleton ffgg+  (vars (m n1 n2 x y text) (b a name))+  (defstrand init 4 (n1 n1) (n2 n2) (m m) (x x) (y y) (a a) (b b))+  (deflistener m)+  (non-orig (privk b))+  (uniq-orig m)+  (traces+    ((send a) (recv (cat b n1 n2)) (send (cat a (enc n1 n2 m (pubk b))))+      (recv (cat n1 x (enc x y n1 (pubk b))))) ((recv m) (send m)))+  (label 0)+  (unrealized (1 0)))++(defskeleton ffgg+  (vars (m n1 n2 x y text) (b a name))+  (defstrand init 4 (n1 n1) (n2 n2) (m m) (x x) (y y) (a a) (b b))+  (deflistener m)+  (precedes ((0 2) (1 0)))+  (non-orig (privk b))+  (uniq-orig m)+  (traces+    ((send a) (recv (cat b n1 n2)) (send (cat a (enc n1 n2 m (pubk b))))+      (recv (cat n1 x (enc x y n1 (pubk b))))) ((recv m) (send m)))+  (label 1)+  (parent 0)+  (unrealized (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton ffgg+  (vars (m n1 n2 x y n2-0 text) (b a a-0 name))+  (defstrand init 4 (n1 n1) (n2 n2) (m m) (x x) (y y) (a a) (b b))+  (deflistener m)+  (defstrand resp 4 (n1 n1) (n2 n2-0) (x n2) (y m) (b b) (a a-0))+  (precedes ((0 2) (2 2)) ((2 1) (0 1)) ((2 3) (1 0)))+  (non-orig (privk b))+  (uniq-orig m n1 n2-0)+  (operation nonce-test (added-strand resp 4) m (1 0)+    (enc n1 n2 m (pubk b)))+  (traces+    ((send a) (recv (cat b n1 n2)) (send (cat a (enc n1 n2 m (pubk b))))+      (recv (cat n1 x (enc x y n1 (pubk b))))) ((recv m) (send m))+    ((recv a-0) (send (cat b n1 n2-0))+      (recv (cat a-0 (enc n1 n2 m (pubk b))))+      (send (cat n1 n2 (enc n2 m n1 (pubk b))))))+  (label 2)+  (parent 1)+  (unrealized (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton ffgg+  (vars (m n1 n2 x y n2-0 n2-1 text) (b a a-0 a-1 name))+  (defstrand init 4 (n1 n1) (n2 n2) (m m) (x x) (y y) (a a) (b b))+  (deflistener m)+  (defstrand resp 4 (n1 n1) (n2 n2-0) (x n2) (y m) (b b) (a a-0))+  (defstrand resp 4 (n1 n2) (n2 n2-1) (x m) (y n1) (b b) (a a-1))+  (precedes ((0 2) (2 2)) ((0 2) (3 2)) ((2 1) (0 1)) ((2 3) (1 0))+    ((3 1) (0 1)) ((3 3) (1 0)))+  (non-orig (privk b))+  (uniq-orig m n1 n2 n2-0 n2-1)+  (operation nonce-test (added-strand resp 4) m (1 0)+    (enc n1 n2 m (pubk b)) (enc n2 m n1 (pubk b)))+  (traces+    ((send a) (recv (cat b n1 n2)) (send (cat a (enc n1 n2 m (pubk b))))+      (recv (cat n1 x (enc x y n1 (pubk b))))) ((recv m) (send m))+    ((recv a-0) (send (cat b n1 n2-0))+      (recv (cat a-0 (enc n1 n2 m (pubk b))))+      (send (cat n1 n2 (enc n2 m n1 (pubk b)))))+    ((recv a-1) (send (cat b n2 n2-1))+      (recv (cat a-1 (enc n2 m n1 (pubk b))))+      (send (cat n2 m (enc m n1 n2 (pubk b))))))+  (label 3)+  (parent 2)+  (unrealized (3 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton ffgg+  (vars (m n1 n2 x y n2-0 n2-1 text) (b a a-0 a-1 name))+  (defstrand init 4 (n1 n1) (n2 n2) (m m) (x x) (y y) (a a) (b b))+  (deflistener m)+  (defstrand resp 4 (n1 n1) (n2 n2-0) (x n2) (y m) (b b) (a a-0))+  (defstrand resp 4 (n1 n2) (n2 n2-1) (x m) (y n1) (b b) (a a-1))+  (precedes ((0 2) (2 2)) ((2 1) (0 1)) ((2 3) (3 2)) ((3 1) (0 1))+    ((3 3) (1 0)))+  (non-orig (privk b))+  (uniq-orig m n1 n2 n2-0 n2-1)+  (operation nonce-test (added-strand resp 4) m (3 2)+    (enc n1 n2 m (pubk b)))+  (traces+    ((send a) (recv (cat b n1 n2)) (send (cat a (enc n1 n2 m (pubk b))))+      (recv (cat n1 x (enc x y n1 (pubk b))))) ((recv m) (send m))+    ((recv a-0) (send (cat b n1 n2-0))+      (recv (cat a-0 (enc n1 n2 m (pubk b))))+      (send (cat n1 n2 (enc n2 m n1 (pubk b)))))+    ((recv a-1) (send (cat b n2 n2-1))+      (recv (cat a-1 (enc n2 m n1 (pubk b))))+      (send (cat n2 m (enc m n1 n2 (pubk b))))))+  (label 4)+  (parent 3)+  (unrealized)+  (shape))++(comment "Nothing left to do")
+ tst/isoreject.scm view
@@ -0,0 +1,22 @@+(defprotocol isoreject basic+  (defrole init (vars (a b name) (na nb nc text))+    (trace+     (send (cat a na))+     (recv (enc nb na a (privk b)))+     (send (enc nc nb b (privk a)))))+  (defrole resp (vars (a b name) (na nb nc text))+    (trace+     (recv (cat a na))+     (send (enc nb na a (privk b)))+     (recv (enc nc nb b (privk a))))+    (uniq-orig nb)))++(defskeleton isoreject+  (vars (a b name))+  (defstrand resp 3 (a a) (b b))+  (non-orig (privk a) (privk b)))++(defskeleton isoreject+  (vars (b name))+  (defstrand init 3 (b b))+  (non-orig (privk b)))
+ tst/isoreject.tst view
@@ -0,0 +1,143 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol isoreject basic+  (defrole init+    (vars (a b name) (na nb nc text))+    (trace (send (cat a na)) (recv (enc nb na a (privk b)))+      (send (enc nc nb b (privk a)))))+  (defrole resp+    (vars (a b name) (na nb nc text))+    (trace (recv (cat a na)) (send (enc nb na a (privk b)))+      (recv (enc nc nb b (privk a))))+    (uniq-orig nb)))++(defskeleton isoreject+  (vars (na nb nc text) (a b name))+  (defstrand resp 3 (na na) (nb nb) (nc nc) (a a) (b b))+  (non-orig (privk a) (privk b))+  (uniq-orig nb)+  (traces+    ((recv (cat a na)) (send (enc nb na a (privk b)))+      (recv (enc nc nb b (privk a)))))+  (label 0)+  (unrealized (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton isoreject+  (vars (na nb nc na-0 text) (a b name))+  (defstrand resp 3 (na na) (nb nb) (nc nc) (a a) (b b))+  (defstrand init 3 (na na-0) (nb nb) (nc nc) (a a) (b b))+  (precedes ((0 1) (1 1)) ((1 2) (0 2)))+  (non-orig (privk a) (privk b))+  (uniq-orig nb)+  (operation encryption-test (added-strand init 3)+    (enc nc nb b (privk a)) (0 2))+  (traces+    ((recv (cat a na)) (send (enc nb na a (privk b)))+      (recv (enc nc nb b (privk a))))+    ((send (cat a na-0)) (recv (enc nb na-0 a (privk b)))+      (send (enc nc nb b (privk a)))))+  (label 1)+  (parent 0)+  (unrealized (1 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton isoreject+  (vars (na nb nc text) (a b name))+  (defstrand resp 3 (na na) (nb nb) (nc nc) (a a) (b b))+  (defstrand resp 2 (na nb) (nb nc) (a b) (b a))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (privk a) (privk b))+  (uniq-orig nb nc)+  (operation encryption-test (added-strand resp 2)+    (enc nc nb b (privk a)) (0 2))+  (traces+    ((recv (cat a na)) (send (enc nb na a (privk b)))+      (recv (enc nc nb b (privk a))))+    ((recv (cat b nb)) (send (enc nc nb b (privk a)))))+  (label 2)+  (parent 0)+  (unrealized)+  (shape))++(defskeleton isoreject+  (vars (na nb nc text) (a b name))+  (defstrand resp 3 (na na) (nb nb) (nc nc) (a a) (b b))+  (defstrand init 3 (na na) (nb nb) (nc nc) (a a) (b b))+  (precedes ((0 1) (1 1)) ((1 2) (0 2)))+  (non-orig (privk a) (privk b))+  (uniq-orig nb)+  (operation encryption-test (added-strand resp 2)+    (enc nb na a (privk b)) (1 1))+  (traces+    ((recv (cat a na)) (send (enc nb na a (privk b)))+      (recv (enc nc nb b (privk a))))+    ((send (cat a na)) (recv (enc nb na a (privk b)))+      (send (enc nc nb b (privk a)))))+  (label 3)+  (parent 1)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol isoreject basic+  (defrole init+    (vars (a b name) (na nb nc text))+    (trace (send (cat a na)) (recv (enc nb na a (privk b)))+      (send (enc nc nb b (privk a)))))+  (defrole resp+    (vars (a b name) (na nb nc text))+    (trace (recv (cat a na)) (send (enc nb na a (privk b)))+      (recv (enc nc nb b (privk a))))+    (uniq-orig nb)))++(defskeleton isoreject+  (vars (na nb nc text) (b a name))+  (defstrand init 3 (na na) (nb nb) (nc nc) (a a) (b b))+  (non-orig (privk b))+  (traces+    ((send (cat a na)) (recv (enc nb na a (privk b)))+      (send (enc nc nb b (privk a)))))+  (label 4)+  (unrealized (0 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton isoreject+  (vars (na nb nc na-0 text) (b a name))+  (defstrand init 3 (na na) (nb nb) (nc nc) (a a) (b b))+  (defstrand init 3 (na na-0) (nb na) (nc nb) (a b) (b a))+  (precedes ((1 2) (0 1)))+  (non-orig (privk b))+  (operation encryption-test (added-strand init 3)+    (enc nb na a (privk b)) (0 1))+  (traces+    ((send (cat a na)) (recv (enc nb na a (privk b)))+      (send (enc nc nb b (privk a))))+    ((send (cat b na-0)) (recv (enc na na-0 b (privk a)))+      (send (enc nb na a (privk b)))))+  (label 5)+  (parent 4)+  (unrealized)+  (shape))++(defskeleton isoreject+  (vars (na nb nc text) (b a name))+  (defstrand init 3 (na na) (nb nb) (nc nc) (a a) (b b))+  (defstrand resp 2 (na na) (nb nb) (a a) (b b))+  (precedes ((1 1) (0 1)))+  (non-orig (privk b))+  (uniq-orig nb)+  (operation encryption-test (added-strand resp 2)+    (enc nb na a (privk b)) (0 1))+  (traces+    ((send (cat a na)) (recv (enc nb na a (privk b)))+      (send (enc nc nb b (privk a))))+    ((recv (cat a na)) (send (enc nb na a (privk b)))))+  (label 6)+  (parent 4)+  (unrealized)+  (shape))++(comment "Nothing left to do")
+ tst/kelly1.scm view
@@ -0,0 +1,84 @@+;;An attestation protocol containing a client, a server, and an appraiser.++;;The client is attempting to verify that the server he receives his+;;content from is the server he wishes to communicate with, and that the+;;server meets some policy.++;;The appraiser acquires measurements from the server to determine the+;;policy, and passes the resulting policy on to the client. The server's+;;public key is used to identify the server.++;;The server is verifying nothing about his surroundings, and will+;;answer both measurement and content inquiries from anyone.++;;When analyzing this protocol, it is assumes that the client knows some+;;appraiser he trusts; the client analysis should contain non privk(A).++(defprotocol kelly1 basic++  (defrole client+    (vars (C name) (A name) (S name) (Ns text) (request text) (Check text)  (policy text) (response text))+    (trace++   ;;non = ();+  ;; uniq = ();++     (send (cat C S request))+     (recv (cat S C (enc (cat response Ns)+			 (privk S))))+     (send (cat C A Check (pubk S)))+     (recv (cat A C (enc (cat policy (pubk S) Ns)+			 (privk A))))+      )+    )++  (defrole appraiser+    (vars (C name) (A name) (S name) (N text) (Ns text) (hello text)+	  (Quote text) (measurements text) (Check text) (policy text)+	  (AIK name))+   ;;non = (privk(A);privk(AIK));+    ;;uniq = (N);+    (trace+     (recv (cat S A hello))+     (send (cat A S N))+     (recv (cat S A+		(enc+		 (cat Quote measurements N Ns (pubk S))+		 (privk AIK))+		(pubk S)))+     (recv (cat C A Check (pubk S)))+     (send (cat A C (enc (cat policy (pubk S) Ns)+			 (privk A))))+      )+    (non-orig (privk A) (privk AIK))+    (uniq-orig N)+    )++  (defrole server+    (vars (C name) (A name) (S name) (N text) (Ns text) (hello text)+	  (Quote text) (measurements text) (request text) (response text)+	  (AIK name))+    ;;non = (privk(S);privk(AIK));+   ;;uniq = (Ns);+   (trace+      (send (cat S A hello))+      (recv (cat A S N))+      (send (cat S A+		 (enc+		  (cat Quote measurements N Ns (pubk S))+		  (privk AIK))+		 (pubk S)))+      (recv (cat C S request))+      (send (cat S C (enc (cat response Ns)+			  (privk S))))+      )+   (non-orig  (privk S) (privk AIK))+   (uniq-orig  Ns)+   )+)++(defskeleton kelly1+  (vars (A name))+  (defstrand client 4 (A A))+  (non-orig (privk A))+  )
+ tst/kelly1.tst view
@@ -0,0 +1,147 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol kelly1 basic+  (defrole client+    (vars (C A S name) (Ns request Check policy response text))+    (trace (send (cat C S request))+      (recv (cat S C (enc response Ns (privk S))))+      (send (cat C A Check (pubk S)))+      (recv (cat A C (enc policy (pubk S) Ns (privk A))))))+  (defrole appraiser+    (vars (C A S name) (N Ns hello Quote measurements Check policy text)+      (AIK name))+    (trace (recv (cat S A hello)) (send (cat A S N))+      (recv+        (cat S A (enc Quote measurements N Ns (pubk S) (privk AIK))+          (pubk S))) (recv (cat C A Check (pubk S)))+      (send (cat A C (enc policy (pubk S) Ns (privk A)))))+    (non-orig (privk A) (privk AIK))+    (uniq-orig N))+  (defrole server+    (vars (C A S name)+      (N Ns hello Quote measurements request response text) (AIK name))+    (trace (send (cat S A hello)) (recv (cat A S N))+      (send+        (cat S A (enc Quote measurements N Ns (pubk S) (privk AIK))+          (pubk S))) (recv (cat C S request))+      (send (cat S C (enc response Ns (privk S)))))+    (non-orig (privk S) (privk AIK))+    (uniq-orig Ns)))++(defskeleton kelly1+  (vars (Ns request Check policy response text) (A C S name))+  (defstrand client 4 (Ns Ns) (request request) (Check Check)+    (policy policy) (response response) (C C) (A A) (S S))+  (non-orig (privk A))+  (traces+    ((send (cat C S request))+      (recv (cat S C (enc response Ns (privk S))))+      (send (cat C A Check (pubk S)))+      (recv (cat A C (enc policy (pubk S) Ns (privk A))))))+  (label 0)+  (unrealized (0 3))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton kelly1+  (vars+    (Ns request Check policy response N hello Quote measurements Check-0+      text) (A C S C-0 AIK name))+  (defstrand client 4 (Ns Ns) (request request) (Check Check)+    (policy policy) (response response) (C C) (A A) (S S))+  (defstrand appraiser 5 (N N) (Ns Ns) (hello hello) (Quote Quote)+    (measurements measurements) (Check Check-0) (policy policy) (C C-0)+    (A A) (S S) (AIK AIK))+  (precedes ((1 4) (0 3)))+  (non-orig (privk A) (privk AIK))+  (uniq-orig N)+  (operation encryption-test (added-strand appraiser 5)+    (enc policy (pubk S) Ns (privk A)) (0 3))+  (traces+    ((send (cat C S request))+      (recv (cat S C (enc response Ns (privk S))))+      (send (cat C A Check (pubk S)))+      (recv (cat A C (enc policy (pubk S) Ns (privk A)))))+    ((recv (cat S A hello)) (send (cat A S N))+      (recv+        (cat S A (enc Quote measurements N Ns (pubk S) (privk AIK))+          (pubk S))) (recv (cat C-0 A Check-0 (pubk S)))+      (send (cat A C-0 (enc policy (pubk S) Ns (privk A))))))+  (label 1)+  (parent 0)+  (unrealized (1 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton kelly1+  (vars+    (Ns request Check policy response N hello Quote measurements Check-0+      hello-0 text) (A C S C-0 AIK A-0 name))+  (defstrand client 4 (Ns Ns) (request request) (Check Check)+    (policy policy) (response response) (C C) (A A) (S S))+  (defstrand appraiser 5 (N N) (Ns Ns) (hello hello) (Quote Quote)+    (measurements measurements) (Check Check-0) (policy policy) (C C-0)+    (A A) (S S) (AIK AIK))+  (defstrand server 3 (N N) (Ns Ns) (hello hello-0) (Quote Quote)+    (measurements measurements) (A A-0) (S S) (AIK AIK))+  (precedes ((1 1) (2 1)) ((1 4) (0 3)) ((2 2) (0 1)) ((2 2) (1 2)))+  (non-orig (privk A) (privk S) (privk AIK))+  (uniq-orig Ns N)+  (operation encryption-test (added-strand server 3)+    (enc Quote measurements N Ns (pubk S) (privk AIK)) (1 2))+  (traces+    ((send (cat C S request))+      (recv (cat S C (enc response Ns (privk S))))+      (send (cat C A Check (pubk S)))+      (recv (cat A C (enc policy (pubk S) Ns (privk A)))))+    ((recv (cat S A hello)) (send (cat A S N))+      (recv+        (cat S A (enc Quote measurements N Ns (pubk S) (privk AIK))+          (pubk S))) (recv (cat C-0 A Check-0 (pubk S)))+      (send (cat A C-0 (enc policy (pubk S) Ns (privk A)))))+    ((send (cat S A-0 hello-0)) (recv (cat A-0 S N))+      (send+        (cat S A-0 (enc Quote measurements N Ns (pubk S) (privk AIK))+          (pubk S)))))+  (label 2)+  (parent 1)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton kelly1+  (vars+    (Ns request Check policy response hello Check-0 N hello-0 Quote+      measurements request-0 text) (A C S C-0 C-1 A-0 AIK name))+  (defstrand client 4 (Ns Ns) (request request) (Check Check)+    (policy policy) (response response) (C C) (A A) (S S))+  (defstrand appraiser 5 (N N) (Ns Ns) (hello hello) (Quote Quote)+    (measurements measurements) (Check Check-0) (policy policy) (C C-0)+    (A A) (S S) (AIK AIK))+  (defstrand server 5 (N N) (Ns Ns) (hello hello-0) (Quote Quote)+    (measurements measurements) (request request-0) (response response)+    (C C-1) (A A-0) (S S) (AIK AIK))+  (precedes ((1 1) (2 1)) ((1 4) (0 3)) ((2 2) (1 2)) ((2 4) (0 1)))+  (non-orig (privk A) (privk S) (privk AIK))+  (uniq-orig Ns N)+  (operation encryption-test (added-strand server 5)+    (enc response Ns (privk S)) (0 1))+  (traces+    ((send (cat C S request))+      (recv (cat S C (enc response Ns (privk S))))+      (send (cat C A Check (pubk S)))+      (recv (cat A C (enc policy (pubk S) Ns (privk A)))))+    ((recv (cat S A hello)) (send (cat A S N))+      (recv+        (cat S A (enc Quote measurements N Ns (pubk S) (privk AIK))+          (pubk S))) (recv (cat C-0 A Check-0 (pubk S)))+      (send (cat A C-0 (enc policy (pubk S) Ns (privk A)))))+    ((send (cat S A-0 hello-0)) (recv (cat A-0 S N))+      (send+        (cat S A-0 (enc Quote measurements N Ns (pubk S) (privk AIK))+          (pubk S))) (recv (cat C-1 S request-0))+      (send (cat S C-1 (enc response Ns (privk S))))))+  (label 3)+  (parent 2)+  (unrealized)+  (shape))++(comment "Nothing left to do")
+ tst/kelly64.lisp view
@@ -0,0 +1,127 @@+;; Kelly's 64-shape protocol++(defprotocol kelly64 basic+  (defrole client+    (vars (C name) (A name) (S name) (AIKC name) (NC text)+	  (hello text) (Quote text) (mc text) (request text)+	  (response text) (Check text) (P2 text))+    (trace+     (send (cat C A hello))+     (recv (cat A C NC))+     (send (cat C A (enc+		     (cat Quote mc NC+			  (enc+			   (pubk C)+			   (privk C)))+		     (privk AIKC))+		(enc+		 (pubk C)+		 (privk C))))+     (send (cat C S+		(enc (cat request request)+		     (privk C))))+     (recv (cat S C+		(enc response+		     (privk S))))+     (send (cat C A Check (pubk S)))+     (recv (cat A C+		(enc (cat P2 (pubk S))+		     (privk A)))))+    (non-orig (privk C) (privk AIKC) (privk A))+    )+  ;;   non = (privk(C);privk(AIKC);privk(A));+  ;;   uniq = ();++  (defrole appraiser+    (vars (C name) (A name) (S name) (AIKS name) (AIKC name)+	  (NS text) (NC text) (hello text)(Quote text)+	  (ms text)(mc text)(Check text)(P1 text)(P2 text))+    (trace++     (recv (cat S A hello))+     (send (cat A S NS))+     (recv (cat S A+		(enc+		 (cat Quote ms NS+		      (enc (pubk S)+			   (privk S)))+		 (privk AIKS))+		(enc+		 (pubk S)+		 (privk S))))+     (recv (cat C A hello))+     (send (cat A C NC))+     (recv (cat C A (enc+		     (cat Quote mc NC (enc+				       (pubk C)+				       (privk C)))+		     (privk AIKC))+		(enc+		 (pubk C)+		 (privk C))))+     (recv (cat S A  Check (pubk C)))+     (send (cat A S (enc+		     (cat P1 (pubk C))+		     (privk A))))+     (recv (cat C A Check (pubk S)))+     (send (cat A C (enc+		     (cat P2 (pubk S))+		     (privk A))))+     )+    (non-orig (privk A) (privk AIKS) (privk AIKC))+    (uniq-orig NS NC)+    ;;   non = (privk(A);privk(AIKS);privk(AIKC));+    ;;   uniq = (NS;NC);+    )++  (defrole server+    (vars (C name) (A name) (S name) (AIKS name) (NS text)+	  (hello text) (Quote text) (ms text) (request text)+	  (Check text) (P1 text) (response text))+    (trace+     ;;   non = (privk(S);privk(AIKS);privk(A));+     ;;  uniq = ();++     (send (cat S A hello))+     (recv (cat A S NS))+     (send (cat S A (enc+		     (cat Quote ms NS (enc+				       (pubk S)+				       (privk S)))+		     (privk AIKS))+		(enc+		 (pubk S)+		 (privk S))))+     (recv (cat C S (enc+		     (cat request request)+		     (privk C))))+     (send (cat S A Check (pubk C)))+     (recv (cat A S (enc+		     (cat P1 (pubk C))+		     (privk A))))+     (send (cat S C (enc+		     response+		     (privk S))))+     )+    (non-orig (privk S) (privk AIKS) (privk A))+    )++  )++(defskeleton kelly64+  (vars (C name) (A name) (S name) (AIKC name) (NC text)+	  (hello text) (Quote text) (mc text) (request text)+	  (response text) (Check text) (P2 text))+  (defstrand client 7 (C C) (A A) (S S) (AIKC AIKC)+    (NC NC) (hello hello) (Quote Quote) (mc mc)+    (request request) (response response) (Check Check) (P2 P2)))++(defskeleton kelly64+  (vars (C name) (A name) (S name) (AIKC name) (NC text)+	  (hello text) (Quote text) (mc text) (request text)+	  (response text) (Check text) (P1 text))+  (defstrand server 7 ))++(defskeleton kelly64+(vars)+  (defstrand appraiser 10))
+ tst/kerb5.lisp view
@@ -0,0 +1,94 @@+;; Kerberos 5 specification, taken from+;; http://www.lsv.ens-cachan.fr/spore/kerberos.html+;;+;; Ku in the original document has become pubk/privk U.+;; Since we cannot confirm with CPSA that T1 is between T1start and T1expire,+;; and since the purpose of T1 is to have a defined relationship with T1start+;; and T1expire, I am replacing T1 with (cat T1start T1expire). Ditto with T2.++(defprotocol kerb5 basic++  ;; U is the client's user (and, approximately, its principal.)+  (defrole client+    (vars (U name) (G name) (L1 text) (N1 text) (C name) (S name)+	  (L2 text) (N2 text) (Kcg skey) (T1start text) (T1expire text)+	  (Kag skey) (Kgs skey) (T2start text) (T2expire text)+	  (Kcs skey))+    (trace+     (send (cat U G L1 N1))+     (recv (cat U+		(enc (cat U C G Kcg T1start T1expire) Kag)+		(enc (cat G Kcg T1start T1expire) (pubk U))))+     (send (cat S+		L2+		N2+		(enc (cat U C G Kcg T1start T1expire) Kag)+		(enc (cat C T1start T1expire) Kcg)))+     (recv (cat U+		(enc (cat U C S Kcs T2start T2expire) Kgs)+		(enc (cat S Kcs T2start T2expire N2) Kcg)))+     (send (cat (enc (cat U C S Kcs T2start T2expire) Kgs)+		(enc (cat C T2start T2expire) Kcs)))+     (recv (enc (cat T2start T2expire) Kcs))+     )+    (uniq-orig N1 N2)+    (non-orig (privk U))+    )++;; A is the key distribution authority's principal; never used explicitly+;; Kag is a long-term shared key between A and G.+;; Kcg is the session key to be shared by C and G, created by A.+  (defrole authority+    (vars (U name) (G name) (C name) (L1 text) (N1 text)+	  (T1start text) (T1expire text) (Kag skey) (Kcg skey))+    (trace+     (recv (cat U G L1 N1))+     (send (cat U+		(enc (cat U C G Kcg T1start T1expire) Kag)+		(enc (cat G Kcg T1start T1expire) (pubk U))))+     )+    (uniq-orig Kcg)+    (non-orig Kag)+    )++;; G is the ticket granting server's principal.+;; Kag is a long-term shared key between A and G.+;; Kgs is a long-term shared key between G and S.+  (defrole granter+       (vars (U name) (G name) (C name) (S name) (L2 text) (N2 text)+	  (Kcg skey) (T1start text) (T1expire text) (Kag skey)+	  (Kgs skey) (T2start text) (T2expire text) (Kcs skey))+       (trace+	(recv (cat S+		   L2+		   N2+		   (enc (cat U C G Kcg T1start T1expire) Kag)+		   (enc (cat C T1start T1expire) Kcg)))+	(send (cat U+		   (enc (cat U C S Kcs T2start T2expire) Kgs)+		   (enc (cat S Kcs T2start T2expire N2) Kcg)))+	)+       (uniq-orig Kcs)+       (non-orig Kgs Kag)+    )++;; S is the principal of the server that C wishes to communicate with+;; Kgs is a long-term shared key between G and S.+  (defrole server+    (vars (U name) (C name) (S name) (Kgs skey) (T2start text)+	  (T2expire text) (Kcs skey))+    (trace+     (recv (cat (enc (cat U C S Kcs T2start T2expire) Kgs)+		(enc (cat C T2start T2expire) Kcs)))+     (send (enc (cat T2start T2expire) Kcs))+     )+    (uniq-orig )+    (non-orig Kgs)+    )++)++ (defskeleton kerb5+    (vars )+    (defstrand server 2)+    )
+ tst/kerberos.scm view
@@ -0,0 +1,37 @@+(defprotocol kerberos basic+  (defrole init+    (vars (a name) (b name) (ks name) (t text) (t-prime text) (l text) (k skey))+    (trace (send (cat a b))+      (recv+        (cat (enc (cat t l k b) (ltk a ks))+          (enc (cat t l k a) (ltk b ks))))+      (send (cat (enc (cat a t) k) (enc (cat t l k a) (ltk b ks))))+      (recv (enc t-prime k))))+  (defrole resp+    (vars (a name) (b name) (ks name) (t text) (t-prime text) (l text) (k skey))+    (trace (recv (cat (enc (cat a t) k) (enc (cat t l k a) (ltk b ks))))+      (send (enc t-prime k))))+  (defrole keyserver+    (vars (a name) (b name) (ks name) (t text) (l text) (k skey))+    (trace (recv (cat a b))+      (send+        (cat (enc (cat t l k b) (ltk a ks))+          (enc (cat t l k a) (ltk b ks))))) (uniq-orig k)))++; we'll observe two shapes resulting from these preskeletons+; because the keyserver can reverse a and b with no change+; in the protocol+(defskeleton kerberos+  (vars (a name) (b name) (ks name))+  (defstrand init 4 (a a) (b b) (ks ks))+  (non-orig (ltk a ks) (ltk b ks)))++(defskeleton kerberos+  (vars (a name) (b name) (ks name))+  (defstrand resp 2 (a a) (b b) (ks ks))+  (non-orig (ltk a ks) (ltk b ks)))++(defskeleton kerberos+  (vars (a name) (b name) (ks name))+  (defstrand keyserver 2 (a a) (b b) (ks ks))+  (non-orig (ltk a ks) (ltk b ks)))
+ tst/kerberos.tst view
@@ -0,0 +1,862 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol kerberos basic+  (defrole init+    (vars (a b ks name) (t t-prime l text) (k skey))+    (trace (send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k))))+  (defrole resp+    (vars (a b ks name) (t t-prime l text) (k skey))+    (trace (recv (cat (enc a t k) (enc t l k a (ltk b ks))))+      (send (enc t-prime k))))+  (defrole keyserver+    (vars (a b ks name) (t l text) (k skey))+    (trace (recv (cat a b))+      (send (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks)))))+    (uniq-orig k)))++(defskeleton kerberos+  (vars (t t-prime l text) (a b ks name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (non-orig (ltk a ks) (ltk b ks))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k))))+  (label 0)+  (unrealized (0 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l text) (a b ks name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (precedes ((1 1) (0 1)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation encryption-test (added-strand keyserver 2)+    (enc t l k b (ltk a ks)) (0 1))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat a b))+      (send (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))))+  (label 1)+  (parent 0)+  (unrealized (0 3))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l text) (a b ks name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a b) (b a) (ks ks) (k k))+  (precedes ((1 1) (0 1)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation encryption-test (added-strand keyserver 2)+    (enc t l k b (ltk a ks)) (0 1))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat b a))+      (send (cat (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks))))))+  (label 2)+  (parent 0)+  (unrealized (0 3))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l t-0 l-0 text) (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (defstrand resp 2 (t t-0) (t-prime t-prime) (l l-0) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (precedes ((1 1) (0 1)) ((1 1) (2 0)) ((2 1) (0 3)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation encryption-test (added-strand resp 2) (enc t-prime k)+    (0 3))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat a b))+      (send (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks)))))+    ((recv (cat (enc a-0 t-0 k) (enc t-0 l-0 k a-0 (ltk b-0 ks-0))))+      (send (enc t-prime k))))+  (label 3)+  (parent 1)+  (unrealized (2 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l text) (a b ks name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (deflistener k)+  (precedes ((1 1) (0 1)) ((1 1) (2 0)) ((2 1) (0 3)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation encryption-test (added-listener k) (enc t-prime k) (0 3))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat a b))+      (send (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks)))))+    ((recv k) (send k)))+  (label 4)+  (parent 1)+  (unrealized (2 0))+  (comment "empty cohort"))++(defskeleton kerberos+  (vars (t t-prime l t-0 l-0 text) (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a b) (b a) (ks ks) (k k))+  (defstrand resp 2 (t t-0) (t-prime t-prime) (l l-0) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (precedes ((1 1) (0 1)) ((1 1) (2 0)) ((2 1) (0 3)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation encryption-test (added-strand resp 2) (enc t-prime k)+    (0 3))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat b a))+      (send (cat (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))))+    ((recv (cat (enc a-0 t-0 k) (enc t-0 l-0 k a-0 (ltk b-0 ks-0))))+      (send (enc t-prime k))))+  (label 5)+  (parent 2)+  (unrealized (2 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l text) (a b ks name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a b) (b a) (ks ks) (k k))+  (deflistener k)+  (precedes ((1 1) (0 1)) ((1 1) (2 0)) ((2 1) (0 3)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation encryption-test (added-listener k) (enc t-prime k) (0 3))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat b a))+      (send (cat (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))))+    ((recv k) (send k)))+  (label 6)+  (parent 2)+  (unrealized (2 0))+  (comment "empty cohort"))++(defskeleton kerberos+  (vars (t t-prime l t-0 l-0 l-1 text)+    (a b ks a-0 b-0 ks-0 b-1 ks-1 name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (defstrand resp 2 (t t-0) (t-prime t-prime) (l l-0) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (defstrand init 3 (t t-0) (l l-1) (a a-0) (b b-1) (ks ks-1) (k k))+  (precedes ((1 1) (0 1)) ((1 1) (3 1)) ((2 1) (0 3)) ((3 2) (2 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation encryption-test (added-strand init 3) (enc a-0 t-0 k)+    (2 0))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat a b))+      (send (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks)))))+    ((recv (cat (enc a-0 t-0 k) (enc t-0 l-0 k a-0 (ltk b-0 ks-0))))+      (send (enc t-prime k)))+    ((send (cat a-0 b-1))+      (recv+        (cat (enc t-0 l-1 k b-1 (ltk a-0 ks-1))+          (enc t-0 l-1 k a-0 (ltk b-1 ks-1))))+      (send (cat (enc a-0 t-0 k) (enc t-0 l-1 k a-0 (ltk b-1 ks-1))))))+  (label 7)+  (parent 3)+  (unrealized (3 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l t-0 l-0 text) (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (defstrand resp 2 (t t-0) (t-prime t-prime) (l l-0) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (deflistener k)+  (precedes ((1 1) (0 1)) ((1 1) (3 0)) ((2 1) (0 3)) ((3 1) (2 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation encryption-test (added-listener k) (enc a-0 t-0 k) (2 0))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat a b))+      (send (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks)))))+    ((recv (cat (enc a-0 t-0 k) (enc t-0 l-0 k a-0 (ltk b-0 ks-0))))+      (send (enc t-prime k))) ((recv k) (send k)))+  (label 8)+  (parent 3)+  (unrealized (3 0))+  (comment "empty cohort"))++(defskeleton kerberos+  (vars (t t-prime l t-0 l-0 l-1 text)+    (a b ks a-0 b-0 ks-0 b-1 ks-1 name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a b) (b a) (ks ks) (k k))+  (defstrand resp 2 (t t-0) (t-prime t-prime) (l l-0) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (defstrand init 3 (t t-0) (l l-1) (a a-0) (b b-1) (ks ks-1) (k k))+  (precedes ((1 1) (0 1)) ((1 1) (3 1)) ((2 1) (0 3)) ((3 2) (2 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation encryption-test (added-strand init 3) (enc a-0 t-0 k)+    (2 0))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat b a))+      (send (cat (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))))+    ((recv (cat (enc a-0 t-0 k) (enc t-0 l-0 k a-0 (ltk b-0 ks-0))))+      (send (enc t-prime k)))+    ((send (cat a-0 b-1))+      (recv+        (cat (enc t-0 l-1 k b-1 (ltk a-0 ks-1))+          (enc t-0 l-1 k a-0 (ltk b-1 ks-1))))+      (send (cat (enc a-0 t-0 k) (enc t-0 l-1 k a-0 (ltk b-1 ks-1))))))+  (label 9)+  (parent 5)+  (unrealized (3 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l t-0 l-0 text) (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a b) (b a) (ks ks) (k k))+  (defstrand resp 2 (t t-0) (t-prime t-prime) (l l-0) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (deflistener k)+  (precedes ((1 1) (0 1)) ((1 1) (3 0)) ((2 1) (0 3)) ((3 1) (2 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation encryption-test (added-listener k) (enc a-0 t-0 k) (2 0))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat b a))+      (send (cat (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))))+    ((recv (cat (enc a-0 t-0 k) (enc t-0 l-0 k a-0 (ltk b-0 ks-0))))+      (send (enc t-prime k))) ((recv k) (send k)))+  (label 10)+  (parent 5)+  (unrealized (3 0))+  (comment "empty cohort"))++(defskeleton kerberos+  (vars (t t-prime l l-0 text) (a b ks b-0 ks-0 name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l-0) (a a) (b b-0)+    (ks ks-0) (k k))+  (defstrand init 3 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (precedes ((1 1) (0 1)) ((1 1) (3 1)) ((2 1) (0 3)) ((3 2) (2 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation nonce-test+    (contracted (a-0 a) (t-0 t) (b-1 b) (ks-1 ks) (l-1 l)) k (3 1)+    (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat a b))+      (send (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks)))))+    ((recv (cat (enc a t k) (enc t l-0 k a (ltk b-0 ks-0))))+      (send (enc t-prime k)))+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))))+  (label 11)+  (parent 7)+  (unrealized (2 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l l-0 text) (a b ks b-0 ks-0 name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l-0) (a b) (b b-0)+    (ks ks-0) (k k))+  (defstrand init 3 (t t) (l l) (a b) (b a) (ks ks) (k k))+  (precedes ((1 1) (0 1)) ((1 1) (3 1)) ((2 1) (0 3)) ((3 2) (2 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation nonce-test+    (contracted (a-0 b) (t-0 t) (b-1 a) (ks-1 ks) (l-1 l)) k (3 1)+    (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat a b))+      (send (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks)))))+    ((recv (cat (enc b t k) (enc t l-0 k b (ltk b-0 ks-0))))+      (send (enc t-prime k)))+    ((send (cat b a))+      (recv (cat (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks))))+      (send (cat (enc b t k) (enc t l k b (ltk a ks))))))+  (label 12)+  (parent 7)+  (unrealized (2 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l l-0 text) (a b ks b-0 ks-0 name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a b) (b a) (ks ks) (k k))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l-0) (a a) (b b-0)+    (ks ks-0) (k k))+  (defstrand init 3 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (precedes ((1 1) (0 1)) ((1 1) (3 1)) ((2 1) (0 3)) ((3 2) (2 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation nonce-test+    (contracted (a-0 a) (t-0 t) (b-1 b) (ks-1 ks) (l-1 l)) k (3 1)+    (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat b a))+      (send (cat (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))))+    ((recv (cat (enc a t k) (enc t l-0 k a (ltk b-0 ks-0))))+      (send (enc t-prime k)))+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))))+  (label 13)+  (parent 9)+  (unrealized (2 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l l-0 text) (a b ks b-0 ks-0 name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a b) (b a) (ks ks) (k k))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l-0) (a b) (b b-0)+    (ks ks-0) (k k))+  (defstrand init 3 (t t) (l l) (a b) (b a) (ks ks) (k k))+  (precedes ((1 1) (0 1)) ((1 1) (3 1)) ((2 1) (0 3)) ((3 2) (2 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation nonce-test+    (contracted (a-0 b) (t-0 t) (b-1 a) (ks-1 ks) (l-1 l)) k (3 1)+    (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat b a))+      (send (cat (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))))+    ((recv (cat (enc b t k) (enc t l-0 k b (ltk b-0 ks-0))))+      (send (enc t-prime k)))+    ((send (cat b a))+      (recv (cat (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks))))+      (send (cat (enc b t k) (enc t l k b (ltk a ks))))))+  (label 14)+  (parent 9)+  (unrealized (2 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l text) (a b ks name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand init 3 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (precedes ((1 1) (0 1)) ((1 1) (3 1)) ((2 1) (0 3)) ((3 2) (2 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation nonce-test (contracted (b-0 b) (ks-0 ks) (l-0 l)) k (2 0)+    (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat a b))+      (send (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks)))))+    ((recv (cat (enc a t k) (enc t l k a (ltk b ks))))+      (send (enc t-prime k)))+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))))+  (label 15)+  (parent 11)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l text) (a b ks name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l) (a b) (b a) (ks ks)+    (k k))+  (defstrand init 3 (t t) (l l) (a b) (b a) (ks ks) (k k))+  (precedes ((1 1) (0 1)) ((1 1) (3 1)) ((2 1) (0 3)) ((3 2) (2 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation nonce-test (contracted (b-0 a) (ks-0 ks) (l-0 l)) k (2 0)+    (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat a b))+      (send (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks)))))+    ((recv (cat (enc b t k) (enc t l k b (ltk a ks))))+      (send (enc t-prime k)))+    ((send (cat b a))+      (recv (cat (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks))))+      (send (cat (enc b t k) (enc t l k b (ltk a ks))))))+  (label 16)+  (parent 12)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l text) (a b ks name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a b) (b a) (ks ks) (k k))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand init 3 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (precedes ((1 1) (0 1)) ((1 1) (3 1)) ((2 1) (0 3)) ((3 2) (2 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation nonce-test (contracted (b-0 b) (ks-0 ks) (l-0 l)) k (2 0)+    (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat b a))+      (send (cat (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))))+    ((recv (cat (enc a t k) (enc t l k a (ltk b ks))))+      (send (enc t-prime k)))+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))))+  (label 17)+  (parent 13)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l text) (a b ks name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a b) (b a) (ks ks) (k k))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l) (a b) (b a) (ks ks)+    (k k))+  (defstrand init 3 (t t) (l l) (a b) (b a) (ks ks) (k k))+  (precedes ((1 1) (0 1)) ((1 1) (3 1)) ((2 1) (0 3)) ((3 2) (2 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation nonce-test (contracted (b-0 a) (ks-0 ks) (l-0 l)) k (2 0)+    (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat b a))+      (send (cat (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))))+    ((recv (cat (enc b t k) (enc t l k b (ltk a ks))))+      (send (enc t-prime k)))+    ((send (cat b a))+      (recv (cat (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks))))+      (send (cat (enc b t k) (enc t l k b (ltk a ks))))))+  (label 18)+  (parent 14)+  (seen 20)+  (unrealized)+  (shape)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l text) (a b ks name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (precedes ((0 2) (2 0)) ((1 1) (0 1)) ((2 1) (0 3)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation collapsed 3 0)+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat a b))+      (send (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks)))))+    ((recv (cat (enc a t k) (enc t l k a (ltk b ks))))+      (send (enc t-prime k))))+  (label 19)+  (parent 15)+  (unrealized)+  (shape))++(defskeleton kerberos+  (vars (t t-prime l text) (a ks name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b a) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a a) (b a) (ks ks) (k k))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l) (a a) (b a) (ks ks)+    (k k))+  (precedes ((0 2) (2 0)) ((1 1) (0 1)) ((2 1) (0 3)))+  (non-orig (ltk a ks))+  (uniq-orig k)+  (operation collapsed 3 0)+  (traces+    ((send (cat a a))+      (recv (cat (enc t l k a (ltk a ks)) (enc t l k a (ltk a ks))))+      (send (cat (enc a t k) (enc t l k a (ltk a ks))))+      (recv (enc t-prime k)))+    ((recv (cat a a))+      (send (cat (enc t l k a (ltk a ks)) (enc t l k a (ltk a ks)))))+    ((recv (cat (enc a t k) (enc t l k a (ltk a ks))))+      (send (enc t-prime k))))+  (label 20)+  (parent 16)+  (seen 19)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l text) (a b ks name) (k skey))+  (defstrand init 4 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a b) (b a) (ks ks) (k k))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (precedes ((0 2) (2 0)) ((1 1) (0 1)) ((2 1) (0 3)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation collapsed 3 0)+  (traces+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k)))+    ((recv (cat b a))+      (send (cat (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))))+    ((recv (cat (enc a t k) (enc t l k a (ltk b ks))))+      (send (enc t-prime k))))+  (label 21)+  (parent 17)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol kerberos basic+  (defrole init+    (vars (a b ks name) (t t-prime l text) (k skey))+    (trace (send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k))))+  (defrole resp+    (vars (a b ks name) (t t-prime l text) (k skey))+    (trace (recv (cat (enc a t k) (enc t l k a (ltk b ks))))+      (send (enc t-prime k))))+  (defrole keyserver+    (vars (a b ks name) (t l text) (k skey))+    (trace (recv (cat a b))+      (send (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks)))))+    (uniq-orig k)))++(defskeleton kerberos+  (vars (t t-prime l text) (a b ks name) (k skey))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (non-orig (ltk a ks) (ltk b ks))+  (traces+    ((recv (cat (enc a t k) (enc t l k a (ltk b ks))))+      (send (enc t-prime k))))+  (label 22)+  (unrealized (0 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l text) (a b ks name) (k skey))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a b) (b a) (ks ks) (k k))+  (precedes ((1 1) (0 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation encryption-test (added-strand keyserver 2)+    (enc t l k a (ltk b ks)) (0 0))+  (traces+    ((recv (cat (enc a t k) (enc t l k a (ltk b ks))))+      (send (enc t-prime k)))+    ((recv (cat b a))+      (send (cat (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks))))))+  (label 23)+  (parent 22)+  (unrealized (0 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l text) (a b ks name) (k skey))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (precedes ((1 1) (0 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation encryption-test (added-strand keyserver 2)+    (enc t l k a (ltk b ks)) (0 0))+  (traces+    ((recv (cat (enc a t k) (enc t l k a (ltk b ks))))+      (send (enc t-prime k)))+    ((recv (cat a b))+      (send (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))))+  (label 24)+  (parent 22)+  (unrealized (0 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l l-0 text) (a b ks b-0 ks-0 name) (k skey))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a b) (b a) (ks ks) (k k))+  (defstrand init 3 (t t) (l l-0) (a a) (b b-0) (ks ks-0) (k k))+  (precedes ((1 1) (2 1)) ((2 2) (0 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation encryption-test (added-strand init 3) (enc a t k) (0 0))+  (traces+    ((recv (cat (enc a t k) (enc t l k a (ltk b ks))))+      (send (enc t-prime k)))+    ((recv (cat b a))+      (send (cat (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))))+    ((send (cat a b-0))+      (recv+        (cat (enc t l-0 k b-0 (ltk a ks-0))+          (enc t l-0 k a (ltk b-0 ks-0))))+      (send (cat (enc a t k) (enc t l-0 k a (ltk b-0 ks-0))))))+  (label 25)+  (parent 23)+  (unrealized (2 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l text) (a b ks name) (k skey))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a b) (b a) (ks ks) (k k))+  (deflistener k)+  (precedes ((1 1) (2 0)) ((2 1) (0 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation encryption-test (added-listener k) (enc a t k) (0 0))+  (traces+    ((recv (cat (enc a t k) (enc t l k a (ltk b ks))))+      (send (enc t-prime k)))+    ((recv (cat b a))+      (send (cat (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))))+    ((recv k) (send k)))+  (label 26)+  (parent 23)+  (unrealized (2 0))+  (comment "empty cohort"))++(defskeleton kerberos+  (vars (t t-prime l l-0 text) (a b ks b-0 ks-0 name) (k skey))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (t t) (l l-0) (a a) (b b-0) (ks ks-0) (k k))+  (precedes ((1 1) (2 1)) ((2 2) (0 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation encryption-test (added-strand init 3) (enc a t k) (0 0))+  (traces+    ((recv (cat (enc a t k) (enc t l k a (ltk b ks))))+      (send (enc t-prime k)))+    ((recv (cat a b))+      (send (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks)))))+    ((send (cat a b-0))+      (recv+        (cat (enc t l-0 k b-0 (ltk a ks-0))+          (enc t l-0 k a (ltk b-0 ks-0))))+      (send (cat (enc a t k) (enc t l-0 k a (ltk b-0 ks-0))))))+  (label 27)+  (parent 24)+  (unrealized (2 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton kerberos+  (vars (t t-prime l text) (a b ks name) (k skey))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (deflistener k)+  (precedes ((1 1) (2 0)) ((2 1) (0 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation encryption-test (added-listener k) (enc a t k) (0 0))+  (traces+    ((recv (cat (enc a t k) (enc t l k a (ltk b ks))))+      (send (enc t-prime k)))+    ((recv (cat a b))+      (send (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks)))))+    ((recv k) (send k)))+  (label 28)+  (parent 24)+  (unrealized (2 0))+  (comment "empty cohort"))++(defskeleton kerberos+  (vars (t t-prime l text) (a b ks name) (k skey))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a b) (b a) (ks ks) (k k))+  (defstrand init 3 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (precedes ((1 1) (2 1)) ((2 2) (0 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation nonce-test (contracted (b-0 b) (ks-0 ks) (l-0 l)) k (2 1)+    (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))+  (traces+    ((recv (cat (enc a t k) (enc t l k a (ltk b ks))))+      (send (enc t-prime k)))+    ((recv (cat b a))+      (send (cat (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))))+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))))+  (label 29)+  (parent 25)+  (unrealized)+  (shape))++(defskeleton kerberos+  (vars (t t-prime l text) (a b ks name) (k skey))+  (defstrand resp 2 (t t) (t-prime t-prime) (l l) (a a) (b b) (ks ks)+    (k k))+  (defstrand keyserver 2 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (precedes ((1 1) (2 1)) ((2 2) (0 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (operation nonce-test (contracted (b-0 b) (ks-0 ks) (l-0 l)) k (2 1)+    (enc t l k a (ltk b ks)) (enc t l k b (ltk a ks)))+  (traces+    ((recv (cat (enc a t k) (enc t l k a (ltk b ks))))+      (send (enc t-prime k)))+    ((recv (cat a b))+      (send (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks)))))+    ((send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))))+  (label 30)+  (parent 27)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol kerberos basic+  (defrole init+    (vars (a b ks name) (t t-prime l text) (k skey))+    (trace (send (cat a b))+      (recv (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))+      (send (cat (enc a t k) (enc t l k a (ltk b ks))))+      (recv (enc t-prime k))))+  (defrole resp+    (vars (a b ks name) (t t-prime l text) (k skey))+    (trace (recv (cat (enc a t k) (enc t l k a (ltk b ks))))+      (send (enc t-prime k))))+  (defrole keyserver+    (vars (a b ks name) (t l text) (k skey))+    (trace (recv (cat a b))+      (send (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks)))))+    (uniq-orig k)))++(defskeleton kerberos+  (vars (t l text) (a b ks name) (k skey))+  (defstrand keyserver 2 (t t) (l l) (a a) (b b) (ks ks) (k k))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig k)+  (traces+    ((recv (cat a b))+      (send (cat (enc t l k b (ltk a ks)) (enc t l k a (ltk b ks))))))+  (label 31)+  (unrealized)+  (shape))++(comment "Nothing left to do")
+ tst/missing-contraction.scm view
@@ -0,0 +1,19 @@+(defprotocol missing-contraction basic+  (defrole sender+    (vars (m n text) (a b name))+    (trace +     (send (enc a m (pubk a)))+     (send (enc a n (pubk b)))))+  (defrole receiver+    (vars (m text) (a b name))+    (trace +     (recv (enc a m (pubk b))))))++(defskeleton missing-contraction+  (vars (m text) (a name))+  (defstrand sender 2 (m m) (a a))+  (defstrand receiver 1 (m m) (a a))+  (precedes ((0 1) (1 0)))+  (uniq-orig m)+  (non-orig (privk a)))+
+ tst/missing-contraction.tst view
@@ -0,0 +1,40 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol missing-contraction basic+  (defrole sender+    (vars (m n text) (a b name))+    (trace (send (enc a m (pubk a))) (send (enc a n (pubk b)))))+  (defrole receiver+    (vars (m text) (a b name))+    (trace (recv (enc a m (pubk b))))))++(defskeleton missing-contraction+  (vars (m n text) (a b b-0 name))+  (defstrand sender 2 (m m) (n n) (a a) (b b))+  (defstrand receiver 1 (m m) (a a) (b b-0))+  (precedes ((0 1) (1 0)))+  (non-orig (privk a))+  (uniq-orig m)+  (traces ((send (enc a m (pubk a))) (send (enc a n (pubk b))))+    ((recv (enc a m (pubk b-0)))))+  (label 0)+  (unrealized (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton missing-contraction+  (vars (m n text) (a b name))+  (defstrand sender 2 (m m) (n n) (a a) (b b))+  (defstrand receiver 1 (m m) (a a) (b a))+  (precedes ((0 1) (1 0)))+  (non-orig (privk a))+  (uniq-orig m)+  (operation nonce-test (contracted (b-0 a)) m (1 0) (enc a m (pubk a)))+  (traces ((send (enc a m (pubk a))) (send (enc a n (pubk b))))+    ((recv (enc a m (pubk a)))))+  (label 1)+  (parent 0)+  (unrealized)+  (shape))++(comment "Nothing left to do")
+ tst/neuman-stubblebine-alt.lisp view
@@ -0,0 +1,36 @@+;;; derived from the protocol description in the CPSA tst directory++(defprotocol neuman-stubblebine basic+  (defrole init+    (vars (a name) (b name) (ks name) (ra text) (rb text) (ltk-a-ks skey) (k skey) (tb text))+    (trace (send (cat a ra))+	   (recv (cat (enc (cat b ra k tb) ltk-a-ks) (enc (cat a k tb) (ltk b ks)) rb))+	   (send (cat (enc (cat a k tb) (ltk b ks)) (enc rb k)))))+  (defrole resp+    (vars (a name) (b name) (ks name) (ra text) (rb text) (k skey) (tb text))+    (trace (recv (cat a ra))+	   (send (cat b rb (enc (cat a ra tb) (ltk b ks))))+	   (recv (cat (enc (cat a k tb) (ltk b ks)) (enc rb k)))))+  (defrole keyserver+    (vars (a name) (b name) (ks name) (ra text) (rb text) (k skey) (tb text))+    (trace (recv (cat b rb (enc (cat a ra tb) (ltk b ks))))+	   (send (cat (enc (cat b ra k tb) (ltk a ks)) (enc (cat a k tb) (ltk b ks)) rb)))+    (uniq-orig k)))++(defskeleton neuman-stubblebine+  (vars (a name) (b name) (ks name) (ra text) (rb text))+  (defstrand init 3 (a a) (b b) (ks ks) (ra ra) (rb rb))+  (uniq-orig ra rb)+  (non-orig (ltk a ks) (ltk b ks)))++(defskeleton neuman-stubblebine+  (vars (a name) (b name) (ks name) (ra text) (rb text))+  (defstrand resp 3 (a a) (b b) (ks ks) (ra ra) (rb rb))+  (uniq-orig ra rb)+  (non-orig (ltk a ks) (ltk b ks)))++(defskeleton neuman-stubblebine+  (vars (a name) (b name) (ks name) (ra text) (rb text))+  (defstrand keyserver 2 (a a) (b b) (ks ks) (ra ra) (rb rb))+  (uniq-orig ra rb)+  (non-orig (ltk a ks) (ltk b ks)))
+ tst/neuman-stubblebine-reauth.lisp view
@@ -0,0 +1,42 @@+(defprotocol neuman-stubblebine basic+  (defrole init+    (vars (a name) (b name) (ks name) (ra text) (ra-prime text) (rb text) (rb-prime text) (k skey) (tb text))+    (trace (send (cat a ra))+	   (recv (cat (enc (cat b ra k tb) (ltk a ks)) (enc (cat a k tb) (ltk b ks)) rb))+	   (send (cat (enc (cat a k tb) (ltk b ks)) (enc rb k)))+	   (send (cat (enc (cat a k tb) (ltk b ks)) ra-prime))+	   (recv (cat rb-prime (enc ra-prime k)))+	   (send (enc rb-prime k))))+  (defrole resp+    (vars (a name) (b name) (ks name) (ra text) (ra-prime text) (rb text) (rb-prime text) (k skey) (tb text))+    (trace (recv (cat a ra))+	   (send (cat b rb (enc (cat a ra tb) (ltk b ks))))+	   (recv (cat (enc (cat a k tb) (ltk b ks)) (enc rb k)))+	   (recv (cat (enc (cat a k tb) (ltk b ks)) ra-prime))+	   (send (cat rb-prime (enc ra-prime k)))+	   (recv (enc rb-prime k))))+  (defrole keyserver+    (vars (a name) (b name) (ks name) (ra text) (rb text) (k skey) (tb text))+    (trace (recv (cat b rb (enc (cat a ra tb) (ltk b ks))))+	   (send (cat (enc (cat b ra k tb) (ltk a ks)) (enc (cat a k tb) (ltk b ks)) rb)))+    (uniq-orig k)))++;(defskeleton neuman-stubblebine+;  (vars (a name) (b name) (k skey) (ks name) (ra text) (rb text))+;  (defstrand init 6 (a a) (b b) (ks ks) (ra ra) (rb rb))+;  (deflistener k)+;  (uniq-orig ra rb)+;  (non-orig (ltk a ks) (ltk b ks)))++(defskeleton neuman-stubblebine+  (vars (a name) (b name) (ks name) (ra text) (rb text) (k skey))+  (defstrand resp 6 (a a) (b b) (ks ks) (ra ra) (rb rb) (k k))+ ; (deflistener k)+  (uniq-orig ra rb)+  (non-orig (ltk a ks) (ltk b ks)))++;(defskeleton neuman-stubblebine+;  (vars (a name) (b name) (ks name) (ra text) (rb text))+;  (defstrand keyserver 2 (a a) (b b) (ks ks) (ra ra) (rb rb))+;  (uniq-orig ra rb)+;  (non-orig (ltk a ks) (ltk b ks)))
+ tst/neuman-stubblebine-reauth.lsp view
@@ -0,0 +1,38 @@+(defprotocol neuman-stubblebine basic+  (defrole init (vars (a b ks name) (ra rb text) (k skey) (tb text))+    (trace+     (send (cat a ra))+     (recv (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb))+     (send (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (defrole resp (vars (a b ks name) (ra rb text) (k skey) (tb text))+    (trace+     (recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+     (recv (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (defrole init-reauth+    (vars (a b ks name) (ra-prime rb-prime text) (k skey) (tb text))+    (trace+     (recv (enc a k tb (ltk b ks)))+     (send (cat (enc a k tb (ltk b ks)) ra-prime))+     (recv (cat rb-prime (enc ra-prime k))) (send (enc rb-prime k))))+  (defrole resp-reauth+    (vars (a b ks name) (ra-prime rb-prime text) (k skey) (tb text))+    (trace+     (recv (cat (enc a k tb (ltk b ks)) ra-prime))+     (send (cat rb-prime (enc ra-prime k)))+     (recv (enc rb-prime k))))+  (defrole keyserver+    (vars (a b ks name) (ra rb text) (k skey) (tb text))+    (trace+     (recv (cat b rb (enc a ra tb (ltk b ks))))+     (send (cat (enc b ra k tb (ltk a ks))+		(enc a k tb (ltk b ks)) rb)))+    (uniq-orig k)))++(defskeleton neuman-stubblebine+  (vars (ra rb-0 tb rb text) (a b ks name) (k skey)+	(ra-prime rb-prime text))+  (defstrand resp 3 (a a) (b b) (ks ks) (ra ra) (rb rb) (k k) (tb tb))+  (defstrand resp-reauth 3 (a a) (b b) (ks ks) (k k) (ra-prime ra-prime)+    (rb-prime rb-prime))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb k ra-prime rb-prime))
+ tst/neuman-stubblebine-reauth.tst view
@@ -0,0 +1,4312 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol neuman-stubblebine basic+  (defrole init+    (vars (a b ks name) (ra rb text) (k skey) (tb text))+    (trace (send (cat a ra))+      (recv (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb))+      (send (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (defrole resp+    (vars (a b ks name) (ra rb text) (k skey) (tb text))+    (trace (recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (defrole init-reauth+    (vars (a b ks name) (ra-prime rb-prime text) (k skey) (tb text))+    (trace (recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-prime))+      (recv (cat rb-prime (enc ra-prime k))) (send (enc rb-prime k))))+  (defrole resp-reauth+    (vars (a b ks name) (ra-prime rb-prime text) (k skey) (tb text))+    (trace (recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k))))+  (defrole keyserver+    (vars (a b ks name) (ra rb text) (k skey) (tb text))+    (trace (recv (cat b rb (enc a ra tb (ltk b ks))))+      (send+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb)))+    (uniq-orig k)))++(defskeleton neuman-stubblebine+  (vars (ra tb rb ra-prime rb-prime tb-0 text) (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k))))+  (label 0)+  (unrealized (0 2) (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 text) (a b ks name)+    (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (precedes ((2 1) (0 2)) ((2 1) (1 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand keyserver 2)+    (enc a k tb-0 (ltk b ks)) (1 0))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0))))+  (label 1)+  (parent 0)+  (unrealized (0 2) (1 2) (2 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (precedes ((2 1) (0 2)) ((2 1) (1 0)) ((3 1) (2 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand resp 2)+    (enc a ra-0 tb-0 (ltk b ks)) (2 0))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks))))))+  (label 2)+  (parent 1)+  (unrealized (0 2) (1 2))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 tb-1 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-1) (rb rb-prime) (tb tb-1) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (precedes ((1 1) (4 1)) ((2 1) (0 2)) ((2 1) (1 0)) ((3 1) (2 0))+    ((4 2) (1 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init 3) (enc rb-prime k)+    (1 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((send (cat a-0 ra-1))+      (recv+        (cat (enc b-0 ra-1 k tb-1 (ltk a-0 ks-0))+          (enc a-0 k tb-1 (ltk b-0 ks-0)) rb-prime))+      (send (cat (enc a-0 k tb-1 (ltk b-0 ks-0)) (enc rb-prime k)))))+  (label 3)+  (parent 2)+  (unrealized (0 2) (4 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 tb-1 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-1)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((3 1) (2 0)) ((4 3) (1 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init-reauth 4)+    (enc rb-prime k) (1 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a-0 k tb-1 (ltk b-0 ks-0)))+      (send (cat (enc a-0 k tb-1 (ltk b-0 ks-0)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k))))+  (label 4)+  (parent 2)+  (unrealized (0 2) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 rb-2 tb-1 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-2) (tb tb-1)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((1 1) (4 0)) ((2 1) (0 2)) ((2 1) (1 0)) ((3 1) (2 0))+    ((4 1) (1 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand resp-reauth 2)+    (enc rb-prime k) (1 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (cat (enc a-0 k tb-1 (ltk b-0 ks-0)) rb-prime))+      (send (cat rb-2 (enc rb-prime k)))))+  (label 5)+  (parent 2)+  (unrealized (0 2) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (deflistener k)+  (precedes ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0)) ((3 1) (2 0))+    ((4 1) (1 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-listener k) (enc rb-prime k) (1 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv k) (send k)))+  (label 6)+  (parent 2)+  (unrealized (0 2) (4 0))+  (comment "empty cohort"))++(defskeleton neuman-stubblebine+  (vars (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (precedes ((1 1) (4 1)) ((2 1) (0 2)) ((2 1) (1 0)) ((3 1) (2 0))+    ((4 2) (1 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test+    (contracted (a-0 a) (b-0 b) (ks-0 ks) (ra-1 ra-0) (tb-1 tb-0)) k+    (4 1) (enc a k tb-0 (ltk b ks)) (enc b ra-0 k tb-0 (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb-0 (ltk b ks)) (enc rb-prime k)))))+  (label 7)+  (parent 3)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((3 1) (2 0)) ((4 3) (1 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test+    (contracted (a-0 a) (b-0 b) (ks-0 ks) (tb-1 tb-0)) k (4 0)+    (enc a k tb-0 (ltk b ks)) (enc b ra-0 k tb-0 (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k))))+  (label 8)+  (parent 4)+  (unrealized (0 2) (4 2))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 rb-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-2) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (precedes ((1 1) (4 0)) ((2 1) (0 2)) ((2 1) (1 0)) ((3 1) (2 0))+    ((4 1) (1 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test+    (contracted (a-0 a) (b-0 b) (ks-0 ks) (tb-1 tb-0)) k (4 0)+    (enc a k tb-0 (ltk b ks)) (enc b ra-0 k tb-0 (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) rb-prime))+      (send (cat rb-2 (enc rb-prime k)))))+  (label 9)+  (parent 5)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 text) (a b ks name)+    (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (precedes ((1 1) (4 1)) ((2 1) (0 2)) ((2 1) (1 0)) ((3 1) (2 0))+    ((4 2) (1 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand keyserver 2)+    (enc a k tb (ltk b ks)) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k)))))+  (label 10)+  (parent 7)+  (unrealized (0 2))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton neuman-stubblebine+  (vars+    (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 ra-2 tb-1 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-2) (rb ra-1) (tb tb-1) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 1)) ((3 1) (2 0)) ((4 3) (1 2)) ((5 2) (4 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init 3) (enc ra-1 k) (4 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((send (cat a-0 ra-2))+      (recv+        (cat (enc b-0 ra-2 k tb-1 (ltk a-0 ks-0))+          (enc a-0 k tb-1 (ltk b-0 ks-0)) ra-1))+      (send (cat (enc a-0 k tb-1 (ltk b-0 ks-0)) (enc ra-1 k)))))+  (label 11)+  (parent 8)+  (unrealized (0 2) (5 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars+    (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 ra-2 tb-1 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb-1)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((3 1) (2 0)) ((4 3) (1 2)) ((5 3) (4 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init-reauth 4) (enc ra-1 k)+    (4 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a-0 k tb-1 (ltk b-0 ks-0)))+      (send (cat (enc a-0 k tb-1 (ltk b-0 ks-0)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k))))+  (label 12)+  (parent 8)+  (unrealized (0 2) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars+    (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 rb-2 tb-1 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-1) (rb-prime rb-2) (tb tb-1)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((3 1) (2 0)) ((4 3) (1 2)) ((5 1) (4 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand resp-reauth 2) (enc ra-1 k)+    (4 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (cat (enc a-0 k tb-1 (ltk b-0 ks-0)) ra-1))+      (send (cat rb-2 (enc ra-1 k)))))+  (label 13)+  (parent 8)+  (unrealized (0 2) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (deflistener k)+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((3 1) (2 0)) ((4 3) (1 2)) ((5 1) (4 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-listener k) (enc ra-1 k) (4 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv k) (send k)))+  (label 14)+  (parent 8)+  (unrealized (0 2) (5 0))+  (comment "empty cohort"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 rb-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-2) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (precedes ((1 1) (4 0)) ((2 1) (0 2)) ((2 1) (1 0)) ((3 1) (2 0))+    ((4 1) (1 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand keyserver 2)+    (enc a k tb (ltk b ks)) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-2 (enc rb-prime k)))))+  (label 15)+  (parent 9)+  (unrealized (0 2))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init 3 (ra ra-1) (rb rb) (tb tb-0) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (precedes ((0 1) (5 1)) ((1 1) (4 1)) ((2 1) (1 0)) ((2 1) (5 1))+    ((3 1) (2 0)) ((4 2) (1 2)) ((5 2) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init 3) (enc rb k) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((send (cat a-0 ra-1))+      (recv+        (cat (enc b-0 ra-1 k tb-0 (ltk a-0 ks-0))+          (enc a-0 k tb-0 (ltk b-0 ks-0)) rb))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) (enc rb k)))))+  (label 16)+  (parent 10)+  (unrealized (5 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb-0)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 1)) ((2 1) (1 0)) ((2 1) (5 0))+    ((3 1) (2 0)) ((4 2) (1 2)) ((5 3) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init-reauth 4) (enc rb k)+    (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv (enc a-0 k tb-0 (ltk b-0 ks-0)))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k))))+  (label 17)+  (parent 10)+  (unrealized (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 rb-2 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp-reauth 2 (ra-prime rb) (rb-prime rb-2) (tb tb-0)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((0 1) (5 0)) ((1 1) (4 1)) ((2 1) (1 0)) ((2 1) (5 0))+    ((3 1) (2 0)) ((4 2) (1 2)) ((5 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand resp-reauth 2) (enc rb k)+    (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) rb))+      (send (cat rb-2 (enc rb k)))))+  (label 18)+  (parent 10)+  (unrealized (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 text) (a b ks name)+    (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (deflistener k)+  (precedes ((1 1) (4 1)) ((2 1) (1 0)) ((2 1) (5 0)) ((3 1) (2 0))+    ((4 2) (1 2)) ((5 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-listener k) (enc rb k) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv k) (send k)))+  (label 19)+  (parent 10)+  (unrealized (5 0))+  (comment "empty cohort"))++(defskeleton neuman-stubblebine+  (vars (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-1) (tb tb-0) (a a) (b b) (ks ks)+    (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 1)) ((3 1) (2 0)) ((4 3) (1 2)) ((5 2) (4 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test+    (contracted (a-0 a) (b-0 b) (ks-0 ks) (ra-2 ra-0) (tb-1 tb-0)) k+    (5 1) (enc a k tb-0 (ltk b ks)) (enc b ra-0 k tb-0 (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          ra-1)) (send (cat (enc a k tb-0 (ltk b ks)) (enc ra-1 k)))))+  (label 20)+  (parent 11)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 ra-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((3 1) (2 0)) ((4 3) (1 2)) ((5 3) (4 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test+    (contracted (a-0 a) (b-0 b) (ks-0 ks) (tb-1 tb-0)) k (5 0)+    (enc a k tb-0 (ltk b ks)) (enc b ra-0 k tb-0 (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k))))+  (label 21)+  (parent 12)+  (unrealized (0 2) (5 2))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 rb-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-1) (rb-prime rb-2) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((3 1) (2 0)) ((4 3) (1 2)) ((5 1) (4 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test+    (contracted (a-0 a) (b-0 b) (ks-0 ks) (tb-1 tb-0)) k (5 0)+    (enc a k tb-0 (ltk b ks)) (enc b ra-0 k tb-0 (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (send (cat rb-2 (enc ra-1 k)))))+  (label 22)+  (parent 13)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 rb-2 ra-1 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-2) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-1) (rb rb) (tb tb-0) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (precedes ((0 1) (5 1)) ((1 1) (4 0)) ((2 1) (1 0)) ((2 1) (5 1))+    ((3 1) (2 0)) ((4 1) (1 2)) ((5 2) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init 3) (enc rb k) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-2 (enc rb-prime k))))+    ((send (cat a-0 ra-1))+      (recv+        (cat (enc b-0 ra-1 k tb-0 (ltk a-0 ks-0))+          (enc a-0 k tb-0 (ltk b-0 ks-0)) rb))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) (enc rb k)))))+  (label 23)+  (parent 15)+  (unrealized (5 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 rb-2 ra-1 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-2) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb-0)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 0)) ((2 1) (1 0)) ((2 1) (5 0))+    ((3 1) (2 0)) ((4 1) (1 2)) ((5 3) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init-reauth 4) (enc rb k)+    (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-2 (enc rb-prime k))))+    ((recv (enc a-0 k tb-0 (ltk b-0 ks-0)))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k))))+  (label 24)+  (parent 15)+  (unrealized (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 rb-2 rb-3 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-2) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime rb) (rb-prime rb-3) (tb tb-0)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((0 1) (5 0)) ((1 1) (4 0)) ((2 1) (1 0)) ((2 1) (5 0))+    ((3 1) (2 0)) ((4 1) (1 2)) ((5 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand resp-reauth 2) (enc rb k)+    (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-2 (enc rb-prime k))))+    ((recv (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) rb))+      (send (cat rb-3 (enc rb k)))))+  (label 25)+  (parent 15)+  (unrealized (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 rb-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-2) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (deflistener k)+  (precedes ((1 1) (4 0)) ((2 1) (1 0)) ((2 1) (5 0)) ((3 1) (2 0))+    ((4 1) (1 2)) ((5 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-listener k) (enc rb k) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-2 (enc rb-prime k)))) ((recv k) (send k)))+  (label 26)+  (parent 15)+  (unrealized (5 0))+  (comment "empty cohort"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 text) (a b ks name)+    (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init 3 (ra ra-0) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (precedes ((0 1) (5 1)) ((1 1) (4 1)) ((2 1) (1 0)) ((2 1) (5 1))+    ((3 1) (2 0)) ((4 2) (1 2)) ((5 2) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test+    (contracted (a-0 a) (b-0 b) (ks-0 ks) (ra-1 ra-0) (tb-0 tb)) k (5 1)+    (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb))+      (send (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (label 27)+  (parent 16)+  (unrealized)+  (shape))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 1)) ((2 1) (1 0)) ((2 1) (5 0))+    ((3 1) (2 0)) ((4 2) (1 2)) ((5 3) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test (contracted (a-0 a) (b-0 b) (ks-0 ks) (tb-0 tb))+    k (5 0) (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k))))+  (label 28)+  (parent 17)+  (unrealized (5 2))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 rb-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp-reauth 2 (ra-prime rb) (rb-prime rb-2) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (precedes ((0 1) (5 0)) ((1 1) (4 1)) ((2 1) (1 0)) ((2 1) (5 0))+    ((3 1) (2 0)) ((4 2) (1 2)) ((5 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test (contracted (a-0 a) (b-0 b) (ks-0 ks) (tb-0 tb))+    k (5 0) (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv (cat (enc a k tb (ltk b ks)) rb))+      (send (cat rb-2 (enc rb k)))))+  (label 29)+  (parent 18)+  (unrealized)+  (shape)+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-1) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 1)) ((3 1) (2 0)) ((4 3) (1 2)) ((5 2) (4 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand keyserver 2)+    (enc a k tb (ltk b ks)) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-1))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-1 k)))))+  (label 30)+  (parent 20)+  (unrealized (0 2))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton neuman-stubblebine+  (vars+    (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 ra-2 ra-3 tb-1+      text) (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-3) (rb ra-2) (tb tb-1) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 1)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 3) (4 2)) ((6 2) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init 3) (enc ra-2 k) (5 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((send (cat a-0 ra-3))+      (recv+        (cat (enc b-0 ra-3 k tb-1 (ltk a-0 ks-0))+          (enc a-0 k tb-1 (ltk b-0 ks-0)) ra-2))+      (send (cat (enc a-0 k tb-1 (ltk b-0 ks-0)) (enc ra-2 k)))))+  (label 31)+  (parent 21)+  (unrealized (0 2) (6 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars+    (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 ra-2 ra-3 tb-1+      text) (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-3) (rb-prime ra-2) (tb tb-1)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 0)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 3) (4 2)) ((6 3) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init-reauth 4) (enc ra-2 k)+    (5 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((recv (enc a-0 k tb-1 (ltk b-0 ks-0)))+      (send (cat (enc a-0 k tb-1 (ltk b-0 ks-0)) ra-3))+      (recv (cat ra-2 (enc ra-3 k))) (send (enc ra-2 k))))+  (label 32)+  (parent 21)+  (unrealized (0 2) (6 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars+    (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 ra-2 rb-2 tb-1+      text) (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-2) (rb-prime rb-2) (tb tb-1)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 0)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 3) (4 2)) ((6 1) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand resp-reauth 2) (enc ra-2 k)+    (5 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((recv (cat (enc a-0 k tb-1 (ltk b-0 ks-0)) ra-2))+      (send (cat rb-2 (enc ra-2 k)))))+  (label 33)+  (parent 21)+  (unrealized (0 2) (6 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 ra-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (deflistener k)+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 0)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 3) (4 2)) ((6 1) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-listener k) (enc ra-2 k) (5 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((recv k) (send k)))+  (label 34)+  (parent 21)+  (unrealized (0 2) (6 0))+  (comment "empty cohort"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 rb-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-1) (rb-prime rb-2) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((3 1) (2 0)) ((4 3) (1 2)) ((5 1) (4 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand keyserver 2)+    (enc a k tb (ltk b ks)) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (cat (enc a k tb (ltk b ks)) ra-1))+      (send (cat rb-2 (enc ra-1 k)))))+  (label 35)+  (parent 22)+  (unrealized (0 2))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 rb-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-2) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (precedes ((0 1) (5 1)) ((1 1) (4 0)) ((2 1) (1 0)) ((2 1) (5 1))+    ((3 1) (2 0)) ((4 1) (1 2)) ((5 2) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test+    (contracted (a-0 a) (b-0 b) (ks-0 ks) (ra-1 ra-0) (tb-0 tb)) k (5 1)+    (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-2 (enc rb-prime k))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb))+      (send (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (label 36)+  (parent 23)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 rb-2 ra-1 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-2) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 0)) ((2 1) (1 0)) ((2 1) (5 0))+    ((3 1) (2 0)) ((4 1) (1 2)) ((5 3) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test (contracted (a-0 a) (b-0 b) (ks-0 ks) (tb-0 tb))+    k (5 0) (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-2 (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k))))+  (label 37)+  (parent 24)+  (unrealized (5 2))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 rb-2 rb-3 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-2) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime rb) (rb-prime rb-3) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (precedes ((0 1) (5 0)) ((1 1) (4 0)) ((2 1) (1 0)) ((2 1) (5 0))+    ((3 1) (2 0)) ((4 1) (1 2)) ((5 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test (contracted (a-0 a) (b-0 b) (ks-0 ks) (tb-0 tb))+    k (5 0) (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-2 (enc rb-prime k))))+    ((recv (cat (enc a k tb (ltk b ks)) rb))+      (send (cat rb-3 (enc rb k)))))+  (label 38)+  (parent 25)+  (unrealized)+  (shape)+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-2) (rb ra-1) (tb tb-0) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 1)) ((2 1) (1 0)) ((2 1) (5 0))+    ((2 1) (6 1)) ((3 1) (2 0)) ((4 2) (1 2)) ((5 3) (0 2))+    ((6 2) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init 3) (enc ra-1 k) (5 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k)))+    ((send (cat a-0 ra-2))+      (recv+        (cat (enc b-0 ra-2 k tb-0 (ltk a-0 ks-0))+          (enc a-0 k tb-0 (ltk b-0 ks-0)) ra-1))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) (enc ra-1 k)))))+  (label 39)+  (parent 28)+  (unrealized (6 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb-0)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 1)) ((2 1) (1 0)) ((2 1) (5 0))+    ((2 1) (6 0)) ((3 1) (2 0)) ((4 2) (1 2)) ((5 3) (0 2))+    ((6 3) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init-reauth 4) (enc ra-1 k)+    (5 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k)))+    ((recv (enc a-0 k tb-0 (ltk b-0 ks-0)))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k))))+  (label 40)+  (parent 28)+  (unrealized (6 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 rb-2 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-1) (rb-prime rb-2) (tb tb-0)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 1)) ((2 1) (1 0)) ((2 1) (5 0))+    ((2 1) (6 0)) ((3 1) (2 0)) ((4 2) (1 2)) ((5 3) (0 2))+    ((6 1) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand resp-reauth 2) (enc ra-1 k)+    (5 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k)))+    ((recv (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) ra-1))+      (send (cat rb-2 (enc ra-1 k)))))+  (label 41)+  (parent 28)+  (unrealized (6 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (deflistener k)+  (precedes ((0 1) (5 2)) ((1 1) (4 1)) ((2 1) (1 0)) ((2 1) (5 0))+    ((2 1) (6 0)) ((3 1) (2 0)) ((4 2) (1 2)) ((5 3) (0 2))+    ((6 1) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-listener k) (enc ra-1 k) (5 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k)))+    ((recv k) (send k)))+  (label 42)+  (parent 28)+  (unrealized (6 0))+  (comment "empty cohort"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb rb-0 rb-1 text) (a b ks name)+    (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init 3 (ra ra) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp-reauth 2 (ra-prime rb) (rb-prime rb-1) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (precedes ((0 1) (2 0)) ((1 1) (3 1)) ((2 1) (1 0)) ((2 1) (4 0))+    ((3 0) (0 0)) ((3 2) (1 2)) ((4 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation collapsed 3 0)+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra tb (ltk b ks))))+      (send+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb-0)))+    ((send (cat a ra))+      (recv+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv (cat (enc a k tb (ltk b ks)) rb))+      (send (cat rb-1 (enc rb k)))))+  (label 43)+  (parent 29)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra ra-prime rb-prime tb ra-0 rb rb-0 text) (a b ks name)+    (k skey))+  (defstrand resp 3 (ra ra) (rb ra-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)) ((1 1) (4 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 2) (1 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra ra-prime rb-prime k)+  (operation collapsed 5 1)+  (traces+    ((recv (cat a ra)) (send (cat b ra-prime (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc ra-prime k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb)))+    ((recv (cat a ra-0)) (send (cat b rb-0 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k)))))+  (label 44)+  (parent 29)+  (seen 66)+  (unrealized)+  (shape)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-1) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init 3 (ra ra-2) (rb rb) (tb tb-0) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (precedes ((0 1) (6 1)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 1)) ((2 1) (6 1)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 2) (4 2)) ((6 2) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init 3) (enc rb k) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-1))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-1 k))))+    ((send (cat a-0 ra-2))+      (recv+        (cat (enc b-0 ra-2 k tb-0 (ltk a-0 ks-0))+          (enc a-0 k tb-0 (ltk b-0 ks-0)) rb))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) (enc rb k)))))+  (label 45)+  (parent 30)+  (unrealized (6 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-1) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime rb) (tb tb-0)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((0 1) (6 2)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 1)) ((2 1) (6 0)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 2) (4 2)) ((6 3) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init-reauth 4) (enc rb k)+    (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-1))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-1 k))))+    ((recv (enc a-0 k tb-0 (ltk b-0 ks-0)))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) ra-2))+      (recv (cat rb (enc ra-2 k))) (send (enc rb k))))+  (label 46)+  (parent 30)+  (unrealized (6 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 rb-2 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-1) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp-reauth 2 (ra-prime rb) (rb-prime rb-2) (tb tb-0)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((0 1) (6 0)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 1)) ((2 1) (6 0)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 2) (4 2)) ((6 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand resp-reauth 2) (enc rb k)+    (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-1))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-1 k))))+    ((recv (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) rb))+      (send (cat rb-2 (enc rb k)))))+  (label 47)+  (parent 30)+  (unrealized (6 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-1) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (deflistener k)+  (precedes ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0)) ((2 1) (5 1))+    ((2 1) (6 0)) ((3 1) (2 0)) ((4 3) (1 2)) ((5 2) (4 2))+    ((6 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-listener k) (enc rb k) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-1))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-1 k))))+    ((recv k) (send k)))+  (label 48)+  (parent 30)+  (unrealized (6 0))+  (comment "empty cohort"))++(defskeleton neuman-stubblebine+  (vars (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 ra-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-2) (tb tb-0) (a a) (b b) (ks ks)+    (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 1)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 3) (4 2)) ((6 2) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test+    (contracted (a-0 a) (b-0 b) (ks-0 ks) (ra-3 ra-0) (tb-1 tb-0)) k+    (6 1) (enc a k tb-0 (ltk b ks)) (enc b ra-0 k tb-0 (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          ra-2)) (send (cat (enc a k tb-0 (ltk b ks)) (enc ra-2 k)))))+  (label 49)+  (parent 31)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars+    (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 ra-2 ra-3 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-3) (rb-prime ra-2) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 0)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 3) (4 2)) ((6 3) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test+    (contracted (a-0 a) (b-0 b) (ks-0 ks) (tb-1 tb-0)) k (6 0)+    (enc a k tb-0 (ltk b ks)) (enc b ra-0 k tb-0 (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-3))+      (recv (cat ra-2 (enc ra-3 k))) (send (enc ra-2 k))))+  (label 50)+  (parent 32)+  (unrealized (0 2) (6 2))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton neuman-stubblebine+  (vars+    (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 ra-2 rb-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-2) (rb-prime rb-2) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 0)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 3) (4 2)) ((6 1) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test+    (contracted (a-0 a) (b-0 b) (ks-0 ks) (tb-1 tb-0)) k (6 0)+    (enc a k tb-0 (ltk b ks)) (enc b ra-0 k tb-0 (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-2))+      (send (cat rb-2 (enc ra-2 k)))))+  (label 51)+  (parent 33)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars+    (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 rb-2 ra-2 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-1) (rb-prime rb-2) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-2) (rb rb) (tb tb-0) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (precedes ((0 1) (6 1)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 1)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 1) (4 2)) ((6 2) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init 3) (enc rb k) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (cat (enc a k tb (ltk b ks)) ra-1))+      (send (cat rb-2 (enc ra-1 k))))+    ((send (cat a-0 ra-2))+      (recv+        (cat (enc b-0 ra-2 k tb-0 (ltk a-0 ks-0))+          (enc a-0 k tb-0 (ltk b-0 ks-0)) rb))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) (enc rb k)))))+  (label 52)+  (parent 35)+  (unrealized (6 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars+    (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 rb-2 ra-2 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-1) (rb-prime rb-2) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime rb) (tb tb-0)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((0 1) (6 2)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 0)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 1) (4 2)) ((6 3) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init-reauth 4) (enc rb k)+    (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (cat (enc a k tb (ltk b ks)) ra-1))+      (send (cat rb-2 (enc ra-1 k))))+    ((recv (enc a-0 k tb-0 (ltk b-0 ks-0)))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) ra-2))+      (recv (cat rb (enc ra-2 k))) (send (enc rb k))))+  (label 53)+  (parent 35)+  (unrealized (6 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars+    (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 rb-2 rb-3 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-1) (rb-prime rb-2) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime rb) (rb-prime rb-3) (tb tb-0)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((0 1) (6 0)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 0)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 1) (4 2)) ((6 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand resp-reauth 2) (enc rb k)+    (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (cat (enc a k tb (ltk b ks)) ra-1))+      (send (cat rb-2 (enc ra-1 k))))+    ((recv (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) rb))+      (send (cat rb-3 (enc rb k)))))+  (label 54)+  (parent 35)+  (unrealized (6 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 rb-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-1) (rb-prime rb-2) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (deflistener k)+  (precedes ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0)) ((2 1) (5 0))+    ((2 1) (6 0)) ((3 1) (2 0)) ((4 3) (1 2)) ((5 1) (4 2))+    ((6 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-listener k) (enc rb k) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (cat (enc a k tb (ltk b ks)) ra-1))+      (send (cat rb-2 (enc ra-1 k)))) ((recv k) (send k)))+  (label 55)+  (parent 35)+  (unrealized (6 0))+  (comment "empty cohort"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb rb-0 rb-1 text) (a b ks name)+    (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-1) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (precedes ((0 1) (2 0)) ((1 1) (3 0)) ((2 1) (1 0)) ((2 1) (4 1))+    ((3 1) (1 2)) ((4 0) (0 0)) ((4 2) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation collapsed 3 0)+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra tb (ltk b ks))))+      (send+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb-0)))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-1 (enc rb-prime k))))+    ((send (cat a ra))+      (recv (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb))+      (send (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (label 56)+  (parent 36)+  (unrealized)+  (shape))++(defskeleton neuman-stubblebine+  (vars+    (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 rb-2 ra-1 ra-2 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-2) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-2) (rb ra-1) (tb tb-0) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 0)) ((2 1) (1 0)) ((2 1) (5 0))+    ((2 1) (6 1)) ((3 1) (2 0)) ((4 1) (1 2)) ((5 3) (0 2))+    ((6 2) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init 3) (enc ra-1 k) (5 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-2 (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k)))+    ((send (cat a-0 ra-2))+      (recv+        (cat (enc b-0 ra-2 k tb-0 (ltk a-0 ks-0))+          (enc a-0 k tb-0 (ltk b-0 ks-0)) ra-1))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) (enc ra-1 k)))))+  (label 57)+  (parent 37)+  (unrealized (6 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars+    (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 rb-2 ra-1 ra-2 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-2) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb-0)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 0)) ((2 1) (1 0)) ((2 1) (5 0))+    ((2 1) (6 0)) ((3 1) (2 0)) ((4 1) (1 2)) ((5 3) (0 2))+    ((6 3) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init-reauth 4) (enc ra-1 k)+    (5 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-2 (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k)))+    ((recv (enc a-0 k tb-0 (ltk b-0 ks-0)))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k))))+  (label 58)+  (parent 37)+  (unrealized (6 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars+    (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 rb-2 ra-1 rb-3 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-2) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-1) (rb-prime rb-3) (tb tb-0)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 0)) ((2 1) (1 0)) ((2 1) (5 0))+    ((2 1) (6 0)) ((3 1) (2 0)) ((4 1) (1 2)) ((5 3) (0 2))+    ((6 1) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand resp-reauth 2) (enc ra-1 k)+    (5 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-2 (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k)))+    ((recv (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) ra-1))+      (send (cat rb-3 (enc ra-1 k)))))+  (label 59)+  (parent 37)+  (unrealized (6 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 rb-2 ra-1 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-2) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (deflistener k)+  (precedes ((0 1) (5 2)) ((1 1) (4 0)) ((2 1) (1 0)) ((2 1) (5 0))+    ((2 1) (6 0)) ((3 1) (2 0)) ((4 1) (1 2)) ((5 3) (0 2))+    ((6 1) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-listener k) (enc ra-1 k) (5 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-2 (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k)))+    ((recv k) (send k)))+  (label 60)+  (parent 37)+  (unrealized (6 0))+  (comment "empty cohort"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb rb-0 rb-1 rb-2 text) (a b ks name)+    (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-1) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime rb) (rb-prime rb-2) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (precedes ((0 1) (2 0)) ((1 1) (3 0)) ((2 1) (1 0)) ((2 1) (4 0))+    ((3 1) (1 2)) ((4 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation collapsed 3 0)+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra tb (ltk b ks))))+      (send+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb-0)))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-1 (enc rb-prime k))))+    ((recv (cat (enc a k tb (ltk b ks)) rb))+      (send (cat rb-2 (enc rb k)))))+  (label 61)+  (parent 38)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra ra-prime rb-prime tb ra-0 rb rb-0 rb-1 text) (a b ks name)+    (k skey))+  (defstrand resp 3 (ra ra) (rb ra-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-1) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)) ((1 1) (4 0)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (1 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra ra-prime rb-prime k)+  (operation collapsed 5 1)+  (traces+    ((recv (cat a ra)) (send (cat b ra-prime (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc ra-prime k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb)))+    ((recv (cat a ra-0)) (send (cat b rb-0 (enc a ra-0 tb (ltk b ks)))))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-1 (enc rb-prime k)))))+  (label 62)+  (parent 38)+  (seen 82)+  (unrealized)+  (shape)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-1) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 1)) ((2 1) (1 0)) ((2 1) (5 0))+    ((2 1) (6 1)) ((3 1) (2 0)) ((4 2) (1 2)) ((5 3) (0 2))+    ((6 2) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test+    (contracted (a-0 a) (b-0 b) (ks-0 ks) (ra-2 ra-0) (tb-0 tb)) k (6 1)+    (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-1))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-1 k)))))+  (label 63)+  (parent 39)+  (unrealized)+  (shape))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 1)) ((2 1) (1 0)) ((2 1) (5 0))+    ((2 1) (6 0)) ((3 1) (2 0)) ((4 2) (1 2)) ((5 3) (0 2))+    ((6 3) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test (contracted (a-0 a) (b-0 b) (ks-0 ks) (tb-0 tb))+    k (6 0) (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k)))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k))))+  (label 64)+  (parent 40)+  (unrealized (6 2))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 rb-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-1) (rb-prime rb-2) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 1)) ((2 1) (1 0)) ((2 1) (5 0))+    ((2 1) (6 0)) ((3 1) (2 0)) ((4 2) (1 2)) ((5 3) (0 2))+    ((6 1) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test (contracted (a-0 a) (b-0 b) (ks-0 ks) (tb-0 tb))+    k (6 0) (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k)))+    ((recv (cat (enc a k tb (ltk b ks)) ra-1))+      (send (cat rb-2 (enc ra-1 k)))))+  (label 65)+  (parent 41)+  (unrealized)+  (shape)+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra ra-prime rb-prime tb rb text) (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb ra-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init 3 (ra ra) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (precedes ((0 1) (2 0)) ((1 1) (0 2)) ((1 1) (3 1)) ((2 1) (1 0))+    ((3 0) (0 0)) ((3 2) (1 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra ra-prime rb-prime k)+  (operation collapsed 4 1)+  (traces+    ((recv (cat a ra)) (send (cat b ra-prime (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc ra-prime k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb (enc a ra tb (ltk b ks))))+      (send+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb)))+    ((send (cat a ra))+      (recv+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k)))))+  (label 66)+  (parent 43)+  (unrealized)+  (shape))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-1) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init 3 (ra ra-0) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (precedes ((0 1) (6 1)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 1)) ((2 1) (6 1)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 2) (4 2)) ((6 2) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test+    (contracted (a-0 a) (b-0 b) (ks-0 ks) (ra-2 ra-0) (tb-0 tb)) k (6 1)+    (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-1))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-1 k))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb))+      (send (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (label 67)+  (parent 45)+  (unrealized)+  (shape))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-1) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (precedes ((0 1) (6 2)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 1)) ((2 1) (6 0)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 2) (4 2)) ((6 3) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test (contracted (a-0 a) (b-0 b) (ks-0 ks) (tb-0 tb))+    k (6 0) (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-1))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-1 k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-2))+      (recv (cat rb (enc ra-2 k))) (send (enc rb k))))+  (label 68)+  (parent 46)+  (unrealized (6 2))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 rb-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-1) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp-reauth 2 (ra-prime rb) (rb-prime rb-2) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (precedes ((0 1) (6 0)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 1)) ((2 1) (6 0)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 2) (4 2)) ((6 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test (contracted (a-0 a) (b-0 b) (ks-0 ks) (tb-0 tb))+    k (6 0) (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-1))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-1 k))))+    ((recv (cat (enc a k tb (ltk b ks)) rb))+      (send (cat rb-2 (enc rb k)))))+  (label 69)+  (parent 47)+  (unrealized)+  (shape)+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-2) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 1)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 3) (4 2)) ((6 2) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand keyserver 2)+    (enc a k tb (ltk b ks)) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-2))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-2 k)))))+  (label 70)+  (parent 49)+  (unrealized (0 2))+  (comment "4 in cohort - 4 not yet seen"))++(comment "Strand bound exceeded--aborting run")++(defskeleton neuman-stubblebine+  (vars+    (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 ra-2 ra-3 ra-4+      tb-1 text) (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-3) (rb-prime ra-2) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-4) (rb ra-3) (tb tb-1) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 0)) ((2 1) (7 1)) ((3 1) (2 0))+    ((4 3) (1 2)) ((5 3) (4 2)) ((6 3) (5 2)) ((7 2) (6 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init 3) (enc ra-3 k) (6 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-3))+      (recv (cat ra-2 (enc ra-3 k))) (send (enc ra-2 k)))+    ((send (cat a-0 ra-4))+      (recv+        (cat (enc b-0 ra-4 k tb-1 (ltk a-0 ks-0))+          (enc a-0 k tb-1 (ltk b-0 ks-0)) ra-3))+      (send (cat (enc a-0 k tb-1 (ltk b-0 ks-0)) (enc ra-3 k)))))+  (label 71)+  (parent 50)+  (unrealized (0 2) (7 1))+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars+    (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 ra-2 ra-3 ra-4+      tb-1 text) (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-3) (rb-prime ra-2) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-4) (rb-prime ra-3) (tb tb-1)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 0)) ((2 1) (7 0)) ((3 1) (2 0))+    ((4 3) (1 2)) ((5 3) (4 2)) ((6 3) (5 2)) ((7 3) (6 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init-reauth 4) (enc ra-3 k)+    (6 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-3))+      (recv (cat ra-2 (enc ra-3 k))) (send (enc ra-2 k)))+    ((recv (enc a-0 k tb-1 (ltk b-0 ks-0)))+      (send (cat (enc a-0 k tb-1 (ltk b-0 ks-0)) ra-4))+      (recv (cat ra-3 (enc ra-4 k))) (send (enc ra-3 k))))+  (label 72)+  (parent 50)+  (unrealized (0 2) (7 0))+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars+    (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 ra-2 ra-3 rb-2+      tb-1 text) (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-3) (rb-prime ra-2) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-3) (rb-prime rb-2) (tb tb-1)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 0)) ((2 1) (7 0)) ((3 1) (2 0))+    ((4 3) (1 2)) ((5 3) (4 2)) ((6 3) (5 2)) ((7 1) (6 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand resp-reauth 2) (enc ra-3 k)+    (6 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-3))+      (recv (cat ra-2 (enc ra-3 k))) (send (enc ra-2 k)))+    ((recv (cat (enc a-0 k tb-1 (ltk b-0 ks-0)) ra-3))+      (send (cat rb-2 (enc ra-3 k)))))+  (label 73)+  (parent 50)+  (unrealized (0 2) (7 0))+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars+    (ra tb rb ra-prime rb-prime tb-0 ra-0 rb-0 rb-1 ra-1 ra-2 ra-3 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb-0) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb-0) (a a) (b b)+    (ks ks) (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb-0) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-3) (rb-prime ra-2) (tb tb-0)+    (a a) (b b) (ks ks) (k k))+  (deflistener k)+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 0)) ((2 1) (7 0)) ((3 1) (2 0))+    ((4 3) (1 2)) ((5 3) (4 2)) ((6 3) (5 2)) ((7 1) (6 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-listener k) (enc ra-3 k) (6 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb-0 (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb-0 (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb-0 (ltk a ks)) (enc a k tb-0 (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb-0 (ltk b ks)))))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((recv (enc a k tb-0 (ltk b ks)))+      (send (cat (enc a k tb-0 (ltk b ks)) ra-3))+      (recv (cat ra-2 (enc ra-3 k))) (send (enc ra-2 k)))+    ((recv k) (send k)))+  (label 74)+  (parent 50)+  (unrealized (0 2) (7 0))+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 rb-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-2) (rb-prime rb-2) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (precedes ((1 1) (4 2)) ((2 1) (0 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 0)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 3) (4 2)) ((6 1) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand keyserver 2)+    (enc a k tb (ltk b ks)) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((recv (cat (enc a k tb (ltk b ks)) ra-2))+      (send (cat rb-2 (enc ra-2 k)))))+  (label 75)+  (parent 51)+  (unrealized (0 2))+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 rb-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-1) (rb-prime rb-2) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (precedes ((0 1) (6 1)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 1)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 1) (4 2)) ((6 2) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test+    (contracted (a-0 a) (b-0 b) (ks-0 ks) (ra-2 ra-0) (tb-0 tb)) k (6 1)+    (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (cat (enc a k tb (ltk b ks)) ra-1))+      (send (cat rb-2 (enc ra-1 k))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb))+      (send (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (label 76)+  (parent 52)+  (unrealized)+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 rb-2 ra-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-1) (rb-prime rb-2) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (precedes ((0 1) (6 2)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 0)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 1) (4 2)) ((6 3) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test (contracted (a-0 a) (b-0 b) (ks-0 ks) (tb-0 tb))+    k (6 0) (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (cat (enc a k tb (ltk b ks)) ra-1))+      (send (cat rb-2 (enc ra-1 k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-2))+      (recv (cat rb (enc ra-2 k))) (send (enc rb k))))+  (label 77)+  (parent 53)+  (unrealized (6 2))+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 rb-2 rb-3 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-1) (rb-prime rb-2) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime rb) (rb-prime rb-3) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (precedes ((0 1) (6 0)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 0)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 1) (4 2)) ((6 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test (contracted (a-0 a) (b-0 b) (ks-0 ks) (tb-0 tb))+    k (6 0) (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (cat (enc a k tb (ltk b ks)) ra-1))+      (send (cat rb-2 (enc ra-1 k))))+    ((recv (cat (enc a k tb (ltk b ks)) rb))+      (send (cat rb-3 (enc rb k)))))+  (label 78)+  (parent 54)+  (unrealized)+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 rb-2 ra-1 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-2) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-1) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 0)) ((2 1) (1 0)) ((2 1) (5 0))+    ((2 1) (6 1)) ((3 1) (2 0)) ((4 1) (1 2)) ((5 3) (0 2))+    ((6 2) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test+    (contracted (a-0 a) (b-0 b) (ks-0 ks) (ra-2 ra-0) (tb-0 tb)) k (6 1)+    (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-2 (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-1))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-1 k)))))+  (label 79)+  (parent 57)+  (unrealized)+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 rb-2 ra-1 ra-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-2) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 0)) ((2 1) (1 0)) ((2 1) (5 0))+    ((2 1) (6 0)) ((3 1) (2 0)) ((4 1) (1 2)) ((5 3) (0 2))+    ((6 3) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test (contracted (a-0 a) (b-0 b) (ks-0 ks) (tb-0 tb))+    k (6 0) (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-2 (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k)))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k))))+  (label 80)+  (parent 58)+  (unrealized (6 2))+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 rb-2 ra-1 rb-3 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-2) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-1) (rb-prime rb-3) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 0)) ((2 1) (1 0)) ((2 1) (5 0))+    ((2 1) (6 0)) ((3 1) (2 0)) ((4 1) (1 2)) ((5 3) (0 2))+    ((6 1) (5 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation nonce-test (contracted (a-0 a) (b-0 b) (ks-0 ks) (tb-0 tb))+    k (6 0) (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-2 (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k)))+    ((recv (cat (enc a k tb (ltk b ks)) ra-1))+      (send (cat rb-3 (enc ra-1 k)))))+  (label 81)+  (parent 59)+  (unrealized)+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars (ra ra-prime rb-prime tb rb rb-0 text) (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb ra-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp-reauth 2 (ra-prime rb-prime) (rb-prime rb-0) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (precedes ((0 1) (2 0)) ((1 1) (0 2)) ((1 1) (3 0)) ((2 1) (1 0))+    ((3 1) (1 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra ra-prime rb-prime k)+  (operation collapsed 4 1)+  (traces+    ((recv (cat a ra)) (send (cat b ra-prime (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc ra-prime k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb (enc a ra tb (ltk b ks))))+      (send+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb)))+    ((recv (cat (enc a k tb (ltk b ks)) rb-prime))+      (send (cat rb-0 (enc rb-prime k)))))+  (label 82)+  (parent 61)+  (unrealized)+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars+    (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 ra-3 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-3) (rb ra-2) (tb tb-0) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 1)) ((2 1) (1 0)) ((2 1) (5 0))+    ((2 1) (6 0)) ((2 1) (7 1)) ((3 1) (2 0)) ((4 2) (1 2))+    ((5 3) (0 2)) ((6 3) (5 2)) ((7 2) (6 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init 3) (enc ra-2 k) (6 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k)))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((send (cat a-0 ra-3))+      (recv+        (cat (enc b-0 ra-3 k tb-0 (ltk a-0 ks-0))+          (enc a-0 k tb-0 (ltk b-0 ks-0)) ra-2))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) (enc ra-2 k)))))+  (label 83)+  (parent 64)+  (unrealized (7 1))+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars+    (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 ra-3 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-3) (rb-prime ra-2) (tb tb-0)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 1)) ((2 1) (1 0)) ((2 1) (5 0))+    ((2 1) (6 0)) ((2 1) (7 0)) ((3 1) (2 0)) ((4 2) (1 2))+    ((5 3) (0 2)) ((6 3) (5 2)) ((7 3) (6 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init-reauth 4) (enc ra-2 k)+    (6 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k)))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((recv (enc a-0 k tb-0 (ltk b-0 ks-0)))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) ra-3))+      (recv (cat ra-2 (enc ra-3 k))) (send (enc ra-2 k))))+  (label 84)+  (parent 64)+  (unrealized (7 0))+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars+    (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 rb-2 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-2) (rb-prime rb-2) (tb tb-0)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 1)) ((2 1) (1 0)) ((2 1) (5 0))+    ((2 1) (6 0)) ((2 1) (7 0)) ((3 1) (2 0)) ((4 2) (1 2))+    ((5 3) (0 2)) ((6 3) (5 2)) ((7 1) (6 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand resp-reauth 2) (enc ra-2 k)+    (6 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k)))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((recv (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) ra-2))+      (send (cat rb-2 (enc ra-2 k)))))+  (label 85)+  (parent 64)+  (unrealized (7 0))+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (deflistener k)+  (precedes ((0 1) (5 2)) ((1 1) (4 1)) ((2 1) (1 0)) ((2 1) (5 0))+    ((2 1) (6 0)) ((2 1) (7 0)) ((3 1) (2 0)) ((4 2) (1 2))+    ((5 3) (0 2)) ((6 3) (5 2)) ((7 1) (6 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-listener k) (enc ra-2 k) (6 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb (enc ra-1 k))) (send (enc rb k)))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((recv k) (send k)))+  (label 86)+  (parent 64)+  (unrealized (7 0))+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb rb-0 ra-0 rb-1 text) (a b ks name)+    (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init 3 (ra ra) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-0) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-0) (rb-prime rb-1) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (precedes ((0 1) (2 0)) ((1 1) (3 1)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((3 0) (0 0)) ((3 2) (1 2)) ((4 3) (0 2))+    ((5 1) (4 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation collapsed 3 0)+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra tb (ltk b ks))))+      (send+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb-0)))+    ((send (cat a ra))+      (recv+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-0))+      (recv (cat rb (enc ra-0 k))) (send (enc rb k)))+    ((recv (cat (enc a k tb (ltk b ks)) ra-0))+      (send (cat rb-1 (enc ra-0 k)))))+  (label 87)+  (parent 65)+  (unrealized)+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 text) (a b ks name)+    (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-prime) (rb-prime rb) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (precedes ((0 1) (5 2)) ((1 1) (4 1)) ((1 1) (5 2)) ((2 1) (5 0))+    ((3 1) (2 0)) ((4 2) (1 2)) ((5 1) (1 0)) ((5 3) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation collapsed 6 1)+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-prime))+      (send (cat (enc a k tb (ltk b ks)) (enc rb-prime k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-prime))+      (recv (cat rb (enc ra-prime k))) (send (enc rb k))))+  (label 88)+  (parent 65)+  (unrealized)+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars+    (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 ra-3 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-1) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-3) (rb ra-2) (tb tb-0) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (precedes ((0 1) (6 2)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 1)) ((2 1) (6 0)) ((2 1) (7 1)) ((3 1) (2 0))+    ((4 3) (1 2)) ((5 2) (4 2)) ((6 3) (0 2)) ((7 2) (6 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init 3) (enc ra-2 k) (6 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-1))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-1 k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-2))+      (recv (cat rb (enc ra-2 k))) (send (enc rb k)))+    ((send (cat a-0 ra-3))+      (recv+        (cat (enc b-0 ra-3 k tb-0 (ltk a-0 ks-0))+          (enc a-0 k tb-0 (ltk b-0 ks-0)) ra-2))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) (enc ra-2 k)))))+  (label 89)+  (parent 68)+  (unrealized (7 1))+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars+    (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 ra-3 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-1) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-3) (rb-prime ra-2) (tb tb-0)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((0 1) (6 2)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 1)) ((2 1) (6 0)) ((2 1) (7 0)) ((3 1) (2 0))+    ((4 3) (1 2)) ((5 2) (4 2)) ((6 3) (0 2)) ((7 3) (6 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init-reauth 4) (enc ra-2 k)+    (6 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-1))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-1 k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-2))+      (recv (cat rb (enc ra-2 k))) (send (enc rb k)))+    ((recv (enc a-0 k tb-0 (ltk b-0 ks-0)))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) ra-3))+      (recv (cat ra-2 (enc ra-3 k))) (send (enc ra-2 k))))+  (label 90)+  (parent 68)+  (unrealized (7 0))+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars+    (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 rb-2 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-1) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime ra-2) (rb-prime rb-2) (tb tb-0)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((0 1) (6 2)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 1)) ((2 1) (6 0)) ((2 1) (7 0)) ((3 1) (2 0))+    ((4 3) (1 2)) ((5 2) (4 2)) ((6 3) (0 2)) ((7 1) (6 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand resp-reauth 2) (enc ra-2 k)+    (6 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-1))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-1 k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-2))+      (recv (cat rb (enc ra-2 k))) (send (enc rb k)))+    ((recv (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) ra-2))+      (send (cat rb-2 (enc ra-2 k)))))+  (label 91)+  (parent 68)+  (unrealized (7 0))+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-1) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime rb) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (deflistener k)+  (precedes ((0 1) (6 2)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 1)) ((2 1) (6 0)) ((2 1) (7 0)) ((3 1) (2 0))+    ((4 3) (1 2)) ((5 2) (4 2)) ((6 3) (0 2)) ((7 1) (6 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-listener k) (enc ra-2 k) (6 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-1))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-1 k))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-2))+      (recv (cat rb (enc ra-2 k))) (send (enc rb k)))+    ((recv k) (send k)))+  (label 92)+  (parent 68)+  (unrealized (7 0))+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb rb-0 ra-0 rb-1 text) (a b ks name)+    (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-0) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra) (rb ra-0) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 2 (ra-prime rb) (rb-prime rb-1) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (precedes ((0 1) (2 0)) ((1 1) (3 2)) ((2 1) (1 0)) ((2 1) (3 0))+    ((2 1) (4 1)) ((2 1) (5 0)) ((3 3) (1 2)) ((4 0) (0 0))+    ((4 2) (3 2)) ((5 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation collapsed 3 0)+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra tb (ltk b ks))))+      (send+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb-0)))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-0))+      (recv (cat rb-prime (enc ra-0 k))) (send (enc rb-prime k)))+    ((send (cat a ra))+      (recv+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-0))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-0 k))))+    ((recv (cat (enc a k tb (ltk b ks)) rb))+      (send (cat rb-1 (enc rb k)))))+  (label 93)+  (parent 69)+  (unrealized)+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars (ra ra-prime rb-prime tb ra-0 rb rb-0 ra-1 text) (a b ks name)+    (k skey))+  (defstrand resp 3 (ra ra) (rb ra-prime) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-1) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)) ((1 1) (4 2)) ((2 1) (1 0))+    ((2 1) (4 0)) ((2 1) (5 1)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 2) (4 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra ra-prime rb-prime k)+  (operation collapsed 6 1)+  (traces+    ((recv (cat a ra)) (send (cat b ra-prime (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc ra-prime k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb)))+    ((recv (cat a ra-0)) (send (cat b rb-0 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-1))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-1 k)))))+  (label 94)+  (parent 69)+  (unrealized)+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars+    (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 ra-3 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-2) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init 3 (ra ra-3) (rb rb) (tb tb-0) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (precedes ((0 1) (7 1)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 1)) ((2 1) (7 1)) ((3 1) (2 0))+    ((4 3) (1 2)) ((5 3) (4 2)) ((6 2) (5 2)) ((7 2) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init 3) (enc rb k) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-2))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-2 k))))+    ((send (cat a-0 ra-3))+      (recv+        (cat (enc b-0 ra-3 k tb-0 (ltk a-0 ks-0))+          (enc a-0 k tb-0 (ltk b-0 ks-0)) rb))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) (enc rb k)))))+  (label 95)+  (parent 70)+  (unrealized (7 1))+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars+    (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 ra-3 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-2) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init-reauth 4 (ra-prime ra-3) (rb-prime rb) (tb tb-0)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((0 1) (7 2)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 1)) ((2 1) (7 0)) ((3 1) (2 0))+    ((4 3) (1 2)) ((5 3) (4 2)) ((6 2) (5 2)) ((7 3) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand init-reauth 4) (enc rb k)+    (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-2))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-2 k))))+    ((recv (enc a-0 k tb-0 (ltk b-0 ks-0)))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) ra-3))+      (recv (cat rb (enc ra-3 k))) (send (enc rb k))))+  (label 96)+  (parent 70)+  (unrealized (7 0))+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars+    (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 rb-2 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-2) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp-reauth 2 (ra-prime rb) (rb-prime rb-2) (tb tb-0)+    (a a-0) (b b-0) (ks ks-0) (k k))+  (precedes ((0 1) (7 0)) ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0))+    ((2 1) (5 0)) ((2 1) (6 1)) ((2 1) (7 0)) ((3 1) (2 0))+    ((4 3) (1 2)) ((5 3) (4 2)) ((6 2) (5 2)) ((7 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-strand resp-reauth 2) (enc rb k)+    (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-2))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-2 k))))+    ((recv (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) rb))+      (send (cat rb-2 (enc rb k)))))+  (label 97)+  (parent 70)+  (unrealized (7 0))+  (comment "aborted"))++(defskeleton neuman-stubblebine+  (vars (ra rb ra-prime rb-prime tb ra-0 rb-0 rb-1 ra-1 ra-2 text)+    (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand resp-reauth 3 (ra-prime ra-prime) (rb-prime rb-prime)+    (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init-reauth 4 (ra-prime ra-1) (rb-prime rb-prime) (tb tb)+    (a a) (b b) (ks ks) (k k))+  (defstrand init-reauth 4 (ra-prime ra-2) (rb-prime ra-1) (tb tb) (a a)+    (b b) (ks ks) (k k))+  (defstrand init 3 (ra ra-0) (rb ra-2) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (deflistener k)+  (precedes ((1 1) (4 2)) ((2 1) (1 0)) ((2 1) (4 0)) ((2 1) (5 0))+    ((2 1) (6 1)) ((2 1) (7 0)) ((3 1) (2 0)) ((4 3) (1 2))+    ((5 3) (4 2)) ((6 2) (5 2)) ((7 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb ra-prime rb-prime k)+  (operation encryption-test (added-listener k) (enc rb k) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat (enc a k tb (ltk b ks)) ra-prime))+      (send (cat rb-prime (enc ra-prime k))) (recv (enc rb-prime k)))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-1))+      (recv (cat rb-prime (enc ra-1 k))) (send (enc rb-prime k)))+    ((recv (enc a k tb (ltk b ks)))+      (send (cat (enc a k tb (ltk b ks)) ra-2))+      (recv (cat ra-1 (enc ra-2 k))) (send (enc ra-1 k)))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) ra-2))+      (send (cat (enc a k tb (ltk b ks)) (enc ra-2 k))))+    ((recv k) (send k)))+  (label 98)+  (parent 70)+  (unrealized (7 0))+  (comment "aborted"))
+ tst/neuman-stubblebine.scm view
@@ -0,0 +1,37 @@+(defprotocol neuman-stubblebine basic+  (defrole init (vars (a b ks name) (ra rb text) (k skey) (tb text))+    (trace+     (send (cat a ra))+     (recv (cat (enc b ra k tb (ltk a ks))+		(enc a k tb (ltk b ks)) rb))+     (send (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (defrole resp (vars (a b ks name) (ra rb text) (k skey) (tb text))+    (trace+     (recv (cat a ra))+     (send (cat b rb (enc a ra tb (ltk b ks))))+     (recv (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (defrole keyserver+    (vars (a b ks name) (ra rb text) (k skey) (tb text))+    (trace+     (recv (cat b rb (enc a ra tb (ltk b ks))))+     (send (cat (enc b ra k tb (ltk a ks))+		(enc a k tb (ltk b ks)) rb)))+    (uniq-orig k)))++(defskeleton neuman-stubblebine+  (vars (a b ks name) (ra rb text))+  (defstrand init 3 (a a) (b b) (ks ks) (ra ra) (rb rb))+  (uniq-orig ra rb)+  (non-orig (ltk a ks) (ltk b ks)))++(defskeleton neuman-stubblebine+  (vars (a b ks name) (ra rb text))+  (defstrand resp 3 (a a) (b b) (ks ks) (ra ra) (rb rb))+  (uniq-orig ra rb)+  (non-orig (ltk a ks) (ltk b ks)))++(defskeleton neuman-stubblebine+  (vars (a b ks name) (ra rb text))+  (defstrand keyserver 2 (a a) (b b) (ks ks) (ra ra) (rb rb))+  (uniq-orig ra rb)+  (non-orig (ltk a ks) (ltk b ks)))
+ tst/neuman-stubblebine.tst view
@@ -0,0 +1,322 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol neuman-stubblebine basic+  (defrole init+    (vars (a b ks name) (ra rb text) (k skey) (tb text))+    (trace (send (cat a ra))+      (recv (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb))+      (send (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (defrole resp+    (vars (a b ks name) (ra rb text) (k skey) (tb text))+    (trace (recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (defrole keyserver+    (vars (a b ks name) (ra rb text) (k skey) (tb text))+    (trace (recv (cat b rb (enc a ra tb (ltk b ks))))+      (send+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb)))+    (uniq-orig k)))++(defskeleton neuman-stubblebine+  (vars (ra rb tb text) (a b ks name) (k skey))+  (defstrand init 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb)+  (traces+    ((send (cat a ra))+      (recv (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb))+      (send (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (label 0)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb tb rb-0 text) (a b ks name) (k skey))+  (defstrand init 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb k)+  (operation encryption-test (added-strand keyserver 2)+    (enc b ra k tb (ltk a ks)) (0 1))+  (traces+    ((send (cat a ra))+      (recv (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb))+      (send (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat b rb-0 (enc a ra tb (ltk b ks))))+      (send+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb-0))))+  (label 1)+  (parent 0)+  (unrealized (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb tb rb-0 rb-1 text) (a b ks name) (k skey))+  (defstrand init 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb k)+  (operation encryption-test (added-strand resp 2)+    (enc a ra tb (ltk b ks)) (1 0))+  (traces+    ((send (cat a ra))+      (recv (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb))+      (send (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat b rb-0 (enc a ra tb (ltk b ks))))+      (send+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb-0)))+    ((recv (cat a ra)) (send (cat b rb-1 (enc a ra tb (ltk b ks))))))+  (label 2)+  (parent 1)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol neuman-stubblebine basic+  (defrole init+    (vars (a b ks name) (ra rb text) (k skey) (tb text))+    (trace (send (cat a ra))+      (recv (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb))+      (send (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (defrole resp+    (vars (a b ks name) (ra rb text) (k skey) (tb text))+    (trace (recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (defrole keyserver+    (vars (a b ks name) (ra rb text) (k skey) (tb text))+    (trace (recv (cat b rb (enc a ra tb (ltk b ks))))+      (send+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb)))+    (uniq-orig k)))++(defskeleton neuman-stubblebine+  (vars (ra rb tb text) (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb)+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (label 3)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb tb ra-0 rb-0 text) (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (precedes ((1 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb k)+  (operation encryption-test (added-strand keyserver 2)+    (enc a k tb (ltk b ks)) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0))))+  (label 4)+  (parent 3)+  (unrealized (0 2) (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb tb ra-0 rb-0 rb-1 text) (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (precedes ((1 1) (0 2)) ((2 1) (1 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb k)+  (operation encryption-test (added-strand resp 2)+    (enc a ra-0 tb (ltk b ks)) (1 0))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0))+      (send (cat b rb-1 (enc a ra-0 tb (ltk b ks))))))+  (label 5)+  (parent 4)+  (unrealized (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb tb ra-0 rb-0 rb-1 ra-1 tb-0 text)+    (a b ks a-0 b-0 ks-0 name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-1) (rb rb) (tb tb-0) (a a-0) (b b-0)+    (ks ks-0) (k k))+  (precedes ((0 1) (3 1)) ((1 1) (3 1)) ((2 1) (1 0)) ((3 2) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb k)+  (operation encryption-test (added-strand init 3) (enc rb k) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a-0 ra-1))+      (recv+        (cat (enc b-0 ra-1 k tb-0 (ltk a-0 ks-0))+          (enc a-0 k tb-0 (ltk b-0 ks-0)) rb))+      (send (cat (enc a-0 k tb-0 (ltk b-0 ks-0)) (enc rb k)))))+  (label 6)+  (parent 5)+  (unrealized (3 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb tb ra-0 rb-0 rb-1 text) (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (deflistener k)+  (precedes ((1 1) (3 0)) ((2 1) (1 0)) ((3 1) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb k)+  (operation encryption-test (added-listener k) (enc rb k) (0 2))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((recv k) (send k)))+  (label 7)+  (parent 5)+  (unrealized (3 0))+  (comment "empty cohort"))++(defskeleton neuman-stubblebine+  (vars (ra rb tb ra-0 rb-0 rb-1 text) (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra-0) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra-0) (rb rb-1) (tb tb) (a a) (b b) (ks ks))+  (defstrand init 3 (ra ra-0) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (precedes ((0 1) (3 1)) ((1 1) (3 1)) ((2 1) (1 0)) ((3 2) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb k)+  (operation nonce-test+    (contracted (a-0 a) (b-0 b) (ks-0 ks) (ra-1 ra-0) (tb-0 tb)) k (3 1)+    (enc a k tb (ltk b ks)) (enc b ra-0 k tb (ltk a ks)))+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat b rb-0 (enc a ra-0 tb (ltk b ks))))+      (send+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks))+          rb-0)))+    ((recv (cat a ra-0)) (send (cat b rb-1 (enc a ra-0 tb (ltk b ks)))))+    ((send (cat a ra-0))+      (recv+        (cat (enc b ra-0 k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb))+      (send (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (label 8)+  (parent 6)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb tb rb-0 text) (a b ks name) (k skey))+  (defstrand resp 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (defstrand keyserver 2 (ra ra) (rb rb-0) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand init 3 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks) (k k))+  (precedes ((0 1) (1 0)) ((1 1) (2 1)) ((2 0) (0 0)) ((2 2) (0 2)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb k)+  (operation collapsed 2 0)+  (traces+    ((recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k))))+    ((recv (cat b rb-0 (enc a ra tb (ltk b ks))))+      (send+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb-0)))+    ((send (cat a ra))+      (recv (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb))+      (send (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (label 9)+  (parent 8)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol neuman-stubblebine basic+  (defrole init+    (vars (a b ks name) (ra rb text) (k skey) (tb text))+    (trace (send (cat a ra))+      (recv (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb))+      (send (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (defrole resp+    (vars (a b ks name) (ra rb text) (k skey) (tb text))+    (trace (recv (cat a ra)) (send (cat b rb (enc a ra tb (ltk b ks))))+      (recv (cat (enc a k tb (ltk b ks)) (enc rb k)))))+  (defrole keyserver+    (vars (a b ks name) (ra rb text) (k skey) (tb text))+    (trace (recv (cat b rb (enc a ra tb (ltk b ks))))+      (send+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb)))+    (uniq-orig k)))++(defskeleton neuman-stubblebine+  (vars (ra rb tb text) (a b ks name) (k skey))+  (defstrand keyserver 2 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb k)+  (traces+    ((recv (cat b rb (enc a ra tb (ltk b ks))))+      (send+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb))))+  (label 10)+  (unrealized (0 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton neuman-stubblebine+  (vars (ra rb tb rb-0 text) (a b ks name) (k skey))+  (defstrand keyserver 2 (ra ra) (rb rb) (tb tb) (a a) (b b) (ks ks)+    (k k))+  (defstrand resp 2 (ra ra) (rb rb-0) (tb tb) (a a) (b b) (ks ks))+  (precedes ((1 1) (0 0)))+  (non-orig (ltk a ks) (ltk b ks))+  (uniq-orig ra rb k)+  (operation encryption-test (added-strand resp 2)+    (enc a ra tb (ltk b ks)) (0 0))+  (traces+    ((recv (cat b rb (enc a ra tb (ltk b ks))))+      (send+        (cat (enc b ra k tb (ltk a ks)) (enc a k tb (ltk b ks)) rb)))+    ((recv (cat a ra)) (send (cat b rb-0 (enc a ra tb (ltk b ks))))))+  (label 11)+  (parent 10)+  (unrealized)+  (shape))++(comment "Nothing left to do")
+ tst/ns.scm view
@@ -0,0 +1,104 @@+;;; Needham-Schroeder Protocol++(defprotocol ns basic+  (defrole init+    (vars (a b name) (n1 n2 text))+    (trace+     (send (enc n1 a (pubk b)))+     (recv (enc n1 n2 (pubk a)))+     (send (enc n2 (pubk b)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace+     (recv (enc n1 a (pubk b)))+     (send (enc n1 n2 (pubk a)))+     (recv (enc n2 (pubk b)))))+  (comment "Needham-Schroeder with no role origination assumptions"))++;;; The initiator point-of-view+(defskeleton ns+  (vars (a b name) (n1 text))+  (defstrand init 3 (a a) (b b) (n1 n1))+  (non-orig (privk b) (privk a))+  (uniq-orig n1)+  (comment "Initiator point-of-view"))++;;; The responder point-of-view+(defskeleton ns+  (vars (a name) (n2 text))+  (defstrand resp 3 (a a) (n2 n2))+  (non-orig (privk a))+  (uniq-orig n2)+  (comment "Responder point-of-view"))++;;; Needham-Schroeder Protocol with origination assumptions on roles+;;; This++(defprotocol ns-role-origs basic+  (defrole init+    (vars (a b name) (n1 n2 text))+    (trace+     (send (enc n1 a (pubk b)))+     (recv (enc n1 n2 (pubk a)))+     (send (enc n2 (pubk b))))+    (non-orig (privk b))+    (uniq-orig n1))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace+     (recv (enc n1 a (pubk b)))+     (send (enc n1 n2 (pubk a)))+     (recv (enc n2 (pubk b))))+    (non-orig (privk a))+    (uniq-orig n2))+  (comment "Needham-Schroeder with role assumptions that are too strong"))++;;; The initiator point-of-view+(defskeleton ns-role-origs+  (vars)+  (defstrand init 3))++;;; The responder point-of-view+(defskeleton ns-role-origs+  (vars)+  (defstrand resp 3))++;;; Needham-Schroeder Protocol with a doubled nonce.  Look at the+;;; first message in each role.++(defprotocol ns2 basic+  (defrole init+    (vars (a b name) (n1 n2 n3 text))+    (trace+     (send (enc n1 n3 a (pubk b)))+     (recv (enc n1 n2 (pubk a)))+     (send (enc n2 (pubk b)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace+     (recv (enc n1 n1 a (pubk b)))+     (send (enc n1 n2 (pubk a)))+     (recv (enc n2 (pubk b))))+    (note doubled nonce in the first message))+  (note that this protocol is derived from Needham-Schroeder))++(defskeleton ns2+  (vars (a b name) (n1 text))+  (defstrand init 3 (a a) (b b) (n1 n1))+  (non-orig (privk b) (privk a))+  (uniq-orig n1)+  (note the disappearance of this note))++;;; Note that the association list style key-value pairs that follow+;;; the list of strands can be supplied in any order, and values with+;;; the same key are appended together.  Check the output to see how+;;; CPSA interprets this input.+(defskeleton ns+  (vars (n1 n2 text) (a b name))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (defstrand resp 2 (n2 n2) (n1 n1) (b b) (a a))+  (non-orig (privk b))+  (precedes ((0 0) (1 0)))+  (non-orig (privk a))+  (uniq-orig n1)+  (precedes ((1 1) (0 1))))
+ tst/ns.tst view
@@ -0,0 +1,376 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol ns basic+  (defrole init+    (vars (a b name) (n1 n2 text))+    (trace (send (enc n1 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace (recv (enc n1 a (pubk b))) (send (enc n1 n2 (pubk a)))+      (recv (enc n2 (pubk b)))))+  (comment "Needham-Schroeder with no role origination assumptions"))++(defskeleton ns+  (vars (n1 n2 text) (a b name))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (non-orig (privk a) (privk b))+  (uniq-orig n1)+  (comment "Initiator point-of-view")+  (traces+    ((send (enc n1 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b)))))+  (label 0)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton ns+  (vars (n1 n2 n2-0 text) (a b name))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (defstrand resp 2 (n2 n2-0) (n1 n1) (b b) (a a))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk a) (privk b))+  (uniq-orig n1)+  (operation nonce-test (added-strand resp 2) n1 (0 1)+    (enc n1 a (pubk b)))+  (traces+    ((send (enc n1 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b))))+    ((recv (enc n1 a (pubk b))) (send (enc n1 n2-0 (pubk a)))))+  (label 1)+  (parent 0)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton ns+  (vars (n1 n2 text) (a b name))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (defstrand resp 2 (n2 n2) (n1 n1) (b b) (a a))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk a) (privk b))+  (uniq-orig n1)+  (operation nonce-test (contracted (n2-0 n2)) n1 (0 1)+    (enc n1 n2 (pubk a)) (enc n1 a (pubk b)))+  (traces+    ((send (enc n1 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b))))+    ((recv (enc n1 a (pubk b))) (send (enc n1 n2 (pubk a)))))+  (label 2)+  (parent 1)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol ns basic+  (defrole init+    (vars (a b name) (n1 n2 text))+    (trace (send (enc n1 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace (recv (enc n1 a (pubk b))) (send (enc n1 n2 (pubk a)))+      (recv (enc n2 (pubk b)))))+  (comment "Needham-Schroeder with no role origination assumptions"))++(defskeleton ns+  (vars (n2 n1 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (non-orig (privk a))+  (uniq-orig n2)+  (comment "Responder point-of-view")+  (traces+    ((recv (enc n1 a (pubk b))) (send (enc n1 n2 (pubk a)))+      (recv (enc n2 (pubk b)))))+  (label 3)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton ns+  (vars (n2 n1 text) (a b b-0 name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b-0))+  (precedes ((0 1) (1 1)) ((1 2) (0 2)))+  (non-orig (privk a))+  (uniq-orig n2)+  (operation nonce-test (added-strand init 3) n2 (0 2)+    (enc n1 n2 (pubk a)))+  (traces+    ((recv (enc n1 a (pubk b))) (send (enc n1 n2 (pubk a)))+      (recv (enc n2 (pubk b))))+    ((send (enc n1 a (pubk b-0))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b-0)))))+  (label 4)+  (parent 3)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol ns-role-origs basic+  (defrole init+    (vars (a b name) (n1 n2 text))+    (trace (send (enc n1 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b))))+    (non-orig (privk b))+    (uniq-orig n1))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace (recv (enc n1 a (pubk b))) (send (enc n1 n2 (pubk a)))+      (recv (enc n2 (pubk b))))+    (non-orig (privk a))+    (uniq-orig n2))+  (comment+    "Needham-Schroeder with role assumptions that are too strong"))++(defskeleton ns-role-origs+  (vars (n1 n2 text) (a b name))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (non-orig (privk b))+  (uniq-orig n1)+  (traces+    ((send (enc n1 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b)))))+  (label 5)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton ns-role-origs+  (vars (n1 n2 n2-0 text) (a b name))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (defstrand resp 2 (n2 n2-0) (n1 n1) (b b) (a a))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk a) (privk b))+  (uniq-orig n1 n2-0)+  (operation nonce-test (added-strand resp 2) n1 (0 1)+    (enc n1 a (pubk b)))+  (traces+    ((send (enc n1 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b))))+    ((recv (enc n1 a (pubk b))) (send (enc n1 n2-0 (pubk a)))))+  (label 6)+  (parent 5)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton ns-role-origs+  (vars (n1 n2 text) (a b name))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (defstrand resp 2 (n2 n2) (n1 n1) (b b) (a a))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk a) (privk b))+  (uniq-orig n1 n2)+  (operation nonce-test (contracted (n2-0 n2)) n1 (0 1)+    (enc n1 n2 (pubk a)) (enc n1 a (pubk b)))+  (traces+    ((send (enc n1 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b))))+    ((recv (enc n1 a (pubk b))) (send (enc n1 n2 (pubk a)))))+  (label 7)+  (parent 6)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol ns-role-origs basic+  (defrole init+    (vars (a b name) (n1 n2 text))+    (trace (send (enc n1 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b))))+    (non-orig (privk b))+    (uniq-orig n1))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace (recv (enc n1 a (pubk b))) (send (enc n1 n2 (pubk a)))+      (recv (enc n2 (pubk b))))+    (non-orig (privk a))+    (uniq-orig n2))+  (comment+    "Needham-Schroeder with role assumptions that are too strong"))++(defskeleton ns-role-origs+  (vars (n2 n1 text) (b a name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (non-orig (privk a))+  (uniq-orig n2)+  (traces+    ((recv (enc n1 a (pubk b))) (send (enc n1 n2 (pubk a)))+      (recv (enc n2 (pubk b)))))+  (label 8)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton ns-role-origs+  (vars (n2 n1 text) (b a b-0 name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b-0))+  (precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))+  (non-orig (privk a) (privk b-0))+  (uniq-orig n2 n1)+  (operation nonce-test (added-strand init 3) n2 (0 2)+    (enc n1 n2 (pubk a)))+  (traces+    ((recv (enc n1 a (pubk b))) (send (enc n1 n2 (pubk a)))+      (recv (enc n2 (pubk b))))+    ((send (enc n1 a (pubk b-0))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b-0)))))+  (label 9)+  (parent 8)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton ns-role-origs+  (vars (n2 n1 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))+  (non-orig (privk a) (privk b))+  (uniq-orig n2 n1)+  (operation nonce-test (contracted (b-0 b)) n1 (0 0)+    (enc n1 a (pubk b)))+  (traces+    ((recv (enc n1 a (pubk b))) (send (enc n1 n2 (pubk a)))+      (recv (enc n2 (pubk b))))+    ((send (enc n1 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b)))))+  (label 10)+  (parent 9)+  (unrealized)+  (shape))++(defskeleton ns-role-origs+  (vars (n2 n1 n2-0 text) (b a b-0 name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b-0))+  (defstrand resp 2 (n2 n2-0) (n1 n1) (b b-0) (a a))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (0 2)) ((2 1) (0 0)))+  (non-orig (privk a) (privk b-0))+  (uniq-orig n2 n1 n2-0)+  (operation nonce-test (added-strand resp 2) n1 (0 0)+    (enc n1 a (pubk b-0)))+  (traces+    ((recv (enc n1 a (pubk b))) (send (enc n1 n2 (pubk a)))+      (recv (enc n2 (pubk b))))+    ((send (enc n1 a (pubk b-0))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b-0))))+    ((recv (enc n1 a (pubk b-0))) (send (enc n1 n2-0 (pubk a)))))+  (label 11)+  (parent 9)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton ns-role-origs+  (vars (n2 n1 n2-0 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (defstrand resp 2 (n2 n2-0) (n1 n1) (b b) (a a))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (0 2)) ((2 1) (0 0)))+  (non-orig (privk a) (privk b))+  (uniq-orig n2 n1 n2-0)+  (operation nonce-test (contracted (b-0 b)) n1 (0 0)+    (enc n1 n2-0 (pubk a)) (enc n1 a (pubk b)))+  (traces+    ((recv (enc n1 a (pubk b))) (send (enc n1 n2 (pubk a)))+      (recv (enc n2 (pubk b))))+    ((send (enc n1 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b))))+    ((recv (enc n1 a (pubk b))) (send (enc n1 n2-0 (pubk a)))))+  (label 12)+  (parent 11)+  (seen 10)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(comment "Nothing left to do")++(defprotocol ns2 basic+  (defrole init+    (vars (a b name) (n1 n2 n3 text))+    (trace (send (enc n1 n3 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace (recv (enc n1 n1 a (pubk b))) (send (enc n1 n2 (pubk a)))+      (recv (enc n2 (pubk b))))+    (note doubled nonce in the first message))+  (note that this protocol is derived from Needham-Schroeder))++(defskeleton ns2+  (vars (n1 n2 n3 text) (a b name))+  (defstrand init 3 (n1 n1) (n2 n2) (n3 n3) (a a) (b b))+  (non-orig (privk a) (privk b))+  (uniq-orig n1)+  (traces+    ((send (enc n1 n3 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b)))))+  (label 13)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton ns2+  (vars (n2 n3 n2-0 text) (a b name))+  (defstrand init 3 (n1 n3) (n2 n2) (n3 n3) (a a) (b b))+  (defstrand resp 2 (n2 n2-0) (n1 n3) (b b) (a a))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk a) (privk b))+  (uniq-orig n3)+  (operation nonce-test (added-strand resp 2) n3 (0 1)+    (enc n3 n3 a (pubk b)))+  (traces+    ((send (enc n3 n3 a (pubk b))) (recv (enc n3 n2 (pubk a)))+      (send (enc n2 (pubk b))))+    ((recv (enc n3 n3 a (pubk b))) (send (enc n3 n2-0 (pubk a)))))+  (label 14)+  (parent 13)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton ns2+  (vars (n3 n2 text) (a b name))+  (defstrand init 3 (n1 n3) (n2 n2) (n3 n3) (a a) (b b))+  (defstrand resp 2 (n2 n2) (n1 n3) (b b) (a a))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk a) (privk b))+  (uniq-orig n3)+  (operation nonce-test (contracted (n2-0 n2)) n3 (0 1)+    (enc n3 n2 (pubk a)) (enc n3 n3 a (pubk b)))+  (traces+    ((send (enc n3 n3 a (pubk b))) (recv (enc n3 n2 (pubk a)))+      (send (enc n2 (pubk b))))+    ((recv (enc n3 n3 a (pubk b))) (send (enc n3 n2 (pubk a)))))+  (label 15)+  (parent 14)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol ns basic+  (defrole init+    (vars (a b name) (n1 n2 text))+    (trace (send (enc n1 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace (recv (enc n1 a (pubk b))) (send (enc n1 n2 (pubk a)))+      (recv (enc n2 (pubk b)))))+  (comment "Needham-Schroeder with no role origination assumptions"))++(defskeleton ns+  (vars (n1 n2 text) (a b name))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (defstrand resp 2 (n2 n2) (n1 n1) (b b) (a a))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk a) (privk b))+  (uniq-orig n1)+  (traces+    ((send (enc n1 a (pubk b))) (recv (enc n1 n2 (pubk a)))+      (send (enc n2 (pubk b))))+    ((recv (enc n1 a (pubk b))) (send (enc n1 n2 (pubk a)))))+  (label 16)+  (unrealized)+  (shape))++(comment "Nothing left to do")
+ tst/nsl3.scm view
@@ -0,0 +1,53 @@+(defprotocol nsl3 basic+  (defrole init (vars (a b c name) (na0 na1 nb0 nb1 nc0 nc1 text))+    (trace+     (send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+     (recv (enc na1 nc1 c b+		(enc na0 nb0 b c (pubk a))+		(enc nb1 nc0 c a (pubk b))+		(pubk a)))+     (send (enc nb0+		(enc nb1 nc0 c a (pubk b))+		(enc nc1 (pubk c))+		(pubk b))))+    (uniq-orig na0 na1))+  (defrole mid (vars (a b c name) (na0 na1 nb0 nb1 nc0 nc1 text))+    (trace+     (recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+     (send (enc nb1 b a+		(enc na1 a b (pubk c))+		(enc na0 nb0 b c (pubk a))+		(pubk c)))+     (recv (enc nb0+		(enc nb1 nc0 c a (pubk b))+		(enc nc1 (pubk c))+		(pubk b)))+     (send (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    (uniq-orig nb0 nb1))+  (defrole resp (vars (a b c name) (na0 na1 nb0 nb1 nc0 nc1 text))+    (trace+     (recv (enc nb1 b a+		(enc na1 a b (pubk c))+		(enc na0 nb0 b c (pubk a))+		(pubk c)))+     (send (enc na1 nc1 c b+		(enc na0 nb0 b c (pubk a))+		(enc nb1 nc0 c a (pubk b))+		(pubk a)))+     (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    (uniq-orig nc0 nc1)))++(defskeleton nsl3+  (vars (a b c name))+  (defstrand init 3 (a a) (b b) (c c))+  (non-orig (privk a) (privk b) (privk c)))++(defskeleton nsl3+  (vars (a b c name))+  (defstrand mid 4 (a a) (b b) (c c))+  (non-orig (privk a) (privk b) (privk c)))++(defskeleton nsl3+  (vars (a b c name))+  (defstrand resp 3 (a a) (b b) (c c))+  (non-orig (privk a) (privk b) (privk c)))
+ tst/nsl3.tst view
@@ -0,0 +1,2144 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol nsl3 basic+  (defrole init+    (vars (a b c name) (na0 na1 nb0 nb1 nc0 nc1 text))+    (trace (send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    (uniq-orig na0 na1))+  (defrole mid+    (vars (a b c name) (na0 na1 nb0 nb1 nc0 nc1 text))+    (trace (recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    (uniq-orig nb0 nb1))+  (defrole resp+    (vars (a b c name) (na0 na1 nb0 nb1 nc0 nc1 text))+    (trace+      (recv+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    (uniq-orig nc0 nc1)))++(defskeleton nsl3+  (vars (na0 na1 nb0 nb1 nc0 nc1 text) (a b c name))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 na1)+  (traces+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b)))))+  (label 0)+  (unrealized (0 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton nsl3+  (vars (na1 nb0 nb1 nc0 nc1 nb0-0 nb1-0 text) (a b c name))+  (defstrand init 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na1) (na1 na1) (nb0 nb0-0) (nb1 nb1-0) (a a)+    (b b) (c c))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na1 nb0-0 nb1-0)+  (operation nonce-test (added-strand mid 2) na1 (0 1)+    (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+  (traces+    ((send (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1-0 b a (enc na1 a b (pubk c))+          (enc na1 nb0-0 b c (pubk a)) (pubk c)))))+  (label 1)+  (parent 0)+  (seen 3)+  (unrealized (0 1))+  (comment "4 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nb0 nb1 nc0 nc1 nb0-0 nb1-0 text) (a b c name))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na1) (nb0 nb0-0) (nb1 nb1-0) (a a)+    (b b) (c c))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 na1 nb0-0 nb1-0)+  (operation nonce-test (added-strand mid 2) na0 (0 1)+    (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+  (traces+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1-0 b a (enc na1 a b (pubk c))+          (enc na0 nb0-0 b c (pubk a)) (pubk c)))))+  (label 2)+  (parent 0)+  (seen 3 4)+  (unrealized (0 1))+  (comment "4 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (na1 nb0 nb1 nc0 nc1 nb0-0 nb1-0 nc0-0 nc1-0 text) (a b c name))+  (defstrand init 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na1) (na1 na1) (nb0 nb0-0) (nb1 nb1-0) (a a)+    (b b) (c c))+  (defstrand resp 2 (na0 na1) (na1 na1) (nb0 nb0-0) (nb1 nb1-0)+    (nc0 nc0-0) (nc1 nc1-0) (a a) (b b) (c c))+  (precedes ((0 0) (1 0)) ((1 1) (2 0)) ((2 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na1 nb0-0 nb1-0 nc0-0 nc1-0)+  (operation nonce-test (added-strand resp 2) na1 (0 1)+    (enc na1 a c (enc na1 a b (pubk c)) (pubk b))+    (enc nb1-0 b a (enc na1 a b (pubk c)) (enc na1 nb0-0 b c (pubk a))+      (pubk c)))+  (traces+    ((send (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1-0 b a (enc na1 a b (pubk c))+          (enc na1 nb0-0 b c (pubk a)) (pubk c))))+    ((recv+       (enc nb1-0 b a (enc na1 a b (pubk c))+         (enc na1 nb0-0 b c (pubk a)) (pubk c)))+      (send+        (enc na1 nc1-0 c b (enc na1 nb0-0 b c (pubk a))+          (enc nb1-0 nc0-0 c a (pubk b)) (pubk a)))))+  (label 3)+  (parent 1)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nb0 nb1 nc0 nc1 nb0-0 nb1-0 nc0-0 nc1-0 text)+    (a b c name))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na1) (nb0 nb0-0) (nb1 nb1-0) (a a)+    (b b) (c c))+  (defstrand resp 2 (na0 na0) (na1 na1) (nb0 nb0-0) (nb1 nb1-0)+    (nc0 nc0-0) (nc1 nc1-0) (a a) (b b) (c c))+  (precedes ((0 0) (1 0)) ((1 1) (2 0)) ((2 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 na1 nb0-0 nb1-0 nc0-0 nc1-0)+  (operation nonce-test (added-strand resp 2) na0 (0 1)+    (enc na0 a c (enc na1 a b (pubk c)) (pubk b))+    (enc nb1-0 b a (enc na1 a b (pubk c)) (enc na0 nb0-0 b c (pubk a))+      (pubk c)))+  (traces+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1-0 b a (enc na1 a b (pubk c))+          (enc na0 nb0-0 b c (pubk a)) (pubk c))))+    ((recv+       (enc nb1-0 b a (enc na1 a b (pubk c))+         (enc na0 nb0-0 b c (pubk a)) (pubk c)))+      (send+        (enc na1 nc1-0 c b (enc na0 nb0-0 b c (pubk a))+          (enc nb1-0 nc0-0 c a (pubk b)) (pubk a)))))+  (label 4)+  (parent 2)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (na1 nb0 nb1 nc0 nc1 text) (a b c name))+  (defstrand init 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (a a) (b b)+    (c c))+  (defstrand resp 2 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 0) (1 0)) ((1 1) (2 0)) ((2 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na1 nb0 nb1 nc0 nc1)+  (operation nonce-test+    (contracted (nb0-0 nb0) (nb1-0 nb1) (nc0-0 nc0) (nc1-0 nc1)) na1+    (0 1)+    (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+      (enc nb1 nc0 c a (pubk b)) (pubk a))+    (enc na1 a c (enc na1 a b (pubk c)) (pubk b))+    (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+      (pubk c)))+  (traces+    ((send (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+          (pubk c))))+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))))+  (label 5)+  (parent 3)+  (seen 6)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nb0 nb1 nc0 nc1 text) (a b c name))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (a a) (b b)+    (c c))+  (defstrand resp 2 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 0) (1 0)) ((1 1) (2 0)) ((2 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 na1 nb0 nb1 nc0 nc1)+  (operation nonce-test+    (contracted (nb0-0 nb0) (nb1-0 nb1) (nc0-0 nc0) (nc1-0 nc1)) na0+    (0 1) (enc na0 a c (enc na1 a b (pubk c)) (pubk b))+    (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+      (enc nb1 nc0 c a (pubk b)) (pubk a))+    (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+      (pubk c)))+  (traces+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c))))+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))))+  (label 6)+  (parent 4)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol nsl3 basic+  (defrole init+    (vars (a b c name) (na0 na1 nb0 nb1 nc0 nc1 text))+    (trace (send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    (uniq-orig na0 na1))+  (defrole mid+    (vars (a b c name) (na0 na1 nb0 nb1 nc0 nc1 text))+    (trace (recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    (uniq-orig nb0 nb1))+  (defrole resp+    (vars (a b c name) (na0 na1 nb0 nb1 nc0 nc1 text))+    (trace+      (recv+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    (uniq-orig nc0 nc1)))++(defskeleton nsl3+  (vars (na0 na1 nb0 nb1 nc0 nc1 text) (a b c name))+  (defstrand mid 4 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nb0 nb1)+  (traces+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc0 (enc nc1 (pubk c)) (pubk c)))))+  (label 7)+  (seen 8)+  (unrealized (0 2))+  (comment "5 in cohort - 2 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nb0 nb1 nc0 nc1 nc0-0 nc1-0 text) (a b c name))+  (defstrand mid 4 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand resp 2 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0-0)+    (nc1 nc1-0) (a a) (b b) (c c))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nb0 nb1 nc0-0 nc1-0)+  (operation nonce-test (added-strand resp 2) nb0 (0 2)+    (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+      (pubk c)))+  (traces+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1-0 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0-0 c a (pubk b)) (pubk a)))))+  (label 8)+  (parent 7)+  (unrealized (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nb1 nc0 nc1 nc0-0 nc1-0 text) (a b c name))+  (defstrand mid 4 (na0 na0) (na1 na1) (nb0 nb1) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand resp 2 (na0 na0) (na1 na1) (nb0 nb1) (nb1 nb1) (nc0 nc0-0)+    (nc1 nc1-0) (a a) (b b) (c c))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nb1 nc0-0 nc1-0)+  (operation nonce-test (added-strand resp 2) nb1 (0 2)+    (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb1 b c (pubk a))+      (pubk c)))+  (traces+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb1 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb1 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb1 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1-0 c b (enc na0 nb1 b c (pubk a))+          (enc nb1 nc0-0 c a (pubk b)) (pubk a)))))+  (label 9)+  (parent 7)+  (seen 10)+  (unrealized (0 2))+  (comment "4 in cohort - 0 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nb1 nc0 nc1 nc0-0 nc1-0 text) (a b c name))+  (defstrand mid 4 (na0 na0) (na1 na1) (nb0 nb1) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand resp 2 (na0 na0) (na1 na1) (nb0 nb1) (nb1 nb1) (nc0 nc0-0)+    (nc1 nc1-0) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb1) (nb1 nb1) (nc0 nc0-0)+    (nc1 nc1-0) (a a) (b b) (c c))+  (precedes ((0 1) (1 0)) ((1 1) (2 1)) ((2 0) (0 0)) ((2 2) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 na1 nb1 nc0-0 nc1-0)+  (operation nonce-test (added-strand init 3) nb1 (0 2)+    (enc na1 nc1-0 c b (enc na0 nb1 b c (pubk a))+      (enc nb1 nc0-0 c a (pubk b)) (pubk a))+    (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb1 b c (pubk a))+      (pubk c)))+  (traces+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb1 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb1 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb1 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1-0 c b (enc na0 nb1 b c (pubk a))+          (enc nb1 nc0-0 c a (pubk b)) (pubk a))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1-0 c b (enc na0 nb1 b c (pubk a))+          (enc nb1 nc0-0 c a (pubk b)) (pubk a)))+      (send+        (enc nb1 (enc nb1 nc0-0 c a (pubk b)) (enc nc1-0 (pubk c))+          (pubk b)))))+  (label 10)+  (parent 8)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nb0 nb1 nc0 nc1 nc0-0 nc1-0 text) (a b c name))+  (defstrand mid 4 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand resp 2 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0-0)+    (nc1 nc1-0) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0-0)+    (nc1 nc1-0) (a a) (b b) (c c))+  (precedes ((0 1) (1 0)) ((1 1) (2 1)) ((2 0) (0 0)) ((2 2) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 na1 nb0 nb1 nc0-0 nc1-0)+  (operation nonce-test (added-strand init 3) nb0 (0 2)+    (enc na1 nc1-0 c b (enc na0 nb0 b c (pubk a))+      (enc nb1 nc0-0 c a (pubk b)) (pubk a))+    (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+      (pubk c)))+  (traces+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1-0 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0-0 c a (pubk b)) (pubk a))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1-0 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0-0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0-0 c a (pubk b)) (enc nc1-0 (pubk c))+          (pubk b)))))+  (label 11)+  (parent 8)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nb1 nc0 nc1 text) (a b c name))+  (defstrand mid 4 (na0 na0) (na1 na1) (nb0 nb1) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand resp 2 (na0 na0) (na1 na1) (nb0 nb1) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb1) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 0)) ((1 1) (2 1)) ((2 0) (0 0)) ((2 2) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 na1 nb1 nc0 nc1)+  (operation nonce-test (contracted (nc0-0 nc0) (nc1-0 nc1)) nb1 (0 2)+    (enc na1 nc1 c b (enc na0 nb1 b c (pubk a))+      (enc nb1 nc0 c a (pubk b)) (pubk a))+    (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb1 b c (pubk a))+      (pubk c))+    (enc nb1 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c)) (pubk b)))+  (traces+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb1 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb1 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb1 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb1 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb1 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb1 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b)))))+  (label 12)+  (parent 10)+  (seen 13)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nb0 nb1 nc0 nc1 text) (a b c name))+  (defstrand mid 4 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand resp 2 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 0)) ((1 1) (2 1)) ((2 0) (0 0)) ((2 2) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 na1 nb0 nb1 nc0 nc1)+  (operation nonce-test (contracted (nc0-0 nc0) (nc1-0 nc1)) nb0 (0 2)+    (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+      (enc nb1 nc0 c a (pubk b)) (pubk a))+    (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c)) (pubk b))+    (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+      (pubk c)))+  (traces+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b)))))+  (label 13)+  (parent 11)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol nsl3 basic+  (defrole init+    (vars (a b c name) (na0 na1 nb0 nb1 nc0 nc1 text))+    (trace (send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    (uniq-orig na0 na1))+  (defrole mid+    (vars (a b c name) (na0 na1 nb0 nb1 nc0 nc1 text))+    (trace (recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    (uniq-orig nb0 nb1))+  (defrole resp+    (vars (a b c name) (na0 na1 nb0 nb1 nc0 nc1 text))+    (trace+      (recv+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    (uniq-orig nc0 nc1)))++(defskeleton nsl3+  (vars (na0 na1 nb0 nb1 nc0 nc1 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nc0 nc1)+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c)))))+  (label 14)+  (seen 15)+  (unrealized (0 2))+  (comment "5 in cohort - 2 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nb0 nb1 nc0 nc1 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 na1 nc0 nc1)+  (operation nonce-test (added-strand init 3) nc0 (0 2)+    (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+      (enc nb1 nc0 c a (pubk b)) (pubk a)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b)))))+  (label 15)+  (parent 14)+  (seen 17)+  (unrealized (0 0) (0 2))+  (comment "4 in cohort - 2 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nb0 nb1 nc1 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 na1 nc1)+  (operation nonce-test (added-strand init 3) nc1 (0 2)+    (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+      (enc nb1 nc1 c a (pubk b)) (pubk a)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (recv (enc nc1 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b)))))+  (label 16)+  (parent 14)+  (seen 19)+  (unrealized (0 0) (0 2))+  (comment "4 in cohort - 2 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nb0 nb1 nc0 nc1 nb0-0 nb1-0 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na1) (nb0 nb0-0) (nb1 nb1-0) (a a)+    (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (0 2)) ((2 1) (0 0)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 na1 nc0 nc1 nb0-0 nb1-0)+  (operation nonce-test (added-strand mid 2) na1 (0 0)+    (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1-0 b a (enc na1 a b (pubk c))+          (enc na0 nb0-0 b c (pubk a)) (pubk c)))))+  (label 17)+  (parent 15)+  (unrealized (0 0) (0 2))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton nsl3+  (vars (na0 nb0 nb1 nc0 nc1 nb0-0 nb1-0 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na0) (nb0 nb0-0) (nb1 nb1-0) (a a)+    (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (0 2)) ((2 1) (0 0)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 nc0 nc1 nb0-0 nb1-0)+  (operation nonce-test (added-strand mid 2) na0 (0 0)+    (enc na0 a c (enc na0 a b (pubk c)) (pubk b)))+  (traces+    ((recv+       (enc nb1 b a (enc na0 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na0 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na0 a b (pubk c)) (pubk b)))+      (recv+        (enc na0 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na0 a b (pubk c)) (pubk b)))+      (send+        (enc nb1-0 b a (enc na0 a b (pubk c))+          (enc na0 nb0-0 b c (pubk a)) (pubk c)))))+  (label 18)+  (parent 15)+  (seen 23)+  (unrealized (0 0) (0 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nb0 nb1 nc1 nb0-0 nb1-0 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na1) (nb0 nb0-0) (nb1 nb1-0) (a a)+    (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (0 2)) ((2 1) (0 0)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 na1 nc1 nb0-0 nb1-0)+  (operation nonce-test (added-strand mid 2) na1 (0 0)+    (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (recv (enc nc1 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1-0 b a (enc na1 a b (pubk c))+          (enc na0 nb0-0 b c (pubk a)) (pubk c)))))+  (label 19)+  (parent 16)+  (unrealized (0 0) (0 2))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton nsl3+  (vars (na0 nb0 nb1 nc1 nb0-0 nb1-0 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na0) (nb0 nb0-0) (nb1 nb1-0) (a a)+    (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (0 2)) ((2 1) (0 0)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 nc1 nb0-0 nb1-0)+  (operation nonce-test (added-strand mid 2) na0 (0 0)+    (enc na0 a c (enc na0 a b (pubk c)) (pubk b)))+  (traces+    ((recv+       (enc nb1 b a (enc na0 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na0 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (recv (enc nc1 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na0 a b (pubk c)) (pubk b)))+      (recv+        (enc na0 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na0 a b (pubk c)) (pubk b)))+      (send+        (enc nb1-0 b a (enc na0 a b (pubk c))+          (enc na0 nb0-0 b c (pubk a)) (pubk c)))))+  (label 20)+  (parent 16)+  (seen 27)+  (unrealized (0 0) (0 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nc0 nc1 nb0 nb1 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (a a) (b b)+    (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (0 2)) ((2 1) (0 0)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 na1 nc0 nc1 nb0 nb1)+  (operation nonce-test (contracted (nb0-0 nb0) (nb1-0 nb1)) na1 (0 0)+    (enc na0 a c (enc na1 a b (pubk c)) (pubk b))+    (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+      (pubk c)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))))+  (label 21)+  (parent 17)+  (unrealized (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nb0 nb1 nc0 nc1 nb0-0 nb1-0 nc0-0 nc1-0 text)+    (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na1) (nb0 nb0-0) (nb1 nb1-0) (a a)+    (b b) (c c))+  (defstrand resp 2 (na0 na0) (na1 na1) (nb0 nb0-0) (nb1 nb1-0)+    (nc0 nc0-0) (nc1 nc1-0) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (0 2)) ((2 1) (3 0))+    ((3 1) (0 0)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 na1 nc0 nc1 nb0-0 nb1-0 nc0-0 nc1-0)+  (operation nonce-test (added-strand resp 2) na1 (0 0)+    (enc na0 a c (enc na1 a b (pubk c)) (pubk b))+    (enc nb1-0 b a (enc na1 a b (pubk c)) (enc na0 nb0-0 b c (pubk a))+      (pubk c)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1-0 b a (enc na1 a b (pubk c))+          (enc na0 nb0-0 b c (pubk a)) (pubk c))))+    ((recv+       (enc nb1-0 b a (enc na1 a b (pubk c))+         (enc na0 nb0-0 b c (pubk a)) (pubk c)))+      (send+        (enc na1 nc1-0 c b (enc na0 nb0-0 b c (pubk a))+          (enc nb1-0 nc0-0 c a (pubk b)) (pubk a)))))+  (label 22)+  (parent 17)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (na0 nb0 nb1 nc0 nc1 nb0-0 nb1-0 nc0-0 nc1-0 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na0) (nb0 nb0-0) (nb1 nb1-0) (a a)+    (b b) (c c))+  (defstrand resp 2 (na0 na0) (na1 na0) (nb0 nb0-0) (nb1 nb1-0)+    (nc0 nc0-0) (nc1 nc1-0) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (0 2)) ((2 1) (3 0))+    ((3 1) (0 0)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 nc0 nc1 nb0-0 nb1-0 nc0-0 nc1-0)+  (operation nonce-test (added-strand resp 2) na0 (0 0)+    (enc na0 a c (enc na0 a b (pubk c)) (pubk b))+    (enc nb1-0 b a (enc na0 a b (pubk c)) (enc na0 nb0-0 b c (pubk a))+      (pubk c)))+  (traces+    ((recv+       (enc nb1 b a (enc na0 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na0 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na0 a b (pubk c)) (pubk b)))+      (recv+        (enc na0 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na0 a b (pubk c)) (pubk b)))+      (send+        (enc nb1-0 b a (enc na0 a b (pubk c))+          (enc na0 nb0-0 b c (pubk a)) (pubk c))))+    ((recv+       (enc nb1-0 b a (enc na0 a b (pubk c))+         (enc na0 nb0-0 b c (pubk a)) (pubk c)))+      (send+        (enc na0 nc1-0 c b (enc na0 nb0-0 b c (pubk a))+          (enc nb1-0 nc0-0 c a (pubk b)) (pubk a)))))+  (label 23)+  (parent 17)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (na0 nc0 nc1 nb0 nb1 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (a a) (b b)+    (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (0 2)) ((2 1) (0 0)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 nc0 nc1 nb0 nb1)+  (operation nonce-test (contracted (nb0-0 nb0) (nb1-0 nb1)) na0 (0 0)+    (enc na0 a c (enc na0 a b (pubk c)) (pubk b))+    (enc nb1 b a (enc na0 a b (pubk c)) (enc na0 nb0 b c (pubk a))+      (pubk c)))+  (traces+    ((recv+       (enc nb1 b a (enc na0 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na0 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na0 a b (pubk c)) (pubk b)))+      (recv+        (enc na0 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na0 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na0 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))))+  (label 24)+  (parent 18)+  (unrealized (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nc1 nb0 nb1 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (a a) (b b)+    (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (0 2)) ((2 1) (0 0)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 na1 nc1 nb0 nb1)+  (operation nonce-test (contracted (nb0-0 nb0) (nb1-0 nb1)) na1 (0 0)+    (enc na0 a c (enc na1 a b (pubk c)) (pubk b))+    (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+      (pubk c)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (recv (enc nc1 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))))+  (label 25)+  (parent 19)+  (seen 29)+  (unrealized (0 2))+  (comment "3 in cohort - 0 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nb0 nb1 nc1 nb0-0 nb1-0 nc0 nc1-0 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na1) (nb0 nb0-0) (nb1 nb1-0) (a a)+    (b b) (c c))+  (defstrand resp 2 (na0 na0) (na1 na1) (nb0 nb0-0) (nb1 nb1-0)+    (nc0 nc0) (nc1 nc1-0) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (0 2)) ((2 1) (3 0))+    ((3 1) (0 0)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 na1 nc1 nb0-0 nb1-0 nc0 nc1-0)+  (operation nonce-test (added-strand resp 2) na1 (0 0)+    (enc na0 a c (enc na1 a b (pubk c)) (pubk b))+    (enc nb1-0 b a (enc na1 a b (pubk c)) (enc na0 nb0-0 b c (pubk a))+      (pubk c)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (recv (enc nc1 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1-0 b a (enc na1 a b (pubk c))+          (enc na0 nb0-0 b c (pubk a)) (pubk c))))+    ((recv+       (enc nb1-0 b a (enc na1 a b (pubk c))+         (enc na0 nb0-0 b c (pubk a)) (pubk c)))+      (send+        (enc na1 nc1-0 c b (enc na0 nb0-0 b c (pubk a))+          (enc nb1-0 nc0 c a (pubk b)) (pubk a)))))+  (label 26)+  (parent 19)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (na0 nb0 nb1 nc1 nb0-0 nb1-0 nc0 nc1-0 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na0) (nb0 nb0-0) (nb1 nb1-0) (a a)+    (b b) (c c))+  (defstrand resp 2 (na0 na0) (na1 na0) (nb0 nb0-0) (nb1 nb1-0)+    (nc0 nc0) (nc1 nc1-0) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (0 2)) ((2 1) (3 0))+    ((3 1) (0 0)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 nc1 nb0-0 nb1-0 nc0 nc1-0)+  (operation nonce-test (added-strand resp 2) na0 (0 0)+    (enc na0 a c (enc na0 a b (pubk c)) (pubk b))+    (enc nb1-0 b a (enc na0 a b (pubk c)) (enc na0 nb0-0 b c (pubk a))+      (pubk c)))+  (traces+    ((recv+       (enc nb1 b a (enc na0 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na0 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (recv (enc nc1 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na0 a b (pubk c)) (pubk b)))+      (recv+        (enc na0 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na0 a b (pubk c)) (pubk b)))+      (send+        (enc nb1-0 b a (enc na0 a b (pubk c))+          (enc na0 nb0-0 b c (pubk a)) (pubk c))))+    ((recv+       (enc nb1-0 b a (enc na0 a b (pubk c))+         (enc na0 nb0-0 b c (pubk a)) (pubk c)))+      (send+        (enc na0 nc1-0 c b (enc na0 nb0-0 b c (pubk a))+          (enc nb1-0 nc0 c a (pubk b)) (pubk a)))))+  (label 27)+  (parent 19)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (na0 nc1 nb0 nb1 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (a a) (b b)+    (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (0 2)) ((2 1) (0 0)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 nc1 nb0 nb1)+  (operation nonce-test (contracted (nb0-0 nb0) (nb1-0 nb1)) na0 (0 0)+    (enc na0 a c (enc na0 a b (pubk c)) (pubk b))+    (enc nb1 b a (enc na0 a b (pubk c)) (enc na0 nb0 b c (pubk a))+      (pubk c)))+  (traces+    ((recv+       (enc nb1 b a (enc na0 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na0 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (recv (enc nc1 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na0 a b (pubk c)) (pubk b)))+      (recv+        (enc na0 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na0 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na0 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))))+  (label 28)+  (parent 20)+  (seen 33)+  (unrealized (0 2))+  (comment "3 in cohort - 0 not yet seen"))++(defskeleton nsl3+  (vars (nc1 nb0 nb1 na0 na1 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 4 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((0 1) (2 2)) ((1 0) (2 0)) ((1 2) (0 2))+    ((2 1) (0 0)) ((2 3) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nc1 nb0 nb1 na0 na1)+  (operation nonce-test (added-strand mid 4) nc1 (0 2)+    (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c)) (pubk b))+    (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+      (enc nb1 nc1 c a (pubk b)) (pubk a)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (recv (enc nc1 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc1 (enc nc1 (pubk c)) (pubk c)))))+  (label 29)+  (parent 21)+  (seen 37)+  (unrealized (2 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (nc0 nc1 nb0 nb1 na0 na1 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 4 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((0 1) (2 2)) ((1 0) (2 0)) ((1 2) (0 2))+    ((2 1) (0 0)) ((2 3) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nc0 nc1 nb0 nb1 na0 na1)+  (operation nonce-test (added-strand mid 4) nc0 (0 2)+    (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c)) (pubk b))+    (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+      (enc nb1 nc0 c a (pubk b)) (pubk a)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc0 (enc nc1 (pubk c)) (pubk c)))))+  (label 30)+  (parent 21)+  (seen 37 38)+  (unrealized (2 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nc0 nc1 nb0 nb1 nc0-0 nc1-0 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (a a) (b b)+    (c c))+  (defstrand resp 2 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0-0)+    (nc1 nc1-0) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (0 2)) ((2 1) (3 0))+    ((3 1) (0 0)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 na1 nc0 nc1 nb0 nb1 nc0-0 nc1-0)+  (operation nonce-test (contracted (nb0-0 nb0) (nb1-0 nb1)) na1 (0 0)+    (enc na0 a c (enc na1 a b (pubk c)) (pubk b))+    (enc na1 nc1-0 c b (enc na0 nb0 b c (pubk a))+      (enc nb1 nc0-0 c a (pubk b)) (pubk a))+    (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+      (pubk c)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c))))+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1-0 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0-0 c a (pubk b)) (pubk a)))))+  (label 31)+  (parent 22)+  (unrealized (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton nsl3+  (vars (na0 nc0 nc1 nb0 nb1 nc0-0 nc1-0 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (a a) (b b)+    (c c))+  (defstrand resp 2 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (nc0 nc0-0)+    (nc1 nc1-0) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (0 2)) ((2 1) (3 0))+    ((3 1) (0 0)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 nc0 nc1 nb0 nb1 nc0-0 nc1-0)+  (operation nonce-test (contracted (nb0-0 nb0) (nb1-0 nb1)) na0 (0 0)+    (enc na0 nc1-0 c b (enc na0 nb0 b c (pubk a))+      (enc nb1 nc0-0 c a (pubk b)) (pubk a))+    (enc na0 a c (enc na0 a b (pubk c)) (pubk b))+    (enc nb1 b a (enc na0 a b (pubk c)) (enc na0 nb0 b c (pubk a))+      (pubk c)))+  (traces+    ((recv+       (enc nb1 b a (enc na0 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na0 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na0 a b (pubk c)) (pubk b)))+      (recv+        (enc na0 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na0 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na0 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c))))+    ((recv+       (enc nb1 b a (enc na0 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na0 nc1-0 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0-0 c a (pubk b)) (pubk a)))))+  (label 32)+  (parent 23)+  (unrealized (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton nsl3+  (vars (nc1 nb0 nb1 na1 text) (a b c name))+  (defstrand resp 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 4 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((0 1) (2 2)) ((1 0) (2 0)) ((1 2) (0 2))+    ((2 1) (0 0)) ((2 3) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nc1 nb0 nb1 na1)+  (operation nonce-test (added-strand mid 4) nc1 (0 2)+    (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c)) (pubk b))+    (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+      (enc nb1 nc1 c a (pubk b)) (pubk a)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (recv (enc nc1 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc1 (enc nc1 (pubk c)) (pubk c)))))+  (label 33)+  (parent 24)+  (seen 43)+  (unrealized (2 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (nc0 nc1 nb0 nb1 na1 text) (a b c name))+  (defstrand resp 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 4 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((0 1) (2 2)) ((1 0) (2 0)) ((1 2) (0 2))+    ((2 1) (0 0)) ((2 3) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nc0 nc1 nb0 nb1 na1)+  (operation nonce-test (added-strand mid 4) nc0 (0 2)+    (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c)) (pubk b))+    (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+      (enc nb1 nc0 c a (pubk b)) (pubk a)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc0 (enc nc1 (pubk c)) (pubk c)))))+  (label 34)+  (parent 24)+  (seen 43 44)+  (unrealized (2 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (na0 na1 nc1 nb0 nb1 nc0 nc1-0 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (a a) (b b)+    (c c))+  (defstrand resp 2 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1-0) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (0 2)) ((2 1) (3 0))+    ((3 1) (0 0)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 na1 nc1 nb0 nb1 nc0 nc1-0)+  (operation nonce-test (contracted (nb0-0 nb0) (nb1-0 nb1)) na1 (0 0)+    (enc na0 a c (enc na1 a b (pubk c)) (pubk b))+    (enc na1 nc1-0 c b (enc na0 nb0 b c (pubk a))+      (enc nb1 nc0 c a (pubk b)) (pubk a))+    (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+      (pubk c)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (recv (enc nc1 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c))))+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1-0 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))))+  (label 35)+  (parent 26)+  (seen 39)+  (unrealized (0 2))+  (comment "3 in cohort - 0 not yet seen"))++(defskeleton nsl3+  (vars (na0 nc1 nb0 nb1 nc0 nc1-0 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 2 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (a a) (b b)+    (c c))+  (defstrand resp 2 (na0 na0) (na1 na0) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1-0) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (0 2)) ((2 1) (3 0))+    ((3 1) (0 0)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig na0 nc1 nb0 nb1 nc0 nc1-0)+  (operation nonce-test (contracted (nb0-0 nb0) (nb1-0 nb1)) na0 (0 0)+    (enc na0 nc1-0 c b (enc na0 nb0 b c (pubk a))+      (enc nb1 nc0 c a (pubk b)) (pubk a))+    (enc na0 a c (enc na0 a b (pubk c)) (pubk b))+    (enc nb1 b a (enc na0 a b (pubk c)) (enc na0 nb0 b c (pubk a))+      (pubk c)))+  (traces+    ((recv+       (enc nb1 b a (enc na0 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na0 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (recv (enc nc1 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na0 a b (pubk c)) (pubk b)))+      (recv+        (enc na0 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na0 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na0 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c))))+    ((recv+       (enc nb1 b a (enc na0 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na0 nc1-0 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))))+  (label 36)+  (parent 27)+  (seen 41)+  (unrealized (0 2))+  (comment "3 in cohort - 0 not yet seen"))++(defskeleton nsl3+  (vars (nc1 nb0 nb1 na0 na1 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 4 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (2 2)) ((2 1) (0 0))+    ((2 3) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nc1 nb0 nb1 na0 na1)+  (operation nonce-test (added-strand init 3) nc1 (2 2)+    (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+      (enc nb1 nc1 c a (pubk b)) (pubk a)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (recv (enc nc1 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc1 (enc nc1 (pubk c)) (pubk c)))))+  (label 37)+  (parent 29)+  (seen 38)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton nsl3+  (vars (nc0 nc1 nb0 nb1 na0 na1 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 4 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (2 2)) ((2 1) (0 0))+    ((2 3) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nc0 nc1 nb0 nb1 na0 na1)+  (operation nonce-test (added-strand init 3) nc0 (2 2)+    (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+      (enc nb1 nc0 c a (pubk b)) (pubk a)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc0 (enc nc1 (pubk c)) (pubk c)))))+  (label 38)+  (parent 30)+  (unrealized)+  (shape))++(defskeleton nsl3+  (vars (nc1 nb0 nb1 nc0 nc1-0 na0 na1 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand resp 2 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1-0) (a a) (b b) (c c))+  (defstrand mid 4 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((0 1) (3 2)) ((1 0) (3 0)) ((1 2) (0 2))+    ((2 1) (0 0)) ((3 1) (2 0)) ((3 3) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nc1 nb0 nb1 nc0 nc1-0 na0 na1)+  (operation nonce-test (added-strand mid 4) nc1 (0 2)+    (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c)) (pubk b))+    (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+      (enc nb1 nc1 c a (pubk b)) (pubk a)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (recv (enc nc1 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1-0 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc1 (enc nc1 (pubk c)) (pubk c)))))+  (label 39)+  (parent 31)+  (seen 45)+  (unrealized (3 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (nc0 nc1 nb0 nb1 nc0-0 nc1-0 na0 na1 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand resp 2 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0-0)+    (nc1 nc1-0) (a a) (b b) (c c))+  (defstrand mid 4 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((0 1) (3 2)) ((1 0) (3 0)) ((1 2) (0 2))+    ((2 1) (0 0)) ((3 1) (2 0)) ((3 3) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nc0 nc1 nb0 nb1 nc0-0 nc1-0 na0 na1)+  (operation nonce-test (added-strand mid 4) nc0 (0 2)+    (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c)) (pubk b))+    (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+      (enc nb1 nc0 c a (pubk b)) (pubk a)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1-0 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0-0 c a (pubk b)) (pubk a))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc0 (enc nc1 (pubk c)) (pubk c)))))+  (label 40)+  (parent 31)+  (seen 45 46)+  (unrealized (3 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (nc1 nb0 nb1 nc0 nc1-0 na1 text) (a b c name))+  (defstrand resp 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand resp 2 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1-0) (a a) (b b) (c c))+  (defstrand mid 4 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((0 1) (3 2)) ((1 0) (3 0)) ((1 2) (0 2))+    ((2 1) (0 0)) ((3 1) (2 0)) ((3 3) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nc1 nb0 nb1 nc0 nc1-0 na1)+  (operation nonce-test (added-strand mid 4) nc1 (0 2)+    (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c)) (pubk b))+    (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+      (enc nb1 nc1 c a (pubk b)) (pubk a)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (recv (enc nc1 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1-0 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a))))+    ((recv (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc1 (enc nc1 (pubk c)) (pubk c)))))+  (label 41)+  (parent 32)+  (seen 47)+  (unrealized (3 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (nc0 nc1 nb0 nb1 nc0-0 nc1-0 na1 text) (a b c name))+  (defstrand resp 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand resp 2 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0-0)+    (nc1 nc1-0) (a a) (b b) (c c))+  (defstrand mid 4 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((0 1) (3 2)) ((1 0) (3 0)) ((1 2) (0 2))+    ((2 1) (0 0)) ((3 1) (2 0)) ((3 3) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nc0 nc1 nb0 nb1 nc0-0 nc1-0 na1)+  (operation nonce-test (added-strand mid 4) nc0 (0 2)+    (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c)) (pubk b))+    (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+      (enc nb1 nc0 c a (pubk b)) (pubk a)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1-0 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc0-0 c a (pubk b)) (pubk a))))+    ((recv (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc0 (enc nc1 (pubk c)) (pubk c)))))+  (label 42)+  (parent 32)+  (seen 47 48)+  (unrealized (3 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton nsl3+  (vars (nc1 nb0 nb1 na1 text) (a b c name))+  (defstrand resp 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 4 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (2 2)) ((2 1) (0 0))+    ((2 3) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nc1 nb0 nb1 na1)+  (operation nonce-test (added-strand init 3) nc1 (2 2)+    (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+      (enc nb1 nc1 c a (pubk b)) (pubk a)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (recv (enc nc1 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc1 (enc nc1 (pubk c)) (pubk c)))))+  (label 43)+  (parent 33)+  (seen 44)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton nsl3+  (vars (nc0 nc1 nb0 nb1 na1 text) (a b c name))+  (defstrand resp 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand mid 4 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (2 0)) ((1 2) (2 2)) ((2 1) (0 0))+    ((2 3) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nc0 nc1 nb0 nb1 na1)+  (operation nonce-test (added-strand init 3) nc0 (2 2)+    (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+      (enc nb1 nc0 c a (pubk b)) (pubk a)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc0 (enc nc1 (pubk c)) (pubk c)))))+  (label 44)+  (parent 34)+  (seen 38)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton nsl3+  (vars (nc1 nb0 nb1 nc0 nc1-0 na0 na1 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand resp 2 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1-0) (a a) (b b) (c c))+  (defstrand mid 4 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (3 0)) ((1 2) (3 2)) ((2 1) (0 0))+    ((3 1) (2 0)) ((3 3) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nc1 nb0 nb1 nc0 nc1-0 na0 na1)+  (operation nonce-test (added-strand init 3) nc1 (3 2)+    (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+      (enc nb1 nc1 c a (pubk b)) (pubk a)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (recv (enc nc1 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1-0 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc1 (enc nc1 (pubk c)) (pubk c)))))+  (label 45)+  (parent 39)+  (seen 37)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton nsl3+  (vars (nc0 nc1 nb0 nb1 nc0-0 nc1-0 na0 na1 text) (a b c name))+  (defstrand resp 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand resp 2 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0-0)+    (nc1 nc1-0) (a a) (b b) (c c))+  (defstrand mid 4 (na0 na0) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (3 0)) ((1 2) (3 2)) ((2 1) (0 0))+    ((3 1) (2 0)) ((3 3) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nc0 nc1 nb0 nb1 nc0-0 nc1-0 na0 na1)+  (operation nonce-test (added-strand init 3) nc0 (3 2)+    (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+      (enc nb1 nc0 c a (pubk b)) (pubk a)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1-0 c b (enc na0 nb0 b c (pubk a))+          (enc nb1 nc0-0 c a (pubk b)) (pubk a))))+    ((recv (enc na0 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na0 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc0 (enc nc1 (pubk c)) (pubk c)))))+  (label 46)+  (parent 40)+  (seen 38)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton nsl3+  (vars (nc1 nb0 nb1 nc0 nc1-0 na1 text) (a b c name))+  (defstrand resp 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand resp 2 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1-0) (a a) (b b) (c c))+  (defstrand mid 4 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc1)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (3 0)) ((1 2) (3 2)) ((2 1) (0 0))+    ((3 1) (2 0)) ((3 3) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nc1 nb0 nb1 nc0 nc1-0 na1)+  (operation nonce-test (added-strand init 3) nc1 (3 2)+    (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+      (enc nb1 nc1 c a (pubk b)) (pubk a)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (recv (enc nc1 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc1 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1-0 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a))))+    ((recv (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc1 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc1 (enc nc1 (pubk c)) (pubk c)))))+  (label 47)+  (parent 41)+  (seen 43)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton nsl3+  (vars (nc0 nc1 nb0 nb1 nc0-0 nc1-0 na1 text) (a b c name))+  (defstrand resp 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand init 3 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (defstrand resp 2 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0-0)+    (nc1 nc1-0) (a a) (b b) (c c))+  (defstrand mid 4 (na0 na1) (na1 na1) (nb0 nb0) (nb1 nb1) (nc0 nc0)+    (nc1 nc1) (a a) (b b) (c c))+  (precedes ((0 1) (1 1)) ((1 0) (3 0)) ((1 2) (3 2)) ((2 1) (0 0))+    ((3 1) (2 0)) ((3 3) (0 2)))+  (non-orig (privk a) (privk b) (privk c))+  (uniq-orig nc0 nc1 nb0 nb1 nc0-0 nc1-0 na1)+  (operation nonce-test (added-strand init 3) nc0 (3 2)+    (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+      (enc nb1 nc0 c a (pubk b)) (pubk a)))+  (traces+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (recv (enc nc0 (enc nc1 (pubk c)) (pubk c))))+    ((send (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (recv+        (enc na1 nc1 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc0 c a (pubk b)) (pubk a)))+      (send+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))))+    ((recv+       (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+         (pubk c)))+      (send+        (enc na1 nc1-0 c b (enc na1 nb0 b c (pubk a))+          (enc nb1 nc0-0 c a (pubk b)) (pubk a))))+    ((recv (enc na1 a c (enc na1 a b (pubk c)) (pubk b)))+      (send+        (enc nb1 b a (enc na1 a b (pubk c)) (enc na1 nb0 b c (pubk a))+          (pubk c)))+      (recv+        (enc nb0 (enc nb1 nc0 c a (pubk b)) (enc nc1 (pubk c))+          (pubk b))) (send (enc nc0 (enc nc1 (pubk c)) (pubk c)))))+  (label 48)+  (parent 42)+  (seen 44)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(comment "Nothing left to do")
+ tst/nsl4.lisp view
@@ -0,0 +1,85 @@+(defprotocol nsl4 basic+  (defrole init+    (vars (a b c d name)+      (na0 na1 na2 nb0 nb1 nb2 nc0 nc1 nc2 nd0 nd1 nd2 text))+    (trace+      (send+        (enc na0 a c d (enc na1 a b d (pubk c)) (enc na2 a b c (pubk d))+          (pubk b)))+      (recv+        (enc na2 nd0 d b c (enc na0 nb2 b c d (pubk a))+          (enc na1 nc1 c b d (pubk a)) (enc nb0 nc2 c d a (pubk b))+          (enc nb1 nd1 d a c (pubk b)) (enc nc0 nd2 d a b (pubk c))+          (pubk a)))+      (send+        (enc nb2 (enc nb0 nc2 c d a (pubk b))+          (enc nb1 nd1 d a c (pubk b)) (enc nc0 nd2 d a b (pubk c))+          (enc nc1 (pubk c)) (enc nd0 (pubk d)) (pubk b))))+    (uniq-orig na0 na1 na2))+  (defrole resp1+    (vars (a b c d name)+      (na0 na1 na2 nb0 nb1 nb2 nc0 nc1 nc2 nd0 nd1 nd2 text))+    (trace+      (recv+        (enc na0 a c d (enc na1 a b d (pubk c)) (enc na2 a b c (pubk d))+          (pubk b)))+      (send+        (enc nb0 b d a (enc na1 a b d (pubk c)) (enc na2 a b c (pubk d))+          (enc nb1 b c a (pubk d)) (enc na0 nb2 b c d (pubk a))+          (pubk c)))+      (recv+        (enc nb2 (enc nb0 nc2 c d a (pubk b))+          (enc nb1 nd1 d a c (pubk b)) (enc nc0 nd2 d a b (pubk c))+          (enc nc1 (pubk c)) (enc nd0 (pubk d)) (pubk b)))+      (send+        (enc nc2 (enc nc0 nd2 d a b (pubk c)) (enc nc1 (pubk c))+          (enc nd0 (pubk d)) (enc nd1 (pubk d)) (pubk c))))+    (uniq-orig nb0 nb1 nb2))+  (defrole resp2+    (vars (a b c d name)+      (na0 na1 na2 nb0 nb1 nb2 nc0 nc1 nc2 nd0 nd1 nd2 text))+    (trace+      (recv+        (enc nb0 b d a (enc na1 a b d (pubk c)) (enc na2 a b c (pubk d))+          (enc nb1 b c a (pubk d)) (enc na0 nb2 b c d (pubk a))+          (pubk c)))+      (send+        (enc nc0 c a b (enc na2 a b c (pubk d)) (enc nb1 b c a (pubk d))+          (enc na0 nb2 b c d (pubk a)) (enc na1 nc1 c b d (pubk a))+          (enc nb0 nc2 c d a (pubk b)) (pubk d)))+      (recv+        (enc nc2 (enc nc0 nd2 d a b (pubk c)) (enc nc1 (pubk c))+          (enc nd0 (pubk d)) (enc nd1 (pubk d)) (pubk c)))+      (send (enc nd2 (enc nd0 (pubk d)) (enc nd1 (pubk d)) (pubk d))))+    (uniq-orig nc0 nc1 nc2))+  (defrole resp3+    (vars (a b c d name)+      (na0 na1 na2 nb0 nb1 nb2 nc0 nc1 nc2 nd0 nd1 nd2 text))+    (trace+      (recv+        (enc nc0 c a b (enc na2 a b c (pubk d)) (enc nb1 b c a (pubk d))+          (enc na0 nb2 b c d (pubk a)) (enc na1 nc1 c b d (pubk a))+          (enc nb0 nc2 c d a (pubk b)) (pubk d)))+      (send+        (enc na2 nd0 d b c (enc na0 nb2 b c d (pubk a))+          (enc na1 nc1 c b d (pubk a)) (enc nb0 nc2 c d a (pubk b))+          (enc nb1 nd1 d a c (pubk b)) (enc nc0 nd2 d a b (pubk c))+          (pubk a)))+      (recv (enc nd2 (enc nd0 (pubk d)) (enc nd1 (pubk d)) (pubk d))))+    (uniq-orig nd0 nd1 nd2)))++(defskeleton nsl4 (vars (a b c d name))+  (defstrand init 3 (a a) (b b) (c c) (d d))+  (non-orig (privk a) (privk b) (privk c) (privk d)))++(defskeleton nsl4 (vars (a b c d name))+  (defstrand resp1 4 (a a) (b b) (c c) (d d))+  (non-orig (privk a) (privk b) (privk c) (privk d)))++(defskeleton nsl4 (vars (a b c d name))+  (defstrand resp2 4 (a a) (b b) (c c) (d d))+  (non-orig (privk a) (privk b) (privk c) (privk d)))++(defskeleton nsl4 (vars (a b c d name))+  (defstrand resp3 3 (a a) (b b) (c c) (d d))+  (non-orig (privk a) (privk b) (privk c) (privk d)))
+ tst/nsl4cm1.lsp view
@@ -0,0 +1,47 @@+(defprotocol nsl4cm basic+   (defrole init+      (vars (a b c d name) (na nb nc nd text))+      (trace+         (send (enc a c d na (pubk b)))+	 (recv (enc b c d na nb nc nd (pubk a)))+	 (send (enc nb nc nd (pubk b)))))+   (defrole resp1+      (vars (a b c d name) (na nb nc nd text))+      (trace+         (recv (enc a c d na (pubk b)))+	 (send (enc a b d na nb (pubk c)))+	 (recv (enc nb nc nd (pubk b)))+	 (send (enc nc nd (pubk c)))))+   (defrole resp2+      (vars (a b c d name) (na nb nc nd text))+      (trace+         (recv (enc a b d na nb (pubk c)))+	 (send (enc a b c na nb nc (pubk d)))+	 (recv (enc nc nd (pubk c)))+	 (send (enc nd (pubk d)))))+   (defrole resp3+      (vars (a b c d name) (na nb nc nd text))+      (trace+         (recv (enc a b c na nb nc (pubk d)))+	 (send (enc b c d na nb nc nd (pubk a)))+	 (recv (enc nd (pubk d))))))++(defskeleton nsl4cm (vars (a b c d name) (na text))+  (defstrand init 3 (a a) (b b) (c c) (d d) (na na))+   (non-orig (privk a) (privk b) (privk c) (privk d))+   (uniq-orig na))++(comment (defskeleton nsl4cm (vars (a b c d name) (nb text))+   (defstrand resp1 4 (a a) (b b) (c c) (d d) (nb nb))+   (non-orig (privk a) (privk b) (privk c) (privk d))+   (uniq-orig nb))++(defskeleton nsl4cm (vars (a b c d name) (nc text))+   (defstrand resp2 4 (a a) (b b) (c c) (d d) (nc nc))+   (non-orig (privk a) (privk b) (privk c) (privk d))+   (uniq-orig nc))++(defskeleton nsl4cm (vars (a b c d name) (nd text))+   (defstrand resp3 3 (a a) (b b) (c c) (d d) (nd nd))+   (non-orig (privk a) (privk b) (privk c) (privk d))+   (uniq-orig nd)))
+ tst/nsl4cm1.tst view
@@ -0,0 +1,8318 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol nsl4cm basic+  (defrole init+    (vars (a b c d name) (na nb nc nd text))+    (trace (send (enc a c d na (pubk b)))+      (recv (enc b c d na nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b)))))+  (defrole resp1+    (vars (a b c d name) (na nb nc nd text))+    (trace (recv (enc a c d na (pubk b)))+      (send (enc a b d na nb (pubk c))) (recv (enc nb nc nd (pubk b)))+      (send (enc nc nd (pubk c)))))+  (defrole resp2+    (vars (a b c d name) (na nb nc nd text))+    (trace (recv (enc a b d na nb (pubk c)))+      (send (enc a b c na nb nc (pubk d))) (recv (enc nc nd (pubk c)))+      (send (enc nd (pubk d)))))+  (defrole resp3+    (vars (a b c d name) (na nb nc nd text))+    (trace (recv (enc a b c na nb nc (pubk d)))+      (send (enc b c d na nb nc nd (pubk a)))+      (recv (enc nd (pubk d))))))++(defskeleton nsl4cm+  (vars (na nb nc nd text) (a b c d name))+  (defstrand init 3 (na na) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig na)+  (traces+    ((send (enc a c d na (pubk b)))+      (recv (enc b c d na nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b)))))+  (label 0)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (na nb nc nd nb-0 text) (a b c d name))+  (defstrand init 3 (na na) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig na)+  (operation nonce-test (added-strand resp1 2) na (0 1)+    (enc a c d na (pubk b)))+  (traces+    ((send (enc a c d na (pubk b)))+      (recv (enc b c d na nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d na (pubk b)))+      (send (enc a b d na nb-0 (pubk c)))))+  (label 1)+  (parent 0)+  (unrealized (0 1))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (0 1)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 2)+  (parent 1)+  (unrealized (0 1) (2 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (0 1)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d)))))+  (label 3)+  (parent 1)+  (unrealized (0 1) (2 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (na nb nc nd nb-0 nc-0 text) (a b c d name))+  (defstrand init 3 (na na) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na na) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig na)+  (operation nonce-test (added-strand resp2 2) na (0 1)+    (enc a b d na nb-0 (pubk c)) (enc a c d na (pubk b)))+  (traces+    ((send (enc a c d na (pubk b)))+      (recv (enc b c d na nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-0 (pubk c))))+    ((recv (enc a b d na nb-0 (pubk c)))+      (send (enc a b c na nb-0 nc-0 (pubk d)))))+  (label 4)+  (parent 1)+  (unrealized (0 1) (2 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (0 1))+    ((3 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (2 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 5)+  (parent 2)+  (unrealized (0 1) (2 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (0 1))+    ((3 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (2 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 6)+  (parent 3)+  (unrealized (0 1) (2 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (na nb nc nd nb-0 nc-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na na) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na na) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (0 1))+    ((3 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig na)+  (operation nonce-test (added-strand resp1 2) na (2 0)+    (enc a c d na (pubk b)))+  (traces+    ((send (enc a c d na (pubk b)))+      (recv (enc b c d na nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-0 (pubk c))))+    ((recv (enc a b d na nb-0 (pubk c)))+      (send (enc a b c na nb-0 nc-0 (pubk d))))+    ((recv (enc a c d na (pubk b)))+      (send (enc a b d na nb-1 (pubk c)))))+  (label 7)+  (parent 4)+  (unrealized (0 1) (2 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (contracted (nb-1 nb-0)) nb-0 (2 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c)))))+  (label 8)+  (parent 5)+  (seen 20 21)+  (unrealized (0 1))+  (comment "5 in cohort - 2 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (2 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 9)+  (parent 5)+  (unrealized (0 1) (3 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (2 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d)))))+  (label 10)+  (parent 5)+  (unrealized (0 1) (3 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nb-1 nc-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (2 0)+    (enc a b d nb-0 nb-1 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-0 (pubk d)))))+  (label 11)+  (parent 5)+  (unrealized (0 1) (2 0) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (contracted (nb-1 nb-0)) nb-0 (2 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c)))))+  (label 12)+  (parent 6)+  (seen 20 21 27)+  (unrealized (0 1))+  (comment "8 in cohort - 3 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (2 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 13)+  (parent 6)+  (unrealized (0 1) (3 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (2 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d)))))+  (label 14)+  (parent 6)+  (unrealized (0 1) (3 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (2 0)+    (enc a b d nb-0 nb-1 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-1 (pubk d)))))+  (label 15)+  (parent 6)+  (unrealized (0 1) (2 0) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (na nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na na) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na na) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((1 1) (0 1)) ((2 1) (1 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig na)+  (operation nonce-test (contracted (nb-1 nb-0)) na (2 0)+    (enc a b d na nb-0 (pubk c)) (enc a c d na (pubk b)))+  (traces+    ((send (enc a c d na (pubk b)))+      (recv (enc b c d na nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d na nb-0 (pubk c)))+      (send (enc a b c na nb-0 nc-0 (pubk d))))+    ((recv (enc a c d na (pubk b)))+      (send (enc a b d na nb-0 (pubk c)))))+  (label 16)+  (parent 7)+  (seen 20 26 27)+  (unrealized (0 1))+  (comment "6 in cohort - 3 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (2 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d)))))+  (label 17)+  (parent 7)+  (unrealized (0 1) (2 0) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (2 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d)))))+  (label 18)+  (parent 7)+  (unrealized (0 1) (2 0) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (na nb nc nd nb-0 nc-0 nb-1 nc-1 text) (a b c d name))+  (defstrand init 3 (na na) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na na) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na na) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig na)+  (operation nonce-test (added-strand resp2 2) na (2 0)+    (enc a b d na nb-1 (pubk c)) (enc a c d na (pubk b)))+  (traces+    ((send (enc a c d na (pubk b)))+      (recv (enc b c d na nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-0 (pubk c))))+    ((recv (enc a b d na nb-0 (pubk c)))+      (send (enc a b c na nb-0 nc-0 (pubk d))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-1 (pubk c))))+    ((recv (enc a b d na nb-1 (pubk c)))+      (send (enc a b c na nb-1 nc-1 (pubk d)))))+  (label 19)+  (parent 7)+  (unrealized (0 1) (2 0) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nb-0 (pubk a)))))+  (label 20)+  (parent 8)+  (unrealized (0 1) (3 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nd-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nd-0 (pubk a)))))+  (label 21)+  (parent 8)+  (unrealized (0 1) (3 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (3 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 22)+  (parent 9)+  (unrealized (0 1) (3 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (3 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 23)+  (parent 10)+  (unrealized (0 1) (3 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nb-1 nc-0 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-2 (pubk c)))))+  (label 24)+  (parent 11)+  (unrealized (0 1) (2 0) (4 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nc-0 (pubk c)))))+  (label 25)+  (parent 12)+  (seen 20 21 53)+  (unrealized (0 1))+  (comment "8 in cohort - 3 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 26)+  (parent 12)+  (unrealized (0 1) (3 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nc-0 nd-0 (pubk a)))))+  (label 27)+  (parent 12)+  (unrealized (0 1) (3 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (3 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 28)+  (parent 13)+  (unrealized (0 1) (3 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (3 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 29)+  (parent 14)+  (unrealized (0 1) (3 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-2 (pubk c)))))+  (label 30)+  (parent 15)+  (unrealized (0 1) (2 0) (4 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nc-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nc-0) (nb nb-0) (nc nc-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nc-0)+  (operation nonce-test (added-strand resp3 2) nc-0 (0 1)+    (enc a b c nc-0 nb-0 nc-0 (pubk d)) (enc a b d nc-0 nb-0 (pubk c))+    (enc a c d nc-0 (pubk b)))+  (traces+    ((send (enc a c d nc-0 (pubk b)))+      (recv (enc b c d nc-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nc-0 nb-0 (pubk c)))+      (send (enc a b c nc-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nb-0 (pubk c))))+    ((recv (enc a b c nc-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nc-0 nb-0 nc-0 nb-0 (pubk a)))))+  (label 31)+  (parent 16)+  (unrealized (0 1) (3 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 text) (a b c d name))+  (defstrand init 3 (na nc-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nc-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nc-0)+  (operation nonce-test (added-strand resp3 2) nc-0 (0 1)+    (enc a b c nc-0 nb-0 nc-0 (pubk d)) (enc a b d nc-0 nb-0 (pubk c))+    (enc a c d nc-0 (pubk b)))+  (traces+    ((send (enc a c d nc-0 (pubk b)))+      (recv (enc b c d nc-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nc-0 nb-0 (pubk c)))+      (send (enc a b c nc-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nb-0 (pubk c))))+    ((recv (enc a b c nc-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nc-0 nb-0 nc-0 nd-0 (pubk a)))))+  (label 32)+  (parent 16)+  (unrealized (0 1) (3 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (na nb nc nd nc-0 nb-0 nd-0 text) (a b c d name))+  (defstrand init 3 (na na) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na na) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na na) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig na)+  (operation nonce-test (added-strand resp3 2) na (0 1)+    (enc a b c na nb-0 nc-0 (pubk d)) (enc a b d na nb-0 (pubk c))+    (enc a c d na (pubk b)))+  (traces+    ((send (enc a c d na (pubk b)))+      (recv (enc b c d na nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d na nb-0 (pubk c)))+      (send (enc a b c na nb-0 nc-0 (pubk d))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-0 (pubk c))))+    ((recv (enc a b c na nb-0 nc-0 (pubk d)))+      (send (enc b c d na nb-0 nc-0 nd-0 (pubk a)))))+  (label 33)+  (parent 16)+  (unrealized (0 1) (3 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp1 2) nb-1 (4 0)+    (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-2 (pubk c)))))+  (label 34)+  (parent 17)+  (unrealized (0 1) (2 0) (4 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp1 2) nb-1 (4 0)+    (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-2 (pubk c)))))+  (label 35)+  (parent 18)+  (unrealized (0 1) (2 0) (4 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (na nb nc nd nb-0 nc-0 nb-1 nc-1 nb-2 text) (a b c d name))+  (defstrand init 3 (na na) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na na) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na na) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig na)+  (operation nonce-test (added-strand resp1 2) na (4 0)+    (enc a c d na (pubk b)))+  (traces+    ((send (enc a c d na (pubk b)))+      (recv (enc b c d na nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-0 (pubk c))))+    ((recv (enc a b d na nb-0 (pubk c)))+      (send (enc a b c na nb-0 nc-0 (pubk d))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-1 (pubk c))))+    ((recv (enc a b d na nb-1 (pubk c)))+      (send (enc a b c na nb-1 nc-1 (pubk d))))+    ((recv (enc a c d na (pubk b)))+      (send (enc a b d na nb-2 (pubk c)))))+  (label 36)+  (parent 19)+  (unrealized (0 1) (2 0) (4 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (0 1)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (3 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nb-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 37)+  (parent 20)+  (unrealized (0 1) (3 0))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nd-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (0 1)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (3 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 38)+  (parent 21)+  (unrealized (0 1) (3 0))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (contracted (nb-1 nb-0)) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c)))))+  (label 39)+  (parent 22)+  (seen 89 90)+  (unrealized (0 1))+  (comment "5 in cohort - 2 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 40)+  (parent 22)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d)))))+  (label 41)+  (parent 22)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nb-1 nc-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-1 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-0 (pubk d)))))+  (label 42)+  (parent 22)+  (unrealized (0 1) (3 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (contracted (nb-1 nb-0)) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c)))))+  (label 43)+  (parent 23)+  (seen 95 96 97 98)+  (unrealized (0 1))+  (comment "10 in cohort - 5 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 44)+  (parent 23)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d)))))+  (label 45)+  (parent 23)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-1 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-1 (pubk d)))))+  (label 46)+  (parent 23)+  (unrealized (0 1) (3 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (0 1))+    ((3 1) (2 0)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (contracted (nb-2 nb-1)) nb-0 (4 0)+    (enc a b d nb-0 nb-1 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 47)+  (parent 24)+  (seen 43)+  (unrealized (0 1) (2 0))+  (comment "8 in cohort - 6 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (4 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d)))))+  (label 48)+  (parent 24)+  (unrealized (0 1) (3 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (4 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d)))))+  (label 49)+  (parent 24)+  (unrealized (0 1) (3 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nb-1 nc-0 nb-2 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-2) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-2) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0))+    ((1 1) (0 1)) ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0))+    ((5 1) (4 0)) ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (4 0)+    (enc a b d nb-0 nb-2 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-2 (pubk c))))+    ((recv (enc a b d nb-0 nb-2 (pubk c)))+      (send (enc a b c nb-0 nb-2 nc-1 (pubk d)))))+  (label 50)+  (parent 24)+  (unrealized (0 1) (2 0) (4 0) (6 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d)) (enc a b d nb-0 nc-0 (pubk c))+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nc-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 51)+  (parent 25)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nc-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d)) (enc a b d nb-0 nc-0 (pubk c))+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nc-0 (pubk c))))+    ((recv (enc a b d nb-0 nc-0 (pubk c)))+      (send (enc a b c nb-0 nc-0 nc-1 (pubk d)))))+  (label 52)+  (parent 25)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d)) (enc a b d nb-0 nc-0 (pubk c))+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nc-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nc-0 nd-0 (pubk a)))))+  (label 53)+  (parent 25)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (0 1)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (3 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 54)+  (parent 26)+  (unrealized (0 1) (3 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (0 1)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (3 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nc-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 55)+  (parent 27)+  (unrealized (0 1) (3 0))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (contracted (nb-1 nb-0)) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c)))))+  (label 56)+  (parent 28)+  (seen 122 123 124 125)+  (unrealized (0 1))+  (comment "10 in cohort - 5 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 57)+  (parent 28)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d)))))+  (label 58)+  (parent 28)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nb-1 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-1 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-1 (pubk d)))))+  (label 59)+  (parent 28)+  (unrealized (0 1) (3 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nc-1 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (contracted (nb-1 nb-0)) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c)))))+  (label 60)+  (parent 29)+  (seen 95 96 97 122 123 124 132 133)+  (unrealized (0 1))+  (comment "19 in cohort - 5 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nc-1 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 61)+  (parent 29)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nc-1 nb-0 nc-2 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-2 (pubk d)))))+  (label 62)+  (parent 29)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 nb-1 nc-2 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-1 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-2 (pubk d)))))+  (label 63)+  (parent 29)+  (unrealized (0 1) (3 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nc-1 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (0 1))+    ((3 1) (2 0)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (contracted (nb-2 nb-1)) nb-0 (4 0)+    (enc a b d nb-0 nb-1 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 64)+  (parent 30)+  (seen 60)+  (unrealized (0 1) (2 0))+  (comment "8 in cohort - 6 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (4 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d)))))+  (label 65)+  (parent 30)+  (unrealized (0 1) (3 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 nb-1 nc-2 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (4 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-2 (pubk d)))))+  (label 66)+  (parent 30)+  (unrealized (0 1) (3 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 nb-2 nc-2 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-2) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-2) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0))+    ((1 1) (0 1)) ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0))+    ((5 1) (4 0)) ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (4 0)+    (enc a b d nb-0 nb-2 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-2 (pubk c))))+    ((recv (enc a b d nb-0 nb-2 (pubk c)))+      (send (enc a b c nb-0 nb-2 nc-2 (pubk d)))))+  (label 67)+  (parent 30)+  (unrealized (0 1) (2 0) (4 0) (6 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nc-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nc-0) (nb nb-0) (nc nc-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nc-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (0 1)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nc-0)+  (operation nonce-test (added-strand resp1 2) nc-0 (3 0)+    (enc a c d nc-0 (pubk b)))+  (traces+    ((send (enc a c d nc-0 (pubk b)))+      (recv (enc b c d nc-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nc-0 nb-0 (pubk c)))+      (send (enc a b c nc-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nb-0 (pubk c))))+    ((recv (enc a b c nc-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nc-0 nb-0 nc-0 nb-0 (pubk a))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nb-1 (pubk c)))))+  (label 68)+  (parent 31)+  (unrealized (0 1) (3 0))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nc-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nc-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nc-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (0 1)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nc-0)+  (operation nonce-test (added-strand resp1 2) nc-0 (3 0)+    (enc a c d nc-0 (pubk b)))+  (traces+    ((send (enc a c d nc-0 (pubk b)))+      (recv (enc b c d nc-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nc-0 nb-0 (pubk c)))+      (send (enc a b c nc-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nb-0 (pubk c))))+    ((recv (enc a b c nc-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nc-0 nb-0 nc-0 nd-0 (pubk a))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nb-1 (pubk c)))))+  (label 69)+  (parent 32)+  (unrealized (0 1) (3 0))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton nsl4cm+  (vars (na nb nc nd nc-0 nb-0 nd-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na na) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na na) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na na) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na na) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (0 1)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig na)+  (operation nonce-test (added-strand resp1 2) na (3 0)+    (enc a c d na (pubk b)))+  (traces+    ((send (enc a c d na (pubk b)))+      (recv (enc b c d na nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d na nb-0 (pubk c)))+      (send (enc a b c na nb-0 nc-0 (pubk d))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-0 (pubk c))))+    ((recv (enc a b c na nb-0 nc-0 (pubk d)))+      (send (enc b c d na nb-0 nc-0 nd-0 (pubk a))))+    ((recv (enc a c d na (pubk b)))+      (send (enc a b d na nb-1 (pubk c)))))+  (label 70)+  (parent 33)+  (unrealized (0 1) (3 0))+  (comment "3 in cohort - 3 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (0 1))+    ((3 1) (2 0)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (contracted (nb-2 nb-1)) nb-1 (4 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c)))))+  (label 71)+  (parent 34)+  (seen 56 155 156)+  (unrealized (0 1) (2 0))+  (comment "6 in cohort - 2 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (4 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d)))))+  (label 72)+  (parent 34)+  (unrealized (0 1) (2 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (4 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d)))))+  (label 73)+  (parent 34)+  (unrealized (0 1) (2 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nb-2 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-2) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-2) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0))+    ((1 1) (0 1)) ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0))+    ((5 1) (4 0)) ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (4 0)+    (enc a b d nb-1 nb-2 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-2 (pubk c))))+    ((recv (enc a b d nb-1 nb-2 (pubk c)))+      (send (enc a b c nb-1 nb-2 nc-1 (pubk d)))))+  (label 74)+  (parent 34)+  (unrealized (0 1) (2 0) (4 0) (6 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nc-1 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (0 1))+    ((3 1) (2 0)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (contracted (nb-2 nb-1)) nb-1 (4 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c)))))+  (label 75)+  (parent 35)+  (seen 60 155 156 162)+  (unrealized (0 1) (2 0))+  (comment "9 in cohort - 3 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nc-1 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (4 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d)))))+  (label 76)+  (parent 35)+  (unrealized (0 1) (2 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nc-1 nb-1 nc-2 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (4 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-2 (pubk d)))))+  (label 77)+  (parent 35)+  (unrealized (0 1) (2 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 nb-2 nc-2 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-2) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-2) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0))+    ((1 1) (0 1)) ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0))+    ((5 1) (4 0)) ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (4 0)+    (enc a b d nb-1 nb-2 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-2 (pubk c))))+    ((recv (enc a b d nb-1 nb-2 (pubk c)))+      (send (enc a b c nb-1 nb-2 nc-2 (pubk d)))))+  (label 78)+  (parent 35)+  (unrealized (0 1) (2 0) (4 0) (6 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (na nb nc nd nb-0 nc-0 nc-1 nb-1 text) (a b c d name))+  (defstrand init 3 (na na) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na na) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na na) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (0 1))+    ((3 1) (2 0)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig na)+  (operation nonce-test (contracted (nb-2 nb-1)) na (4 0)+    (enc a b d na nb-1 (pubk c)) (enc a c d na (pubk b)))+  (traces+    ((send (enc a c d na (pubk b)))+      (recv (enc b c d na nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-0 (pubk c))))+    ((recv (enc a b d na nb-0 (pubk c)))+      (send (enc a b c na nb-0 nc-0 (pubk d))))+    ((recv (enc a b d na nb-1 (pubk c)))+      (send (enc a b c na nb-1 nc-1 (pubk d))))+    ((recv (enc a c d na (pubk b)))+      (send (enc a b d na nb-1 (pubk c)))))+  (label 79)+  (parent 36)+  (seen 155 161 162)+  (unrealized (0 1) (2 0))+  (comment "7 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-2) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-2) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-2) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-2) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-2) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-2) (nb nb-2) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-2) (nb nb-2) (nc nb-2) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0))+    ((1 1) (0 1)) ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0))+    ((5 1) (4 0)) ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-2)+  (operation nonce-test (added-strand resp2 2) nb-2 (4 0)+    (enc a b d nb-2 nb-2 (pubk c)) (enc a c d nb-2 (pubk b)))+  (traces+    ((send (enc a c d nb-2 (pubk b)))+      (recv (enc b c d nb-2 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-2 (pubk b)))+      (send (enc a b d nb-2 nb-0 (pubk c))))+    ((recv (enc a b d nb-2 nb-0 (pubk c)))+      (send (enc a b c nb-2 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-2 (pubk b)))+      (send (enc a b d nb-2 nb-1 (pubk c))))+    ((recv (enc a b d nb-2 nb-1 (pubk c)))+      (send (enc a b c nb-2 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-2 (pubk b)))+      (send (enc a b d nb-2 nb-2 (pubk c))))+    ((recv (enc a b d nb-2 nb-2 (pubk c)))+      (send (enc a b c nb-2 nb-2 nb-2 (pubk d)))))+  (label 80)+  (parent 36)+  (unrealized (0 1) (2 0) (4 0) (6 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 nb-2 nc-2 text) (a b c d name))+  (defstrand init 3 (na nb-2) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-2) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-2) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-2) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-2) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-2) (nb nb-2) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-2) (nb nb-2) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0))+    ((1 1) (0 1)) ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0))+    ((5 1) (4 0)) ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-2)+  (operation nonce-test (added-strand resp2 2) nb-2 (4 0)+    (enc a b d nb-2 nb-2 (pubk c)) (enc a c d nb-2 (pubk b)))+  (traces+    ((send (enc a c d nb-2 (pubk b)))+      (recv (enc b c d nb-2 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-2 (pubk b)))+      (send (enc a b d nb-2 nb-0 (pubk c))))+    ((recv (enc a b d nb-2 nb-0 (pubk c)))+      (send (enc a b c nb-2 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-2 (pubk b)))+      (send (enc a b d nb-2 nb-1 (pubk c))))+    ((recv (enc a b d nb-2 nb-1 (pubk c)))+      (send (enc a b c nb-2 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-2 (pubk b)))+      (send (enc a b d nb-2 nb-2 (pubk c))))+    ((recv (enc a b d nb-2 nb-2 (pubk c)))+      (send (enc a b c nb-2 nb-2 nc-2 (pubk d)))))+  (label 81)+  (parent 36)+  (unrealized (0 1) (2 0) (4 0) (6 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (na nb nc nd nb-0 nc-0 nb-1 nc-1 nb-2 nc-2 text) (a b c d name))+  (defstrand init 3 (na na) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na na) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na na) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-2) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na na) (nb nb-2) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0))+    ((1 1) (0 1)) ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0))+    ((5 1) (4 0)) ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig na)+  (operation nonce-test (added-strand resp2 2) na (4 0)+    (enc a b d na nb-2 (pubk c)) (enc a c d na (pubk b)))+  (traces+    ((send (enc a c d na (pubk b)))+      (recv (enc b c d na nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-0 (pubk c))))+    ((recv (enc a b d na nb-0 (pubk c)))+      (send (enc a b c na nb-0 nc-0 (pubk d))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-1 (pubk c))))+    ((recv (enc a b d na nb-1 (pubk c)))+      (send (enc a b c na nb-1 nc-1 (pubk d))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-2 (pubk c))))+    ((recv (enc a b d na nb-2 (pubk c)))+      (send (enc a b c na nb-2 nc-2 (pubk d)))))+  (label 82)+  (parent 36)+  (unrealized (0 1) (2 0) (4 0) (6 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nb-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 83)+  (parent 37)+  (unrealized (0 1) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nb-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d)))))+  (label 84)+  (parent 37)+  (unrealized (0 1) (3 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nb-1 nc-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-1 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nb-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-0 (pubk d)))))+  (label 85)+  (parent 37)+  (unrealized (0 1) (3 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nd-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 86)+  (parent 38)+  (unrealized (0 1) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nd-0 nb-0 nc-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d)))))+  (label 87)+  (parent 38)+  (unrealized (0 1) (3 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nd-0 nb-1 nc-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-1 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-0 (pubk d)))))+  (label 88)+  (parent 38)+  (unrealized (0 1) (3 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nb-0 (pubk a)))))+  (label 89)+  (parent 39)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nd-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nd-0 (pubk a)))))+  (label 90)+  (parent 39)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 91)+  (parent 40)+  (unrealized (0 1) (4 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 92)+  (parent 41)+  (unrealized (0 1) (4 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nb-1 nc-0 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (3 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (5 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-2 (pubk c)))))+  (label 93)+  (parent 42)+  (unrealized (0 1) (3 0) (5 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nc-0 (pubk c)))))+  (label 94)+  (parent 43)+  (seen 194 195 196 197)+  (unrealized (0 1))+  (comment "10 in cohort - 5 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nb-0 (pubk a)))))+  (label 95)+  (parent 43)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nc-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nc-0 (pubk a)))))+  (label 96)+  (parent 43)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nd-0 (pubk a)))))+  (label 97)+  (parent 43)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nc-0 nd-0 (pubk a)))))+  (label 98)+  (parent 43)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 99)+  (parent 44)+  (unrealized (0 1) (4 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 100)+  (parent 45)+  (unrealized (0 1) (4 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (3 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (5 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-2 (pubk c)))))+  (label 101)+  (parent 46)+  (unrealized (0 1) (3 0) (5 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (1 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (2 0)+    (enc a b c nb-0 nb-0 nc-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 102)+  (parent 47)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nc-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nc-0) (nb nc-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nc-0) (nb nb-0) (nc nc-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nc-0)+  (operation nonce-test (added-strand resp3 2) nc-0 (2 0)+    (enc a b c nc-0 nb-0 nc-0 (pubk d)) (enc a b d nc-0 nb-0 (pubk c))+    (enc a c d nc-0 (pubk b)))+  (traces+    ((send (enc a c d nc-0 (pubk b)))+      (recv (enc b c d nc-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nc-0 (pubk c))))+    ((recv (enc a b d nc-0 nc-0 (pubk c)))+      (send (enc a b c nc-0 nc-0 nc-0 (pubk d))))+    ((recv (enc a b d nc-0 nb-0 (pubk c)))+      (send (enc a b c nc-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nb-0 (pubk c))))+    ((recv (enc a b c nc-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nc-0 nb-0 nc-0 nb-0 (pubk a)))))+  (label 103)+  (parent 47)+  (unrealized (0 1) (2 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 text) (a b c d name))+  (defstrand init 3 (na nc-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-0) (nb nc-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-0) (nb nc-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nc-0) (nb nc-0) (nc nc-0) (nd nc-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (1 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nc-0)+  (operation nonce-test (added-strand resp3 2) nc-0 (2 0)+    (enc a b c nc-0 nc-0 nc-0 (pubk d)) (enc a b d nc-0 nc-0 (pubk c))+    (enc a c d nc-0 (pubk b)))+  (traces+    ((send (enc a c d nc-0 (pubk b)))+      (recv (enc b c d nc-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nc-0 nc-0 (pubk c)))+      (send (enc a b c nc-0 nc-0 nc-0 (pubk d))))+    ((recv (enc a b d nc-0 nc-0 (pubk c)))+      (send (enc a b c nc-0 nc-0 nc-0 (pubk d))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nc-0 (pubk c))))+    ((recv (enc a b c nc-0 nc-0 nc-0 (pubk d)))+      (send (enc b c d nc-0 nc-0 nc-0 nc-0 (pubk a)))))+  (label 104)+  (parent 47)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 text) (a b c d name))+  (defstrand init 3 (na nc-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nc-0) (nb nc-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nc-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nc-0)+  (operation nonce-test (added-strand resp3 2) nc-0 (2 0)+    (enc a b c nc-0 nb-0 nc-0 (pubk d)) (enc a b d nc-0 nb-0 (pubk c))+    (enc a c d nc-0 (pubk b)))+  (traces+    ((send (enc a c d nc-0 (pubk b)))+      (recv (enc b c d nc-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nc-0 (pubk c))))+    ((recv (enc a b d nc-0 nc-0 (pubk c)))+      (send (enc a b c nc-0 nc-0 nc-0 (pubk d))))+    ((recv (enc a b d nc-0 nb-0 (pubk c)))+      (send (enc a b c nc-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nb-0 (pubk c))))+    ((recv (enc a b c nc-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nc-0 nb-0 nc-0 nd-0 (pubk a)))))+  (label 105)+  (parent 47)+  (unrealized (0 1) (2 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (1 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (2 0)+    (enc a b c nb-0 nb-0 nc-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nc-0 nd-0 (pubk a)))))+  (label 106)+  (parent 47)+  (unrealized (0 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nd-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-1) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (2 0)+    (enc a b c nb-0 nb-1 nc-0 (pubk d)) (enc a b d nb-0 nb-1 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b c nb-0 nb-1 nc-0 (pubk d)))+      (send (enc b c d nb-0 nb-1 nc-0 nd-0 (pubk a)))))+  (label 107)+  (parent 47)+  (unrealized (0 1) (2 0) (5 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (3 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp1 2) nb-1 (5 0)+    (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-2 (pubk c)))))+  (label 108)+  (parent 48)+  (unrealized (0 1) (3 0) (5 0))+  (comment "4 in cohort - 4 not yet seen"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (3 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp1 2) nb-1 (5 0)+    (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-2 (pubk c)))))+  (label 109)+  (parent 49)+  (unrealized (0 1) (3 0) (5 0))+  (comment "4 in cohort - 4 not yet seen"))++(comment "Strand bound exceeded--aborting run")++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nb-1 nc-0 nb-2 nc-1 nb-3 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-2) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-2) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-3) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (7 0))+    ((1 1) (0 1)) ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0))+    ((5 1) (4 0)) ((6 1) (4 0)) ((7 1) (6 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (6 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-2 (pubk c))))+    ((recv (enc a b d nb-0 nb-2 (pubk c)))+      (send (enc a b c nb-0 nb-2 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-3 (pubk c)))))+  (label 110)+  (parent 50)+  (unrealized (0 1) (2 0) (4 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (0 1)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nc-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 111)+  (parent 51)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nc-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (0 1)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nc-0 (pubk c))))+    ((recv (enc a b d nb-0 nc-0 (pubk c)))+      (send (enc a b c nb-0 nc-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 112)+  (parent 52)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (0 1)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nc-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nc-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 113)+  (parent 53)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (0 1)) ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (contracted (nb-1 nb-0)) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c)))))+  (label 114)+  (parent 54)+  (unrealized (0 1))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 115)+  (parent 54)+  (unrealized (0 1) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d)))))+  (label 116)+  (parent 54)+  (unrealized (0 1) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nb-1 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-1 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-1 (pubk d)))))+  (label 117)+  (parent 54)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nd-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nc-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 118)+  (parent 55)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nd-0 nb-0 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nc-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d)))))+  (label 119)+  (parent 55)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 nb-1 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (3 0)+    (enc a b d nb-0 nb-1 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nc-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-1 (pubk d)))))+  (label 120)+  (parent 55)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nc-0 (pubk c)))))+  (label 121)+  (parent 56)+  (unrealized (0 1))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nb-0 (pubk a)))))+  (label 122)+  (parent 56)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nc-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nc-0 (pubk a)))))+  (label 123)+  (parent 56)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nd-0 (pubk a)))))+  (label 124)+  (parent 56)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nc-0 nd-0 (pubk a)))))+  (label 125)+  (parent 56)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 126)+  (parent 57)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 127)+  (parent 58)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nb-1 nc-1 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (3 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (5 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-2 (pubk c)))))+  (label 128)+  (parent 59)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nc-1 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nc-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nc-1 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nc-1 (pubk c)))))+  (label 129)+  (parent 60)+  (unrealized (0 1))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nc-1 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nc-1 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nc-0 (pubk c)))))+  (label 130)+  (parent 60)+  (unrealized (0 1))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nc-1 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nc-1 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 131)+  (parent 60)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nc-1 nb-0 nd-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nc-1 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nc-0 nd-0 (pubk a)))))+  (label 132)+  (parent 60)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nc-1 nb-0 nd-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nc-1) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nc-1 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nc-1 (pubk d)))+      (send (enc b c d nb-0 nb-0 nc-1 nd-0 (pubk a)))))+  (label 133)+  (parent 60)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nc-1 nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 134)+  (parent 61)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nc-1 nb-0 nc-2 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-2 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 135)+  (parent 62)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 nb-1 nc-2 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (3 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (5 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-2 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-2 (pubk c)))))+  (label 136)+  (parent 63)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nc-1 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (1 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (2 0)+    (enc a b c nb-0 nb-0 nc-1 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 137)+  (parent 64)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nc-1 nb-0 text) (a b c d name))+  (defstrand init 3 (na nc-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-1) (nb nc-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nc-1) (nb nc-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-1) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nc-1) (nb nb-0) (nc nc-1) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nc-1)+  (operation nonce-test (added-strand resp3 2) nc-1 (2 0)+    (enc a b c nc-1 nb-0 nc-1 (pubk d)) (enc a b d nc-1 nb-0 (pubk c))+    (enc a c d nc-1 (pubk b)))+  (traces+    ((send (enc a c d nc-1 (pubk b)))+      (recv (enc b c d nc-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nc-1 (pubk b)))+      (send (enc a b d nc-1 nc-1 (pubk c))))+    ((recv (enc a b d nc-1 nc-1 (pubk c)))+      (send (enc a b c nc-1 nc-1 nc-0 (pubk d))))+    ((recv (enc a b d nc-1 nb-0 (pubk c)))+      (send (enc a b c nc-1 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nc-1 (pubk b)))+      (send (enc a b d nc-1 nb-0 (pubk c))))+    ((recv (enc a b c nc-1 nb-0 nc-1 (pubk d)))+      (send (enc b c d nc-1 nb-0 nc-1 nb-0 (pubk a)))))+  (label 138)+  (parent 64)+  (unrealized (0 1) (2 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nc-1 text) (a b c d name))+  (defstrand init 3 (na nc-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-1) (nb nc-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-1) (nb nc-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-1) (nb nc-1) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nc-1) (nb nc-1) (nc nc-1) (nd nc-1) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (1 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nc-1)+  (operation nonce-test (added-strand resp3 2) nc-1 (2 0)+    (enc a b c nc-1 nc-1 nc-1 (pubk d)) (enc a b d nc-1 nc-1 (pubk c))+    (enc a c d nc-1 (pubk b)))+  (traces+    ((send (enc a c d nc-1 (pubk b)))+      (recv (enc b c d nc-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nc-1 nc-1 (pubk c)))+      (send (enc a b c nc-1 nc-1 nc-0 (pubk d))))+    ((recv (enc a b d nc-1 nc-1 (pubk c)))+      (send (enc a b c nc-1 nc-1 nc-1 (pubk d))))+    ((recv (enc a c d nc-1 (pubk b)))+      (send (enc a b d nc-1 nc-1 (pubk c))))+    ((recv (enc a b c nc-1 nc-1 nc-1 (pubk d)))+      (send (enc b c d nc-1 nc-1 nc-1 nc-1 (pubk a)))))+  (label 139)+  (parent 64)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nc-1 nb-0 nd-0 text) (a b c d name))+  (defstrand init 3 (na nc-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-1) (nb nc-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nc-1) (nb nc-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-1) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nc-1) (nb nb-0) (nc nc-1) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nc-1)+  (operation nonce-test (added-strand resp3 2) nc-1 (2 0)+    (enc a b c nc-1 nb-0 nc-1 (pubk d)) (enc a b d nc-1 nb-0 (pubk c))+    (enc a c d nc-1 (pubk b)))+  (traces+    ((send (enc a c d nc-1 (pubk b)))+      (recv (enc b c d nc-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nc-1 (pubk b)))+      (send (enc a b d nc-1 nc-1 (pubk c))))+    ((recv (enc a b d nc-1 nc-1 (pubk c)))+      (send (enc a b c nc-1 nc-1 nc-0 (pubk d))))+    ((recv (enc a b d nc-1 nb-0 (pubk c)))+      (send (enc a b c nc-1 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nc-1 (pubk b)))+      (send (enc a b d nc-1 nb-0 (pubk c))))+    ((recv (enc a b c nc-1 nb-0 nc-1 (pubk d)))+      (send (enc b c d nc-1 nb-0 nc-1 nd-0 (pubk a)))))+  (label 140)+  (parent 64)+  (unrealized (0 1) (2 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nc-1 nb-0 nd-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nc-1) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (1 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (2 0)+    (enc a b c nb-0 nb-0 nc-1 (pubk d)) (enc a b d nb-0 nb-0 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nc-1 (pubk d)))+      (send (enc b c d nb-0 nb-0 nc-1 nd-0 (pubk a)))))+  (label 141)+  (parent 64)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nc-1 nb-1 nd-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-1) (nc nc-1) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (2 0)+    (enc a b c nb-0 nb-1 nc-1 (pubk d)) (enc a b d nb-0 nb-1 (pubk c))+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b c nb-0 nb-1 nc-1 (pubk d)))+      (send (enc b c d nb-0 nb-1 nc-1 nd-0 (pubk a)))))+  (label 142)+  (parent 64)+  (unrealized (0 1) (2 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 nb-1 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (3 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp1 2) nb-1 (5 0)+    (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-2 (pubk c)))))+  (label 143)+  (parent 65)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 nb-1 nc-2 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (3 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp1 2) nb-1 (5 0)+    (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-2 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-2 (pubk c)))))+  (label 144)+  (parent 66)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 nb-2 nc-2 nb-3 text)+    (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-2) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-2) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-3) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (7 0))+    ((1 1) (0 1)) ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0))+    ((5 1) (4 0)) ((6 1) (4 0)) ((7 1) (6 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (6 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-2 (pubk c))))+    ((recv (enc a b d nb-0 nb-2 (pubk c)))+      (send (enc a b c nb-0 nb-2 nc-2 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-3 (pubk c)))))+  (label 145)+  (parent 67)+  (unrealized (0 1) (2 0) (4 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-1) (nb nb-0) (nc nb-1) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (3 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b c nb-1 nb-0 nb-1 (pubk d)))+      (send (enc b c d nb-1 nb-0 nb-1 nb-0 (pubk a))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d)))))+  (label 146)+  (parent 68)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nb-1 nc-0 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-1) (nb nb-0) (nc nb-1) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (3 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b c nb-1 nb-0 nb-1 (pubk d)))+      (send (enc b c d nb-1 nb-0 nb-1 nb-0 (pubk a))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-0 (pubk d)))))+  (label 147)+  (parent 68)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nb-1 nc-1 text) (a b c d name))+  (defstrand init 3 (na nc-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nc-0) (nb nb-0) (nc nc-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nc-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nc-0) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nc-0)+  (operation nonce-test (added-strand resp2 2) nc-0 (3 0)+    (enc a b d nc-0 nb-1 (pubk c)) (enc a c d nc-0 (pubk b)))+  (traces+    ((send (enc a c d nc-0 (pubk b)))+      (recv (enc b c d nc-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nc-0 nb-0 (pubk c)))+      (send (enc a b c nc-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nb-0 (pubk c))))+    ((recv (enc a b c nc-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nc-0 nb-0 nc-0 nb-0 (pubk a))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nb-1 (pubk c))))+    ((recv (enc a b d nc-0 nb-1 (pubk c)))+      (send (enc a b c nc-0 nb-1 nc-1 (pubk d)))))+  (label 148)+  (parent 68)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nd-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-1) (nb nb-0) (nc nb-1) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (3 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b c nb-1 nb-0 nb-1 (pubk d)))+      (send (enc b c d nb-1 nb-0 nb-1 nd-0 (pubk a))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d)))))+  (label 149)+  (parent 69)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nd-0 nb-1 nc-0 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-1) (nb nb-0) (nc nb-1) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (3 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b c nb-1 nb-0 nb-1 (pubk d)))+      (send (enc b c d nb-1 nb-0 nb-1 nd-0 (pubk a))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-0 (pubk d)))))+  (label 150)+  (parent 69)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 nb-1 nc-1 text) (a b c d name))+  (defstrand init 3 (na nc-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nc-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nc-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nc-0) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nc-0)+  (operation nonce-test (added-strand resp2 2) nc-0 (3 0)+    (enc a b d nc-0 nb-1 (pubk c)) (enc a c d nc-0 (pubk b)))+  (traces+    ((send (enc a c d nc-0 (pubk b)))+      (recv (enc b c d nc-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nc-0 nb-0 (pubk c)))+      (send (enc a b c nc-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nb-0 (pubk c))))+    ((recv (enc a b c nc-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nc-0 nb-0 nc-0 nd-0 (pubk a))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nb-1 (pubk c))))+    ((recv (enc a b d nc-0 nb-1 (pubk c)))+      (send (enc a b c nc-0 nb-1 nc-1 (pubk d)))))+  (label 151)+  (parent 69)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-1) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (3 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b c nb-1 nb-0 nc-0 (pubk d)))+      (send (enc b c d nb-1 nb-0 nc-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d)))))+  (label 152)+  (parent 70)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 nb-1 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-1) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (3 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b c nb-1 nb-0 nc-0 (pubk d)))+      (send (enc b c d nb-1 nb-0 nc-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d)))))+  (label 153)+  (parent 70)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (na nb nc nd nc-0 nb-0 nd-0 nb-1 nc-1 text) (a b c d name))+  (defstrand init 3 (na na) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na na) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na na) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na na) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na na) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig na)+  (operation nonce-test (added-strand resp2 2) na (3 0)+    (enc a b d na nb-1 (pubk c)) (enc a c d na (pubk b)))+  (traces+    ((send (enc a c d na (pubk b)))+      (recv (enc b c d na nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d na nb-0 (pubk c)))+      (send (enc a b c na nb-0 nc-0 (pubk d))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-0 (pubk c))))+    ((recv (enc a b c na nb-0 nc-0 (pubk d)))+      (send (enc b c d na nb-0 nc-0 nd-0 (pubk a))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-1 (pubk c))))+    ((recv (enc a b d na nb-1 (pubk c)))+      (send (enc a b c na nb-1 nc-1 (pubk d)))))+  (label 154)+  (parent 70)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-1) (nb nb-1) (nc nb-1) (nd nb-1) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp3 2) nb-1 (2 0)+    (enc a b c nb-1 nb-1 nb-1 (pubk d)) (enc a b d nb-1 nb-1 (pubk c))+    (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b c nb-1 nb-1 nb-1 (pubk d)))+      (send (enc b c d nb-1 nb-1 nb-1 nb-1 (pubk a)))))+  (label 155)+  (parent 71)+  (unrealized (0 1) (2 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nd-0 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-1) (nb nb-1) (nc nb-1) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp3 2) nb-1 (2 0)+    (enc a b c nb-1 nb-1 nb-1 (pubk d)) (enc a b d nb-1 nb-1 (pubk c))+    (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b c nb-1 nb-1 nb-1 (pubk d)))+      (send (enc b c d nb-1 nb-1 nb-1 nd-0 (pubk a)))))+  (label 156)+  (parent 71)+  (unrealized (0 1) (2 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp1 2) nb-1 (5 0)+    (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-2 (pubk c)))))+  (label 157)+  (parent 72)+  (unrealized (0 1) (2 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp1 2) nb-1 (5 0)+    (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-2 (pubk c)))))+  (label 158)+  (parent 73)+  (unrealized (0 1) (2 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nb-2 nc-1 nb-3 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-2) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-2) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-3) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (7 0))+    ((1 1) (0 1)) ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0))+    ((5 1) (4 0)) ((6 1) (4 0)) ((7 1) (6 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp1 2) nb-1 (6 0)+    (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-2 (pubk c))))+    ((recv (enc a b d nb-1 nb-2 (pubk c)))+      (send (enc a b c nb-1 nb-2 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-3 (pubk c)))))+  (label 159)+  (parent 74)+  (unrealized (0 1) (2 0) (4 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nc-1 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp1 2 (na nb-1) (nb nc-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp1 2) nb-1 (2 0)+    (enc a b c nb-1 nb-1 nc-1 (pubk d)) (enc a b d nb-1 nb-1 (pubk c))+    (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nc-1 (pubk c)))))+  (label 160)+  (parent 75)+  (unrealized (0 1) (2 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nc-1 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (2 0)+    (enc a b c nb-1 nb-1 nc-1 (pubk d)) (enc a b d nb-1 nb-1 (pubk c))+    (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d)))))+  (label 161)+  (parent 75)+  (unrealized (0 1) (2 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nc-1 nb-1 nd-0 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-1) (nb nb-1) (nc nc-1) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp3 2) nb-1 (2 0)+    (enc a b c nb-1 nb-1 nc-1 (pubk d)) (enc a b d nb-1 nb-1 (pubk c))+    (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b c nb-1 nb-1 nc-1 (pubk d)))+      (send (enc b c d nb-1 nb-1 nc-1 nd-0 (pubk a)))))+  (label 162)+  (parent 75)+  (unrealized (0 1) (2 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nc-1 nb-1 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp1 2) nb-1 (5 0)+    (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-2 (pubk c)))))+  (label 163)+  (parent 76)+  (unrealized (0 1) (2 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nc-1 nb-1 nc-2 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp1 2) nb-1 (5 0)+    (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-2 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-2 (pubk c)))))+  (label 164)+  (parent 77)+  (unrealized (0 1) (2 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 nb-2 nc-2 nb-3 text)+    (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-2) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-2) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-3) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (7 0))+    ((1 1) (0 1)) ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0))+    ((5 1) (4 0)) ((6 1) (4 0)) ((7 1) (6 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp1 2) nb-1 (6 0)+    (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-2 (pubk c))))+    ((recv (enc a b d nb-1 nb-2 (pubk c)))+      (send (enc a b c nb-1 nb-2 nc-2 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-3 (pubk c)))))+  (label 165)+  (parent 78)+  (unrealized (0 1) (2 0) (4 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (na nb nc nd nc-0 nc-1 nb-0 text) (a b c d name))+  (defstrand init 3 (na na) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na na) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na na) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig na)+  (operation nonce-test (contracted (nb-1 nb-0)) na (2 0)+    (enc a b c na nb-0 nc-1 (pubk d)) (enc a b d na nb-0 (pubk c))+    (enc a c d na (pubk b)))+  (traces+    ((send (enc a c d na (pubk b)))+      (recv (enc b c d na nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d na nb-0 (pubk c)))+      (send (enc a b c na nb-0 nc-0 (pubk d))))+    ((recv (enc a b d na nb-0 (pubk c)))+      (send (enc a b c na nb-0 nc-1 (pubk d))))+    ((recv (enc a c d na (pubk b)))+      (send (enc a b d na nb-0 (pubk c)))))+  (label 166)+  (parent 79)+  (unrealized (0 1))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nc-1 nb-1 text) (a b c d name))+  (defstrand init 3 (na nc-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nc-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nc-1) (nb nb-1) (nc nc-1) (nd nb-1) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nc-1)+  (operation nonce-test (added-strand resp3 2) nc-1 (2 0)+    (enc a b c nc-1 nb-1 nc-1 (pubk d)) (enc a b d nc-1 nb-1 (pubk c))+    (enc a c d nc-1 (pubk b)))+  (traces+    ((send (enc a c d nc-1 (pubk b)))+      (recv (enc b c d nc-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nc-1 (pubk b)))+      (send (enc a b d nc-1 nb-0 (pubk c))))+    ((recv (enc a b d nc-1 nb-0 (pubk c)))+      (send (enc a b c nc-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nc-1 nb-1 (pubk c)))+      (send (enc a b c nc-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nc-1 (pubk b)))+      (send (enc a b d nc-1 nb-1 (pubk c))))+    ((recv (enc a b c nc-1 nb-1 nc-1 (pubk d)))+      (send (enc b c d nc-1 nb-1 nc-1 nb-1 (pubk a)))))+  (label 167)+  (parent 79)+  (unrealized (0 1) (2 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nc-1 nb-1 nd-0 text) (a b c d name))+  (defstrand init 3 (na nc-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nc-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nc-1) (nb nb-1) (nc nc-1) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nc-1)+  (operation nonce-test (added-strand resp3 2) nc-1 (2 0)+    (enc a b c nc-1 nb-1 nc-1 (pubk d)) (enc a b d nc-1 nb-1 (pubk c))+    (enc a c d nc-1 (pubk b)))+  (traces+    ((send (enc a c d nc-1 (pubk b)))+      (recv (enc b c d nc-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nc-1 (pubk b)))+      (send (enc a b d nc-1 nb-0 (pubk c))))+    ((recv (enc a b d nc-1 nb-0 (pubk c)))+      (send (enc a b c nc-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nc-1 nb-1 (pubk c)))+      (send (enc a b c nc-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nc-1 (pubk b)))+      (send (enc a b d nc-1 nb-1 (pubk c))))+    ((recv (enc a b c nc-1 nb-1 nc-1 (pubk d)))+      (send (enc b c d nc-1 nb-1 nc-1 nd-0 (pubk a)))))+  (label 168)+  (parent 79)+  (unrealized (0 1) (2 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (na nb nc nd nb-0 nc-0 nc-1 nb-1 nd-0 text) (a b c d name))+  (defstrand init 3 (na na) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na na) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na na) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na na) (nb nb-1) (nc nc-1) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig na)+  (operation nonce-test (added-strand resp3 2) na (2 0)+    (enc a b c na nb-1 nc-1 (pubk d)) (enc a b d na nb-1 (pubk c))+    (enc a c d na (pubk b)))+  (traces+    ((send (enc a c d na (pubk b)))+      (recv (enc b c d na nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-0 (pubk c))))+    ((recv (enc a b d na nb-0 (pubk c)))+      (send (enc a b c na nb-0 nc-0 (pubk d))))+    ((recv (enc a b d na nb-1 (pubk c)))+      (send (enc a b c na nb-1 nc-1 (pubk d))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-1 (pubk c))))+    ((recv (enc a b c na nb-1 nc-1 (pubk d)))+      (send (enc b c d na nb-1 nc-1 nd-0 (pubk a)))))+  (label 169)+  (parent 79)+  (unrealized (0 1) (2 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 nb-2 nb-3 text) (a b c d name))+  (defstrand init 3 (na nb-2) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-2) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-2) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-2) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-2) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-2) (nb nb-2) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-2) (nb nb-2) (nc nb-2) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-2) (nb nb-3) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (7 0))+    ((1 1) (0 1)) ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0))+    ((5 1) (4 0)) ((6 1) (4 0)) ((7 1) (6 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-2)+  (operation nonce-test (added-strand resp1 2) nb-2 (6 0)+    (enc a c d nb-2 (pubk b)))+  (traces+    ((send (enc a c d nb-2 (pubk b)))+      (recv (enc b c d nb-2 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-2 (pubk b)))+      (send (enc a b d nb-2 nb-0 (pubk c))))+    ((recv (enc a b d nb-2 nb-0 (pubk c)))+      (send (enc a b c nb-2 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-2 (pubk b)))+      (send (enc a b d nb-2 nb-1 (pubk c))))+    ((recv (enc a b d nb-2 nb-1 (pubk c)))+      (send (enc a b c nb-2 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-2 (pubk b)))+      (send (enc a b d nb-2 nb-2 (pubk c))))+    ((recv (enc a b d nb-2 nb-2 (pubk c)))+      (send (enc a b c nb-2 nb-2 nb-2 (pubk d))))+    ((recv (enc a c d nb-2 (pubk b)))+      (send (enc a b d nb-2 nb-3 (pubk c)))))+  (label 170)+  (parent 80)+  (unrealized (0 1) (2 0) (4 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 nb-2 nc-2 nb-3 text)+    (a b c d name))+  (defstrand init 3 (na nb-2) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-2) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-2) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-2) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-2) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-2) (nb nb-2) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-2) (nb nb-2) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-2) (nb nb-3) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (7 0))+    ((1 1) (0 1)) ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0))+    ((5 1) (4 0)) ((6 1) (4 0)) ((7 1) (6 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-2)+  (operation nonce-test (added-strand resp1 2) nb-2 (6 0)+    (enc a c d nb-2 (pubk b)))+  (traces+    ((send (enc a c d nb-2 (pubk b)))+      (recv (enc b c d nb-2 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-2 (pubk b)))+      (send (enc a b d nb-2 nb-0 (pubk c))))+    ((recv (enc a b d nb-2 nb-0 (pubk c)))+      (send (enc a b c nb-2 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-2 (pubk b)))+      (send (enc a b d nb-2 nb-1 (pubk c))))+    ((recv (enc a b d nb-2 nb-1 (pubk c)))+      (send (enc a b c nb-2 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-2 (pubk b)))+      (send (enc a b d nb-2 nb-2 (pubk c))))+    ((recv (enc a b d nb-2 nb-2 (pubk c)))+      (send (enc a b c nb-2 nb-2 nc-2 (pubk d))))+    ((recv (enc a c d nb-2 (pubk b)))+      (send (enc a b d nb-2 nb-3 (pubk c)))))+  (label 171)+  (parent 81)+  (unrealized (0 1) (2 0) (4 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (na nb nc nd nb-0 nc-0 nb-1 nc-1 nb-2 nc-2 nb-3 text)+    (a b c d name))+  (defstrand init 3 (na na) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na na) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na na) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-2) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na na) (nb nb-2) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na na) (nb nb-3) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (7 0))+    ((1 1) (0 1)) ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (2 0))+    ((5 1) (4 0)) ((6 1) (4 0)) ((7 1) (6 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig na)+  (operation nonce-test (added-strand resp1 2) na (6 0)+    (enc a c d na (pubk b)))+  (traces+    ((send (enc a c d na (pubk b)))+      (recv (enc b c d na nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-0 (pubk c))))+    ((recv (enc a b d na nb-0 (pubk c)))+      (send (enc a b c na nb-0 nc-0 (pubk d))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-1 (pubk c))))+    ((recv (enc a b d na nb-1 (pubk c)))+      (send (enc a b c na nb-1 nc-1 (pubk d))))+    ((recv (enc a c d na (pubk b))) (send (enc a b d na nb-2 (pubk c))))+    ((recv (enc a b d na nb-2 (pubk c)))+      (send (enc a b c na nb-2 nc-2 (pubk d))))+    ((recv (enc a c d na (pubk b)))+      (send (enc a b d na nb-3 (pubk c)))))+  (label 172)+  (parent 82)+  (unrealized (0 1) (2 0) (4 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (5 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nb-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 173)+  (parent 83)+  (unrealized (0 1) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (5 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nb-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 174)+  (parent 84)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nb-1 nc-0 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (5 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nb-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-2 (pubk c)))))+  (label 175)+  (parent 85)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nd-0 nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (5 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 176)+  (parent 86)+  (unrealized (0 1) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nd-0 nb-0 nc-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (5 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 177)+  (parent 87)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nd-0 nb-1 nc-0 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (0 1)) ((4 1) (3 0)) ((5 1) (3 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (5 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-2 (pubk c)))))+  (label 178)+  (parent 88)+  (unrealized (0 1) (3 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nb-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 179)+  (parent 89)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nd-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 180)+  (parent 90)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0))+    ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (contracted (nb-1 nb-0)) nb-0 (4 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c)))))+  (label 181)+  (parent 91)+  (unrealized (0 1))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (4 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 182)+  (parent 91)+  (unrealized (0 1) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (4 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d)))))+  (label 183)+  (parent 91)+  (unrealized (0 1) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nb-1 nc-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0))+    ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (4 0)+    (enc a b d nb-0 nb-1 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-0 (pubk d)))))+  (label 184)+  (parent 91)+  (unrealized (0 1) (4 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0))+    ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (contracted (nb-1 nb-0)) nb-0 (4 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c)))))+  (label 185)+  (parent 92)+  (unrealized (0 1))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (4 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 186)+  (parent 92)+  (unrealized (0 1) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (4 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d)))))+  (label 187)+  (parent 92)+  (unrealized (0 1) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0))+    ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (4 0)+    (enc a b d nb-0 nb-1 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-1 (pubk d)))))+  (label 188)+  (parent 92)+  (unrealized (0 1) (4 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (contracted (nb-2 nb-1)) nb-0 (5 0)+    (enc a b d nb-0 nb-1 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 189)+  (parent 93)+  (unrealized (0 1) (3 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0))+    ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (5 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d)))))+  (label 190)+  (parent 93)+  (unrealized (0 1) (4 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0))+    ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (5 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d)))))+  (label 191)+  (parent 93)+  (unrealized (0 1) (4 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nb-1 nc-0 nb-2 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-2) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-2) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((0 0) (7 0))+    ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0))+    ((5 1) (3 0)) ((6 1) (5 0)) ((7 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (5 0)+    (enc a b d nb-0 nb-2 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-2 (pubk c))))+    ((recv (enc a b d nb-0 nb-2 (pubk c)))+      (send (enc a b c nb-0 nb-2 nc-1 (pubk d)))))+  (label 192)+  (parent 93)+  (unrealized (0 1) (3 0) (5 0) (7 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nc-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (0 1)) ((5 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nc-0 (pubk c))+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nc-0 (pubk c))))+    ((recv (enc a b d nb-0 nc-0 (pubk c)))+      (send (enc a b c nb-0 nc-0 nc-1 (pubk d)))))+  (label 193)+  (parent 94)+  (unrealized (0 1) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (0 1)) ((5 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nc-0 (pubk c))+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nc-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nb-0 (pubk a)))))+  (label 194)+  (parent 94)+  (unrealized (0 1) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nc-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (0 1)) ((5 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nc-0 (pubk c))+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nc-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nc-0 (pubk a)))))+  (label 195)+  (parent 94)+  (unrealized (0 1) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (0 1)) ((5 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nc-0 (pubk c))+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nc-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nd-0 (pubk a)))))+  (label 196)+  (parent 94)+  (unrealized (0 1) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (0 1)) ((5 1) (0 1)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp3 2) nb-0 (0 1)+    (enc a b c nb-0 nb-0 nc-0 (pubk d))+    (enc a b c nb-0 nb-0 nb-0 (pubk d)) (enc a b d nb-0 nc-0 (pubk c))+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nc-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nc-0 nd-0 (pubk a)))))+  (label 197)+  (parent 94)+  (unrealized (0 1) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nb-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 198)+  (parent 95)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nc-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nc-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 199)+  (parent 96)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nb-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nb-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nb-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 200)+  (parent 97)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (0 1)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nc-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 201)+  (parent 98)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0))+    ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (contracted (nb-1 nb-0)) nb-0 (4 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c)))))+  (label 202)+  (parent 99)+  (unrealized (0 1))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (4 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 203)+  (parent 99)+  (unrealized (0 1) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (4 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d)))))+  (label 204)+  (parent 99)+  (unrealized (0 1) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nb-1 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0))+    ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (4 0)+    (enc a b d nb-0 nb-1 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-1 (pubk d)))))+  (label 205)+  (parent 99)+  (unrealized (0 1) (4 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nc-1 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (4 0)) ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (2 0))+    ((4 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (contracted (nb-1 nb-0)) nb-0 (4 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c)))))+  (label 206)+  (parent 100)+  (unrealized (0 1))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nc-1 nb-0 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (4 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d)))))+  (label 207)+  (parent 100)+  (unrealized (0 1) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nc-1 nb-0 nc-2 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (4 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (3 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (4 0)+    (enc a b d nb-0 nb-0 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-2 (pubk d)))))+  (label 208)+  (parent 100)+  (unrealized (0 1) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 nb-1 nc-2 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0))+    ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (4 0)+    (enc a b d nb-0 nb-1 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-2 (pubk d)))))+  (label 209)+  (parent 100)+  (unrealized (0 1) (4 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nc-1 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (contracted (nb-2 nb-1)) nb-0 (5 0)+    (enc a b d nb-0 nb-1 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 210)+  (parent 101)+  (unrealized (0 1) (3 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0))+    ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (5 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d)))))+  (label 211)+  (parent 101)+  (unrealized (0 1) (4 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nc-1 nb-1 nc-2 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (2 0)) ((5 1) (4 0))+    ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (5 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-2 (pubk d)))))+  (label 212)+  (parent 101)+  (unrealized (0 1) (4 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 nb-2 nc-2 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-2) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-2) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((0 0) (7 0))+    ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0))+    ((5 1) (3 0)) ((6 1) (5 0)) ((7 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp2 2) nb-0 (5 0)+    (enc a b d nb-0 nb-2 (pubk c)) (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-2 (pubk c))))+    ((recv (enc a b d nb-0 nb-2 (pubk c)))+      (send (enc a b c nb-0 nb-2 nc-2 (pubk d)))))+  (label 213)+  (parent 101)+  (unrealized (0 1) (3 0) (5 0) (7 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (1 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 214)+  (parent 102)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nc-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nc-0) (nb nc-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nc-0) (nb nb-0) (nc nc-0) (nd nb-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nc-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nc-0)+  (operation nonce-test (added-strand resp1 2) nc-0 (5 0)+    (enc a c d nc-0 (pubk b)))+  (traces+    ((send (enc a c d nc-0 (pubk b)))+      (recv (enc b c d nc-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nc-0 (pubk c))))+    ((recv (enc a b d nc-0 nc-0 (pubk c)))+      (send (enc a b c nc-0 nc-0 nc-0 (pubk d))))+    ((recv (enc a b d nc-0 nb-0 (pubk c)))+      (send (enc a b c nc-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nb-0 (pubk c))))+    ((recv (enc a b c nc-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nc-0 nb-0 nc-0 nb-0 (pubk a))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nb-1 (pubk c)))))+  (label 215)+  (parent 103)+  (unrealized (0 1) (2 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 text) (a b c d name))+  (defstrand init 3 (na nc-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-0) (nb nc-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-0) (nb nc-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nc-0) (nb nc-0) (nc nc-0) (nd nc-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nc-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (1 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nc-0)+  (operation nonce-test (added-strand resp1 2) nc-0 (4 0)+    (enc a c d nc-0 (pubk b)))+  (traces+    ((send (enc a c d nc-0 (pubk b)))+      (recv (enc b c d nc-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nc-0 nc-0 (pubk c)))+      (send (enc a b c nc-0 nc-0 nc-0 (pubk d))))+    ((recv (enc a b d nc-0 nc-0 (pubk c)))+      (send (enc a b c nc-0 nc-0 nc-0 (pubk d))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nc-0 (pubk c))))+    ((recv (enc a b c nc-0 nc-0 nc-0 (pubk d)))+      (send (enc b c d nc-0 nc-0 nc-0 nc-0 (pubk a))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nb-0 (pubk c)))))+  (label 216)+  (parent 104)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nc-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-0) (nb nc-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nc-0) (nb nc-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nc-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nc-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nc-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nc-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nc-0)+  (operation nonce-test (added-strand resp1 2) nc-0 (5 0)+    (enc a c d nc-0 (pubk b)))+  (traces+    ((send (enc a c d nc-0 (pubk b)))+      (recv (enc b c d nc-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nc-0 (pubk c))))+    ((recv (enc a b d nc-0 nc-0 (pubk c)))+      (send (enc a b c nc-0 nc-0 nc-0 (pubk d))))+    ((recv (enc a b d nc-0 nb-0 (pubk c)))+      (send (enc a b c nc-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nb-0 (pubk c))))+    ((recv (enc a b c nc-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nc-0 nb-0 nc-0 nd-0 (pubk a))))+    ((recv (enc a c d nc-0 (pubk b)))+      (send (enc a b d nc-0 nb-1 (pubk c)))))+  (label 217)+  (parent 105)+  (unrealized (0 1) (2 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nc-0 nb-0 nd-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-0) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (3 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (2 0)) ((4 1) (1 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (4 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b c nb-0 nb-0 nc-0 (pubk d)))+      (send (enc b c d nb-0 nb-0 nc-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c)))))+  (label 218)+  (parent 106)+  (unrealized (0 1) (4 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nd-0 nb-2 text) (a b c d name))+  (defstrand init 3 (na nb-0) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-0) (nc nb-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-0) (nb nb-1) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp3 2 (na nb-0) (nb nb-1) (nc nc-0) (nd nd-0) (a a) (b b)+    (c c) (d d))+  (defstrand resp1 2 (na nb-0) (nb nb-2) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (1 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (0 1)) ((3 1) (2 0)) ((4 1) (3 0)) ((5 1) (2 0))+    ((6 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-0)+  (operation nonce-test (added-strand resp1 2) nb-0 (5 0)+    (enc a c d nb-0 (pubk b)))+  (traces+    ((send (enc a c d nb-0 (pubk b)))+      (recv (enc b c d nb-0 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-0 (pubk c))))+    ((recv (enc a b d nb-0 nb-0 (pubk c)))+      (send (enc a b c nb-0 nb-0 nb-0 (pubk d))))+    ((recv (enc a b d nb-0 nb-1 (pubk c)))+      (send (enc a b c nb-0 nb-1 nc-0 (pubk d))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-1 (pubk c))))+    ((recv (enc a b c nb-0 nb-1 nc-0 (pubk d)))+      (send (enc b c d nb-0 nb-1 nc-0 nd-0 (pubk a))))+    ((recv (enc a c d nb-0 (pubk b)))+      (send (enc a b d nb-0 nb-2 (pubk c)))))+  (label 219)+  (parent 107)+  (unrealized (0 1) (2 0) (5 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (contracted (nb-2 nb-1)) nb-1 (5 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c)))))+  (label 220)+  (parent 108)+  (unrealized (0 1) (3 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (4 0))+    ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (5 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d)))))+  (label 221)+  (parent 108)+  (unrealized (0 1) (3 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (4 0))+    ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (5 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d)))))+  (label 222)+  (parent 108)+  (unrealized (0 1) (3 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nb-2 nc-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-2) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-2) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((0 0) (7 0))+    ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0))+    ((5 1) (3 0)) ((6 1) (5 0)) ((7 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (5 0)+    (enc a b d nb-1 nb-2 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-2 (pubk c))))+    ((recv (enc a b d nb-1 nb-2 (pubk c)))+      (send (enc a b c nb-1 nb-2 nc-1 (pubk d)))))+  (label 223)+  (parent 108)+  (unrealized (0 1) (3 0) (5 0) (7 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nc-1 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (precedes ((0 0) (2 0)) ((0 0) (5 0)) ((1 1) (0 1)) ((2 1) (1 0))+    ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (contracted (nb-2 nb-1)) nb-1 (5 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c)))))+  (label 224)+  (parent 109)+  (unrealized (0 1) (3 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nc-1 nb-1 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (4 0))+    ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (5 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d)))))+  (label 225)+  (parent 109)+  (unrealized (0 1) (3 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nc-1 nb-1 nc-2 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (5 0)) ((0 0) (6 0)) ((1 1) (0 1))+    ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0)) ((5 1) (4 0))+    ((6 1) (4 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (5 0)+    (enc a b d nb-1 nb-1 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-2 (pubk d)))))+  (label 226)+  (parent 109)+  (unrealized (0 1) (3 0) (6 0))+  (comment "aborted"))++(defskeleton nsl4cm+  (vars (nb nc nd nb-0 nc-0 nb-1 nc-1 nb-2 nc-2 text) (a b c d name))+  (defstrand init 3 (na nb-1) (nb nb) (nc nc) (nd nd) (a a) (b b) (c c)+    (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nb-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-0) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-0) (nc nc-0) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-1) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-1) (nc nc-1) (a a) (b b) (c c)+    (d d))+  (defstrand resp1 2 (na nb-1) (nb nb-2) (a a) (b b) (c c) (d d))+  (defstrand resp2 2 (na nb-1) (nb nb-2) (nc nc-2) (a a) (b b) (c c)+    (d d))+  (precedes ((0 0) (2 0)) ((0 0) (4 0)) ((0 0) (6 0)) ((0 0) (7 0))+    ((1 1) (0 1)) ((2 1) (1 0)) ((3 1) (1 0)) ((4 1) (3 0))+    ((5 1) (3 0)) ((6 1) (5 0)) ((7 1) (5 0)))+  (non-orig (privk a) (privk b) (privk c) (privk d))+  (uniq-orig nb-1)+  (operation nonce-test (added-strand resp2 2) nb-1 (5 0)+    (enc a b d nb-1 nb-2 (pubk c)) (enc a c d nb-1 (pubk b)))+  (traces+    ((send (enc a c d nb-1 (pubk b)))+      (recv (enc b c d nb-1 nb nc nd (pubk a)))+      (send (enc nb nc nd (pubk b))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nb-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-0 (pubk c))))+    ((recv (enc a b d nb-1 nb-0 (pubk c)))+      (send (enc a b c nb-1 nb-0 nc-0 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-1 (pubk c))))+    ((recv (enc a b d nb-1 nb-1 (pubk c)))+      (send (enc a b c nb-1 nb-1 nc-1 (pubk d))))+    ((recv (enc a c d nb-1 (pubk b)))+      (send (enc a b d nb-1 nb-2 (pubk c))))+    ((recv (enc a b d nb-1 nb-2 (pubk c)))+      (send (enc a b c nb-1 nb-2 nc-2 (pubk d)))))+  (label 227)+  (parent 109)+  (unrealized (0 1) (3 0) (5 0) (7 0))+  (comment "aborted"))
+ tst/nsl5.lisp view
@@ -0,0 +1,147 @@+(defprotocol nsl5 basic+  (defrole init+    (vars (a b c d e name)+      (na0 na1 na2 na3 nb0 nb1 nb2 nb3 nc0 nc1 nc2 nc3 nd0 nd1 nd2 nd3+        ne0 ne1 ne2 ne3 text))+    (trace+      (send+        (enc na0 a c d e (enc na1 a b d e (pubk c))+          (enc na2 a b c e (pubk d)) (enc na3 a b c d (pubk e))+          (pubk b)))+      (recv+        (enc na3 ne0 e b c d (enc na0 nb3 b c d e (pubk a))+          (enc na1 nc2 c b d e (pubk a)) (enc na2 nd1 d e b c (pubk a))+          (enc nb0 nc3 c d e a (pubk b)) (enc nb1 nd2 d c e a (pubk b))+          (enc nb2 ne1 e a c d (pubk b)) (enc nc0 nd3 d e a b (pubk c))+          (enc nc1 ne2 e a b d (pubk c)) (enc nd0 ne3 e a b c (pubk d))+          (pubk a)))+      (send+        (enc nb3 (enc nb0 nc3 c d e a (pubk b))+          (enc nb1 nd2 d c e a (pubk b)) (enc nb2 ne1 e a c d (pubk b))+          (enc nc0 nd3 d e a b (pubk c)) (enc nc1 ne2 e a b d (pubk c))+          (enc nc2 (pubk c)) (enc nd0 ne3 e a b c (pubk d))+          (enc nd1 (pubk d)) (enc ne0 (pubk e)) (pubk b))))+    (uniq-orig na0 na1 na2 na3))+  (defrole resp1+    (vars (a b c d e name)+      (na0 na1 na2 na3 nb0 nb1 nb2 nb3 nc0 nc1 nc2 nc3 nd0 nd1 nd2 nd3+        ne0 ne1 ne2 ne3 text))+    (trace+      (recv+        (enc na0 a c d e (enc na1 a b d e (pubk c))+          (enc na2 a b c e (pubk d)) (enc na3 a b c d (pubk e))+          (pubk b)))+      (send+        (enc nb0 b d e a (enc na1 a b d e (pubk c))+          (enc na2 a b c e (pubk d)) (enc nb1 b c e a (pubk d))+          (enc na3 a b c d (pubk e)) (enc nb2 b c d a (pubk e))+          (enc na0 nb3 b c d e (pubk a)) (pubk c)))+      (recv+        (enc nb3 (enc nb0 nc3 c d e a (pubk b))+          (enc nb1 nd2 d c e a (pubk b)) (enc nb2 ne1 e a c d (pubk b))+          (enc nc0 nd3 d e a b (pubk c)) (enc nc1 ne2 e a b d (pubk c))+          (enc nc2 (pubk c)) (enc nd0 ne3 e a b c (pubk d))+          (enc nd1 (pubk d)) (enc ne0 (pubk e)) (pubk b)))+      (send+        (enc nc3 (enc nc0 nd3 d e a b (pubk c))+          (enc nc1 ne2 e a b d (pubk c)) (enc nc2 (pubk c))+          (enc nd0 ne3 e a b c (pubk d)) (enc nd1 (pubk d))+          (enc nd2 (pubk d)) (enc ne0 (pubk e)) (enc ne1 (pubk e))+          (pubk c))))+    (uniq-orig nb0 nb1 nb2 nb3))+  (defrole resp2+    (vars (a b c d e name)+      (na0 na1 na2 na3 nb0 nb1 nb2 nb3 nc0 nc1 nc2 nc3 nd0 nd1 nd2 nd3+        ne0 ne1 ne2 ne3 text))+    (trace+      (recv+        (enc nb0 b d e a (enc na1 a b d e (pubk c))+          (enc na2 a b c e (pubk d)) (enc nb1 b c e a (pubk d))+          (enc na3 a b c d (pubk e)) (enc nb2 b c d a (pubk e))+          (enc na0 nb3 b c d e (pubk a)) (pubk c)))+      (send+        (enc nc0 c e a b (enc na2 a b c e (pubk d))+          (enc nb1 b c e a (pubk d)) (enc na3 a b c d (pubk e))+          (enc nb2 b c d a (pubk e)) (enc nc1 c d a b (pubk e))+          (enc na0 nb3 b c d e (pubk a)) (enc na1 nc2 c b d e (pubk a))+          (enc nb0 nc3 c d e a (pubk b)) (pubk d)))+      (recv+        (enc nc3 (enc nc0 nd3 d e a b (pubk c))+          (enc nc1 ne2 e a b d (pubk c)) (enc nc2 (pubk c))+          (enc nd0 ne3 e a b c (pubk d)) (enc nd1 (pubk d))+          (enc nd2 (pubk d)) (enc ne0 (pubk e)) (enc ne1 (pubk e))+          (pubk c)))+      (send+        (enc nd3 (enc nd0 ne3 e a b c (pubk d)) (enc nd1 (pubk d))+          (enc nd2 (pubk d)) (enc ne0 (pubk e)) (enc ne1 (pubk e))+          (enc ne2 (pubk e)) (pubk d))))+    (uniq-orig nc0 nc1 nc2 nc3))+  (defrole resp3+    (vars (a b c d e name)+      (na0 na1 na2 na3 nb0 nb1 nb2 nb3 nc0 nc1 nc2 nc3 nd0 nd1 nd2 nd3+        ne0 ne1 ne2 ne3 text))+    (trace+      (recv+        (enc nc0 c e a b (enc na2 a b c e (pubk d))+          (enc nb1 b c e a (pubk d)) (enc na3 a b c d (pubk e))+          (enc nb2 b c d a (pubk e)) (enc nc1 c d a b (pubk e))+          (enc na0 nb3 b c d e (pubk a)) (enc na1 nc2 c b d e (pubk a))+          (enc nb0 nc3 c d e a (pubk b)) (pubk d)))+      (send+        (enc nd0 d a b c (enc na3 a b c d (pubk e))+          (enc nb2 b c d a (pubk e)) (enc nc1 c d a b (pubk e))+          (enc na0 nb3 b c d e (pubk a)) (enc na1 nc2 c b d e (pubk a))+          (enc na2 nd1 d e b c (pubk a)) (enc nb0 nc3 c d e a (pubk b))+          (enc nb1 nd2 d c e a (pubk b)) (enc nc0 nd3 d e a b (pubk c))+          (pubk e)))+      (recv+        (enc nd3 (enc nd0 ne3 e a b c (pubk d)) (enc nd1 (pubk d))+          (enc nd2 (pubk d)) (enc ne0 (pubk e)) (enc ne1 (pubk e))+          (enc ne2 (pubk e)) (pubk d)))+      (send+        (enc ne3 (enc ne0 (pubk e)) (enc ne1 (pubk e))+          (enc ne2 (pubk e)) (pubk e))))+    (uniq-orig nd0 nd1 nd2 nd3))+  (defrole resp4+    (vars (a b c d e name)+      (na0 na1 na2 na3 nb0 nb1 nb2 nb3 nc0 nc1 nc2 nc3 nd0 nd1 nd2 nd3+        ne0 ne1 ne2 ne3 text))+    (trace+      (recv+        (enc nd0 d a b c (enc na3 a b c d (pubk e))+          (enc nb2 b c d a (pubk e)) (enc nc1 c d a b (pubk e))+          (enc na0 nb3 b c d e (pubk a)) (enc na1 nc2 c b d e (pubk a))+          (enc na2 nd1 d e b c (pubk a)) (enc nb0 nc3 c d e a (pubk b))+          (enc nb1 nd2 d c e a (pubk b)) (enc nc0 nd3 d e a b (pubk c))+          (pubk e)))+      (send+        (enc na3 ne0 e b c d (enc na0 nb3 b c d e (pubk a))+          (enc na1 nc2 c b d e (pubk a)) (enc na2 nd1 d e b c (pubk a))+          (enc nb0 nc3 c d e a (pubk b)) (enc nb1 nd2 d c e a (pubk b))+          (enc nb2 ne1 e a c d (pubk b)) (enc nc0 nd3 d e a b (pubk c))+          (enc nc1 ne2 e a b d (pubk c)) (enc nd0 ne3 e a b c (pubk d))+          (pubk a)))+      (recv+        (enc ne3 (enc ne0 (pubk e)) (enc ne1 (pubk e))+          (enc ne2 (pubk e)) (pubk e))))+    (uniq-orig ne0 ne1 ne2 ne3)))++(defskeleton nsl5 (vars (a b c d e name))+  (defstrand init 3 (a a) (b b) (c c) (d d) (e e))+  (non-orig (privk a) (privk b) (privk c) (privk d) (privk e)))++(defskeleton nsl5 (vars (a b c d e name))+  (defstrand resp1 4 (a a) (b b) (c c) (d d) (e e))+  (non-orig (privk a) (privk b) (privk c) (privk d) (privk e)))++(defskeleton nsl5 (vars (a b c d e name))+  (defstrand resp2 4 (a a) (b b) (c c) (d d) (e e))+  (non-orig (privk a) (privk b) (privk c) (privk d) (privk e)))++(defskeleton nsl5 (vars (a b c d e name))+  (defstrand resp3 4 (a a) (b b) (c c) (d d) (e e))+  (non-orig (privk a) (privk b) (privk c) (privk d) (privk e)))++(defskeleton nsl5 (vars (a b c d e name))+  (defstrand resp4 3 (a a) (b b) (c c) (d d) (e e))+  (non-orig (privk a) (privk b) (privk c) (privk d) (privk e)))
+ tst/nsl5i.lisp view
@@ -0,0 +1,64 @@+(defprotocol nsl5i basic+  (defrole init+    (vars (a name) (b name) (c name) (d name) (e name) (na text) (nb text) (nc text) (nd text) (ne text))+    (trace+      (send (enc (cat a b c d e (enc (enc (enc na (pubk e)) (pubk d)) (pubk c))) (pubk b)))+      (recv (enc (cat a b c d e na (enc nb (pubk a)) (enc (enc nc (pubk b)) (pubk a)) (enc (enc (enc nd (pubk c)) (pubk b)) (pubk a)) (enc (enc (enc ne (pubk d)) (pubk c)) (pubk b))) (pubk a)))+      (send (enc (cat nb (enc nc (pubk b)) (enc (enc nd (pubk c)) (pubk b)) (enc (enc (enc ne (pubk d)) (pubk c)) (pubk b))) (pubk b))))+      (uniq-orig na))+  (defrole resp1+    (vars (a name) (b name) (c name) (d name) (e name) (na text) (nb text) (nc text) (nd text) (ne text))+    (trace+      (recv (enc (cat a b c d e (enc (enc (enc na (pubk e)) (pubk d)) (pubk c))) (pubk b)))+      (send (enc (cat a b c d e (enc (enc (enc na (pubk e)) (pubk d)) (pubk c)) (enc (enc (enc nb (pubk a)) (pubk e)) (pubk d))) (pubk c)))+      (recv (enc (cat nb (enc nc (pubk b)) (enc (enc nd (pubk c)) (pubk b)) (enc (enc (enc ne (pubk d)) (pubk c)) (pubk b))) (pubk b)))+      (send (enc (cat nc (enc nd (pubk c)) (enc (enc ne (pubk d)) (pubk c))) (pubk c))))+      (uniq-orig nb))+  (defrole resp2+    (vars (a name) (b name) (c name) (d name) (e name) (na text) (nb text) (nc text) (nd text) (ne text))+    (trace+      (recv (enc (cat a b c d e (enc (enc (enc na (pubk e)) (pubk d)) (pubk c)) (enc (enc (enc nb (pubk a)) (pubk e)) (pubk d))) (pubk c)))+      (send (enc (cat a b c d e (enc (enc na (pubk e)) (pubk d)) (enc (enc (enc nb (pubk a)) (pubk e)) (pubk d)) (enc (enc (enc nc (pubk b)) (pubk a)) (pubk e))) (pubk d)))+      (recv (enc (cat nc (enc nd (pubk c)) (enc (enc ne (pubk d)) (pubk c))) (pubk c)))+      (send (enc (cat nd (enc ne (pubk d))) (pubk d))))+      (uniq-orig nc))+  (defrole resp3+    (vars (a name) (b name) (c name) (d name) (e name) (na text) (nb text) (nc text) (nd text) (ne text))+    (trace+      (recv (enc (cat a b c d e (enc (enc na (pubk e)) (pubk d)) (enc (enc (enc nb (pubk a)) (pubk e)) (pubk d)) (enc (enc (enc nc (pubk b)) (pubk a)) (pubk e))) (pubk d)))+      (send (enc (cat a b c d e (enc na (pubk e)) (enc (enc nb (pubk a)) (pubk e)) (enc (enc (enc nc (pubk b)) (pubk a)) (pubk e)) (enc (enc (enc nd (pubk c)) (pubk b)) (pubk a))) (pubk e)))+      (recv (enc (cat nd (enc ne (pubk d))) (pubk d)))+      (send (enc ne (pubk e))))+      (uniq-orig nd))+  (defrole resp4+    (vars (a name) (b name) (c name) (d name) (e name) (na text) (nb text) (nc text) (nd text) (ne text))+    (trace+      (recv (enc (cat a b c d e (enc na (pubk e)) (enc (enc nb (pubk a)) (pubk e)) (enc (enc (enc nc (pubk b)) (pubk a)) (pubk e)) (enc (enc (enc nd (pubk c)) (pubk b)) (pubk a))) (pubk e)))+      (send (enc (cat a b c d e na (enc nb (pubk a)) (enc (enc nc (pubk b)) (pubk a)) (enc (enc (enc nd (pubk c)) (pubk b)) (pubk a)) (enc (enc (enc ne (pubk d)) (pubk c)) (pubk b))) (pubk a)))+      (recv (enc ne (pubk e))))+      (uniq-orig ne)))++(defskeleton nsl5i+  (vars (a name) (b name) (c name) (d name) (e name) (na text) (nb text) (nc text) (nd text) (ne text))+  (defstrand init 3 (a a) (b b) (c c) (d d) (e e))+  (non-orig (privk a) (privk b) (privk c) (privk d) (privk e)))++(defskeleton nsl5i+  (vars (a name) (b name) (c name) (d name) (e name) (na text) (nb text) (nc text) (nd text) (ne text))+  (defstrand resp1 4 (a a) (b b) (c c) (d d) (e e))+  (non-orig (privk a) (privk b) (privk c) (privk d) (privk e)))++(defskeleton nsl5i+  (vars (a name) (b name) (c name) (d name) (e name) (na text) (nb text) (nc text) (nd text) (ne text))+  (defstrand resp2 4 (a a) (b b) (c c) (d d) (e e))+  (non-orig (privk a) (privk b) (privk c) (privk d) (privk e)))++(defskeleton nsl5i+  (vars (a name) (b name) (c name) (d name) (e name) (na text) (nb text) (nc text) (nd text) (ne text))+  (defstrand resp3 4 (a a) (b b) (c c) (d d) (e e))+  (non-orig (privk a) (privk b) (privk c) (privk d) (privk e)))++(defskeleton nsl5i+  (vars (a name) (b name) (c name) (d name) (e name) (na text) (nb text) (nc text) (nd text) (ne text))+  (defstrand resp4 3 (a a) (b b) (c c) (d d) (e e))+  (non-orig (privk a) (privk b) (privk c) (privk d) (privk e)))
+ tst/nslsk.scm view
@@ -0,0 +1,51 @@+;;; Needham-Schroeder-Lowe Protocol augmented with symmetric encryption++(defprotocol nslsk basic+  (defrole init (vars (a b name) (n text) (k skey) (t text))+    (trace+     (send (enc n a (pubk b)))+     (recv (enc n k b (pubk a)))+     (send (enc t k))))+  (defrole resp (vars (b a name) (n text) (k skey) (t text))+    (trace+     (recv (enc n a (pubk b)))+     (send (enc n k b (pubk a)))+     (recv (enc t k)))))++(defskeleton nslsk+  (vars (a name) (k skey))+  (defstrand resp 3 (a a) (k k))+  (non-orig (privk a))+  (uniq-orig k))++(defskeleton nslsk+  (vars (b name) (n text))+  (defstrand init 3 (b b) (n n))+  (non-orig (privk b))+  (uniq-orig n))++;; Use a tag as a term.++(defprotocol nslsk-tag-term basic+  (defrole init (vars (a b name) (n text) (k skey))+    (trace+     (send (enc n a (pubk b)))+     (recv (enc n k b (pubk a)))+     (send (enc "t" k))))+  (defrole resp (vars (b a name) (n text) (k skey))+    (trace+     (recv (enc n a (pubk b)))+     (send (enc n k b (pubk a)))+     (recv (enc "t" k)))))++(defskeleton nslsk-tag-term+  (vars (a name) (k skey))+  (defstrand resp 3 (a a) (k k))+  (non-orig (privk a))+  (uniq-orig k))++(defskeleton nslsk-tag-term+  (vars (b name) (n text))+  (defstrand init 3 (b b) (n n))+  (non-orig (privk b))+  (uniq-orig n))
+ tst/nslsk.tst view
@@ -0,0 +1,240 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol nslsk basic+  (defrole init+    (vars (a b name) (n text) (k skey) (t text))+    (trace (send (enc n a (pubk b))) (recv (enc n k b (pubk a)))+      (send (enc t k))))+  (defrole resp+    (vars (b a name) (n text) (k skey) (t text))+    (trace (recv (enc n a (pubk b))) (send (enc n k b (pubk a)))+      (recv (enc t k)))))++(defskeleton nslsk+  (vars (n t text) (a b name) (k skey))+  (defstrand resp 3 (n n) (t t) (b b) (a a) (k k))+  (non-orig (privk a))+  (uniq-orig k)+  (traces+    ((recv (enc n a (pubk b))) (send (enc n k b (pubk a)))+      (recv (enc t k))))+  (label 0)+  (unrealized (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton nslsk+  (vars (n t n-0 text) (a b a-0 b-0 name) (k skey))+  (defstrand resp 3 (n n) (t t) (b b) (a a) (k k))+  (defstrand init 3 (n n-0) (t t) (a a-0) (b b-0) (k k))+  (precedes ((0 1) (1 1)) ((1 2) (0 2)))+  (non-orig (privk a))+  (uniq-orig k)+  (operation encryption-test (added-strand init 3) (enc t k) (0 2))+  (traces+    ((recv (enc n a (pubk b))) (send (enc n k b (pubk a)))+      (recv (enc t k)))+    ((send (enc n-0 a-0 (pubk b-0))) (recv (enc n-0 k b-0 (pubk a-0)))+      (send (enc t k))))+  (label 1)+  (parent 0)+  (unrealized (1 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nslsk+  (vars (n t text) (a b name) (k skey))+  (defstrand resp 3 (n n) (t t) (b b) (a a) (k k))+  (deflistener k)+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (privk a))+  (uniq-orig k)+  (operation encryption-test (added-listener k) (enc t k) (0 2))+  (traces+    ((recv (enc n a (pubk b))) (send (enc n k b (pubk a)))+      (recv (enc t k))) ((recv k) (send k)))+  (label 2)+  (parent 0)+  (unrealized (1 0))+  (comment "empty cohort"))++(defskeleton nslsk+  (vars (n t text) (a b name) (k skey))+  (defstrand resp 3 (n n) (t t) (b b) (a a) (k k))+  (defstrand init 3 (n n) (t t) (a a) (b b) (k k))+  (precedes ((0 1) (1 1)) ((1 2) (0 2)))+  (non-orig (privk a))+  (uniq-orig k)+  (operation nonce-test (contracted (a-0 a) (b-0 b) (n-0 n)) k (1 1)+    (enc n k b (pubk a)))+  (traces+    ((recv (enc n a (pubk b))) (send (enc n k b (pubk a)))+      (recv (enc t k)))+    ((send (enc n a (pubk b))) (recv (enc n k b (pubk a)))+      (send (enc t k))))+  (label 3)+  (parent 1)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol nslsk basic+  (defrole init+    (vars (a b name) (n text) (k skey) (t text))+    (trace (send (enc n a (pubk b))) (recv (enc n k b (pubk a)))+      (send (enc t k))))+  (defrole resp+    (vars (b a name) (n text) (k skey) (t text))+    (trace (recv (enc n a (pubk b))) (send (enc n k b (pubk a)))+      (recv (enc t k)))))++(defskeleton nslsk+  (vars (n t text) (b a name) (k skey))+  (defstrand init 3 (n n) (t t) (a a) (b b) (k k))+  (non-orig (privk b))+  (uniq-orig n)+  (traces+    ((send (enc n a (pubk b))) (recv (enc n k b (pubk a)))+      (send (enc t k))))+  (label 4)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nslsk+  (vars (n t text) (b a name) (k k-0 skey))+  (defstrand init 3 (n n) (t t) (a a) (b b) (k k))+  (defstrand resp 2 (n n) (b b) (a a) (k k-0))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk b))+  (uniq-orig n)+  (operation nonce-test (added-strand resp 2) n (0 1)+    (enc n a (pubk b)))+  (traces+    ((send (enc n a (pubk b))) (recv (enc n k b (pubk a)))+      (send (enc t k)))+    ((recv (enc n a (pubk b))) (send (enc n k-0 b (pubk a)))))+  (label 5)+  (parent 4)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol nslsk-tag-term basic+  (defrole init+    (vars (a b name) (n text) (k skey))+    (trace (send (enc n a (pubk b))) (recv (enc n k b (pubk a)))+      (send (enc "t" k))))+  (defrole resp+    (vars (b a name) (n text) (k skey))+    (trace (recv (enc n a (pubk b))) (send (enc n k b (pubk a)))+      (recv (enc "t" k)))))++(defskeleton nslsk-tag-term+  (vars (n text) (a b name) (k skey))+  (defstrand resp 3 (n n) (b b) (a a) (k k))+  (non-orig (privk a))+  (uniq-orig k)+  (traces+    ((recv (enc n a (pubk b))) (send (enc n k b (pubk a)))+      (recv (enc "t" k))))+  (label 6)+  (unrealized (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton nslsk-tag-term+  (vars (n n-0 text) (a b a-0 b-0 name) (k skey))+  (defstrand resp 3 (n n) (b b) (a a) (k k))+  (defstrand init 3 (n n-0) (a a-0) (b b-0) (k k))+  (precedes ((0 1) (1 1)) ((1 2) (0 2)))+  (non-orig (privk a))+  (uniq-orig k)+  (operation encryption-test (added-strand init 3) (enc "t" k) (0 2))+  (traces+    ((recv (enc n a (pubk b))) (send (enc n k b (pubk a)))+      (recv (enc "t" k)))+    ((send (enc n-0 a-0 (pubk b-0))) (recv (enc n-0 k b-0 (pubk a-0)))+      (send (enc "t" k))))+  (label 7)+  (parent 6)+  (unrealized (1 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nslsk-tag-term+  (vars (n text) (a b name) (k skey))+  (defstrand resp 3 (n n) (b b) (a a) (k k))+  (deflistener k)+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (privk a))+  (uniq-orig k)+  (operation encryption-test (added-listener k) (enc "t" k) (0 2))+  (traces+    ((recv (enc n a (pubk b))) (send (enc n k b (pubk a)))+      (recv (enc "t" k))) ((recv k) (send k)))+  (label 8)+  (parent 6)+  (unrealized (1 0))+  (comment "empty cohort"))++(defskeleton nslsk-tag-term+  (vars (n text) (a b name) (k skey))+  (defstrand resp 3 (n n) (b b) (a a) (k k))+  (defstrand init 3 (n n) (a a) (b b) (k k))+  (precedes ((0 1) (1 1)) ((1 2) (0 2)))+  (non-orig (privk a))+  (uniq-orig k)+  (operation nonce-test (contracted (a-0 a) (b-0 b) (n-0 n)) k (1 1)+    (enc n k b (pubk a)))+  (traces+    ((recv (enc n a (pubk b))) (send (enc n k b (pubk a)))+      (recv (enc "t" k)))+    ((send (enc n a (pubk b))) (recv (enc n k b (pubk a)))+      (send (enc "t" k))))+  (label 9)+  (parent 7)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol nslsk-tag-term basic+  (defrole init+    (vars (a b name) (n text) (k skey))+    (trace (send (enc n a (pubk b))) (recv (enc n k b (pubk a)))+      (send (enc "t" k))))+  (defrole resp+    (vars (b a name) (n text) (k skey))+    (trace (recv (enc n a (pubk b))) (send (enc n k b (pubk a)))+      (recv (enc "t" k)))))++(defskeleton nslsk-tag-term+  (vars (n text) (b a name) (k skey))+  (defstrand init 3 (n n) (a a) (b b) (k k))+  (non-orig (privk b))+  (uniq-orig n)+  (traces+    ((send (enc n a (pubk b))) (recv (enc n k b (pubk a)))+      (send (enc "t" k))))+  (label 10)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton nslsk-tag-term+  (vars (n text) (b a name) (k k-0 skey))+  (defstrand init 3 (n n) (a a) (b b) (k k))+  (defstrand resp 2 (n n) (b b) (a a) (k k-0))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk b))+  (uniq-orig n)+  (operation nonce-test (added-strand resp 2) n (0 1)+    (enc n a (pubk b)))+  (traces+    ((send (enc n a (pubk b))) (recv (enc n k b (pubk a)))+      (send (enc "t" k)))+    ((recv (enc n a (pubk b))) (send (enc n k-0 b (pubk a)))))+  (label 11)+  (parent 10)+  (unrealized)+  (shape))++(comment "Nothing left to do")
+ tst/or.scm view
@@ -0,0 +1,28 @@+;;; Otway-Rees Protocol++;;; Standard version using variables of sort mesg++(defprotocol or basic+  (defrole init (vars (a b s name) (na text) (k skey) (m text))+    (trace+     (send (cat m a b (enc na m a b (ltk a s))))+     (recv (cat m (enc na k (ltk a s))))))+  (defrole resp+    (vars (a b s name) (nb text) (k skey) (m text) (x y mesg))+    (trace+     (recv (cat m a b x))+     (send (cat m a b x (enc nb m a b (ltk b s))))+     (recv (cat m y (enc nb k (ltk b s))))+     (send y)))+  (defrole serv (vars (a b s name) (na nb text) (k skey) (m text))+    (trace+     (recv (cat m a b (enc na m a b (ltk a s))+		(enc nb m a b (ltk b s))))+     (send (cat m (enc na k (ltk a s)) (enc nb k (ltk b s)))))+    (uniq-orig k)))++(defskeleton or+  (vars (nb text) (s a b name))+  (defstrand resp 4 (a a) (b b) (s s) (nb nb))+  (non-orig (ltk a s) (ltk b s))+  (uniq-orig nb))
+ tst/or.tst view
@@ -0,0 +1,228 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol or basic+  (defrole init+    (vars (a b s name) (na text) (k skey) (m text))+    (trace (send (cat m a b (enc na m a b (ltk a s))))+      (recv (cat m (enc na k (ltk a s))))))+  (defrole resp+    (vars (a b s name) (nb text) (k skey) (m text) (x y mesg))+    (trace (recv (cat m a b x))+      (send (cat m a b x (enc nb m a b (ltk b s))))+      (recv (cat m y (enc nb k (ltk b s)))) (send y)))+  (defrole serv+    (vars (a b s name) (na nb text) (k skey) (m text))+    (trace+      (recv+        (cat m a b (enc na m a b (ltk a s)) (enc nb m a b (ltk b s))))+      (send (cat m (enc na k (ltk a s)) (enc nb k (ltk b s)))))+    (uniq-orig k)))++(defskeleton or+  (vars (x y mesg) (nb m text) (s a b name) (k skey))+  (defstrand resp 4 (x x) (y y) (nb nb) (m m) (a a) (b b) (s s) (k k))+  (non-orig (ltk a s) (ltk b s))+  (uniq-orig nb)+  (traces+    ((recv (cat m a b x)) (send (cat m a b x (enc nb m a b (ltk b s))))+      (recv (cat m y (enc nb k (ltk b s)))) (send y)))+  (label 0)+  (unrealized (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton or+  (vars (x y mesg) (nb m na m-0 text) (s a b a-0 name) (k skey))+  (defstrand resp 4 (x x) (y y) (nb nb) (m m) (a a) (b b) (s s) (k k))+  (defstrand serv 2 (na na) (nb nb) (m m-0) (a a-0) (b b) (s s) (k k))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (ltk a s) (ltk b s))+  (uniq-orig nb k)+  (operation encryption-test (added-strand serv 2) (enc nb k (ltk b s))+    (0 2))+  (traces+    ((recv (cat m a b x)) (send (cat m a b x (enc nb m a b (ltk b s))))+      (recv (cat m y (enc nb k (ltk b s)))) (send y))+    ((recv+       (cat m-0 a-0 b (enc na m-0 a-0 b (ltk a-0 s))+         (enc nb m-0 a-0 b (ltk b s))))+      (send (cat m-0 (enc na k (ltk a-0 s)) (enc nb k (ltk b s))))))+  (label 1)+  (parent 0)+  (unrealized (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton or+  (vars (x y mesg) (nb m nb-0 m-0 text) (s a b b-0 name) (k skey))+  (defstrand resp 4 (x x) (y y) (nb nb) (m m) (a a) (b b) (s s) (k k))+  (defstrand serv 2 (na nb) (nb nb-0) (m m-0) (a b) (b b-0) (s s) (k k))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (ltk a s) (ltk b s))+  (uniq-orig nb k)+  (operation encryption-test (added-strand serv 2) (enc nb k (ltk b s))+    (0 2))+  (traces+    ((recv (cat m a b x)) (send (cat m a b x (enc nb m a b (ltk b s))))+      (recv (cat m y (enc nb k (ltk b s)))) (send y))+    ((recv+       (cat m-0 b b-0 (enc nb m-0 b b-0 (ltk b s))+         (enc nb-0 m-0 b b-0 (ltk b-0 s))))+      (send (cat m-0 (enc nb k (ltk b s)) (enc nb-0 k (ltk b-0 s))))))+  (label 2)+  (parent 0)+  (unrealized (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton or+  (vars (x y mesg) (nb m na text) (s a b name) (k skey))+  (defstrand resp 4 (x x) (y y) (nb nb) (m m) (a a) (b b) (s s) (k k))+  (defstrand serv 2 (na na) (nb nb) (m m) (a a) (b b) (s s) (k k))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (ltk a s) (ltk b s))+  (uniq-orig nb k)+  (operation encryption-test (added-strand resp 2)+    (enc nb m a b (ltk b s)) (1 0))+  (traces+    ((recv (cat m a b x)) (send (cat m a b x (enc nb m a b (ltk b s))))+      (recv (cat m y (enc nb k (ltk b s)))) (send y))+    ((recv+       (cat m a b (enc na m a b (ltk a s)) (enc nb m a b (ltk b s))))+      (send (cat m (enc na k (ltk a s)) (enc nb k (ltk b s))))))+  (label 3)+  (parent 1)+  (unrealized (1 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton or+  (vars (x y mesg) (nb m nb-0 text) (s a name) (k skey))+  (defstrand resp 4 (x x) (y y) (nb nb) (m m) (a a) (b a) (s s) (k k))+  (defstrand serv 2 (na nb) (nb nb-0) (m m) (a a) (b a) (s s) (k k))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (ltk a s))+  (uniq-orig nb k)+  (operation encryption-test (added-strand resp 2)+    (enc nb m a a (ltk a s)) (1 0))+  (traces+    ((recv (cat m a a x)) (send (cat m a a x (enc nb m a a (ltk a s))))+      (recv (cat m y (enc nb k (ltk a s)))) (send y))+    ((recv+       (cat m a a (enc nb m a a (ltk a s)) (enc nb-0 m a a (ltk a s))))+      (send (cat m (enc nb k (ltk a s)) (enc nb-0 k (ltk a s))))))+  (label 4)+  (parent 2)+  (unrealized (1 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton or+  (vars (x y mesg) (nb m na text) (s a b name) (k skey))+  (defstrand resp 4 (x x) (y y) (nb nb) (m m) (a a) (b b) (s s) (k k))+  (defstrand serv 2 (na na) (nb nb) (m m) (a a) (b b) (s s) (k k))+  (defstrand init 1 (na na) (m m) (a a) (b b) (s s))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)) ((2 0) (1 0)))+  (non-orig (ltk a s) (ltk b s))+  (uniq-orig nb k)+  (operation encryption-test (added-strand init 1)+    (enc na m a b (ltk a s)) (1 0))+  (traces+    ((recv (cat m a b x)) (send (cat m a b x (enc nb m a b (ltk b s))))+      (recv (cat m y (enc nb k (ltk b s)))) (send y))+    ((recv+       (cat m a b (enc na m a b (ltk a s)) (enc nb m a b (ltk b s))))+      (send (cat m (enc na k (ltk a s)) (enc nb k (ltk b s)))))+    ((send (cat m a b (enc na m a b (ltk a s))))))+  (label 5)+  (parent 3)+  (unrealized)+  (shape))++(defskeleton or+  (vars (x y x-0 mesg) (nb m na text) (s a name) (k skey))+  (defstrand resp 4 (x x) (y y) (nb nb) (m m) (a a) (b a) (s s) (k k))+  (defstrand serv 2 (na na) (nb nb) (m m) (a a) (b a) (s s) (k k))+  (defstrand resp 2 (x x-0) (nb na) (m m) (a a) (b a) (s s))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)) ((2 1) (1 0)))+  (non-orig (ltk a s))+  (uniq-orig nb k)+  (operation encryption-test (added-strand resp 2)+    (enc na m a a (ltk a s)) (1 0))+  (traces+    ((recv (cat m a a x)) (send (cat m a a x (enc nb m a a (ltk a s))))+      (recv (cat m y (enc nb k (ltk a s)))) (send y))+    ((recv+       (cat m a a (enc na m a a (ltk a s)) (enc nb m a a (ltk a s))))+      (send (cat m (enc na k (ltk a s)) (enc nb k (ltk a s)))))+    ((recv (cat m a a x-0))+      (send (cat m a a x-0 (enc na m a a (ltk a s))))))+  (label 6)+  (parent 3)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton or+  (vars (x y mesg) (nb m nb-0 text) (s a name) (k skey))+  (defstrand resp 4 (x x) (y y) (nb nb) (m m) (a a) (b a) (s s) (k k))+  (defstrand serv 2 (na nb) (nb nb-0) (m m) (a a) (b a) (s s) (k k))+  (defstrand init 1 (na nb-0) (m m) (a a) (b a) (s s))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)) ((2 0) (1 0)))+  (non-orig (ltk a s))+  (uniq-orig nb k)+  (operation encryption-test (added-strand init 1)+    (enc nb-0 m a a (ltk a s)) (1 0))+  (traces+    ((recv (cat m a a x)) (send (cat m a a x (enc nb m a a (ltk a s))))+      (recv (cat m y (enc nb k (ltk a s)))) (send y))+    ((recv+       (cat m a a (enc nb m a a (ltk a s)) (enc nb-0 m a a (ltk a s))))+      (send (cat m (enc nb k (ltk a s)) (enc nb-0 k (ltk a s)))))+    ((send (cat m a a (enc nb-0 m a a (ltk a s))))))+  (label 7)+  (parent 4)+  (unrealized)+  (shape))++(defskeleton or+  (vars (x y x-0 mesg) (nb m nb-0 text) (s a name) (k skey))+  (defstrand resp 4 (x x) (y y) (nb nb) (m m) (a a) (b a) (s s) (k k))+  (defstrand serv 2 (na nb) (nb nb-0) (m m) (a a) (b a) (s s) (k k))+  (defstrand resp 2 (x x-0) (nb nb-0) (m m) (a a) (b a) (s s))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)) ((2 1) (1 0)))+  (non-orig (ltk a s))+  (uniq-orig nb k)+  (operation encryption-test (added-strand resp 2)+    (enc nb-0 m a a (ltk a s)) (1 0))+  (traces+    ((recv (cat m a a x)) (send (cat m a a x (enc nb m a a (ltk a s))))+      (recv (cat m y (enc nb k (ltk a s)))) (send y))+    ((recv+       (cat m a a (enc nb m a a (ltk a s)) (enc nb-0 m a a (ltk a s))))+      (send (cat m (enc nb k (ltk a s)) (enc nb-0 k (ltk a s)))))+    ((recv (cat m a a x-0))+      (send (cat m a a x-0 (enc nb-0 m a a (ltk a s))))))+  (label 8)+  (parent 4)+  (seen 9)+  (unrealized)+  (shape)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton or+  (vars (x y mesg) (nb m text) (s a name) (k skey))+  (defstrand resp 4 (x x) (y y) (nb nb) (m m) (a a) (b a) (s s) (k k))+  (defstrand serv 2 (na nb) (nb nb) (m m) (a a) (b a) (s s) (k k))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (ltk a s))+  (uniq-orig nb k)+  (operation collapsed 2 0)+  (traces+    ((recv (cat m a a x)) (send (cat m a a x (enc nb m a a (ltk a s))))+      (recv (cat m y (enc nb k (ltk a s)))) (send y))+    ((recv+       (cat m a a (enc nb m a a (ltk a s)) (enc nb m a a (ltk a s))))+      (send (cat m (enc nb k (ltk a s)) (enc nb k (ltk a s))))))+  (label 9)+  (parent 6)+  (unrealized)+  (shape))++(comment "Nothing left to do")
+ tst/pca.lsp view
@@ -0,0 +1,33 @@+;;; PCA generation of AIC, simplified++;;; ki = identity key+;;; a = identity label+;;; t = TPM type/platform+;;; ke = endorsement key+;;; kp = PCA key+;;; km = manufacturer key+;;; (enc (cat ki a t) (invk kp)) is the signed AIC++(defprotocol aic basic+  (defrole tpm (vars (ke ki km kp akey) (t a text))+    (trace+     (send (cat (enc ki a (invk ki)) (enc t ke (invk km))))+     (recv (enc (enc ki a t (invk kp)) ke))+     (send (enc ki a t (invk kp))))+    (non-orig (invk ke) (invk ki) (invk km) (invk kp))+    (uniq-orig ki))+  (defrole pca (vars (ke ki km kp akey) (t a text))+    (trace+     (recv (cat (enc ki a (invk ki)) (enc t ke (invk km))))+     (send (enc (enc ki a t (invk kp)) ke)))+    (non-orig (invk ke) (invk ki) (invk km) (invk kp)))+  (defrole appr (vars (ki kp akey) (t a text))+    (trace+     (recv (enc ki a t (invk kp))))+    (non-orig (invk ki) (invk kp))))++;;; normal run++(defskeleton aic (vars (ki kp akey))+  (defstrand appr 1 (ki ki) (kp kp))+  (non-orig (invk ki) (invk kp)))
+ tst/pca.tst view
@@ -0,0 +1,271 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol aic basic+  (defrole tpm+    (vars (ke ki km kp akey) (t a text))+    (trace (send (cat (enc ki a (invk ki)) (enc t ke (invk km))))+      (recv (enc (enc ki a t (invk kp)) ke))+      (send (enc ki a t (invk kp))))+    (non-orig (invk ke) (invk ki) (invk km) (invk kp))+    (uniq-orig ki))+  (defrole pca+    (vars (ke ki km kp akey) (t a text))+    (trace (recv (cat (enc ki a (invk ki)) (enc t ke (invk km))))+      (send (enc (enc ki a t (invk kp)) ke)))+    (non-orig (invk ke) (invk ki) (invk km) (invk kp)))+  (defrole appr+    (vars (ki kp akey) (t a text))+    (trace (recv (enc ki a t (invk kp))))+    (non-orig (invk ki) (invk kp))))++(defskeleton aic+  (vars (t a text) (ki kp akey))+  (defstrand appr 1 (t t) (a a) (ki ki) (kp kp))+  (non-orig (invk ki) (invk kp))+  (traces ((recv (enc ki a t (invk kp)))))+  (label 0)+  (unrealized (0 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton aic+  (vars (t a text) (ki kp ke km akey))+  (defstrand appr 1 (t t) (a a) (ki ki) (kp kp))+  (defstrand pca 2 (t t) (a a) (ke ke) (ki ki) (km km) (kp kp))+  (precedes ((1 1) (0 0)))+  (non-orig (invk ki) (invk kp) (invk ke) (invk km))+  (operation encryption-test (added-strand pca 2) (enc ki a t (invk kp))+    (0 0))+  (traces ((recv (enc ki a t (invk kp))))+    ((recv (cat (enc ki a (invk ki)) (enc t ke (invk km))))+      (send (enc (enc ki a t (invk kp)) ke))))+  (label 1)+  (parent 0)+  (unrealized (0 0) (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton aic+  (vars (t a t-0 text) (ki kp ke km ke-0 km-0 akey))+  (defstrand appr 1 (t t) (a a) (ki ki) (kp kp))+  (defstrand pca 2 (t t) (a a) (ke ke) (ki ki) (km km) (kp kp))+  (defstrand tpm 1 (t t-0) (a a) (ke ke-0) (ki ki) (km km-0))+  (precedes ((1 1) (0 0)) ((2 0) (1 0)))+  (non-orig (invk ki) (invk kp) (invk ke) (invk km) (invk ke-0)+    (invk km-0))+  (uniq-orig ki)+  (operation encryption-test (added-strand tpm 1) (enc ki a (invk ki))+    (1 0))+  (traces ((recv (enc ki a t (invk kp))))+    ((recv (cat (enc ki a (invk ki)) (enc t ke (invk km))))+      (send (enc (enc ki a t (invk kp)) ke)))+    ((send (cat (enc ki a (invk ki)) (enc t-0 ke-0 (invk km-0))))))+  (label 2)+  (parent 1)+  (unrealized (0 0) (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton aic+  (vars (t a t-0 a-0 text) (ki kp ke km ke-0 km-0 ki-0 akey))+  (defstrand appr 1 (t t) (a a) (ki ki) (kp kp))+  (defstrand pca 2 (t t) (a a) (ke ke) (ki ki) (km km) (kp kp))+  (defstrand tpm 1 (t t-0) (a a) (ke ke-0) (ki ki) (km km-0))+  (defstrand tpm 1 (t t) (a a-0) (ke ke) (ki ki-0) (km km))+  (precedes ((1 1) (0 0)) ((2 0) (1 0)) ((3 0) (1 0)))+  (non-orig (invk ki) (invk kp) (invk ke) (invk km) (invk ke-0)+    (invk km-0) (invk ki-0))+  (uniq-orig ki ki-0)+  (operation encryption-test (added-strand tpm 1) (enc t ke (invk km))+    (1 0))+  (traces ((recv (enc ki a t (invk kp))))+    ((recv (cat (enc ki a (invk ki)) (enc t ke (invk km))))+      (send (enc (enc ki a t (invk kp)) ke)))+    ((send (cat (enc ki a (invk ki)) (enc t-0 ke-0 (invk km-0)))))+    ((send (cat (enc ki-0 a-0 (invk ki-0)) (enc t ke (invk km))))))+  (label 3)+  (parent 2)+  (unrealized (0 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton aic+  (vars (t a a-0 text) (ki kp ke km ki-0 km-0 akey))+  (defstrand appr 1 (t t) (a a) (ki ki) (kp kp))+  (defstrand pca 2 (t t) (a a) (ke ke) (ki ki) (km km) (kp kp))+  (defstrand tpm 1 (t t) (a a-0) (ke ke) (ki ki-0) (km km))+  (defstrand tpm 3 (t t) (a a) (ke ke) (ki ki) (km km-0) (kp kp))+  (precedes ((1 1) (0 0)) ((2 0) (1 0)) ((3 0) (1 0)) ((3 2) (0 0)))+  (non-orig (invk ki) (invk kp) (invk ke) (invk km) (invk ki-0)+    (invk km-0))+  (uniq-orig ki ki-0)+  (operation encryption-test (added-strand tpm 3) (enc ki a t (invk kp))+    (0 0) (enc (enc ki a t (invk kp)) ke))+  (traces ((recv (enc ki a t (invk kp))))+    ((recv (cat (enc ki a (invk ki)) (enc t ke (invk km))))+      (send (enc (enc ki a t (invk kp)) ke)))+    ((send (cat (enc ki-0 a-0 (invk ki-0)) (enc t ke (invk km)))))+    ((send (cat (enc ki a (invk ki)) (enc t ke (invk km-0))))+      (recv (enc (enc ki a t (invk kp)) ke))+      (send (enc ki a t (invk kp)))))+  (label 4)+  (parent 3)+  (unrealized (3 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton aic+  (vars (t a a-0 text) (ki kp ke km ki-0 km-0 ke-0 km-1 akey))+  (defstrand appr 1 (t t) (a a) (ki ki) (kp kp))+  (defstrand pca 2 (t t) (a a) (ke ke) (ki ki) (km km) (kp kp))+  (defstrand tpm 1 (t t) (a a-0) (ke ke) (ki ki-0) (km km))+  (defstrand tpm 3 (t t) (a a) (ke ke) (ki ki) (km km-0) (kp kp))+  (defstrand pca 2 (t t) (a a) (ke ke-0) (ki ki) (km km-1) (kp kp))+  (precedes ((1 1) (0 0)) ((2 0) (1 0)) ((3 0) (1 0)) ((3 0) (4 0))+    ((3 2) (0 0)) ((4 1) (3 1)))+  (non-orig (invk ki) (invk kp) (invk ke) (invk km) (invk ki-0)+    (invk km-0) (invk ke-0) (invk km-1))+  (uniq-orig ki ki-0)+  (operation encryption-test (added-strand pca 2) (enc ki a t (invk kp))+    (3 1))+  (traces ((recv (enc ki a t (invk kp))))+    ((recv (cat (enc ki a (invk ki)) (enc t ke (invk km))))+      (send (enc (enc ki a t (invk kp)) ke)))+    ((send (cat (enc ki-0 a-0 (invk ki-0)) (enc t ke (invk km)))))+    ((send (cat (enc ki a (invk ki)) (enc t ke (invk km-0))))+      (recv (enc (enc ki a t (invk kp)) ke))+      (send (enc ki a t (invk kp))))+    ((recv (cat (enc ki a (invk ki)) (enc t ke-0 (invk km-1))))+      (send (enc (enc ki a t (invk kp)) ke-0))))+  (label 5)+  (parent 4)+  (unrealized (3 1) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton aic+  (vars (t a a-0 a-1 text) (ki kp ke km ki-0 km-0 ke-0 km-1 ki-1 akey))+  (defstrand appr 1 (t t) (a a) (ki ki) (kp kp))+  (defstrand pca 2 (t t) (a a) (ke ke) (ki ki) (km km) (kp kp))+  (defstrand tpm 1 (t t) (a a-0) (ke ke) (ki ki-0) (km km))+  (defstrand tpm 3 (t t) (a a) (ke ke) (ki ki) (km km-0) (kp kp))+  (defstrand pca 2 (t t) (a a) (ke ke-0) (ki ki) (km km-1) (kp kp))+  (defstrand tpm 1 (t t) (a a-1) (ke ke-0) (ki ki-1) (km km-1))+  (precedes ((1 1) (0 0)) ((2 0) (1 0)) ((3 0) (1 0)) ((3 0) (4 0))+    ((3 2) (0 0)) ((4 1) (3 1)) ((5 0) (4 0)))+  (non-orig (invk ki) (invk kp) (invk ke) (invk km) (invk ki-0)+    (invk km-0) (invk ke-0) (invk km-1) (invk ki-1))+  (uniq-orig ki ki-0 ki-1)+  (operation encryption-test (added-strand tpm 1)+    (enc t ke-0 (invk km-1)) (4 0))+  (traces ((recv (enc ki a t (invk kp))))+    ((recv (cat (enc ki a (invk ki)) (enc t ke (invk km))))+      (send (enc (enc ki a t (invk kp)) ke)))+    ((send (cat (enc ki-0 a-0 (invk ki-0)) (enc t ke (invk km)))))+    ((send (cat (enc ki a (invk ki)) (enc t ke (invk km-0))))+      (recv (enc (enc ki a t (invk kp)) ke))+      (send (enc ki a t (invk kp))))+    ((recv (cat (enc ki a (invk ki)) (enc t ke-0 (invk km-1))))+      (send (enc (enc ki a t (invk kp)) ke-0)))+    ((send (cat (enc ki-1 a-1 (invk ki-1)) (enc t ke-0 (invk km-1))))))+  (label 6)+  (parent 5)+  (unrealized (3 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton aic+  (vars (t a a-0 a-1 text) (ki kp km ki-0 km-0 ke km-1 ki-1 akey))+  (defstrand appr 1 (t t) (a a) (ki ki) (kp kp))+  (defstrand pca 2 (t t) (a a) (ke ke) (ki ki) (km km) (kp kp))+  (defstrand tpm 1 (t t) (a a-0) (ke ke) (ki ki-0) (km km))+  (defstrand tpm 3 (t t) (a a) (ke ke) (ki ki) (km km-0) (kp kp))+  (defstrand pca 2 (t t) (a a) (ke ke) (ki ki) (km km-1) (kp kp))+  (defstrand tpm 1 (t t) (a a-1) (ke ke) (ki ki-1) (km km-1))+  (precedes ((1 1) (0 0)) ((2 0) (1 0)) ((3 0) (1 0)) ((3 0) (4 0))+    ((3 2) (0 0)) ((4 1) (3 1)) ((5 0) (4 0)))+  (non-orig (invk ki) (invk kp) (invk km) (invk ki-0) (invk km-0)+    (invk ke) (invk km-1) (invk ki-1))+  (uniq-orig ki ki-0 ki-1)+  (operation encryption-test (contracted (ke-0 ke))+    (enc ki a t (invk kp)) (3 1) (enc (enc ki a t (invk kp)) ke))+  (traces ((recv (enc ki a t (invk kp))))+    ((recv (cat (enc ki a (invk ki)) (enc t ke (invk km))))+      (send (enc (enc ki a t (invk kp)) ke)))+    ((send (cat (enc ki-0 a-0 (invk ki-0)) (enc t ke (invk km)))))+    ((send (cat (enc ki a (invk ki)) (enc t ke (invk km-0))))+      (recv (enc (enc ki a t (invk kp)) ke))+      (send (enc ki a t (invk kp))))+    ((recv (cat (enc ki a (invk ki)) (enc t ke (invk km-1))))+      (send (enc (enc ki a t (invk kp)) ke)))+    ((send (cat (enc ki-1 a-1 (invk ki-1)) (enc t ke (invk km-1))))))+  (label 7)+  (parent 6)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton aic+  (vars (t a a-0 a-1 text) (ki kp km ki-0 km-0 ke km-1 ki-1 akey))+  (defstrand appr 1 (t t) (a a) (ki ki) (kp kp))+  (defstrand tpm 1 (t t) (a a-0) (ke ke) (ki ki-0) (km km))+  (defstrand tpm 3 (t t) (a a) (ke ke) (ki ki) (km km-0) (kp kp))+  (defstrand pca 2 (t t) (a a) (ke ke) (ki ki) (km km-1) (kp kp))+  (defstrand tpm 1 (t t) (a a-1) (ke ke) (ki ki-1) (km km-1))+  (precedes ((1 0) (0 0)) ((2 0) (3 0)) ((2 2) (0 0)) ((3 1) (2 1))+    ((4 0) (3 0)))+  (non-orig (invk ki) (invk kp) (invk km) (invk ki-0) (invk km-0)+    (invk ke) (invk km-1) (invk ki-1))+  (uniq-orig ki ki-0 ki-1)+  (operation generalization deleted (1 0))+  (traces ((recv (enc ki a t (invk kp))))+    ((send (cat (enc ki-0 a-0 (invk ki-0)) (enc t ke (invk km)))))+    ((send (cat (enc ki a (invk ki)) (enc t ke (invk km-0))))+      (recv (enc (enc ki a t (invk kp)) ke))+      (send (enc ki a t (invk kp))))+    ((recv (cat (enc ki a (invk ki)) (enc t ke (invk km-1))))+      (send (enc (enc ki a t (invk kp)) ke)))+    ((send (cat (enc ki-1 a-1 (invk ki-1)) (enc t ke (invk km-1))))))+  (label 8)+  (parent 7)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton aic+  (vars (t a a-0 text) (ki kp km ke km-0 ki-0 akey))+  (defstrand appr 1 (t t) (a a) (ki ki) (kp kp))+  (defstrand tpm 3 (t t) (a a) (ke ke) (ki ki) (km km) (kp kp))+  (defstrand pca 2 (t t) (a a) (ke ke) (ki ki) (km km-0) (kp kp))+  (defstrand tpm 1 (t t) (a a-0) (ke ke) (ki ki-0) (km km-0))+  (precedes ((1 0) (2 0)) ((1 2) (0 0)) ((2 1) (1 1)) ((3 0) (2 0)))+  (non-orig (invk ki) (invk kp) (invk km) (invk ke) (invk km-0)+    (invk ki-0))+  (uniq-orig ki ki-0)+  (operation generalization deleted (1 0))+  (traces ((recv (enc ki a t (invk kp))))+    ((send (cat (enc ki a (invk ki)) (enc t ke (invk km))))+      (recv (enc (enc ki a t (invk kp)) ke))+      (send (enc ki a t (invk kp))))+    ((recv (cat (enc ki a (invk ki)) (enc t ke (invk km-0))))+      (send (enc (enc ki a t (invk kp)) ke)))+    ((send (cat (enc ki-0 a-0 (invk ki-0)) (enc t ke (invk km-0))))))+  (label 9)+  (parent 8)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton aic+  (vars (t a text) (ki kp km ke akey))+  (defstrand appr 1 (t t) (a a) (ki ki) (kp kp))+  (defstrand tpm 3 (t t) (a a) (ke ke) (ki ki) (km km) (kp kp))+  (defstrand pca 2 (t t) (a a) (ke ke) (ki ki) (km km) (kp kp))+  (precedes ((1 0) (2 0)) ((1 2) (0 0)) ((2 1) (1 1)))+  (non-orig (invk ki) (invk kp) (invk km) (invk ke))+  (uniq-orig ki)+  (operation collapsed 3 1)+  (traces ((recv (enc ki a t (invk kp))))+    ((send (cat (enc ki a (invk ki)) (enc t ke (invk km))))+      (recv (enc (enc ki a t (invk kp)) ke))+      (send (enc ki a t (invk kp))))+    ((recv (cat (enc ki a (invk ki)) (enc t ke (invk km))))+      (send (enc (enc ki a t (invk kp)) ke))))+  (label 10)+  (parent 9)+  (unrealized)+  (shape))++(comment "Nothing left to do")
+ tst/sigenc.scm view
@@ -0,0 +1,41 @@+(defprotocol mult-keys-sig-enc basic+   (defrole init+    (vars (a b name) (n1 n2 text))+    (trace+     (send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+     (recv (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+     (send (enc (enc n2 (privk "sig" a)) (pubk "enc" b)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace+     (recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+     (send (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+     (recv (enc (enc n2 (privk "sig" a)) (pubk "enc" b))))))++;;; The initiator point-of-view+(defskeleton mult-keys-sig-enc+   (vars (a b name) (n1 text))+   (defstrand init 3 (a a) (b b) (n1 n1))+   (non-orig (privk "enc" a) (privk "sig" a) (privk "enc" b))+   (uniq-orig n1))++;;; The responder point-of-view trusting only a's signature key+(defskeleton mult-keys-sig-enc+  (vars (a b name) (n2 text))+  (defstrand resp 3 (a a) (b b) (n2 n2))+  (non-orig (privk "sig" a))+  (uniq-orig n2))++;;; The responder point-of-view trusting only a's encryption key+(defskeleton mult-keys-sig-enc+  (vars (a b name) (n2 text))+  (defstrand resp 3 (a a) (b b) (n2 n2))+  (non-orig (privk "enc" a))+  (uniq-orig n2))++;;; The responder point-of-view trusting both of a's keys+(defskeleton mult-keys-sig-enc+  (vars (a b name) (n2 text))+  (defstrand resp 3 (a a) (b b) (n2 n2))+  (non-orig (privk "sig" a) (privk "enc" a))+  (uniq-orig n2))
+ tst/sigenc.tst view
@@ -0,0 +1,349 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol mult-keys-sig-enc basic+  (defrole init+    (vars (a b name) (n1 n2 text))+    (trace (send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (recv (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (send (enc (enc n2 (privk "sig" a)) (pubk "enc" b)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace (recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (send (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (recv (enc (enc n2 (privk "sig" a)) (pubk "enc" b))))))++(defskeleton mult-keys-sig-enc+  (vars (n1 n2 text) (a b name))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (non-orig (privk "enc" a) (privk "enc" b) (privk "sig" a))+  (uniq-orig n1)+  (traces+    ((send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (recv (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (send (enc (enc n2 (privk "sig" a)) (pubk "enc" b)))))+  (label 0)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton mult-keys-sig-enc+  (vars (n1 n2 n2-0 text) (a b name))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (defstrand resp 2 (n2 n2-0) (n1 n1) (b b) (a a))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk "enc" a) (privk "enc" b) (privk "sig" a))+  (uniq-orig n1)+  (operation nonce-test (added-strand resp 2) n1 (0 1)+    (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+  (traces+    ((send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (recv (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (send (enc (enc n2 (privk "sig" a)) (pubk "enc" b))))+    ((recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (send (enc (enc n1 n2-0 (privk "sig" b)) (pubk "enc" a)))))+  (label 1)+  (parent 0)+  (unrealized (0 1))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton mult-keys-sig-enc+  (vars (n1 n2 text) (a b name))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (defstrand resp 2 (n2 n2) (n1 n1) (b b) (a a))+  (precedes ((0 0) (1 0)) ((1 1) (0 1)))+  (non-orig (privk "enc" a) (privk "enc" b) (privk "sig" a))+  (uniq-orig n1)+  (operation nonce-test (contracted (n2-0 n2)) n1 (0 1)+    (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a))+    (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+  (traces+    ((send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (recv (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (send (enc (enc n2 (privk "sig" a)) (pubk "enc" b))))+    ((recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (send (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))))+  (label 2)+  (parent 1)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol mult-keys-sig-enc basic+  (defrole init+    (vars (a b name) (n1 n2 text))+    (trace (send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (recv (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (send (enc (enc n2 (privk "sig" a)) (pubk "enc" b)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace (recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (send (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (recv (enc (enc n2 (privk "sig" a)) (pubk "enc" b))))))++(defskeleton mult-keys-sig-enc+  (vars (n2 n1 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (non-orig (privk "sig" a))+  (uniq-orig n2)+  (traces+    ((recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (send (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (recv (enc (enc n2 (privk "sig" a)) (pubk "enc" b)))))+  (label 3)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton mult-keys-sig-enc+  (vars (n2 n1 text) (a b b-0 name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 1 (n1 n1) (a a) (b b-0))+  (precedes ((1 0) (0 0)))+  (non-orig (privk "sig" a))+  (uniq-orig n2)+  (operation encryption-test (added-strand init 1)+    (enc n1 a (privk "sig" a)) (0 0))+  (traces+    ((recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (send (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (recv (enc (enc n2 (privk "sig" a)) (pubk "enc" b))))+    ((send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b-0)))))+  (label 4)+  (parent 3)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton mult-keys-sig-enc+  (vars (n2 n1 n1-0 text) (a b b-0 b-1 name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 1 (n1 n1) (a a) (b b-0))+  (defstrand init 3 (n1 n1-0) (n2 n2) (a a) (b b-1))+  (precedes ((0 1) (2 1)) ((1 0) (0 0)) ((2 2) (0 2)))+  (non-orig (privk "sig" a))+  (uniq-orig n2)+  (operation encryption-test (added-strand init 3)+    (enc n2 (privk "sig" a)) (0 2))+  (traces+    ((recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (send (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (recv (enc (enc n2 (privk "sig" a)) (pubk "enc" b))))+    ((send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b-0))))+    ((send (enc (enc n1-0 a (privk "sig" a)) (pubk "enc" b-1)))+      (recv (enc (enc n1-0 n2 (privk "sig" b-1)) (pubk "enc" a)))+      (send (enc (enc n2 (privk "sig" a)) (pubk "enc" b-1)))))+  (label 5)+  (parent 4)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton mult-keys-sig-enc+  (vars (n2 n1 text) (a b b-0 name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b-0))+  (precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))+  (non-orig (privk "sig" a))+  (uniq-orig n2)+  (operation collapsed 1 2)+  (traces+    ((recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (send (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (recv (enc (enc n2 (privk "sig" a)) (pubk "enc" b))))+    ((send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b-0)))+      (recv (enc (enc n1 n2 (privk "sig" b-0)) (pubk "enc" a)))+      (send (enc (enc n2 (privk "sig" a)) (pubk "enc" b-0)))))+  (label 6)+  (parent 5)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol mult-keys-sig-enc basic+  (defrole init+    (vars (a b name) (n1 n2 text))+    (trace (send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (recv (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (send (enc (enc n2 (privk "sig" a)) (pubk "enc" b)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace (recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (send (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (recv (enc (enc n2 (privk "sig" a)) (pubk "enc" b))))))++(defskeleton mult-keys-sig-enc+  (vars (n2 n1 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (non-orig (privk "enc" a))+  (uniq-orig n2)+  (traces+    ((recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (send (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (recv (enc (enc n2 (privk "sig" a)) (pubk "enc" b)))))+  (label 7)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton mult-keys-sig-enc+  (vars (n2 n1 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (precedes ((0 1) (1 1)) ((1 2) (0 2)))+  (non-orig (privk "enc" a))+  (uniq-orig n2)+  (operation nonce-test (added-strand init 3) n2 (0 2)+    (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+  (traces+    ((recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (send (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (recv (enc (enc n2 (privk "sig" a)) (pubk "enc" b))))+    ((send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (recv (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (send (enc (enc n2 (privk "sig" a)) (pubk "enc" b)))))+  (label 8)+  (parent 7)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol mult-keys-sig-enc basic+  (defrole init+    (vars (a b name) (n1 n2 text))+    (trace (send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (recv (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (send (enc (enc n2 (privk "sig" a)) (pubk "enc" b)))))+  (defrole resp+    (vars (b a name) (n2 n1 text))+    (trace (recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (send (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (recv (enc (enc n2 (privk "sig" a)) (pubk "enc" b))))))++(defskeleton mult-keys-sig-enc+  (vars (n2 n1 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (non-orig (privk "enc" a) (privk "sig" a))+  (uniq-orig n2)+  (traces+    ((recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (send (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (recv (enc (enc n2 (privk "sig" a)) (pubk "enc" b)))))+  (label 9)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton mult-keys-sig-enc+  (vars (n2 n1 text) (a b b-0 name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 1 (n1 n1) (a a) (b b-0))+  (precedes ((1 0) (0 0)))+  (non-orig (privk "enc" a) (privk "sig" a))+  (uniq-orig n2)+  (operation encryption-test (added-strand init 1)+    (enc n1 a (privk "sig" a)) (0 0))+  (traces+    ((recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (send (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (recv (enc (enc n2 (privk "sig" a)) (pubk "enc" b))))+    ((send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b-0)))))+  (label 10)+  (parent 9)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton mult-keys-sig-enc+  (vars (n2 n1 n1-0 text) (a b b-0 b-1 name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 1 (n1 n1) (a a) (b b-0))+  (defstrand init 3 (n1 n1-0) (n2 n2) (a a) (b b-1))+  (precedes ((0 1) (2 1)) ((1 0) (0 0)) ((2 2) (0 2)))+  (non-orig (privk "enc" a) (privk "sig" a))+  (uniq-orig n2)+  (operation encryption-test (added-strand init 3)+    (enc n2 (privk "sig" a)) (0 2))+  (traces+    ((recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (send (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (recv (enc (enc n2 (privk "sig" a)) (pubk "enc" b))))+    ((send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b-0))))+    ((send (enc (enc n1-0 a (privk "sig" a)) (pubk "enc" b-1)))+      (recv (enc (enc n1-0 n2 (privk "sig" b-1)) (pubk "enc" a)))+      (send (enc (enc n2 (privk "sig" a)) (pubk "enc" b-1)))))+  (label 11)+  (parent 10)+  (unrealized (2 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton mult-keys-sig-enc+  (vars (n2 n1 text) (a b b-0 name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 1 (n1 n1) (a a) (b b-0))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (precedes ((0 1) (2 1)) ((1 0) (0 0)) ((2 2) (0 2)))+  (non-orig (privk "enc" a) (privk "sig" a))+  (uniq-orig n2)+  (operation nonce-test (contracted (b-1 b) (n1-0 n1)) n2 (2 1)+    (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+  (traces+    ((recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (send (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (recv (enc (enc n2 (privk "sig" a)) (pubk "enc" b))))+    ((send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b-0))))+    ((send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (recv (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (send (enc (enc n2 (privk "sig" a)) (pubk "enc" b)))))+  (label 12)+  (parent 11)+  (unrealized)+  (shape)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton mult-keys-sig-enc+  (vars (n2 n1 n1-0 text) (a b b-0 b-1 name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 1 (n1 n1) (a a) (b b-0))+  (defstrand init 3 (n1 n1-0) (n2 n2) (a a) (b b-1))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (precedes ((0 1) (3 1)) ((1 0) (0 0)) ((2 2) (0 2)) ((3 2) (2 1)))+  (non-orig (privk "enc" a) (privk "sig" a))+  (uniq-orig n2)+  (operation nonce-test (added-strand init 3) n2 (2 1)+    (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+  (traces+    ((recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (send (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (recv (enc (enc n2 (privk "sig" a)) (pubk "enc" b))))+    ((send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b-0))))+    ((send (enc (enc n1-0 a (privk "sig" a)) (pubk "enc" b-1)))+      (recv (enc (enc n1-0 n2 (privk "sig" b-1)) (pubk "enc" a)))+      (send (enc (enc n2 (privk "sig" a)) (pubk "enc" b-1))))+    ((send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (recv (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (send (enc (enc n2 (privk "sig" a)) (pubk "enc" b)))))+  (label 13)+  (parent 11)+  (seen 12)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton mult-keys-sig-enc+  (vars (n2 n1 text) (a b name))+  (defstrand resp 3 (n2 n2) (n1 n1) (b b) (a a))+  (defstrand init 3 (n1 n1) (n2 n2) (a a) (b b))+  (precedes ((0 1) (1 1)) ((1 0) (0 0)) ((1 2) (0 2)))+  (non-orig (privk "enc" a) (privk "sig" a))+  (uniq-orig n2)+  (operation collapsed 1 2)+  (traces+    ((recv (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (send (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (recv (enc (enc n2 (privk "sig" a)) (pubk "enc" b))))+    ((send (enc (enc n1 a (privk "sig" a)) (pubk "enc" b)))+      (recv (enc (enc n1 n2 (privk "sig" b)) (pubk "enc" a)))+      (send (enc (enc n2 (privk "sig" a)) (pubk "enc" b)))))+  (label 14)+  (parent 12)+  (unrealized)+  (shape))++(comment "Nothing left to do")
+ tst/sorted_epmo_acctnum.scm view
@@ -0,0 +1,84 @@+(defprotocol epmo_acctnum basic+  (defrole bank+    (vars (b c m name) (acctnum price text) (hash name) (nc nm nb data))+    (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 goods price text) (nc nm nb data))+    (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) (goods price text) (nc nm nb data))+    (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 (b m c name) (nm nc nb data) (hash name))+  (defstrand merchant 4 (b b) (m m) (c c) (nm nm) (nc nc) (nb nb) (hash hash))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nc nb))++(defskeleton epmo_acctnum+  (vars (b m c name) (nm nb nc data) (hash name) (price acctnum text))+  (defstrand bank 3 (b b) (m m) (c c) (nm nm) (nb nb) (nc nc) (hash hash))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nc nb))
+ tst/sorted_epmo_acctnum.tst view
@@ -0,0 +1,1629 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol epmo_acctnum basic+  (defrole bank+    (vars (b c m name) (acctnum price text) (hash name) (nc nm nb data))+    (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 goods price text) (nc nm nb data))+    (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) (goods price text) (nc nm nb data))+    (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 (goods price text) (nm nc nb data) (b m c hash name))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (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))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (goods price acctnum text) (nm nc nb data) (b m c hash name))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (hash hash))+  (precedes ((0 1) (1 0)) ((1 1) (0 2)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nc nb)+  (operation encryption-test (added-strand bank 2)+    (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b)) (0 2))+  (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))))))+  (label 1)+  (parent 0)+  (unrealized (0 2) (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (goods price acctnum acctnum-0 goods-0 text) (nm nc nb data)+    (b m c hash b-0 name))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum-0) (goods goods-0)+    (price price) (nc nc) (nm nm) (b b-0) (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0))+  (uniq-orig nm nc nb)+  (operation nonce-test (added-strand customer 3) nm (1 0)+    (enc nc nm m price (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum-0 price (pubk b-0)))))+  (label 2)+  (parent 1)+  (unrealized (0 0) (0 2) (1 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (goods price acctnum goods-0 text) (nm nc nb data)+    (m c hash b name))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum) (goods goods-0) (price price)+    (nc nc) (nm nm) (b b) (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b))+  (uniq-orig nm nc nb)+  (operation nonce-test (contracted (b-0 b) (acctnum-0 acctnum)) nm+    (1 0) (enc nc nm m price (pubk c))+    (enc c nc nm acctnum price (pubk b)))+  (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum price (pubk b)))))+  (label 3)+  (parent 2)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (goods price acctnum acctnum-0 goods-0 text)+    (nm nc nb nb-0 data) (b m c hash b-0 hash-0 name))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum-0) (goods goods-0)+    (price price) (nc nc) (nm nm) (b b-0) (c c) (m m))+  (defstrand bank 2 (acctnum acctnum-0) (price price) (nc nc) (nm nm)+    (nb nb-0) (b b-0) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((0 1) (3 0)) ((1 1) (0 2)) ((2 0) (0 0))+    ((2 2) (1 0)) ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0))+  (uniq-orig nm nc nb)+  (operation nonce-test (added-strand bank 2) nm (1 0)+    (enc nc nm m price (pubk c))+    (enc c nc nm acctnum-0 price (pubk b-0)))+  (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum-0 price (pubk b-0))))+    ((recv (enc c nc nm acctnum-0 price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0))+            (privk b-0)) (enc nc nb-0 (pubk c))))))+  (label 4)+  (parent 2)+  (unrealized (0 0) (0 2) (1 0) (3 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (price acctnum goods text) (nm nc nb data) (m c hash b name))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum) (goods goods) (price price)+    (nc nc) (nm nm) (b b) (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b))+  (uniq-orig nm nc nb)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc c nc goods (pubk m)))+  (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)))))+  (label 5)+  (parent 3)+  (seen 8)+  (unrealized (0 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (goods price acctnum goods-0 price-0 text) (nm nc nb nm-0 data)+    (m c hash b name))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum) (goods goods-0) (price price)+    (nc nc) (nm nm) (b b) (c c) (m m))+  (defstrand merchant 2 (goods goods-0) (price price-0) (nc nc)+    (nm nm-0) (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (3 0)) ((2 2) (1 0))+    ((3 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b))+  (uniq-orig nm nc nb nm-0)+  (operation nonce-test (added-strand merchant 2) nc (0 0)+    (enc c nc goods-0 (pubk m)))+  (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum price (pubk b))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c)))))+  (label 6)+  (parent 3)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (goods price acctnum acctnum-0 goods-0 text)+    (nm nc nb nb-0 data) (b m c hash b-0 hash-0 name))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum-0) (goods goods-0)+    (price price) (nc nc) (nm nm) (b b-0) (c c) (m m))+  (defstrand bank 2 (acctnum acctnum-0) (price price) (nc nc) (nm nm)+    (nb nb-0) (b b-0) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0)+    (privk hash-0))+  (uniq-orig nm nc nb)+  (operation nonce-test (added-strand customer 3) nm (3 0)+    (enc nc nm m price (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum-0 price (pubk b-0))))+    ((recv (enc c nc nm acctnum-0 price (pubk b-0)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0))+            (privk b-0)) (enc nc nb-0 (pubk c))))))+  (label 7)+  (parent 4)+  (unrealized (0 0) (0 2) (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (price acctnum goods text) (nm nc nb data) (c hash b m name))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (hash hash))+  (defstrand customer 5 (acctnum acctnum) (goods goods) (price price)+    (nc nc) (nm nm) (nb nb) (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 (added-strand 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 5)+  (unrealized)+  (shape))++(defskeleton epmo_acctnum+  (vars (price acctnum goods price-0 text) (nm nc nb nm-0 data)+    (m c hash b name))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum) (goods goods) (price price)+    (nc nc) (nm nm) (b b) (c c) (m m))+  (defstrand merchant 2 (goods goods) (price price-0) (nc nc) (nm nm-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (3 0)) ((2 2) (1 0))+    ((3 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b))+  (uniq-orig nm nc nb nm-0)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc nc nm-0 m price-0 (pubk c)) (enc c nc goods (pubk m)))+  (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 (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c)))))+  (label 9)+  (parent 6)+  (seen 11)+  (unrealized (0 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (goods price acctnum goods-0 text) (nm nc nb nb-0 data)+    (m c hash b hash-0 name))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum) (goods goods-0) (price price)+    (nc nc) (nm nm) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb-0) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((3 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nm nc nb)+  (operation nonce-test (contracted (b-0 b) (acctnum-0 acctnum)) nm+    (1 0) (enc "hash" c nc nb-0 nm price (pubk hash-0))+    (enc nc nm m price (pubk c)) (enc c nc nm acctnum price (pubk b)))+  (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum price (pubk b))))+    ((recv (enc c nc nm acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c))))))+  (label 10)+  (parent 7)+  (unrealized (0 0) (0 2))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (price price-0 acctnum goods text) (nm nc nb nm-0 data)+    (c hash b m name))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (hash hash))+  (defstrand merchant 2 (goods goods) (price price-0) (nc nc) (nm nm-0)+    (c c) (m m))+  (defstrand customer 5 (acctnum acctnum) (goods goods) (price price)+    (nc nc) (nm nm) (nb nb) (b b) (c c) (m m) (hash hash))+  (precedes ((0 1) (3 1)) ((1 1) (3 3)) ((2 1) (0 0)) ((3 0) (2 0))+    ((3 2) (1 0)) ((3 4) (0 2)))+  (non-orig (privk c) (privk hash) (privk b) (privk m))+  (uniq-orig nm nc nb nm-0)+  (operation nonce-test (added-strand 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)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (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 11)+  (parent 9)+  (seen 8)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (price acctnum goods text) (nm nc nb nb-0 data)+    (m c hash b hash-0 name))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum) (goods goods) (price price)+    (nc nc) (nm nm) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb-0) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (0 0)) ((2 2) (3 0))+    ((3 1) (1 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nm nc nb)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc c nc goods (pubk m)))+  (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 (enc c nc nm acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c))))))+  (label 12)+  (parent 10)+  (seen 14)+  (unrealized (0 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (goods price acctnum goods-0 price-0 text)+    (nm nc nb nb-0 nm-0 data) (m c hash b hash-0 name))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum) (goods goods-0) (price price)+    (nc nc) (nm nm) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb-0) (b b) (c c) (hash hash-0))+  (defstrand merchant 2 (goods goods-0) (price price-0) (nc nc)+    (nm nm-0) (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (4 0)) ((2 2) (3 0))+    ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nm nc nb nm-0)+  (operation nonce-test (added-strand merchant 2) nc (0 0)+    (enc c nc goods-0 (pubk m)))+  (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum price (pubk b))))+    ((recv (enc c nc nm acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c)))))+  (label 13)+  (parent 10)+  (unrealized (0 0) (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (price acctnum goods text) (nm nc nb nb-0 data)+    (c hash hash-0 b m name))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb-0) (b b) (c c) (hash hash-0))+  (defstrand customer 5 (acctnum acctnum) (goods goods) (price price)+    (nc nc) (nm nm) (nb nb) (b b) (c c) (m m) (hash hash))+  (precedes ((0 1) (3 1)) ((1 1) (3 3)) ((2 1) (1 0)) ((3 0) (0 0))+    ((3 2) (2 0)) ((3 4) (0 2)))+  (non-orig (privk c) (privk hash) (privk hash-0) (privk b) (privk m))+  (uniq-orig nm nc nb)+  (operation nonce-test (added-strand 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)))))+    ((recv (enc c nc nm acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (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 14)+  (parent 12)+  (seen 8)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (price acctnum goods price-0 text) (nm nc nb nb-0 nm-0 data)+    (m c hash b hash-0 name))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (hash hash))+  (defstrand customer 3 (acctnum acctnum) (goods goods) (price price)+    (nc nc) (nm nm) (b b) (c c) (m m))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb-0) (b b) (c c) (hash hash-0))+  (defstrand merchant 2 (goods goods) (price price-0) (nc nc) (nm nm-0)+    (c c) (m m))+  (precedes ((0 1) (2 1)) ((1 1) (0 2)) ((2 0) (4 0)) ((2 2) (3 0))+    ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk m) (privk c) (privk hash) (privk b) (privk hash-0))+  (uniq-orig nm nc nb nm-0)+  (operation nonce-test (contracted (goods-0 goods)) nc (0 0)+    (enc nc nm-0 m price-0 (pubk c)) (enc c nc goods (pubk m)))+  (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 (enc c nc nm acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c)))))+  (label 15)+  (parent 13)+  (seen 16)+  (unrealized (0 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (price price-0 acctnum goods text) (nm nc nb nb-0 nm-0 data)+    (c hash hash-0 b m name))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb-0) (b b) (c c) (hash hash-0))+  (defstrand merchant 2 (goods goods) (price price-0) (nc nc) (nm nm-0)+    (c c) (m m))+  (defstrand customer 5 (acctnum acctnum) (goods goods) (price price)+    (nc nc) (nm nm) (nb nb) (b b) (c c) (m m) (hash hash))+  (precedes ((0 1) (4 1)) ((1 1) (4 3)) ((2 1) (1 0)) ((3 1) (0 0))+    ((4 0) (3 0)) ((4 2) (2 0)) ((4 4) (0 2)))+  (non-orig (privk c) (privk hash) (privk hash-0) (privk b) (privk m))+  (uniq-orig nm nc nb nm-0)+  (operation nonce-test (added-strand 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)))))+    ((recv (enc c nc nm acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c)))))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (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 16)+  (parent 15)+  (seen 11)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(comment "Nothing left to do")++(defprotocol epmo_acctnum basic+  (defrole bank+    (vars (b c m name) (acctnum price text) (hash name) (nc nm nb data))+    (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 goods price text) (nc nm nb data))+    (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) (goods price text) (nc nm nb data))+    (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 (acctnum price text) (nm nb nc data) (b m c hash name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (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 17)+  (unrealized (0 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (acctnum price goods price-0 text) (nm nb nc nc-0 data)+    (b m c hash c-0 name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price-0) (nc nc-0) (nm nm)+    (nb nb) (b b) (c c-0) (m m) (hash hash))+  (precedes ((0 1) (1 2)) ((1 1) (0 0)) ((1 3) (0 2)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nb nc)+  (operation encryption-test (added-strand merchant 4)+    (enc (enc "hash" b m nb nm (pubk hash)) (privk m)) (0 2))+  (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-0 nc-0 goods (pubk m)))+      (send (enc nc-0 nm m price-0 (pubk c-0)))+      (recv+        (cat+          (enc (enc "hash" c-0 nc-0 nb nm price-0 (pubk hash))+            (privk b)) nb))+      (send (enc (enc "hash" b m nb nm (pubk hash)) (privk m)))))+  (label 18)+  (parent 17)+  (unrealized (1 2))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (acctnum price goods text) (nm nb nc data) (b m c hash name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (precedes ((0 1) (1 2)) ((1 1) (0 0)) ((1 3) (0 2)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nb nc)+  (operation encryption-test (added-strand bank 2)+    (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b)) (1 2))+  (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)))))+  (label 19)+  (parent 18)+  (seen 20)+  (unrealized (0 0) (1 2))+  (comment "5 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (acctnum price goods acctnum-0 goods-0 text) (nm nb nc data)+    (b m c hash b-0 m-0 name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum-0) (goods goods-0)+    (price price) (nc nc) (nm nm) (nb nb) (b b-0) (c c) (m m-0)+    (hash hash))+  (precedes ((0 1) (2 3)) ((1 1) (0 0)) ((1 1) (2 1)) ((1 3) (0 2))+    ((2 0) (1 0)) ((2 4) (1 2)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0))+  (uniq-orig nm nb nc)+  (operation nonce-test (added-strand customer 5) nb (1 2)+    (enc "hash" c nc nb nm price (pubk hash)) (enc nc nb (pubk c)))+  (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-0 (pubk m-0)))+      (recv (enc nc nm m-0 price (pubk c)))+      (send (enc c nc nm acctnum-0 price (pubk b-0)))+      (recv+        (cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b-0))+          (enc nc nb (pubk c))))+      (send+        (cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b-0))+          nb))))+  (label 20)+  (parent 19)+  (unrealized (0 0) (2 1) (2 3))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (acctnum price goods acctnum-0 goods-0 text) (nm nb nc data)+    (b m c hash b-0 name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum-0) (goods goods-0)+    (price price) (nc nc) (nm nm) (nb nb) (b b-0) (c c) (m m)+    (hash hash))+  (precedes ((0 1) (2 3)) ((1 1) (0 0)) ((1 1) (2 1)) ((1 3) (0 2))+    ((2 0) (1 0)) ((2 4) (1 2)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk b-0))+  (uniq-orig nm nb nc)+  (operation nonce-test (contracted (m-0 m)) nm (2 1)+    (enc nc nm m price (pubk c)))+  (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum-0 price (pubk b-0)))+      (recv+        (cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b-0))+          (enc nc nb (pubk c))))+      (send+        (cat (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b-0))+          nb))))+  (label 21)+  (parent 20)+  (unrealized (0 0) (1 0) (2 3))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (acctnum price goods acctnum-0 goods-0 text) (nm nb nc data)+    (b m c hash name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum-0) (goods goods-0)+    (price price) (nc nc) (nm nm) (nb nb) (b b) (c c) (m m) (hash hash))+  (precedes ((0 1) (2 3)) ((1 1) (0 0)) ((1 1) (2 1)) ((1 3) (0 2))+    ((2 0) (1 0)) ((2 4) (1 2)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nb nc)+  (operation encryption-test (added-strand bank 2)+    (enc (enc "hash" c nc nb nm price (pubk hash)) (privk b)) (2 3))+  (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum-0 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 22)+  (parent 21)+  (unrealized (0 0) (1 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (acctnum price acctnum-0 goods text) (nm nb nc data)+    (b m c hash name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum-0) (goods goods) (price price)+    (nc nc) (nm nm) (nb nb) (b b) (c c) (m m) (hash hash))+  (precedes ((0 1) (2 3)) ((1 1) (0 0)) ((1 1) (2 1)) ((1 3) (0 2))+    ((2 0) (1 0)) ((2 4) (1 2)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nb nc)+  (operation nonce-test (contracted (goods-0 goods)) nc (1 0)+    (enc c nc goods (pubk m)))+  (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-0 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 23)+  (parent 22)+  (unrealized (0 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (acctnum price goods acctnum-0 goods-0 price-0 text)+    (nm nb nc nm-0 data) (b m c hash name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum-0) (goods goods-0)+    (price price) (nc nc) (nm nm) (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (goods goods-0) (price price-0) (nc nc)+    (nm nm-0) (c c) (m m))+  (precedes ((0 1) (2 3)) ((1 1) (0 0)) ((1 1) (2 1)) ((1 3) (0 2))+    ((2 0) (3 0)) ((2 4) (1 2)) ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nb nc nm-0)+  (operation nonce-test (added-strand merchant 2) nc (1 0)+    (enc c nc goods-0 (pubk m)))+  (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-0 (pubk m)))+      (recv (enc nc nm m price (pubk c)))+      (send (enc c nc nm acctnum-0 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)))+    ((recv (enc c nc goods-0 (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c)))))+  (label 24)+  (parent 22)+  (unrealized (0 0) (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (acctnum price acctnum-0 goods text) (nm nb nc data)+    (b m c hash name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum-0) (goods goods) (price price)+    (nc nc) (nm nm) (nb nb) (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 (added-strand customer 3) nm (0 0)+    (enc nc nm m price (pubk c)))+  (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-0 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 25)+  (parent 23)+  (unrealized (0 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (acctnum price acctnum-0 goods price-0 text)+    (nm nb nc nm-0 data) (b m c hash name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum-0) (goods goods) (price price)+    (nc nc) (nm nm) (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (goods goods) (price price-0) (nc nc) (nm nm-0)+    (c c) (m m))+  (precedes ((0 1) (2 3)) ((1 1) (0 0)) ((1 1) (2 1)) ((1 3) (0 2))+    ((2 0) (3 0)) ((2 4) (1 2)) ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nb nc nm-0)+  (operation nonce-test (contracted (goods-0 goods)) nc (1 0)+    (enc nc nm-0 m price-0 (pubk c)) (enc c nc goods (pubk m)))+  (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-0 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)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c)))))+  (label 26)+  (parent 24)+  (unrealized (0 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (price acctnum goods text) (nm nb nc data) (b m c hash name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum) (goods goods) (price price)+    (nc nc) (nm nm) (nb nb) (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 27)+  (parent 25)+  (unrealized)+  (shape))++(defskeleton epmo_acctnum+  (vars (acctnum price acctnum-0 goods text) (nm nb nc nb-0 data)+    (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum-0) (goods goods) (price price)+    (nc nc) (nm nm) (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum-0) (price price) (nc nc) (nm nm)+    (nb nb-0) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 1) (3 0)) ((1 3) (0 2))+    ((2 0) (1 0)) ((2 2) (0 0)) ((2 4) (1 2)) ((3 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nm nb nc)+  (operation nonce-test (added-strand bank 2) nm (0 0)+    (enc nc nm m price (pubk c)) (enc c nc nm acctnum-0 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-0 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)))+    ((recv (enc c nc nm acctnum-0 price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c))))))+  (label 28)+  (parent 25)+  (unrealized (0 0) (3 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (acctnum price acctnum-0 goods price-0 text)+    (nm nb nc nm-0 data) (b m c hash name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum-0) (goods goods) (price price)+    (nc nc) (nm nm) (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (goods goods) (price price-0) (nc nc) (nm nm-0)+    (c c) (m m))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (3 0))+    ((2 2) (0 0)) ((2 4) (1 2)) ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nb nc nm-0)+  (operation nonce-test (added-strand customer 3) nm (0 0)+    (enc nc nm m price (pubk c)))+  (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-0 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)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c)))))+  (label 29)+  (parent 26)+  (unrealized (0 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton epmo_acctnum+  (vars (acctnum price acctnum-0 goods text) (nm nb nc nb-0 data)+    (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum-0) (goods goods) (price price)+    (nc nc) (nm nm) (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum-0) (price price) (nc nc) (nm nm)+    (nb nb-0) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (1 0))+    ((2 2) (3 0)) ((2 4) (1 2)) ((3 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nm nb nc)+  (operation nonce-test (added-strand customer 3) nm (3 0)+    (enc nc nm m price (pubk c)))+  (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-0 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)))+    ((recv (enc c nc nm acctnum-0 price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c))))))+  (label 30)+  (parent 28)+  (unrealized (0 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (price acctnum goods price-0 text) (nm nb nc nm-0 data)+    (b m c hash name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum) (goods goods) (price price)+    (nc nc) (nm nm) (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (goods goods) (price price-0) (nc nc) (nm nm-0)+    (c c) (m m))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (3 0))+    ((2 2) (0 0)) ((2 4) (1 2)) ((3 1) (1 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash))+  (uniq-orig nm nb nc nm-0)+  (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)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c)))))+  (label 31)+  (parent 29)+  (seen 27)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (acctnum price acctnum-0 goods price-0 text)+    (nm nb nc nm-0 nb-0 data) (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum-0) (goods goods) (price price)+    (nc nc) (nm nm) (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (goods goods) (price price-0) (nc nc) (nm nm-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum acctnum-0) (price price) (nc nc) (nm nm)+    (nb nb-0) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 1) (4 0)) ((1 3) (0 2))+    ((2 0) (3 0)) ((2 2) (0 0)) ((2 4) (1 2)) ((3 1) (1 0))+    ((4 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nm nb nc nm-0)+  (operation nonce-test (added-strand bank 2) nm (0 0)+    (enc nc nm m price (pubk c)) (enc c nc nm acctnum-0 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-0 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)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c))))+    ((recv (enc c nc nm acctnum-0 price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c))))))+  (label 32)+  (parent 29)+  (unrealized (0 0) (4 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (price acctnum goods text) (nm nb nc nb-0 data)+    (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum) (goods goods) (price price)+    (nc nc) (nm nm) (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb-0) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (1 0))+    ((2 2) (3 0)) ((2 4) (1 2)) ((3 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nm nb nc)+  (operation nonce-test (contracted (acctnum-0 acctnum)) nm (0 0)+    (enc "hash" c nc nb-0 nm price (pubk hash-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)))+    ((recv (enc c nc nm acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c))))))+  (label 33)+  (parent 30)+  (seen 27)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton epmo_acctnum+  (vars (acctnum price acctnum-0 goods price-0 text)+    (nm nb nc nm-0 nb-0 data) (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum-0) (goods goods) (price price)+    (nc nc) (nm nm) (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (goods goods) (price price-0) (nc nc) (nm nm-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum acctnum-0) (price price) (nc nc) (nm nm)+    (nb nb-0) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (3 0))+    ((2 2) (4 0)) ((2 4) (1 2)) ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nm nb nc nm-0)+  (operation nonce-test (added-strand customer 3) nm (4 0)+    (enc nc nm m price (pubk c)))+  (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-0 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)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c))))+    ((recv (enc c nc nm acctnum-0 price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c))))))+  (label 34)+  (parent 32)+  (unrealized (0 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton epmo_acctnum+  (vars (price acctnum goods price-0 text) (nm nb nc nm-0 nb-0 data)+    (b m c hash hash-0 name))+  (defstrand bank 3 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 4 (goods goods) (price price) (nc nc) (nm nm)+    (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand customer 5 (acctnum acctnum) (goods goods) (price price)+    (nc nc) (nm nm) (nb nb) (b b) (c c) (m m) (hash hash))+  (defstrand merchant 2 (goods goods) (price price-0) (nc nc) (nm nm-0)+    (c c) (m m))+  (defstrand bank 2 (acctnum acctnum) (price price) (nc nc) (nm nm)+    (nb nb-0) (b b) (c c) (hash hash-0))+  (precedes ((0 1) (2 3)) ((1 1) (2 1)) ((1 3) (0 2)) ((2 0) (3 0))+    ((2 2) (4 0)) ((2 4) (1 2)) ((3 1) (1 0)) ((4 1) (0 0)))+  (non-orig (privk b) (privk m) (privk c) (privk hash) (privk hash-0))+  (uniq-orig nm nb nc nm-0)+  (operation nonce-test (contracted (acctnum-0 acctnum)) nm (0 0)+    (enc "hash" c nc nb-0 nm price (pubk hash-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)))+    ((recv (enc c nc goods (pubk m)))+      (send (enc nc nm-0 m price-0 (pubk c))))+    ((recv (enc c nc nm acctnum price (pubk b)))+      (send+        (cat+          (enc (enc "hash" c nc nb-0 nm price (pubk hash-0)) (privk b))+          (enc nc nb-0 (pubk c))))))+  (label 35)+  (parent 34)+  (seen 33)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(comment "Nothing left to do")
+ tst/tnsl5.lisp view
@@ -0,0 +1,168 @@+(defprotocol tnsl5 basic+  (defrole init+    (vars (a b c d e name)+      (na0 na1 na2 na3 nb0 nb1 nb2 nb3 nc0 nc1 nc2 nc3 nd0 nd1 nd2 nd3+        ne0 ne1 ne2 ne3 text))+    (trace+      (send+        (enc na0 a c d e (enc "unitac" na1 a b d e (pubk c))+          (enc "unitad" na2 a b c e (pubk d))+          (enc "unitae" na3 a b c d (pubk e)) (pubk b)))+      (recv+        (enc na3 ne0 e b c d (enc "repba" na0 nb3 b c d e (pubk a))+          (enc "repca" na1 nc2 c b d e (pubk a))+          (enc "repda" na2 nd1 d e b c (pubk a))+          (enc "repcb" nb0 nc3 c d e a (pubk b))+          (enc "repdb" nb1 nd2 d c e a (pubk b))+          (enc "repeb" nb2 ne1 e a c d (pubk b))+          (enc "repdc" nc0 nd3 d e a b (pubk c))+          (enc "repec" nc1 ne2 e a b d (pubk c))+          (enc "reped" nd0 ne3 e a b c (pubk d)) (pubk a)))+      (send+        (enc nb3 (enc "repcb" nb0 nc3 c d e a (pubk b))+          (enc "repdb" nb1 nd2 d c e a (pubk b))+          (enc "repeb" nb2 ne1 e a c d (pubk b))+          (enc "repdc" nc0 nd3 d e a b (pubk c))+          (enc "repec" nc1 ne2 e a b d (pubk c))+          (enc "confac" nc2 (pubk c))+          (enc "reped" nd0 ne3 e a b c (pubk d))+          (enc "confad" nd1 (pubk d)) (enc "confae" ne0 (pubk e))+          (pubk b))))+    (uniq-orig na0 na1 na2 na3))+  (defrole resp1+    (vars (a b c d e name)+      (na0 na1 na2 na3 nb0 nb1 nb2 nb3 nc0 nc1 nc2 nc3 nd0 nd1 nd2 nd3+        ne0 ne1 ne2 ne3 text))+    (trace+      (recv+        (enc na0 a c d e (enc "unitac" na1 a b d e (pubk c))+          (enc "unitad" na2 a b c e (pubk d))+          (enc "unitae" na3 a b c d (pubk e)) (pubk b)))+      (send+        (enc nb0 b d e a (enc "unitac" na1 a b d e (pubk c))+          (enc "unitad" na2 a b c e (pubk d))+          (enc "unitbd" nb1 b c e a (pubk d))+          (enc "unitae" na3 a b c d (pubk e))+          (enc "unitbe" nb2 b c d a (pubk e))+          (enc "repba" na0 nb3 b c d e (pubk a)) (pubk c)))+      (recv+        (enc nb3 (enc "repcb" nb0 nc3 c d e a (pubk b))+          (enc "repdb" nb1 nd2 d c e a (pubk b))+          (enc "repeb" nb2 ne1 e a c d (pubk b))+          (enc "repdc" nc0 nd3 d e a b (pubk c))+          (enc "repec" nc1 ne2 e a b d (pubk c))+          (enc "confac" nc2 (pubk c))+          (enc "reped" nd0 ne3 e a b c (pubk d))+          (enc "confad" nd1 (pubk d)) (enc "confae" ne0 (pubk e))+          (pubk b)))+      (send+        (enc nc3 (enc "repdc" nc0 nd3 d e a b (pubk c))+          (enc "repec" nc1 ne2 e a b d (pubk c))+          (enc "confac" nc2 (pubk c))+          (enc "reped" nd0 ne3 e a b c (pubk d))+          (enc "confad" nd1 (pubk d)) (enc "confbd" nd2 (pubk d))+          (enc "confae" ne0 (pubk e)) (enc "confbe" ne1 (pubk e))+          (pubk c))))+    (uniq-orig nb0 nb1 nb2 nb3))+  (defrole resp2+    (vars (a b c d e name)+      (na0 na1 na2 na3 nb0 nb1 nb2 nb3 nc0 nc1 nc2 nc3 nd0 nd1 nd2 nd3+        ne0 ne1 ne2 ne3 text))+    (trace+      (recv+        (enc nb0 b d e a (enc "unitac" na1 a b d e (pubk c))+          (enc "unitad" na2 a b c e (pubk d))+          (enc "unitbd" nb1 b c e a (pubk d))+          (enc "unitae" na3 a b c d (pubk e))+          (enc "unitbe" nb2 b c d a (pubk e))+          (enc "repba" na0 nb3 b c d e (pubk a)) (pubk c)))+      (send+        (enc nc0 c e a b (enc "unitad" na2 a b c e (pubk d))+          (enc "unitbd" nb1 b c e a (pubk d))+          (enc "unitae" na3 a b c d (pubk e))+          (enc "unitbe" nb2 b c d a (pubk e))+          (enc "unitce" nc1 c d a b (pubk e))+          (enc "repba" na0 nb3 b c d e (pubk a))+          (enc "repca" na1 nc2 c b d e (pubk a))+          (enc "repcb" nb0 nc3 c d e a (pubk b)) (pubk d)))+      (recv+        (enc nc3 (enc "repdc" nc0 nd3 d e a b (pubk c))+          (enc "repec" nc1 ne2 e a b d (pubk c))+          (enc "confac" nc2 (pubk c))+          (enc "reped" nd0 ne3 e a b c (pubk d))+          (enc "confad" nd1 (pubk d)) (enc "confbd" nd2 (pubk d))+          (enc "confae" ne0 (pubk e)) (enc "confbe" ne1 (pubk e))+          (pubk c)))+      (send+        (enc nd3 (enc "reped" nd0 ne3 e a b c (pubk d))+          (enc "confad" nd1 (pubk d)) (enc "confbd" nd2 (pubk d))+          (enc "confae" ne0 (pubk e)) (enc "confbe" ne1 (pubk e))+          (enc "confce" ne2 (pubk e)) (pubk d))))+    (uniq-orig nc0 nc1 nc2 nc3))+  (defrole resp3+    (vars (a b c d e name)+      (na0 na1 na2 na3 nb0 nb1 nb2 nb3 nc0 nc1 nc2 nc3 nd0 nd1 nd2 nd3+        ne0 ne1 ne2 ne3 text))+    (trace+      (recv+        (enc nc0 c e a b (enc "unitad" na2 a b c e (pubk d))+          (enc "unitbd" nb1 b c e a (pubk d))+          (enc "unitae" na3 a b c d (pubk e))+          (enc "unitbe" nb2 b c d a (pubk e))+          (enc "unitce" nc1 c d a b (pubk e))+          (enc "repba" na0 nb3 b c d e (pubk a))+          (enc "repca" na1 nc2 c b d e (pubk a))+          (enc "repcb" nb0 nc3 c d e a (pubk b)) (pubk d)))+      (send+        (enc nd0 d a b c (enc "unitae" na3 a b c d (pubk e))+          (enc "unitbe" nb2 b c d a (pubk e))+          (enc "unitce" nc1 c d a b (pubk e))+          (enc "repba" na0 nb3 b c d e (pubk a))+          (enc "repca" na1 nc2 c b d e (pubk a))+          (enc "repda" na2 nd1 d e b c (pubk a))+          (enc "repcb" nb0 nc3 c d e a (pubk b))+          (enc "repdb" nb1 nd2 d c e a (pubk b))+          (enc "repde" nc0 nd3 d e a b (pubk c)) (pubk e)))+      (recv+        (enc nd3 (enc "reped" nd0 ne3 e a b c (pubk d))+          (enc "confad" nd1 (pubk d)) (enc "confbd" nd2 (pubk d))+          (enc "confae" ne0 (pubk e)) (enc "confbe" ne1 (pubk e))+          (enc "confce" ne2 (pubk e)) (pubk d)))+      (send+        (enc ne3 (enc "confae" ne0 (pubk e)) (enc "confbe" ne1 (pubk e))+          (enc "confce" ne2 (pubk e)) (pubk e))))+    (uniq-orig nd0 nd1 nd2 nd3))+  (defrole resp4+    (vars (a b c d e name)+      (na0 na1 na2 na3 nb0 nb1 nb2 nb3 nc0 nc1 nc2 nc3 nd0 nd1 nd2 nd3+        ne0 ne1 ne2 ne3 text))+    (trace+      (recv+        (enc nd0 d a b c (enc "unitae" na3 a b c d (pubk e))+          (enc "unitbe" nb2 b c d a (pubk e))+          (enc "unitce" nc1 c d a b (pubk e))+          (enc "repba" na0 nb3 b c d e (pubk a))+          (enc "repca" na1 nc2 c b d e (pubk a))+          (enc "repda" na2 nd1 d e b c (pubk a))+          (enc "repcb" nb0 nc3 c d e a (pubk b))+          (enc "repdb" nb1 nd2 d c e a (pubk b))+          (enc "repde" nc0 nd3 d e a b (pubk c)) (pubk e)))+      (send+        (enc na3 ne0 e b c d (enc "repba" na0 nb3 b c d e (pubk a))+          (enc "repca" na1 nc2 c b d e (pubk a))+          (enc "repda" na2 nd1 d e b c (pubk a))+          (enc "repcb" nb0 nc3 c d e a (pubk b))+          (enc "repdb" nb1 nd2 d c e a (pubk b))+          (enc "repeb" nb2 ne1 e a c d (pubk b))+          (enc "repdc" nc0 nd3 d e a b (pubk c))+          (enc "repec" nc1 ne2 e a b d (pubk c))+          (enc "reped" nd0 ne3 e a b c (pubk d)) (pubk a)))+      (recv+        (enc ne3 (enc "confae" ne0 (pubk e)) (enc "confbe" ne1 (pubk e))+          (enc "confce" ne2 (pubk e)) (pubk e))))+    (uniq-orig ne0 ne1 ne2 ne3)))++(defskeleton tnsl5+  (vars (a b c d e name))+  (defstrand init 3 (a a) (b b) (c c) (d d) (e e))+  (non-orig (privk a) (privk b) (privk c) (privk d) (privk e)))
+ tst/updatetst.sh view
@@ -0,0 +1,19 @@+#! /bin/sh++for f in *.scm+do+  b=`basename $f .scm`+  mv $b.txt $b.tst+done++for f in *.lsp+do+  b=`basename $f .lsp`+  mv $b.txt $b.tst+done++for f in *.sch+do+  b=`basename $f .sch`+  mv $b.txt $b.tst+done
+ tst/weird.scm view
@@ -0,0 +1,24 @@+(defprotocol wierd basic+  (defrole originator+    (vars (k skey))+    (trace (send k))+    (uniq-orig k))+  (defrole guesser+    (vars (k skey) (a name))+    (trace (send (enc a k))))+  (defrole encryptor+    (vars (k skey) (a name))+    (trace (recv (enc a k)))))++;;; CPSA mistakenly concludes this is a skeleton.+(defskeleton wierd+  (vars (k skey))+  (defstrand originator 1 (k k))+  (defstrand guesser 1 (k k)))++;;; CPSA mistakenly concludes it is possible for the encryptor to+;;; acquire k.+(defskeleton wierd+  (vars (k skey))+  (defstrand originator 1 (k k))+  (defstrand encryptor 1 (k k)))
+ tst/weird.tst view
@@ -0,0 +1,77 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol wierd basic+  (defrole originator (vars (k skey)) (trace (send k)) (uniq-orig k))+  (defrole guesser (vars (k skey) (a name)) (trace (send (enc a k))))+  (defrole encryptor (vars (k skey) (a name)) (trace (recv (enc a k)))))++(defskeleton wierd+  (vars (a name) (k skey))+  (defstrand originator 1 (k k))+  (defstrand guesser 1 (a a) (k k))+  (uniq-orig k)+  (traces ((send k)) ((send (enc a k))))+  (label 0)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol wierd basic+  (defrole originator (vars (k skey)) (trace (send k)) (uniq-orig k))+  (defrole guesser (vars (k skey) (a name)) (trace (send (enc a k))))+  (defrole encryptor (vars (k skey) (a name)) (trace (recv (enc a k)))))++(defskeleton wierd+  (vars (a name) (k skey))+  (defstrand originator 1 (k k))+  (defstrand encryptor 1 (a a) (k k))+  (uniq-orig k)+  (traces ((send k)) ((recv (enc a k))))+  (label 1)+  (unrealized (1 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton wierd+  (vars (a name) (k skey))+  (defstrand originator 1 (k k))+  (defstrand encryptor 1 (a a) (k k))+  (defstrand guesser 1 (a a) (k k))+  (precedes ((2 0) (1 0)))+  (uniq-orig k)+  (operation encryption-test (added-strand guesser 1) (enc a k) (1 0))+  (traces ((send k)) ((recv (enc a k))) ((send (enc a k))))+  (label 2)+  (parent 1)+  (unrealized)+  (shape))++(defskeleton wierd+  (vars (a name) (k skey))+  (defstrand originator 1 (k k))+  (defstrand encryptor 1 (a a) (k k))+  (deflistener k)+  (precedes ((0 0) (2 0)) ((2 1) (1 0)))+  (uniq-orig k)+  (operation encryption-test (added-listener k) (enc a k) (1 0))+  (traces ((send k)) ((recv (enc a k))) ((recv k) (send k)))+  (label 3)+  (parent 1)+  (unrealized)+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton wierd+  (vars (a name) (k skey))+  (defstrand originator 1 (k k))+  (defstrand encryptor 1 (a a) (k k))+  (precedes ((0 0) (1 0)))+  (uniq-orig k)+  (operation generalization deleted (2 0))+  (traces ((send k)) ((recv (enc a k))))+  (label 4)+  (parent 3)+  (unrealized)+  (shape))++(comment "Nothing left to do")
+ tst/wmf.lsp view
@@ -0,0 +1,26 @@+(defprotocol wide-mouth-frog basic+  (defrole init (vars (a b t name) (ta text) (k skey))+    (trace (send (cat a (enc ta b k (ltk a t))))))+  (defrole resp (vars (a b t name) (k skey) (tb text))+    (trace (recv (enc tb a k (ltk b t)))))+  (defrole ks (vars (a b t name) (k skey) (ta tb text))+    (trace (recv (cat a (enc ta b k (ltk a t))))+	   (send (enc tb a k (ltk b t))))))++(defskeleton wide-mouth-frog+  (vars (a t name) (k skey))+  (defstrand init 1 (a a) (t t) (k k))+  (non-orig (ltk a t))+  (uniq-orig k))++(defskeleton wide-mouth-frog+  (vars (b t name) (k skey))+  (defstrand resp 1 (b b) (t t) (k k))+  (non-orig (ltk b t))+  (uniq-orig k))++(defskeleton wide-mouth-frog+  (vars (a b t name) (k skey))+  (defstrand ks 2 (a a) (b b) (t t) (k k))+  (non-orig (ltk a t) (ltk b t))+  (uniq-orig k))
+ tst/wmf.tst view
@@ -0,0 +1,503 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol wide-mouth-frog basic+  (defrole init+    (vars (a b t name) (ta text) (k skey))+    (trace (send (cat a (enc ta b k (ltk a t))))))+  (defrole resp+    (vars (a b t name) (k skey) (tb text))+    (trace (recv (enc tb a k (ltk b t)))))+  (defrole ks+    (vars (a b t name) (k skey) (ta tb text))+    (trace (recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t))))))++(defskeleton wide-mouth-frog+  (vars (ta text) (a t b name) (k skey))+  (defstrand init 1 (ta ta) (a a) (b b) (t t) (k k))+  (non-orig (ltk a t))+  (uniq-orig k)+  (traces ((send (cat a (enc ta b k (ltk a t))))))+  (label 0)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol wide-mouth-frog basic+  (defrole init+    (vars (a b t name) (ta text) (k skey))+    (trace (send (cat a (enc ta b k (ltk a t))))))+  (defrole resp+    (vars (a b t name) (k skey) (tb text))+    (trace (recv (enc tb a k (ltk b t)))))+  (defrole ks+    (vars (a b t name) (k skey) (ta tb text))+    (trace (recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t))))))++(defskeleton wide-mouth-frog+  (vars (tb text) (b t a name) (k skey))+  (defstrand resp 1 (tb tb) (a a) (b b) (t t) (k k))+  (non-orig (ltk b t))+  (uniq-orig k)+  (traces ((recv (enc tb a k (ltk b t)))))+  (label 1)+  (unrealized (0 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton wide-mouth-frog+  (vars (tb text) (b t a name) (k skey))+  (defstrand resp 1 (tb tb) (a a) (b b) (t t) (k k))+  (defstrand init 1 (ta tb) (a b) (b a) (t t) (k k))+  (precedes ((1 0) (0 0)))+  (non-orig (ltk b t))+  (uniq-orig k)+  (operation encryption-test (added-strand init 1)+    (enc tb a k (ltk b t)) (0 0))+  (traces ((recv (enc tb a k (ltk b t))))+    ((send (cat b (enc tb a k (ltk b t))))))+  (label 2)+  (parent 1)+  (unrealized)+  (shape))++(defskeleton wide-mouth-frog+  (vars (tb ta text) (b t a name) (k skey))+  (defstrand resp 1 (tb tb) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta) (tb tb) (a a) (b b) (t t) (k k))+  (precedes ((1 1) (0 0)))+  (non-orig (ltk b t))+  (uniq-orig k)+  (operation encryption-test (added-strand ks 2) (enc tb a k (ltk b t))+    (0 0))+  (traces ((recv (enc tb a k (ltk b t))))+    ((recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t)))))+  (label 3)+  (parent 1)+  (unrealized)+  (shape))++(comment "Nothing left to do")++(defprotocol wide-mouth-frog basic+  (defrole init+    (vars (a b t name) (ta text) (k skey))+    (trace (send (cat a (enc ta b k (ltk a t))))))+  (defrole resp+    (vars (a b t name) (k skey) (tb text))+    (trace (recv (enc tb a k (ltk b t)))))+  (defrole ks+    (vars (a b t name) (k skey) (ta tb text))+    (trace (recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t))))))++(defskeleton wide-mouth-frog+  (vars (ta tb text) (a b t name) (k skey))+  (defstrand ks 2 (ta ta) (tb tb) (a a) (b b) (t t) (k k))+  (non-orig (ltk a t) (ltk b t))+  (uniq-orig k)+  (traces+    ((recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t)))))+  (label 4)+  (unrealized (0 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton wide-mouth-frog+  (vars (ta tb text) (a b t name) (k skey))+  (defstrand ks 2 (ta ta) (tb tb) (a a) (b b) (t t) (k k))+  (defstrand init 1 (ta ta) (a a) (b b) (t t) (k k))+  (precedes ((1 0) (0 0)))+  (non-orig (ltk a t) (ltk b t))+  (uniq-orig k)+  (operation encryption-test (added-strand init 1)+    (enc ta b k (ltk a t)) (0 0))+  (traces+    ((recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t))))+    ((send (cat a (enc ta b k (ltk a t))))))+  (label 5)+  (parent 4)+  (unrealized)+  (shape))++(defskeleton wide-mouth-frog+  (vars (ta tb ta-0 text) (a b t name) (k skey))+  (defstrand ks 2 (ta ta) (tb tb) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-0) (tb ta) (a b) (b a) (t t) (k k))+  (precedes ((1 1) (0 0)))+  (non-orig (ltk a t) (ltk b t))+  (uniq-orig k)+  (operation encryption-test (added-strand ks 2) (enc ta b k (ltk a t))+    (0 0))+  (traces+    ((recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t))))+    ((recv (cat b (enc ta-0 a k (ltk b t))))+      (send (enc ta b k (ltk a t)))))+  (label 6)+  (parent 4)+  (unrealized (1 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton wide-mouth-frog+  (vars (ta tb ta-0 text) (a b t name) (k skey))+  (defstrand ks 2 (ta ta) (tb tb) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-0) (tb ta) (a b) (b a) (t t) (k k))+  (defstrand init 1 (ta ta-0) (a b) (b a) (t t) (k k))+  (precedes ((1 1) (0 0)) ((2 0) (1 0)))+  (non-orig (ltk a t) (ltk b t))+  (uniq-orig k)+  (operation encryption-test (added-strand init 1)+    (enc ta-0 a k (ltk b t)) (1 0))+  (traces+    ((recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t))))+    ((recv (cat b (enc ta-0 a k (ltk b t))))+      (send (enc ta b k (ltk a t))))+    ((send (cat b (enc ta-0 a k (ltk b t))))))+  (label 7)+  (parent 6)+  (unrealized)+  (shape))++(defskeleton wide-mouth-frog+  (vars (ta tb ta-0 ta-1 text) (a b t name) (k skey))+  (defstrand ks 2 (ta ta) (tb tb) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-0) (tb ta) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-1) (tb ta-0) (a a) (b b) (t t) (k k))+  (precedes ((1 1) (0 0)) ((2 1) (1 0)))+  (non-orig (ltk a t) (ltk b t))+  (uniq-orig k)+  (operation encryption-test (added-strand ks 2)+    (enc ta-0 a k (ltk b t)) (1 0))+  (traces+    ((recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t))))+    ((recv (cat b (enc ta-0 a k (ltk b t))))+      (send (enc ta b k (ltk a t))))+    ((recv (cat a (enc ta-1 b k (ltk a t))))+      (send (enc ta-0 a k (ltk b t)))))+  (label 8)+  (parent 6)+  (unrealized (2 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton wide-mouth-frog+  (vars (ta tb ta-0 ta-1 text) (a b t name) (k skey))+  (defstrand ks 2 (ta ta) (tb tb) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-0) (tb ta) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-1) (tb ta-0) (a a) (b b) (t t) (k k))+  (defstrand init 1 (ta ta-1) (a a) (b b) (t t) (k k))+  (precedes ((1 1) (0 0)) ((2 1) (1 0)) ((3 0) (2 0)))+  (non-orig (ltk a t) (ltk b t))+  (uniq-orig k)+  (operation encryption-test (added-strand init 1)+    (enc ta-1 b k (ltk a t)) (2 0))+  (traces+    ((recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t))))+    ((recv (cat b (enc ta-0 a k (ltk b t))))+      (send (enc ta b k (ltk a t))))+    ((recv (cat a (enc ta-1 b k (ltk a t))))+      (send (enc ta-0 a k (ltk b t))))+    ((send (cat a (enc ta-1 b k (ltk a t))))))+  (label 9)+  (parent 8)+  (unrealized)+  (shape))++(defskeleton wide-mouth-frog+  (vars (ta tb ta-0 ta-1 ta-2 text) (a b t name) (k skey))+  (defstrand ks 2 (ta ta) (tb tb) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-0) (tb ta) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-1) (tb ta-0) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-2) (tb ta-1) (a b) (b a) (t t) (k k))+  (precedes ((1 1) (0 0)) ((2 1) (1 0)) ((3 1) (2 0)))+  (non-orig (ltk a t) (ltk b t))+  (uniq-orig k)+  (operation encryption-test (added-strand ks 2)+    (enc ta-1 b k (ltk a t)) (2 0))+  (traces+    ((recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t))))+    ((recv (cat b (enc ta-0 a k (ltk b t))))+      (send (enc ta b k (ltk a t))))+    ((recv (cat a (enc ta-1 b k (ltk a t))))+      (send (enc ta-0 a k (ltk b t))))+    ((recv (cat b (enc ta-2 a k (ltk b t))))+      (send (enc ta-1 b k (ltk a t)))))+  (label 10)+  (parent 8)+  (unrealized (3 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton wide-mouth-frog+  (vars (ta tb ta-0 ta-1 ta-2 text) (a b t name) (k skey))+  (defstrand ks 2 (ta ta) (tb tb) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-0) (tb ta) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-1) (tb ta-0) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-2) (tb ta-1) (a b) (b a) (t t) (k k))+  (defstrand init 1 (ta ta-2) (a b) (b a) (t t) (k k))+  (precedes ((1 1) (0 0)) ((2 1) (1 0)) ((3 1) (2 0)) ((4 0) (3 0)))+  (non-orig (ltk a t) (ltk b t))+  (uniq-orig k)+  (operation encryption-test (added-strand init 1)+    (enc ta-2 a k (ltk b t)) (3 0))+  (traces+    ((recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t))))+    ((recv (cat b (enc ta-0 a k (ltk b t))))+      (send (enc ta b k (ltk a t))))+    ((recv (cat a (enc ta-1 b k (ltk a t))))+      (send (enc ta-0 a k (ltk b t))))+    ((recv (cat b (enc ta-2 a k (ltk b t))))+      (send (enc ta-1 b k (ltk a t))))+    ((send (cat b (enc ta-2 a k (ltk b t))))))+  (label 11)+  (parent 10)+  (unrealized)+  (shape))++(defskeleton wide-mouth-frog+  (vars (ta tb ta-0 ta-1 ta-2 ta-3 text) (a b t name) (k skey))+  (defstrand ks 2 (ta ta) (tb tb) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-0) (tb ta) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-1) (tb ta-0) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-2) (tb ta-1) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-3) (tb ta-2) (a a) (b b) (t t) (k k))+  (precedes ((1 1) (0 0)) ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (3 0)))+  (non-orig (ltk a t) (ltk b t))+  (uniq-orig k)+  (operation encryption-test (added-strand ks 2)+    (enc ta-2 a k (ltk b t)) (3 0))+  (traces+    ((recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t))))+    ((recv (cat b (enc ta-0 a k (ltk b t))))+      (send (enc ta b k (ltk a t))))+    ((recv (cat a (enc ta-1 b k (ltk a t))))+      (send (enc ta-0 a k (ltk b t))))+    ((recv (cat b (enc ta-2 a k (ltk b t))))+      (send (enc ta-1 b k (ltk a t))))+    ((recv (cat a (enc ta-3 b k (ltk a t))))+      (send (enc ta-2 a k (ltk b t)))))+  (label 12)+  (parent 10)+  (unrealized (4 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton wide-mouth-frog+  (vars (ta tb ta-0 ta-1 ta-2 ta-3 text) (a b t name) (k skey))+  (defstrand ks 2 (ta ta) (tb tb) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-0) (tb ta) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-1) (tb ta-0) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-2) (tb ta-1) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-3) (tb ta-2) (a a) (b b) (t t) (k k))+  (defstrand init 1 (ta ta-3) (a a) (b b) (t t) (k k))+  (precedes ((1 1) (0 0)) ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (3 0))+    ((5 0) (4 0)))+  (non-orig (ltk a t) (ltk b t))+  (uniq-orig k)+  (operation encryption-test (added-strand init 1)+    (enc ta-3 b k (ltk a t)) (4 0))+  (traces+    ((recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t))))+    ((recv (cat b (enc ta-0 a k (ltk b t))))+      (send (enc ta b k (ltk a t))))+    ((recv (cat a (enc ta-1 b k (ltk a t))))+      (send (enc ta-0 a k (ltk b t))))+    ((recv (cat b (enc ta-2 a k (ltk b t))))+      (send (enc ta-1 b k (ltk a t))))+    ((recv (cat a (enc ta-3 b k (ltk a t))))+      (send (enc ta-2 a k (ltk b t))))+    ((send (cat a (enc ta-3 b k (ltk a t))))))+  (label 13)+  (parent 12)+  (unrealized)+  (shape))++(defskeleton wide-mouth-frog+  (vars (ta tb ta-0 ta-1 ta-2 ta-3 ta-4 text) (a b t name) (k skey))+  (defstrand ks 2 (ta ta) (tb tb) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-0) (tb ta) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-1) (tb ta-0) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-2) (tb ta-1) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-3) (tb ta-2) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-4) (tb ta-3) (a b) (b a) (t t) (k k))+  (precedes ((1 1) (0 0)) ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (3 0))+    ((5 1) (4 0)))+  (non-orig (ltk a t) (ltk b t))+  (uniq-orig k)+  (operation encryption-test (added-strand ks 2)+    (enc ta-3 b k (ltk a t)) (4 0))+  (traces+    ((recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t))))+    ((recv (cat b (enc ta-0 a k (ltk b t))))+      (send (enc ta b k (ltk a t))))+    ((recv (cat a (enc ta-1 b k (ltk a t))))+      (send (enc ta-0 a k (ltk b t))))+    ((recv (cat b (enc ta-2 a k (ltk b t))))+      (send (enc ta-1 b k (ltk a t))))+    ((recv (cat a (enc ta-3 b k (ltk a t))))+      (send (enc ta-2 a k (ltk b t))))+    ((recv (cat b (enc ta-4 a k (ltk b t))))+      (send (enc ta-3 b k (ltk a t)))))+  (label 14)+  (parent 12)+  (unrealized (5 0))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton wide-mouth-frog+  (vars (ta tb ta-0 ta-1 ta-2 ta-3 ta-4 text) (a b t name) (k skey))+  (defstrand ks 2 (ta ta) (tb tb) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-0) (tb ta) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-1) (tb ta-0) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-2) (tb ta-1) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-3) (tb ta-2) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-4) (tb ta-3) (a b) (b a) (t t) (k k))+  (defstrand init 1 (ta ta-4) (a b) (b a) (t t) (k k))+  (precedes ((1 1) (0 0)) ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (3 0))+    ((5 1) (4 0)) ((6 0) (5 0)))+  (non-orig (ltk a t) (ltk b t))+  (uniq-orig k)+  (operation encryption-test (added-strand init 1)+    (enc ta-4 a k (ltk b t)) (5 0))+  (traces+    ((recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t))))+    ((recv (cat b (enc ta-0 a k (ltk b t))))+      (send (enc ta b k (ltk a t))))+    ((recv (cat a (enc ta-1 b k (ltk a t))))+      (send (enc ta-0 a k (ltk b t))))+    ((recv (cat b (enc ta-2 a k (ltk b t))))+      (send (enc ta-1 b k (ltk a t))))+    ((recv (cat a (enc ta-3 b k (ltk a t))))+      (send (enc ta-2 a k (ltk b t))))+    ((recv (cat b (enc ta-4 a k (ltk b t))))+      (send (enc ta-3 b k (ltk a t))))+    ((send (cat b (enc ta-4 a k (ltk b t))))))+  (label 15)+  (parent 14)+  (unrealized)+  (shape))++(defskeleton wide-mouth-frog+  (vars (ta tb ta-0 ta-1 ta-2 ta-3 ta-4 ta-5 text) (a b t name)+    (k skey))+  (defstrand ks 2 (ta ta) (tb tb) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-0) (tb ta) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-1) (tb ta-0) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-2) (tb ta-1) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-3) (tb ta-2) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-4) (tb ta-3) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-5) (tb ta-4) (a a) (b b) (t t) (k k))+  (precedes ((1 1) (0 0)) ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (3 0))+    ((5 1) (4 0)) ((6 1) (5 0)))+  (non-orig (ltk a t) (ltk b t))+  (uniq-orig k)+  (operation encryption-test (added-strand ks 2)+    (enc ta-4 a k (ltk b t)) (5 0))+  (traces+    ((recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t))))+    ((recv (cat b (enc ta-0 a k (ltk b t))))+      (send (enc ta b k (ltk a t))))+    ((recv (cat a (enc ta-1 b k (ltk a t))))+      (send (enc ta-0 a k (ltk b t))))+    ((recv (cat b (enc ta-2 a k (ltk b t))))+      (send (enc ta-1 b k (ltk a t))))+    ((recv (cat a (enc ta-3 b k (ltk a t))))+      (send (enc ta-2 a k (ltk b t))))+    ((recv (cat b (enc ta-4 a k (ltk b t))))+      (send (enc ta-3 b k (ltk a t))))+    ((recv (cat a (enc ta-5 b k (ltk a t))))+      (send (enc ta-4 a k (ltk b t)))))+  (label 16)+  (parent 14)+  (unrealized (6 0))+  (comment "2 in cohort - 2 not yet seen"))++(comment "Strand bound exceeded--aborting run")++(defskeleton wide-mouth-frog+  (vars (ta tb ta-0 ta-1 ta-2 ta-3 ta-4 ta-5 text) (a b t name)+    (k skey))+  (defstrand ks 2 (ta ta) (tb tb) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-0) (tb ta) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-1) (tb ta-0) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-2) (tb ta-1) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-3) (tb ta-2) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-4) (tb ta-3) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-5) (tb ta-4) (a a) (b b) (t t) (k k))+  (defstrand init 1 (ta ta-5) (a a) (b b) (t t) (k k))+  (precedes ((1 1) (0 0)) ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (3 0))+    ((5 1) (4 0)) ((6 1) (5 0)) ((7 0) (6 0)))+  (non-orig (ltk a t) (ltk b t))+  (uniq-orig k)+  (operation encryption-test (added-strand init 1)+    (enc ta-5 b k (ltk a t)) (6 0))+  (traces+    ((recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t))))+    ((recv (cat b (enc ta-0 a k (ltk b t))))+      (send (enc ta b k (ltk a t))))+    ((recv (cat a (enc ta-1 b k (ltk a t))))+      (send (enc ta-0 a k (ltk b t))))+    ((recv (cat b (enc ta-2 a k (ltk b t))))+      (send (enc ta-1 b k (ltk a t))))+    ((recv (cat a (enc ta-3 b k (ltk a t))))+      (send (enc ta-2 a k (ltk b t))))+    ((recv (cat b (enc ta-4 a k (ltk b t))))+      (send (enc ta-3 b k (ltk a t))))+    ((recv (cat a (enc ta-5 b k (ltk a t))))+      (send (enc ta-4 a k (ltk b t))))+    ((send (cat a (enc ta-5 b k (ltk a t))))))+  (label 17)+  (parent 16)+  (unrealized)+  (comment "aborted"))++(defskeleton wide-mouth-frog+  (vars (ta tb ta-0 ta-1 ta-2 ta-3 ta-4 ta-5 ta-6 text) (a b t name)+    (k skey))+  (defstrand ks 2 (ta ta) (tb tb) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-0) (tb ta) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-1) (tb ta-0) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-2) (tb ta-1) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-3) (tb ta-2) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-4) (tb ta-3) (a b) (b a) (t t) (k k))+  (defstrand ks 2 (ta ta-5) (tb ta-4) (a a) (b b) (t t) (k k))+  (defstrand ks 2 (ta ta-6) (tb ta-5) (a b) (b a) (t t) (k k))+  (precedes ((1 1) (0 0)) ((2 1) (1 0)) ((3 1) (2 0)) ((4 1) (3 0))+    ((5 1) (4 0)) ((6 1) (5 0)) ((7 1) (6 0)))+  (non-orig (ltk a t) (ltk b t))+  (uniq-orig k)+  (operation encryption-test (added-strand ks 2)+    (enc ta-5 b k (ltk a t)) (6 0))+  (traces+    ((recv (cat a (enc ta b k (ltk a t))))+      (send (enc tb a k (ltk b t))))+    ((recv (cat b (enc ta-0 a k (ltk b t))))+      (send (enc ta b k (ltk a t))))+    ((recv (cat a (enc ta-1 b k (ltk a t))))+      (send (enc ta-0 a k (ltk b t))))+    ((recv (cat b (enc ta-2 a k (ltk b t))))+      (send (enc ta-1 b k (ltk a t))))+    ((recv (cat a (enc ta-3 b k (ltk a t))))+      (send (enc ta-2 a k (ltk b t))))+    ((recv (cat b (enc ta-4 a k (ltk b t))))+      (send (enc ta-3 b k (ltk a t))))+    ((recv (cat a (enc ta-5 b k (ltk a t))))+      (send (enc ta-4 a k (ltk b t))))+    ((recv (cat b (enc ta-6 a k (ltk b t))))+      (send (enc ta-5 b k (ltk a t)))))+  (label 18)+  (parent 16)+  (unrealized (7 0))+  (comment "aborted"))
+ tst/woolam.scm view
@@ -0,0 +1,26 @@+;;; Woo-Lam Protocol++(defprotocol woolam basic+  (defrole init (vars (a s name) (n text))+    (trace+     (send a)+     (recv n)+     (send (enc n (ltk a s))))+    (non-orig (ltk a s)))+  (defrole resp (vars (a s b name) (n text))+    (trace+     (recv a)+     (send n)+     (recv (enc n (ltk a s)))+     (send (enc a (enc n (ltk a s)) (ltk b s)))+     (recv (enc a n (ltk b s))))+    (non-orig (ltk b s))+    (uniq-orig n))+  (defrole serv (vars (a s b name) (n text))+    (trace+     (recv (enc a (enc n (ltk a s)) (ltk b s)))+     (send (enc a n (ltk b s))))))++(defskeleton woolam (vars (n text) (a s name))+  (defstrand resp 5 (a a) (s s))+  (non-orig (ltk a s)))
+ tst/woolam.tst view
@@ -0,0 +1,97 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol woolam basic+  (defrole init+    (vars (a s name) (n text))+    (trace (send a) (recv n) (send (enc n (ltk a s))))+    (non-orig (ltk a s)))+  (defrole resp+    (vars (a s b name) (n text))+    (trace (recv a) (send n) (recv (enc n (ltk a s)))+      (send (enc a (enc n (ltk a s)) (ltk b s)))+      (recv (enc a n (ltk b s))))+    (non-orig (ltk b s))+    (uniq-orig n))+  (defrole serv+    (vars (a s b name) (n text))+    (trace (recv (enc a (enc n (ltk a s)) (ltk b s)))+      (send (enc a n (ltk b s))))))++(defskeleton woolam+  (vars (n text) (a s b name))+  (defstrand resp 5 (n n) (a a) (s s) (b b))+  (non-orig (ltk a s) (ltk b s))+  (uniq-orig n)+  (traces+    ((recv a) (send n) (recv (enc n (ltk a s)))+      (send (enc a (enc n (ltk a s)) (ltk b s)))+      (recv (enc a n (ltk b s)))))+  (label 0)+  (unrealized (0 2) (0 4))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton woolam+  (vars (n text) (a s b name))+  (defstrand resp 5 (n n) (a a) (s s) (b b))+  (defstrand init 3 (n n) (a a) (s s))+  (precedes ((0 1) (1 1)) ((1 2) (0 2)))+  (non-orig (ltk a s) (ltk b s))+  (uniq-orig n)+  (operation encryption-test (added-strand init 3) (enc n (ltk a s))+    (0 2))+  (traces+    ((recv a) (send n) (recv (enc n (ltk a s)))+      (send (enc a (enc n (ltk a s)) (ltk b s)))+      (recv (enc a n (ltk b s))))+    ((send a) (recv n) (send (enc n (ltk a s)))))+  (label 1)+  (parent 0)+  (unrealized (0 4))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton woolam+  (vars (n text) (a s b name))+  (defstrand resp 5 (n n) (a a) (s s) (b b))+  (defstrand init 3 (n n) (a a) (s s))+  (defstrand serv 2 (n n) (a a) (s s) (b b))+  (precedes ((0 1) (1 1)) ((0 1) (2 0)) ((1 2) (0 2)) ((2 1) (0 4)))+  (non-orig (ltk a s) (ltk b s))+  (uniq-orig n)+  (operation encryption-test (added-strand serv 2) (enc a n (ltk b s))+    (0 4))+  (traces+    ((recv a) (send n) (recv (enc n (ltk a s)))+      (send (enc a (enc n (ltk a s)) (ltk b s)))+      (recv (enc a n (ltk b s))))+    ((send a) (recv n) (send (enc n (ltk a s))))+    ((recv (enc a (enc n (ltk a s)) (ltk b s)))+      (send (enc a n (ltk b s)))))+  (label 2)+  (parent 1)+  (unrealized (2 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton woolam+  (vars (n text) (a s b name))+  (defstrand resp 5 (n n) (a a) (s s) (b b))+  (defstrand init 3 (n n) (a a) (s s))+  (defstrand serv 2 (n n) (a a) (s s) (b b))+  (precedes ((0 1) (1 1)) ((0 3) (2 0)) ((1 2) (0 2)) ((2 1) (0 4)))+  (non-orig (ltk a s) (ltk b s))+  (uniq-orig n)+  (operation encryption-test (added-strand resp 4)+    (enc a (enc n (ltk a s)) (ltk b s)) (2 0))+  (traces+    ((recv a) (send n) (recv (enc n (ltk a s)))+      (send (enc a (enc n (ltk a s)) (ltk b s)))+      (recv (enc a n (ltk b s))))+    ((send a) (recv n) (send (enc n (ltk a s))))+    ((recv (enc a (enc n (ltk a s)) (ltk b s)))+      (send (enc a n (ltk b s)))))+  (label 3)+  (parent 2)+  (unrealized)+  (shape))++(comment "Nothing left to do")
+ tst/yahalom.scm view
@@ -0,0 +1,34 @@+;;; Yahalom Protocol with Forwarding Removed++(defprotocol yahalom basic+  (defrole init+    (vars (a b c name) (n-a n-b text) (k skey))+    (trace (send (cat a n-a))+	   (recv (enc b k n-a n-b (ltk a c)))+	   (send (enc n-b k))))+  (defrole resp+    (vars (b a c name) (n-a n-b text) (k skey))+    (trace (recv (cat a n-a))+	   (send (cat b (enc a n-a n-b (ltk b c))))+	   (recv (enc a k (ltk b c)))+	   (recv (enc n-b k))))+  (defrole serv+    (vars (c a b name) (n-a n-b text) (k skey))+    (trace (recv (cat b (enc a n-a n-b (ltk b c))))+	   (send (enc b k n-a n-b (ltk a c)))+	   (send (enc a k (ltk b c))))+    (uniq-orig k)))++(defskeleton yahalom+  (vars (a b c name) (n-b text))+  (defstrand resp 4 (a a) (b b) (c c) (n-b n-b))+  (non-orig (ltk b c) (ltk a c))+  (uniq-orig n-b))++;;; Ensure encryption key remains secret.+(defskeleton yahalom+  (vars (a b c name) (n-b text) (k skey))+  (defstrand resp 4 (a a) (b b) (c c) (n-b n-b) (k k))+  (deflistener k)+  (non-orig (ltk b c) (ltk a c))+  (uniq-orig n-b))
+ tst/yahalom.tst view
@@ -0,0 +1,419 @@+(comment "CPSA 2.0.0")+(comment "All input read")++(defprotocol yahalom basic+  (defrole init+    (vars (a b c name) (n-a n-b text) (k skey))+    (trace (send (cat a n-a)) (recv (enc b k n-a n-b (ltk a c)))+      (send (enc n-b k))))+  (defrole resp+    (vars (b a c name) (n-a n-b text) (k skey))+    (trace (recv (cat a n-a)) (send (cat b (enc a n-a n-b (ltk b c))))+      (recv (enc a k (ltk b c))) (recv (enc n-b k))))+  (defrole serv+    (vars (c a b name) (n-a n-b text) (k skey))+    (trace (recv (cat b (enc a n-a n-b (ltk b c))))+      (send (enc b k n-a n-b (ltk a c))) (send (enc a k (ltk b c))))+    (uniq-orig k)))++(defskeleton yahalom+  (vars (n-b n-a text) (a b c name) (k skey))+  (defstrand resp 4 (n-a n-a) (n-b n-b) (b b) (a a) (c c) (k k))+  (non-orig (ltk a c) (ltk b c))+  (uniq-orig n-b)+  (traces+    ((recv (cat a n-a)) (send (cat b (enc a n-a n-b (ltk b c))))+      (recv (enc a k (ltk b c))) (recv (enc n-b k))))+  (label 0)+  (unrealized (0 2) (0 3))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton yahalom+  (vars (n-b n-a n-0 n-1 text) (a b c name) (k skey))+  (defstrand resp 4 (n-a n-a) (n-b n-b) (b b) (a a) (c c) (k k))+  (defstrand serv 3 (n-a n-0) (n-b n-1) (c c) (a a) (b b) (k k))+  (precedes ((1 2) (0 2)))+  (non-orig (ltk a c) (ltk b c))+  (uniq-orig n-b k)+  (operation encryption-test (added-strand serv 3) (enc a k (ltk b c))+    (0 2))+  (traces+    ((recv (cat a n-a)) (send (cat b (enc a n-a n-b (ltk b c))))+      (recv (enc a k (ltk b c))) (recv (enc n-b k)))+    ((recv (cat b (enc a n-0 n-1 (ltk b c))))+      (send (enc b k n-0 n-1 (ltk a c))) (send (enc a k (ltk b c)))))+  (label 1)+  (parent 0)+  (unrealized (0 3) (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton yahalom+  (vars (n-b n-a n-0 n-1 text) (a b c name) (k skey))+  (defstrand resp 4 (n-a n-a) (n-b n-b) (b b) (a a) (c c) (k k))+  (defstrand serv 3 (n-a n-0) (n-b n-1) (c c) (a a) (b b) (k k))+  (defstrand resp 2 (n-a n-0) (n-b n-1) (b b) (a a) (c c))+  (precedes ((1 2) (0 2)) ((2 1) (1 0)))+  (non-orig (ltk a c) (ltk b c))+  (uniq-orig n-b k)+  (operation encryption-test (added-strand resp 2)+    (enc a n-0 n-1 (ltk b c)) (1 0))+  (traces+    ((recv (cat a n-a)) (send (cat b (enc a n-a n-b (ltk b c))))+      (recv (enc a k (ltk b c))) (recv (enc n-b k)))+    ((recv (cat b (enc a n-0 n-1 (ltk b c))))+      (send (enc b k n-0 n-1 (ltk a c))) (send (enc a k (ltk b c))))+    ((recv (cat a n-0)) (send (cat b (enc a n-0 n-1 (ltk b c))))))+  (label 2)+  (parent 1)+  (unrealized (0 3))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton yahalom+  (vars (n-b n-a n-0 n-1 n-2 text) (a b c a-0 b-0 c-0 name) (k skey))+  (defstrand resp 4 (n-a n-a) (n-b n-b) (b b) (a a) (c c) (k k))+  (defstrand serv 3 (n-a n-0) (n-b n-1) (c c) (a a) (b b) (k k))+  (defstrand resp 2 (n-a n-0) (n-b n-1) (b b) (a a) (c c))+  (defstrand init 3 (n-a n-2) (n-b n-b) (a a-0) (b b-0) (c c-0) (k k))+  (precedes ((0 1) (3 1)) ((1 1) (3 1)) ((1 2) (0 2)) ((2 1) (1 0))+    ((3 2) (0 3)))+  (non-orig (ltk a c) (ltk b c))+  (uniq-orig n-b k)+  (operation encryption-test (added-strand init 3) (enc n-b k) (0 3))+  (traces+    ((recv (cat a n-a)) (send (cat b (enc a n-a n-b (ltk b c))))+      (recv (enc a k (ltk b c))) (recv (enc n-b k)))+    ((recv (cat b (enc a n-0 n-1 (ltk b c))))+      (send (enc b k n-0 n-1 (ltk a c))) (send (enc a k (ltk b c))))+    ((recv (cat a n-0)) (send (cat b (enc a n-0 n-1 (ltk b c)))))+    ((send (cat a-0 n-2)) (recv (enc b-0 k n-2 n-b (ltk a-0 c-0)))+      (send (enc n-b k))))+  (label 3)+  (parent 2)+  (seen 5)+  (unrealized (3 1))+  (comment "2 in cohort - 1 not yet seen"))++(defskeleton yahalom+  (vars (n-b n-a n-0 n-1 text) (a b c name) (k skey))+  (defstrand resp 4 (n-a n-a) (n-b n-b) (b b) (a a) (c c) (k k))+  (defstrand serv 3 (n-a n-0) (n-b n-1) (c c) (a a) (b b) (k k))+  (defstrand resp 2 (n-a n-0) (n-b n-1) (b b) (a a) (c c))+  (deflistener k)+  (precedes ((1 1) (3 0)) ((1 2) (0 2)) ((2 1) (1 0)) ((3 1) (0 3)))+  (non-orig (ltk a c) (ltk b c))+  (uniq-orig n-b k)+  (operation encryption-test (added-listener k) (enc n-b k) (0 3))+  (traces+    ((recv (cat a n-a)) (send (cat b (enc a n-a n-b (ltk b c))))+      (recv (enc a k (ltk b c))) (recv (enc n-b k)))+    ((recv (cat b (enc a n-0 n-1 (ltk b c))))+      (send (enc b k n-0 n-1 (ltk a c))) (send (enc a k (ltk b c))))+    ((recv (cat a n-0)) (send (cat b (enc a n-0 n-1 (ltk b c)))))+    ((recv k) (send k)))+  (label 4)+  (parent 2)+  (unrealized (0 3) (3 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton yahalom+  (vars (n-b n-a n-0 n-1 n-2 text) (a b c a-0 b-0 c-0 name)+    (k k-0 skey))+  (defstrand resp 4 (n-a n-a) (n-b n-b) (b b) (a a) (c c) (k k))+  (defstrand serv 3 (n-a n-0) (n-b n-1) (c c) (a a) (b b) (k k))+  (defstrand resp 2 (n-a n-0) (n-b n-1) (b b) (a a) (c c))+  (defstrand init 3 (n-a n-2) (n-b n-b) (a a-0) (b b-0) (c c-0) (k k))+  (defstrand serv 2 (n-a n-a) (n-b n-b) (c c) (a a) (b b) (k k-0))+  (precedes ((0 1) (4 0)) ((1 1) (3 1)) ((1 2) (0 2)) ((2 1) (1 0))+    ((3 2) (0 3)) ((4 1) (3 1)))+  (non-orig (ltk a c) (ltk b c))+  (uniq-orig n-b k k-0)+  (operation nonce-test (added-strand serv 2) n-b (3 1)+    (enc a n-a n-b (ltk b c)))+  (traces+    ((recv (cat a n-a)) (send (cat b (enc a n-a n-b (ltk b c))))+      (recv (enc a k (ltk b c))) (recv (enc n-b k)))+    ((recv (cat b (enc a n-0 n-1 (ltk b c))))+      (send (enc b k n-0 n-1 (ltk a c))) (send (enc a k (ltk b c))))+    ((recv (cat a n-0)) (send (cat b (enc a n-0 n-1 (ltk b c)))))+    ((send (cat a-0 n-2)) (recv (enc b-0 k n-2 n-b (ltk a-0 c-0)))+      (send (enc n-b k)))+    ((recv (cat b (enc a n-a n-b (ltk b c))))+      (send (enc b k-0 n-a n-b (ltk a c)))))+  (label 5)+  (parent 3)+  (unrealized (3 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton yahalom+  (vars (n-b n-a n-0 n-1 text) (a b c name) (k skey))+  (defstrand resp 4 (n-a n-a) (n-b n-b) (b b) (a a) (c c) (k k))+  (defstrand serv 3 (n-a n-0) (n-b n-1) (c c) (a a) (b b) (k k))+  (defstrand resp 2 (n-a n-0) (n-b n-1) (b b) (a a) (c c))+  (deflistener k)+  (precedes ((1 2) (0 2)) ((1 2) (3 0)) ((2 1) (1 0)) ((3 1) (0 3)))+  (non-orig (ltk a c) (ltk b c))+  (uniq-orig n-b k)+  (operation nonce-test (added-strand serv 3) k (3 0)+    (enc b k n-0 n-1 (ltk a c)))+  (traces+    ((recv (cat a n-a)) (send (cat b (enc a n-a n-b (ltk b c))))+      (recv (enc a k (ltk b c))) (recv (enc n-b k)))+    ((recv (cat b (enc a n-0 n-1 (ltk b c))))+      (send (enc b k n-0 n-1 (ltk a c))) (send (enc a k (ltk b c))))+    ((recv (cat a n-0)) (send (cat b (enc a n-0 n-1 (ltk b c)))))+    ((recv k) (send k)))+  (label 6)+  (parent 4)+  (unrealized (0 3) (3 0))+  (comment "empty cohort"))++(defskeleton yahalom+  (vars (n-a n-b text) (a b c name) (k skey))+  (defstrand resp 4 (n-a n-a) (n-b n-b) (b b) (a a) (c c) (k k))+  (defstrand serv 3 (n-a n-a) (n-b n-b) (c c) (a a) (b b) (k k))+  (defstrand init 3 (n-a n-a) (n-b n-b) (a a) (b b) (c c) (k k))+  (precedes ((0 1) (1 0)) ((1 1) (2 1)) ((1 2) (0 2)) ((2 2) (0 3)))+  (non-orig (ltk a c) (ltk b c))+  (uniq-orig n-b k)+  (operation nonce-test+    (contracted (n-0 n-b) (n-1 n-a) (k-0 k) (a-0 a) (b-0 b) (c-0 c)+      (n-2 n-a)) n-b (3 1) (enc a n-a n-b (ltk b c))+    (enc b k n-a n-b (ltk a c)))+  (traces+    ((recv (cat a n-a)) (send (cat b (enc a n-a n-b (ltk b c))))+      (recv (enc a k (ltk b c))) (recv (enc n-b k)))+    ((recv (cat b (enc a n-a n-b (ltk b c))))+      (send (enc b k n-a n-b (ltk a c))) (send (enc a k (ltk b c))))+    ((send (cat a n-a)) (recv (enc b k n-a n-b (ltk a c)))+      (send (enc n-b k))))+  (label 7)+  (parent 5)+  (unrealized)+  (shape))++(defskeleton yahalom+  (vars (n-b n-a n-0 n-1 n-2 text) (a b c a-0 b-0 c-0 name)+    (k k-0 skey))+  (defstrand resp 4 (n-a n-a) (n-b n-b) (b b) (a a) (c c) (k k))+  (defstrand serv 3 (n-a n-0) (n-b n-1) (c c) (a a) (b b) (k k))+  (defstrand resp 2 (n-a n-0) (n-b n-1) (b b) (a a) (c c))+  (defstrand init 3 (n-a n-2) (n-b n-b) (a a-0) (b b-0) (c c-0) (k k))+  (defstrand serv 2 (n-a n-a) (n-b n-b) (c c) (a a) (b b) (k k-0))+  (defstrand init 3 (n-a n-a) (n-b n-b) (a a) (b b) (c c) (k k-0))+  (precedes ((0 1) (4 0)) ((1 1) (3 1)) ((1 2) (0 2)) ((2 1) (1 0))+    ((3 2) (0 3)) ((4 1) (5 1)) ((5 2) (3 1)))+  (non-orig (ltk a c) (ltk b c))+  (uniq-orig n-b k k-0)+  (operation nonce-test (added-strand init 3) n-b (3 1)+    (enc a n-a n-b (ltk b c)) (enc b k-0 n-a n-b (ltk a c)))+  (traces+    ((recv (cat a n-a)) (send (cat b (enc a n-a n-b (ltk b c))))+      (recv (enc a k (ltk b c))) (recv (enc n-b k)))+    ((recv (cat b (enc a n-0 n-1 (ltk b c))))+      (send (enc b k n-0 n-1 (ltk a c))) (send (enc a k (ltk b c))))+    ((recv (cat a n-0)) (send (cat b (enc a n-0 n-1 (ltk b c)))))+    ((send (cat a-0 n-2)) (recv (enc b-0 k n-2 n-b (ltk a-0 c-0)))+      (send (enc n-b k)))+    ((recv (cat b (enc a n-a n-b (ltk b c))))+      (send (enc b k-0 n-a n-b (ltk a c))))+    ((send (cat a n-a)) (recv (enc b k-0 n-a n-b (ltk a c)))+      (send (enc n-b k-0))))+  (label 8)+  (parent 5)+  (unrealized (3 1))+  (comment "2 in cohort - 2 not yet seen"))++(defskeleton yahalom+  (vars (n-a n-b text) (a b c name) (k skey))+  (defstrand resp 4 (n-a n-a) (n-b n-b) (b b) (a a) (c c) (k k))+  (defstrand serv 3 (n-a n-a) (n-b n-b) (c c) (a a) (b b) (k k))+  (defstrand init 3 (n-a n-a) (n-b n-b) (a a) (b b) (c c) (k k))+  (defstrand init 3 (n-a n-a) (n-b n-b) (a a) (b b) (c c) (k k))+  (precedes ((0 1) (1 0)) ((1 1) (3 1)) ((1 2) (0 2)) ((2 2) (0 3))+    ((3 2) (2 1)))+  (non-orig (ltk a c) (ltk b c))+  (uniq-orig n-b k)+  (operation nonce-test+    (contracted (n-0 n-b) (n-1 n-a) (k-0 k) (a-0 a) (b-0 b) (c-0 c)+      (n-2 n-a)) n-b (3 1) (enc n-b k) (enc a n-a n-b (ltk b c))+    (enc b k n-a n-b (ltk a c)))+  (traces+    ((recv (cat a n-a)) (send (cat b (enc a n-a n-b (ltk b c))))+      (recv (enc a k (ltk b c))) (recv (enc n-b k)))+    ((recv (cat b (enc a n-a n-b (ltk b c))))+      (send (enc b k n-a n-b (ltk a c))) (send (enc a k (ltk b c))))+    ((send (cat a n-a)) (recv (enc b k n-a n-b (ltk a c)))+      (send (enc n-b k)))+    ((send (cat a n-a)) (recv (enc b k n-a n-b (ltk a c)))+      (send (enc n-b k))))+  (label 9)+  (parent 8)+  (seen 7)+  (unrealized)+  (comment "1 in cohort - 0 not yet seen"))++(defskeleton yahalom+  (vars (n-b n-a n-0 n-1 n-2 text) (a b c a-0 b-0 c-0 name)+    (k k-0 skey))+  (defstrand resp 4 (n-a n-a) (n-b n-b) (b b) (a a) (c c) (k k))+  (defstrand serv 3 (n-a n-0) (n-b n-1) (c c) (a a) (b b) (k k))+  (defstrand resp 2 (n-a n-0) (n-b n-1) (b b) (a a) (c c))+  (defstrand init 3 (n-a n-2) (n-b n-b) (a a-0) (b b-0) (c c-0) (k k))+  (defstrand serv 2 (n-a n-a) (n-b n-b) (c c) (a a) (b b) (k k-0))+  (defstrand init 3 (n-a n-a) (n-b n-b) (a a) (b b) (c c) (k k-0))+  (deflistener k-0)+  (precedes ((0 1) (4 0)) ((1 1) (3 1)) ((1 2) (0 2)) ((2 1) (1 0))+    ((3 2) (0 3)) ((4 1) (5 1)) ((4 1) (6 0)) ((5 2) (3 1))+    ((6 1) (3 1)))+  (non-orig (ltk a c) (ltk b c))+  (uniq-orig n-b k k-0)+  (operation nonce-test (added-listener k-0) n-b (3 1) (enc n-b k-0)+    (enc a n-a n-b (ltk b c)) (enc b k-0 n-a n-b (ltk a c)))+  (traces+    ((recv (cat a n-a)) (send (cat b (enc a n-a n-b (ltk b c))))+      (recv (enc a k (ltk b c))) (recv (enc n-b k)))+    ((recv (cat b (enc a n-0 n-1 (ltk b c))))+      (send (enc b k n-0 n-1 (ltk a c))) (send (enc a k (ltk b c))))+    ((recv (cat a n-0)) (send (cat b (enc a n-0 n-1 (ltk b c)))))+    ((send (cat a-0 n-2)) (recv (enc b-0 k n-2 n-b (ltk a-0 c-0)))+      (send (enc n-b k)))+    ((recv (cat b (enc a n-a n-b (ltk b c))))+      (send (enc b k-0 n-a n-b (ltk a c))))+    ((send (cat a n-a)) (recv (enc b k-0 n-a n-b (ltk a c)))+      (send (enc n-b k-0))) ((recv k-0) (send k-0)))+  (label 10)+  (parent 8)+  (unrealized (3 1) (6 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton yahalom+  (vars (n-b n-a n-0 n-1 n-2 text) (a b c a-0 b-0 c-0 name)+    (k k-0 skey))+  (defstrand resp 4 (n-a n-a) (n-b n-b) (b b) (a a) (c c) (k k))+  (defstrand serv 3 (n-a n-0) (n-b n-1) (c c) (a a) (b b) (k k))+  (defstrand resp 2 (n-a n-0) (n-b n-1) (b b) (a a) (c c))+  (defstrand init 3 (n-a n-2) (n-b n-b) (a a-0) (b b-0) (c c-0) (k k))+  (defstrand init 3 (n-a n-a) (n-b n-b) (a a) (b b) (c c) (k k-0))+  (deflistener k-0)+  (defstrand serv 3 (n-a n-a) (n-b n-b) (c c) (a a) (b b) (k k-0))+  (precedes ((0 1) (6 0)) ((1 1) (3 1)) ((1 2) (0 2)) ((2 1) (1 0))+    ((3 2) (0 3)) ((4 2) (3 1)) ((5 1) (3 1)) ((6 1) (4 1))+    ((6 2) (5 0)))+  (non-orig (ltk a c) (ltk b c))+  (uniq-orig n-b k k-0)+  (operation nonce-test (added-strand serv 3) k-0 (6 0)+    (enc b k-0 n-a n-b (ltk a c)))+  (traces+    ((recv (cat a n-a)) (send (cat b (enc a n-a n-b (ltk b c))))+      (recv (enc a k (ltk b c))) (recv (enc n-b k)))+    ((recv (cat b (enc a n-0 n-1 (ltk b c))))+      (send (enc b k n-0 n-1 (ltk a c))) (send (enc a k (ltk b c))))+    ((recv (cat a n-0)) (send (cat b (enc a n-0 n-1 (ltk b c)))))+    ((send (cat a-0 n-2)) (recv (enc b-0 k n-2 n-b (ltk a-0 c-0)))+      (send (enc n-b k)))+    ((send (cat a n-a)) (recv (enc b k-0 n-a n-b (ltk a c)))+      (send (enc n-b k-0))) ((recv k-0) (send k-0))+    ((recv (cat b (enc a n-a n-b (ltk b c))))+      (send (enc b k-0 n-a n-b (ltk a c)))+      (send (enc a k-0 (ltk b c)))))+  (label 11)+  (parent 10)+  (unrealized (3 1) (5 0))+  (comment "empty cohort"))++(comment "Nothing left to do")++(defprotocol yahalom basic+  (defrole init+    (vars (a b c name) (n-a n-b text) (k skey))+    (trace (send (cat a n-a)) (recv (enc b k n-a n-b (ltk a c)))+      (send (enc n-b k))))+  (defrole resp+    (vars (b a c name) (n-a n-b text) (k skey))+    (trace (recv (cat a n-a)) (send (cat b (enc a n-a n-b (ltk b c))))+      (recv (enc a k (ltk b c))) (recv (enc n-b k))))+  (defrole serv+    (vars (c a b name) (n-a n-b text) (k skey))+    (trace (recv (cat b (enc a n-a n-b (ltk b c))))+      (send (enc b k n-a n-b (ltk a c))) (send (enc a k (ltk b c))))+    (uniq-orig k)))++(defskeleton yahalom+  (vars (n-b n-a text) (a b c name) (k skey))+  (defstrand resp 4 (n-a n-a) (n-b n-b) (b b) (a a) (c c) (k k))+  (deflistener k)+  (non-orig (ltk a c) (ltk b c))+  (uniq-orig n-b)+  (traces+    ((recv (cat a n-a)) (send (cat b (enc a n-a n-b (ltk b c))))+      (recv (enc a k (ltk b c))) (recv (enc n-b k)))+    ((recv k) (send k)))+  (label 12)+  (unrealized (0 2) (0 3))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton yahalom+  (vars (n-b n-a n-0 n-1 text) (a b c name) (k skey))+  (defstrand resp 4 (n-a n-a) (n-b n-b) (b b) (a a) (c c) (k k))+  (deflistener k)+  (defstrand serv 3 (n-a n-0) (n-b n-1) (c c) (a a) (b b) (k k))+  (precedes ((2 1) (1 0)) ((2 2) (0 2)))+  (non-orig (ltk a c) (ltk b c))+  (uniq-orig n-b k)+  (operation encryption-test (added-strand serv 3) (enc a k (ltk b c))+    (0 2))+  (traces+    ((recv (cat a n-a)) (send (cat b (enc a n-a n-b (ltk b c))))+      (recv (enc a k (ltk b c))) (recv (enc n-b k))) ((recv k) (send k))+    ((recv (cat b (enc a n-0 n-1 (ltk b c))))+      (send (enc b k n-0 n-1 (ltk a c))) (send (enc a k (ltk b c)))))+  (label 13)+  (parent 12)+  (unrealized (0 3) (1 0) (2 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton yahalom+  (vars (n-b n-a n-0 n-1 text) (a b c name) (k skey))+  (defstrand resp 4 (n-a n-a) (n-b n-b) (b b) (a a) (c c) (k k))+  (deflistener k)+  (defstrand serv 3 (n-a n-0) (n-b n-1) (c c) (a a) (b b) (k k))+  (defstrand resp 2 (n-a n-0) (n-b n-1) (b b) (a a) (c c))+  (precedes ((2 1) (1 0)) ((2 2) (0 2)) ((3 1) (2 0)))+  (non-orig (ltk a c) (ltk b c))+  (uniq-orig n-b k)+  (operation encryption-test (added-strand resp 2)+    (enc a n-0 n-1 (ltk b c)) (2 0))+  (traces+    ((recv (cat a n-a)) (send (cat b (enc a n-a n-b (ltk b c))))+      (recv (enc a k (ltk b c))) (recv (enc n-b k))) ((recv k) (send k))+    ((recv (cat b (enc a n-0 n-1 (ltk b c))))+      (send (enc b k n-0 n-1 (ltk a c))) (send (enc a k (ltk b c))))+    ((recv (cat a n-0)) (send (cat b (enc a n-0 n-1 (ltk b c))))))+  (label 14)+  (parent 13)+  (unrealized (0 3) (1 0))+  (comment "1 in cohort - 1 not yet seen"))++(defskeleton yahalom+  (vars (n-b n-a n-0 n-1 text) (a b c name) (k skey))+  (defstrand resp 4 (n-a n-a) (n-b n-b) (b b) (a a) (c c) (k k))+  (deflistener k)+  (defstrand serv 3 (n-a n-0) (n-b n-1) (c c) (a a) (b b) (k k))+  (defstrand resp 2 (n-a n-0) (n-b n-1) (b b) (a a) (c c))+  (precedes ((2 2) (0 2)) ((2 2) (1 0)) ((3 1) (2 0)))+  (non-orig (ltk a c) (ltk b c))+  (uniq-orig n-b k)+  (operation nonce-test (added-strand serv 3) k (1 0)+    (enc b k n-0 n-1 (ltk a c)))+  (traces+    ((recv (cat a n-a)) (send (cat b (enc a n-a n-b (ltk b c))))+      (recv (enc a k (ltk b c))) (recv (enc n-b k))) ((recv k) (send k))+    ((recv (cat b (enc a n-0 n-1 (ltk b c))))+      (send (enc b k n-0 n-1 (ltk a c))) (send (enc a k (ltk b c))))+    ((recv (cat a n-0)) (send (cat b (enc a n-0 n-1 (ltk b c))))))+  (label 15)+  (parent 14)+  (unrealized (0 3) (1 0))+  (comment "empty cohort"))++(comment "Nothing left to do")