예제 #1
0
 public Concat3Response AssumeProducerActsForAlice(Concat3Response x)
 {
     // For testing.  Wanted: a cleaner way to get this into the SymT!
     VProgram_API.AssumeActsFor(x.SVX_producer, Entity.Of("Carol"));
     VProgram_API.AssumeActsFor(Entity.Of("Carol"), Entity.Of("Alice"));
     return(x);
 }
예제 #2
0
        public bool Predicate(Concat3Response resp)
        {
            VProgram_API.AssumeTrusted(Entity.Of("Alice"));
            var tmp      = resp.first + resp.second;
            var expected = tmp + resp.third;

            return(expected == resp.output);
        }
예제 #3
0
        public Concat3Response Chain(Concat2Response part1, Concat2Response part2)
        {
            if (part1.output != part2.first)
            {
                throw new ArgumentException();
            }
            var resp = new Concat3Response();

            resp.first  = part1.first;
            resp.second = part1.second;
            resp.third  = part2.second;
            resp.output = part2.output;
            return(resp);
        }