public static void Test() { var alice = Entity.Of("Alice"); var bob = Entity.Of("Bob"); var p = new SVX_Test_Concat(alice); var req1 = new Concat2Request("A", "B"); var resp1 = SVX_Ops.Call(p.Concat2, req1); var req2 = new Concat2Request(resp1.output, "C"); var resp2 = SVX_Ops.Call(p.Concat2, req2); var chainResp = SVX_Ops.Call(p.Chain, resp1, resp2); var producer = Channel.GenerateNew(bob); var sender = Channel.GenerateNew(bob); SVX_Ops.TransferForTesting(chainResp, producer, sender); // Demonstrate that we can assume acts-for relationships and that // we've axiomatized that acts-for is transitive. Of course, the // acts-for relationships in this example do not represent the ones // we would assume in any real protocol. var respWithAssumption = SVX_Ops.Call(p.AssumeProducerActsForAlice, chainResp); SVX_Ops.Certify(respWithAssumption, p.Predicate); }
// This is going to be an SVX method. public Concat2Response Concat2(Concat2Request req) { var resp = new Concat2Response(); resp.first = req.first; resp.second = req.second; resp.output = req.first + req.second; return(resp); }