<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../../../unit.xsl"?>
<KIVSPEC name="Protocol"><SPECBODY>enrich <a href="../../../specs/path/export/unit.xml">path</a> , 
       <a href="../../../specs/inputlist/export/unit.xml">inputlist</a> , 
       <a href="../../../specs/outputlist/export/unit.xml">outputlist</a> with comment: this specification defines functions input, output that collect
the inputs and outputs done on a path. The predicate Protocol is defined
using these functions.;
   
   functions 
      inputs : path → Jlist;
      outputs : path → Plist;
   predicates 
      Protocol : V × Jlist × Plist × V;
   variables 
      v' : V; 
   
   axioms 
      inputs-base :  ⊦ inputs(v ') = []; used for : s, ls;
      inputs-rec :  ⊦ inputs(mkpa(v, j, p, pa)) = j + inputs(pa); used for : s, ls;
      outputs-base :  ⊦ outputs(v ') = []; used for : s, ls;
      outputs-rec :  ⊦ outputs(mkpa(v, j, p, pa)) = p + outputs(pa); used for : s, ls;
      Protocol-def :  ⊦ Protocol(v, js, ps, v') ↔ (∃ pa. MPath(pa) ∧ inputs(pa) = js ∧ outputs(pa) = ps);
   
end enrich</SPECBODY></KIVSPEC>
