/// <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);
 }
Exemple #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 virtual 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_DEPTH_FIRST_SEARCH);
            DeadlockEngine.Add(Constants.ENGINE_BREADTH_FIRST_SEARCH);
            ModelCheckingOptions.AddAddimissibleBehavior(Constants.COMPLETE_BEHAVIOR, DeadlockEngine);
        }
 public override void Initialize(SpecificationBase spec)
 {
     if (ConstraintType == QueryConstraintType.NONE)
     {
         base.Initialize(spec);
     }
     else
     {
         //initialize model checking options
         ModelCheckingOptions = new ModelCheckingOptions();
         List<string> LTLEngine = new List<string>();
         LTLEngine.Add(Constants.ENGINE_MDP_SEARCH);
         LTLEngine.Add(Constants.ENGINE_MDP_ANTICHAIN_SEARCH);
         ModelCheckingOptions.AddAddimissibleBehavior(Constants.COMPLETE_BEHAVIOR, LTLEngine);
     }
 }
 /// <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);
 }
Exemple #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 virtual 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_DEPTH_FIRST_SEARCH);
     DeadlockEngine.Add(Constants.ENGINE_BREADTH_FIRST_SEARCH);
     ModelCheckingOptions.AddAddimissibleBehavior(Constants.COMPLETE_BEHAVIOR, DeadlockEngine);
 }
Exemple #6
0
        public override void Initialize(SpecificationBase spec)
        {
            ltl2ba.Node LTLHeadNode;

            switch (ConstraintType)
            {
                case QueryConstraintType.PROB:
                    //create the DRA from the BA
                    LTLHeadNode = LTL2BA.ParseLTL("!(" + this.LTLString + ")", "", new CommonToken(0, ""));
                    NegativeDRA = BA2DRAConverter.ConvertBA2DRA(BA, LTLHeadNode);
                    NegativeDRA.DeclarationDatabase = BA.DeclarationDatabase;

                    //todo: builf the positve DRA too
                    //create the DRA from the BA
                    LTLHeadNode = LTL2BA.ParseLTL(this.LTLString, "", new CommonToken(0, ""));
                    PositiveDRA = BA2DRAConverter.ConvertBA2DRA(PositiveBA, LTLHeadNode);
                    PositiveDRA.DeclarationDatabase = BA.DeclarationDatabase;
                    break;
                case QueryConstraintType.PMAX:
                    //create the DRA from the BA
                    LTLHeadNode = LTL2BA.ParseLTL(this.LTLString, "", new CommonToken(0, ""));
                    PositiveDRA = BA2DRAConverter.ConvertBA2DRA(PositiveBA, LTLHeadNode);
                    PositiveDRA.DeclarationDatabase = BA.DeclarationDatabase;
                    break;
                case QueryConstraintType.PMIN:
                    //create the DRA from the BA
                    if(AlmostFair)//note add by ssz
                    {
                        LTLHeadNode = LTL2BA.ParseLTL(this.LTLString, "", new CommonToken(0, ""));
                        PositiveDRA = BA2DRAConverter.ConvertBA2DRA(PositiveBA, LTLHeadNode);
                        PositiveDRA.DeclarationDatabase = BA.DeclarationDatabase;
                    }
                    else
                    {
                        LTLHeadNode = LTL2BA.ParseLTL("!(" + this.LTLString + ")", "", new CommonToken(0, ""));
                        NegativeDRA = BA2DRAConverter.ConvertBA2DRA(BA, LTLHeadNode);
                        NegativeDRA.DeclarationDatabase = BA.DeclarationDatabase;
                    }
                    break;

            }

            if (ConstraintType == QueryConstraintType.NONE)
            {
                base.Initialize(spec);
            }
            else
            {
                //initialize model checking options
                ModelCheckingOptions = new ModelCheckingOptions();
                List<string> LTLEngine = new List<string>();
                LTLEngine.Add(Constants.ENGINE_MDP_SEARCH);

            #if DEBUG
                LTLEngine.Add(Constants.ENGINE_MDP_MEC_SEARCH);
                LTLEngine.Add(Constants.ENGINE_MDP_SIM_SEARCH);

            #endif

                ModelCheckingOptions.AddAddimissibleBehavior(Constants.COMPLETE_BEHAVIOR, LTLEngine);
            }
        }
Exemple #7
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);
            }
        }