Beispiel #1
0
        protected override GT makeAndEmbedNewGT(Function f, GTT gtt)
        {
            #region preconditions
#if DEBUG
            Debug.Assert(upToDateGTTMM(gtt));
            Debug.Assert(!gttData[gtt].sgfas.ContainsKey(f));
            Debug.Assert(inScope(f));
            Debug.Assert(gttDepth(gtt) < maxGTDepth);
#endif
            #endregion preconditions
            var et  = RMergeTemplateMaker.make(this, f, gtt);
            var gti = sources.gtts.getLTTD(gtt).getSGFA(f);
            #region consistency
//            Debug.Assert(et.checkSourcesBefore());
            #endregion consistency
            et.getGTs();
            embedTermStructure(et);
            #region consistency
            Debug.Assert(!isRefuted);
            #endregion consistency
            var gt = et.getLGT(gti);
            #region consistency
            Debug.Assert(gttData[gtt].sgfas[f].gt == gt);
            Debug.Assert(invariant());
            #endregion consistency
            #region postconditions
            Debug.Assert(gt.gfasByFunction[f].ContainsKey(gtt));
            #endregion postconditions
            return(gt);
        }
Beispiel #2
0
        protected override sealed void makeNewGTT(GTT gtt)
        {
            var et = RMergeTemplateMaker.makeGTT(this, gtt.gtT);

            et.getGTs();
            embedTermStructure(et);
            Debug.Assert(sources.gtts.hasLT(gtt));
        }
Beispiel #3
0
        public override void makeOriginalGTs(IEnumerable <FunctionApplicationFormula> ts, bool isGoal)
        {
            var et = RMergeTemplateMaker.makeOriginals(this, ts);

            et.getGTs();
            embedTermStructure(et);
            foreach (var t in ts)
            {
                var gt = makeIT(t, isGoal) as GT;
                Debug.Assert(gtDepth(gt) == 0);
                addOriginal(gt);
            }
            #region consistency
#if DEBUG
//            Debug.Assert(sourcesComplete());
            Debug.Assert(depthInvariant());
#endif
            #endregion consistency
        }
        public static Universe.IEmbedTemplate make(RU universe, IEnumerable <ISet <GT> > canonicalSets)
        {
            var maker = new RMergeTemplateMaker(universe);

            return(maker.make(canonicalSets));
        }
Beispiel #5
0
        protected override IEmbedTemplate makeMergeTemplate(IEnumerable <ISet <GT> > canonicalSets)
        {
            var eTemplate = RMergeTemplateMaker.make(this, canonicalSets);

            return(eTemplate);
        }