コード例 #1
0
        ////////////////////////////////////////////////////////////////////////////
        internal GFABase(Function function, GTT gtt)
        {
            #region precondition
            Debug.Assert(function.argumentTypes.Count() == gtt.Count());
            Debug.Assert(function.argumentTypes.Zip(gtt, (at, a) => at.isEquivalent(a.type)).All(p => p));
            #endregion

            this.function = function;
            this.gtt      = gtt;
            stringCacheN  = makeStringN(function, gtt);
            hashCache     = stringCacheN.GetHashCode();
        }
コード例 #2
0
        internal GAF(IPredicate predicate, GTT args)
            : base(predicate, args)
        {
            Debug.Assert(predicate.argumentTypes.Count() == args.Count());
            Debug.Assert(predicate.argumentTypes.Zip(args, (at, a) => at.isEquivalent(a.type)).All(x => x));

            gtt = args;

            gAtoms[true]  = new GL(this, true);
            gAtoms[false] = new GL(this, false);
#if DEBUG
            index = curIndex;
            curIndex++;
            m[index] = this;
#endif
        }