public override void Initialize(SpecificationBase spec)
        {
            //initialize the ModelCheckingOptions
            base.Initialize(spec);

            Specification Spec = spec as Specification;

            ReachableStateCondition = Spec.DeclarationDatabase[ReachableStateLabel];

            List <string> varList = Process.GetGlobalVariables();

            varList.AddRange(ReachableStateCondition.GetVars());
            varList.AddRange(ConstraintCondition.GetVars());

            Valuation GlobalEnv = Spec.SpecValuation.GetVariableChannelClone(varList, Process.GetChannels());

            //Initialize InitialStep
            InitialStep = new Configuration(Process, Constants.INITIAL_EVENT, null, GlobalEnv, false);

            MustAbstract = Process.MustBeAbstracted();

            if (MustAbstract)
            {
                throw new ParsingException(
                          "Process " + StartingProcess +
                          " has infinite states and therefore can not be used to assert reachability with MIN/MAX constraints!",
                          AssertToken);
            }
        }
Example #2
0
        public static void Initialize(AssertionBase Assertion, DefinitionRef Process, SpecificationBase spec)
        {
            Specification Spec = spec as Specification;

            //get the relevant global variables; remove irrelevant variables so as to save memory;
            Valuation GlobalEnv = Spec.SpecValuation.GetVariableChannelClone(Process.GetGlobalVariables(), Process.GetChannels());

            //Initialize InitialStep
            Assertion.InitialStep = new Configuration(Process, Constants.INITIAL_EVENT, null, GlobalEnv, false);

            Assertion.MustAbstract = Process.MustBeAbstracted();
        }
        public override void Initialize(SpecificationBase spec)
        {
            //initialize the ModelCheckingOptions
            base.Initialize(spec);

            Specification Spec = spec as Specification;

            ReachableStateCondition = Spec.DeclarationDatabase[ReachableStateLabel];

            List <string> varList = Process.GetGlobalVariables();

            varList.AddRange(ReachableStateCondition.GetVars());

            Valuation GlobalEnv = Spec.SpecValuation.GetVariableChannelClone(varList, Process.GetChannels());

            //Initialize InitialStep
            InitialStep = new Configuration(Process, Constants.INITIAL_EVENT, null, GlobalEnv, false);

            MustAbstract = Process.MustBeAbstracted();
        }
Example #4
0
        public override void Initialize(SpecificationBase spec)
        {
            Specification Spec    = spec as Specification;
            List <string> varList = Process.GetGlobalVariables();

            BA.Initialize(Spec.DeclarationDatabase);

            foreach (KeyValuePair <string, Expression> pair in BA.DeclarationDatabase)
            {
                varList.AddRange(pair.Value.GetVars());
            }

            Valuation GlobalEnv = Spec.SpecValuation.GetVariableChannelClone(varList, Process.GetChannels());

            InitialStep = new Configuration(Process, Constants.INITIAL_EVENT, null, GlobalEnv, false);

            MustAbstract = Process.MustBeAbstracted();

            base.Initialize(spec);
        }
Example #5
0
        public static void Initialize(AssertionRefinement Assertion, DefinitionRef ImplementationProcess, DefinitionRef SpecificationProcess, SpecificationBase spec)
        {
            Specification Spec = spec as Specification;

            //get the relevant global variables; remove irrelevant variables so as to save memory;
            List <string> varList = ImplementationProcess.GetGlobalVariables();

            varList.AddRange(SpecificationProcess.GetGlobalVariables());

            Valuation GlobalEnv = Spec.SpecValuation.GetVariableChannelClone(varList, ImplementationProcess.GetChannels());

            //Initialize InitialStep
            Assertion.InitialStep  = new PNConfiguration(ImplementationProcess, Constants.INITIAL_EVENT, null, GlobalEnv, false, spec);
            Assertion.InitSpecStep = new PNConfiguration(SpecificationProcess, Constants.INITIAL_EVENT, null, GlobalEnv, false, spec);

            Assertion.MustAbstract = ImplementationProcess.MustBeAbstracted();
            if (SpecificationProcess.MustBeAbstracted())
            {
                throw new ParsingException(
                          "Process " + Assertion.SpecProcess + " has infinite states and therefore can not be used as a property model for refinement checking!", Assertion.AssertToken);
            }
        }
Example #6
0
        public override void Initialize(SpecificationBase spec)
        {
            Specification Spec = spec as Specification;

            ReachableStateCondition = Spec.DeclarationDatabase[ReachableStateLabel];

            PAT.Common.Ultility.ParsingUltility.TestIsBooleanExpression(
                ReachableStateCondition,
                new CommonToken(null, -1, -1, -1, -1),
                " used in the condition \"" + ReachableStateLabel + "\" of reachablity assertion \"" + this.ToString() + "\"",
                Spec.SpecValuation,
                new Dictionary <string, Expression>()
                );

            List <string> varList = Process.GetGlobalVariables();

            varList.AddRange(ReachableStateCondition.GetVars());

            Valuation GlobalEnv = Spec.SpecValuation.GetVariableChannelClone(varList, Spec.GetChannelNames(Process.GetChannels()));

            //Initialize InitialStep
            InitialStep = new Configuration(Process, Constants.INITIAL_EVENT, null, GlobalEnv, false);

            MustAbstract = Process.MustBeAbstracted();

            //base.Initialize(spec);

            //initialize model checking options, the default option is for deadlock/reachablity algorithms
            ModelCheckingOptions = new ModelCheckingOptions();
            List <string> DeadlockEngine = new List <string>();

            if (!(spec as Specification).HasWildVariable)
            {
                DeadlockEngine.Add(Constants.ENGINE_DEPTH_FIRST_SEARCH);
                DeadlockEngine.Add(Constants.ENGINE_BREADTH_FIRST_SEARCH);
            }

            ModelCheckingOptions.AddAddimissibleBehavior(Constants.COMPLETE_BEHAVIOR, DeadlockEngine);
        }