예제 #1
0
        /** Constructor.
         * @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? */
        //bool trueloop_check=true, bool detailed_states=false
        public DAUnionAlgorithm(DA da_1, DA da_2, bool trueloop_check, bool detailed_states)
        {
            _da_1 = da_1;
            _da_2 = da_2;
            _acceptance_calculator = new UnionAcceptanceCalculator(da_1.acceptance(), da_2.acceptance());
            _trueloop_check        = trueloop_check;
            _detailed_states       = detailed_states;

            if (!(_da_1.getAPSet() == _da_2.getAPSet()))
            {
                throw new IllegalArgumentException("Can't create union of DAs: APSets don't match");
            }

            APSet combined_ap = da_1.getAPSet();

            if (!_da_1.isCompact() || !_da_2.isCompact())
            {
                throw new IllegalArgumentException("Can't create union of DAs: Not compact");
            }

            _result_da = da_1.createInstance(combined_ap);
        }
예제 #2
0
        /**
         * Perform the stuttered conversion.
         * Throws LimitReachedException if a limit is set (>0) and
         * there are more states in the generated DRA than the limit.
         * @param algo the underlying algorithm to be used
         * @param da_result the DRA where the result is stored
         *        (has to have same APSet as the nba)
         * @param limit a limit for the number of states (0 disables the limit).
         */
        public void convert(DAUnionAlgorithm algo, DA da_result, int limit)
        {
            StutteredConvertorUnion conv = new StutteredConvertorUnion(algo, da_result as DRA, limit, _detailed_states, _stutter_information);

            conv.convert();
        }