Exemplo n.º 1
0
        public override List <AssumeCmd> GetInstantiationCmds()
        {
            var result = new List <AssumeCmd>();

            foreach (var instantiation in instantiationExprs)
            {
                foreach (var thread in Enumerable.Range(1, 2))
                {
                    var vd = new VariableDualiser(thread, Dualiser.Verifier, ProcName);
                    var ti = new ThreadInstantiator(instantiation, thread, Dualiser.Verifier, ProcName);

                    var assume = new AssumeCmd(
                        Token.NoToken,
                        Expr.Imp(
                            vd.VisitExpr(Predicate),
                            Expr.Imp(
                                Expr.And(
                                    NonNegative(instantiation),
                                    NotTooLarge(instantiation)),
                                ti.VisitExpr(BarrierInvariant))));
                    result.Add(vd.VisitAssumeCmd(assume) as AssumeCmd);
                }
            }

            return(result);
        }
        internal override List <AssumeCmd> GetInstantiationCmds()
        {
            var result = new List <AssumeCmd>();

            foreach (var Instantiation in InstantiationExprs)
            {
                foreach (var Thread in new int[] { 1, 2 })
                {
                    var vd = new VariableDualiser(Thread, Dualiser.verifier.uniformityAnalyser, ProcName);
                    var ti = new ThreadInstantiator(Instantiation, Thread,
                                                    Dualiser.verifier.uniformityAnalyser, ProcName);

                    var Assume = new AssumeCmd(Token.NoToken,
                                               Expr.Imp(vd.VisitExpr(Predicate),
                                                        Expr.Imp(Expr.And(
                                                                     NonNegative(Instantiation),
                                                                     NotTooLarge(Instantiation)),
                                                                 ti.VisitExpr(BarrierInvariant))));
                    result.Add(vd.VisitAssumeCmd(Assume) as AssumeCmd);
                }
            }
            return(result);
        }