Esempio n. 1
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);
            }
        }
Esempio n. 2
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);
            }
        }