Exemple #1
0
        private void ComputeMaxDepth(ImportantInstantiation imp)
        {
            Quantifier q = imp.Quant;

            q.CurDepth++;
            if (q.CurDepth > q.MaxDepth)
            {
                q.MaxDepth = q.CurDepth;
            }
            foreach (var ch in imp.ResponsibleInsts)
            {
                ComputeMaxDepth(ch);
            }
            q.CurDepth--;
        }
Exemple #2
0
 private void CollectInsts(ProofRule prf)
 {
     if (visitedRules.ContainsKey(prf))
     {
         return;
     }
     visitedRules.Add(prf, true);
     if (prf.Name == "quant-inst")
     {
         ImportantInstantiation imp = AddInst((Instantiation)prf.Premises[0]);
         imp.UseCount++;
     }
     foreach (var p in prf.Premises)
     {
         ProofRule pr = p as ProofRule;
         if (pr != null)
         {
             CollectInsts(pr);
         }
     }
 }
Exemple #3
0
        private ImportantInstantiation AddInst(Instantiation instantiation)
        {
            ImportantInstantiation imp;

            if (importants.TryGetValue(instantiation, out imp))
            {
                return(imp);
            }

            imp = new ImportantInstantiation(instantiation);
            importants.Add(instantiation, imp);
            foreach (var t in instantiation.Responsible)
            {
                if (t.Responsible != null)
                {
                    ImportantInstantiation x = AddInst(t.Responsible);
                    imp.ResponsibleInsts.Add(x);
                    x.DepCount++;
                }
            }
            return(imp);
        }