Beispiel #1
0
        public override void Execute(AbstractMachineState state)
        {
            AMPredicateSet pset = AMPredicateSet.Instance;

            if (pset.IsValidPredicate(_builtinName))
            {
                IAbstractMachinePredicate p = (IAbstractMachinePredicate)pset.CreatePredicate(_builtinName);
                // determine if p is a non-deterministic predicate
                Type pType = p.GetType();
                if (pType.IsInstanceOfType(new AbstractNonDeterministicPredicate()))
                {
                    ((AbstractNonDeterministicPredicate)p).IncrementCallID();
                }
                p.Execute(state);
            }
        }
        public IAbstractMachinePredicate CreatePredicate(string predicateName)
        {
            IAbstractMachinePredicate p = (IAbstractMachinePredicate)_predicates[predicateName];

            return((IAbstractMachinePredicate)Activator.CreateInstance(p.GetType()));
        }