Beispiel #1
0
        /** Calculate the union of two DA. If the DAs are not compact, they are made compact.
         * @param da_1 The first DA
         * @param da_2 the second DA
         * @param trueloop_check Check for trueloops?
         * @param detailed_states Generate detailed descriptions of the states?
         * @return shared_ptr to result DA
         */
        //bool trueloop_check=true,bool detailed_states=false
        public static DA calculateUnion(DA da_1, DA da_2, bool trueloop_check, bool detailed_states)
        {
            //if (!da_1.isCompact()) {
            //  da_1.makeCompact();
            //}

            //if (!da_2.isCompact()) {
            //  da_2.makeCompact();
            //}

            DAUnionAlgorithm dua = new DAUnionAlgorithm(da_1, da_2, trueloop_check, detailed_states);

            NBA2DA generator = new NBA2DA(detailed_states);

            generator.convert(dua, dua.getResultDA() as DRA, 0);

            return(dua.getResultDA());
        }
Beispiel #2
0
        /**
         * Convert the NBA to a DRA using Safra's algorithm
         * @param nba the NBA
         * @param dra_result the result DRA
         * @param limit limit for the size of the DRA
         */
        public void convert_safra(NBA nba, DRA dra_result, int limit)  //=0
        {
            SafraAlgorithm safras_algo = new SafraAlgorithm(nba, _options);

            if (!_options.opt_rename)
            {
                NBA2DA nba2da = new NBA2DA(_detailed_states);

                nba2da.convert(safras_algo, dra_result, limit);
            }
            else
            {
                //typedef typename SafrasAlgorithm<NBA_t>::result_t result_t;
                //typedef typename SafrasAlgorithm<NBA_t>::state_t key_t;

                //<safra_t,DRA_t, StateMapperFuzzy<result_t, key_t, typename DRA_t::state_type, SafraTreeCandidateMatcher> >
                NBA2DA nba2da_fuzzy = new NBA2DA(_detailed_states);

                nba2da_fuzzy.convert(safras_algo, dra_result, limit);
            }
        }
Beispiel #3
0
        //=0
        /**
           * Convert the NBA to a DRA using Safra's algorithm
           * @param nba the NBA
           * @param dra_result the result DRA
           * @param limit limit for the size of the DRA
           */
        public void convert_safra(NBA nba, DRA dra_result, int limit)
        {
            SafraAlgorithm safras_algo = new SafraAlgorithm(nba, _options);

            if (!_options.opt_rename)
            {
                NBA2DA nba2da = new NBA2DA(_detailed_states);

                nba2da.convert(safras_algo, dra_result, limit);
            }
            else
            {
                //typedef typename SafrasAlgorithm<NBA_t>::result_t result_t;
                //typedef typename SafrasAlgorithm<NBA_t>::state_t key_t;

                //<safra_t,DRA_t, StateMapperFuzzy<result_t, key_t, typename DRA_t::state_type, SafraTreeCandidateMatcher> >
                NBA2DA nba2da_fuzzy = new NBA2DA(_detailed_states);

                nba2da_fuzzy.convert(safras_algo, dra_result, limit);
            }
        }