コード例 #1
0
 /// <summary>
 /// Constructs a pair of Boolean algebras that itself is a Boolean algebra over the disjoint union of the domains.
 /// </summary>
 /// <param name="first">first algebra</param>
 /// <param name="second">second algebra</param>
 public DisjointUnionAlgebra(IBooleanAlgebra <S> first, IBooleanAlgebra <T> second)
 {
     this.first            = first;
     this.second           = second;
     this.mintermgenerator = new MintermGenerator <Tuple <S, T> >(this);
     this.tt = new Tuple <S, T>(first.True, second.True);
     this.ff = new Tuple <S, T>(first.False, second.False);
 }
コード例 #2
0
        public CharRangeSolver(BitWidth encoding)
        {
            this.encoding     = encoding;
            this.minCharacter = (char)0;
            this.maxCharacter = (encoding == BitWidth.BV7 ? '\x007F' :
                                 (encoding == BitWidth.BV8 ? '\x00FF' : '\xFFFF'));

            mtg = new MintermGenerator <HashSet <Pair <char, char> > >(this);
        }
コード例 #3
0
 public Z3BoolAlg(Context z3context, Sort elementSort)
 {
     this.context = z3context;
     this.context.UpdateParamValue("MODEL", "true");
     this.elementSort = elementSort;
     this.solver      = z3context.MkSolver();
     this.elemVar     = z3context.MkConst("x", elementSort);
     this.mtg         = new MintermGenerator <BoolExpr>(this);
     this._False      = z3context.MkFalse();
     this._True       = z3context.MkTrue();
 }
コード例 #4
0
 public HashSetSolver(BitWidth encoding)
 {
     this.encoding     = encoding;
     this.maxCharacter = (encoding == BitWidth.BV7 ? '\x007F' :
                          (encoding == BitWidth.BV8 ? '\x00FF' : '\xFFFF'));
     sigma_ = new HashSet <char>();
     for (char i = this.minCharacter; i < this.maxCharacter; i++)
     {
         sigma_.Add(i);
     }
     sigma_.Add(this.maxCharacter);
     mtg = new MintermGenerator <HashSet <char> >(this);
 }
コード例 #5
0
 public CartesianAlgebra(IBooleanAlgebra <T> leafAlg, IBooleanAlgebra <S> nodeAlg)
 {
     this.leafAlgebra            = leafAlg;
     this.nodeAlgebra            = nodeAlg;
     this._True                  = new BDG <T, S>(this, default(S), leafAlg.True, null, null);
     this._False                 = new BDG <T, S>(this, default(S), leafAlg.False, null, null);
     MkLeafCache1[leafAlg.True]  = _True;
     MkLeafCache2[leafAlg.True]  = _True;
     MkLeafCache1[leafAlg.False] = _False;
     MkLeafCache2[leafAlg.False] = _False;
     MkNotCache[_True]           = _False;
     MkNotCache[_False]          = _True;
     this.mintermGenerator       = new MintermGenerator <IMonadicPredicate <T, S> >(this);
 }
コード例 #6
0
        public FiniteSetAlgebra(HashSet <S> universe)
        {
            if (universe.Count > 63)
            {
                throw new AutomataException("for now only supports alphabets of size<=32");
            }
            var alphDic = new Dictionary <S, UIntW>();

            foreach (var v in universe)
            {
                alphDic[v] = new UIntW(((UInt64)1) << alphDic.Count);
            }
            alph       = alphDic;
            this.size  = universe.Count;
            this.empty = new UIntW(0);
            this.full  = new UIntW((((UInt64)1) << size) - 1);

            mtg = new MintermGenerator <UIntW>(this);
        }
コード例 #7
0
ファイル: Label.cs プロジェクト: matejchalk/ARMC
 /// <summary>
 /// Construct label algebra.
 /// </summary>
 /// <param name="alphabet">Alphabet.</param>
 public LabelAlgebra(Set <SYMBOL> alphabet)
 {
     this.pa  = new PredicateAlgebra <SYMBOL>(alphabet);
     this.mtg = new MintermGenerator <Label <SYMBOL> >(this);
 }
コード例 #8
0
 /// <summary>
 /// Constructs predicate algebra.
 /// </summary>
 /// <param name="alphabet">Alphabet.</param>
 public PredicateAlgebra(Set <SYMBOL> alphabet)
 {
     this.Alphabet = alphabet;
     this.mtg      = new MintermGenerator <Predicate <SYMBOL> >(this);
 }
コード例 #9
0
ファイル: BV128Algebra.cs プロジェクト: lawanfalalu/Automata
 public BV128Algebra()
 {
     mtg = new MintermGenerator <BV128>(this);
 }
コード例 #10
0
ファイル: MSOAlgebra.cs プロジェクト: OlliSaarikivi/Automata
 public MSOAlgebra(IBoolAlgMinterm <S> solver)
 {
     this.solver = solver;
     mtg         = new MintermGenerator <MSOFormula <S> >(this);
 }
コード例 #11
0
ファイル: BV64Algebra.cs プロジェクト: lawanfalalu/Automata
 public BV64Algebra()
 {
     mtg = new MintermGenerator <ulong>(this);
 }