コード例 #1
0
        /// <summary>
        /// Assertion Initialization to create the initial step based on the concrete types.
        /// This method shall be invoked after the parsing immediately to instanciate the initial step
        /// </summary>
        /// <param name="spec">The concrete specification of the module</param>
        public override void Initialize(SpecificationBase spec)
        {
            //initialize model checking options, the default option is for deadlock/reachablity algorithms
            ModelCheckingOptions = new ModelCheckingOptions();
            List <string> DeadlockEngine = new List <string>();

            DeadlockEngine.Add(Constants.ENGINE_SMT_DTMC);
            DeadlockEngine.Add(Constants.ENGINE_SMT_MDP);
            ModelCheckingOptions.AddAddimissibleBehavior(Constants.COMPLETE_BEHAVIOR, DeadlockEngine);
        }
コード例 #2
0
        /// <summary>
        /// Assertion Initialization to create the initial step based on the concrete types.
        /// This method shall be invoked after the parsing immediately to instanciate the initial step
        /// </summary>
        /// <param name="spec">The concrete specification of the module</param>
        public override void Initialize(SpecificationBase spec)
        {
            //initialize model checking options, the default option is for deadlock/reachablity algorithms
            ModelCheckingOptions = new ModelCheckingOptions();
            List <string> engines = new List <string>();

            engines.Add(Constants.ENGINE_FD_REFINEMENT_ANTICHAIN_DEPTH_FIRST_SEARCH);
            engines.Add(Constants.ENGINE_FD_REFINEMENT_ANTICHAIN_BREADTH_FIRST_SEARCH);
            engines.Add(Constants.ENGINE_FD_REFINEMENT_DEPTH_FIRST_SEARCH);
            engines.Add(Constants.ENGINE_FD_REFINEMENT_BREADTH_FIRST_SEARCH);
            ModelCheckingOptions.AddAddimissibleBehavior(Constants.COMPLETE_BEHAVIOR, engines);
        }
コード例 #3
0
 /// <summary>
 /// Assertion Initialization to create the initial step based on the concrete types.
 /// This method shall be invoked after the parsing immediately to instanciate the initial step
 /// </summary>
 /// <param name="spec">The concrete specification of the module</param>
 public override void Initialize(SpecificationBase spec)
 {
     //initialize model checking options
     if (QueryConstraintType == QueryConstraintType.NONE)
     {
         base.Initialize(spec);
     }
     else
     {
         ModelCheckingOptions = new ModelCheckingOptions();
         List <string> DeadlockEngine = new List <string>();
         DeadlockEngine.Add(Constants.ENGINE_MDP_SEARCH);
         ModelCheckingOptions.AddAddimissibleBehavior(Constants.COMPLETE_BEHAVIOR, DeadlockEngine);
     }
 }
コード例 #4
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);
        }
コード例 #5
0
        /// <summary>
        /// Assertion Initialization to create the initial step based on the concrete types.
        /// This method shall be invoked after the parsing immediately to instanciate the initial step
        /// </summary>
        /// <param name="spec">The concrete specification of the module</param>
        public override void Initialize(SpecificationBase spec)
        {
            //initialize model checking options
            ModelCheckingOptions = new ModelCheckingOptions();
            List <string> LTLEngine = new List <string>();

            if (IsSafety)
            {
                LTLEngine.Add(Constants.ENGINE_DEPTH_FIRST_SEARCH);
                LTLEngine.Add(Constants.ENGINE_BREADTH_FIRST_SEARCH);
                ModelCheckingOptions.AddAddimissibleBehavior(Constants.COMPLETE_BEHAVIOR, LTLEngine);
            }
            else
            {
                LTLEngine.Add(Constants.ENGINE_SCC_BASED_SEARCH);
#if DEBUG
                LTLEngine.Add(Constants.ENGINE_SCC_BASED_SEARCH_IMPROVED);
                LTLEngine.Add(Constants.ENGINE_SCC_BASED_SEARCH_MULTICORE);
#endif

                ModelCheckingOptions.AddAddimissibleBehavior(Constants.COMPLETE_BEHAVIOR, LTLEngine);

                LTLEngine = new List <string>();
                LTLEngine.Add(Constants.ENGINE_SCC_BASED_SEARCH);
#if DEBUG
                LTLEngine.Add(Constants.ENGINE_SCC_BASED_SEARCH_MULTICORE);
#endif
                ModelCheckingOptions.AddAddimissibleBehavior(Constants.BEHAVIOR_EVENT_LEVEL_WEAK_FAIRNESS, LTLEngine);

                LTLEngine = new List <string>();
                LTLEngine.Add(Constants.ENGINE_SCC_BASED_SEARCH);
#if DEBUG
                LTLEngine.Add(Constants.ENGINE_SCC_BASED_SEARCH_MULTICORE);
#endif
                ModelCheckingOptions.AddAddimissibleBehavior(Constants.BEHAVIOR_EVENT_LEVEL_STRONG_FAIRNESS, LTLEngine);

                if (IsProcessLevelFairnessApplicable())
                {
                    LTLEngine = new List <string>();
                    LTLEngine.Add(Constants.ENGINE_SCC_BASED_SEARCH);
#if DEBUG
                    LTLEngine.Add(Constants.ENGINE_SCC_BASED_SEARCH_MULTICORE);
#endif
                    ModelCheckingOptions.AddAddimissibleBehavior(Constants.BEHAVIOR_PROCESS_LEVEL_WEAK_FAIRNESS, LTLEngine);

                    LTLEngine = new List <string>();
                    LTLEngine.Add(Constants.ENGINE_SCC_BASED_SEARCH);
#if DEBUG
                    LTLEngine.Add(Constants.ENGINE_SCC_BASED_SEARCH_MULTICORE);
#endif
                    ModelCheckingOptions.AddAddimissibleBehavior(Constants.BEHAVIOR_PROCESS_LEVEL_STRONG_FAIRNESS, LTLEngine);
                }

                LTLEngine = new List <string>();
                LTLEngine.Add(Constants.ENGINE_SCC_BASED_SEARCH);
#if DEBUG
                LTLEngine.Add(Constants.ENGINE_SCC_BASED_SEARCH_MULTICORE);
#endif
                ModelCheckingOptions.AddAddimissibleBehavior(Constants.BEHAVIOR_GLOBAL_FAIRNESS, LTLEngine);
            }
        }