예제 #1
0
        public static void Add(string sName, List <Argument> lParameters, Dictionary <string, Constant> dBindings, GroundedPredicate gp, bool bNegation)
        {
            string sFullName    = GetString(sName, lParameters, dBindings, bNegation);
            string sNotFullName = GetString(sName, lParameters, dBindings, !bNegation);

            gp.Cached = true;
            AllGrounded[sFullName] = gp;
            GroundedPredicate gpNot = (GroundedPredicate)gp.Negate();

            gpNot.Cached = true;
            AllGrounded[sNotFullName] = gpNot;
        }
예제 #2
0
        public override Predicate GenerateGiven(string sTag)
        {
            GroundedPredicate pGiven = new GroundedPredicate("Given" + Name);

            foreach (Constant c in Constants)
            {
                pGiven.AddConstant(c);
            }
            pGiven.AddConstant(new Constant(Domain.TAG, sTag));
            if (Negation)
            {
                return(pGiven.Negate());
            }
            return(pGiven);
        }