コード例 #1
0
        private IEnumerable <IType> getDataTypes(ISRS srs)
        {
            var result = new Dictionary <string, IType>();

            foreach (var v in srs.lVarMap.Values)
            {
                result[polish(v.type)] = v.type;
            }
            foreach (var f in srs.functionMap.Values)
            {
                foreach (var a in f.argumentTypes)
                {
                    result[polish(a)] = a;
                }
                result[polish(f.resultType)] = f.resultType;
            }
            foreach (var p in srs.predicateMap.Values)
            {
                foreach (var a in p.argumentTypes)
                {
                    result[polish(a)] = a;
                }
            }
            return(new HashSet <IType>(result.Values));
        }
コード例 #2
0
 public TermRegistry(ISRS srs, Predicate truePredicate)
 {
     this.srs         = srs;
     this.emptyTuple  = getGroundTuple(new GroundTermEC[0]);
     this.trueFormula = getGroundAtomicFormula(truePredicate, emptyTuple);
     Debug.Assert(trueFormula.isTrue); //could be important
 }
コード例 #3
0
ファイル: RU.cs プロジェクト: uriJuhasz/Boogie_verifier
 public RU(ISRS srs, TermRepository rep)
     : base(srs, rep)
 {
     rSources = new RSourceStructure(this);
     emptyGTT = makeGTT(termRepository.emptyGTT);
     addToScope(termRepository.truePredicate);
     addToScope(termRepository.falsePredicate);
     trueGAF  = makeGAF(termRepository.truePredicate, emptyGTT);
     falseGAF = makeGAF(termRepository.falsePredicate, emptyGTT);
     Debug.Assert(trueGAF.isTrue);
     glData[trueGAF.gLiteral(true)].setInstSat(true);
     glData[trueGAF.gLiteral(false)].setInstSat(true);
     queues.remove(trueGAF.gLiteral(false));
     queues.remove(trueGAF.gLiteral(true));
 }
コード例 #4
0
        internal void dumpSMTLib(ISRS srs, string baseName)
        {
            var fileName =
                FileUtilities.trimFileName(srs.procedure.fileName + "." + srs.procedure.name + "." +
                                           baseName + smtExtension);
            var handle = File.Create(fileName);
            var file   = new StreamWriter(handle);

            dumpSorts(file, getDataTypes(srs));

            dumpPredicates(file, srs.predicateMap.Values);

            dumpFunctions(file, from f in srs.functionMap.Values where !srs.predicateMap.ContainsKey(f.name) select f);

            dumpClauses(file, srs.currentClauseSet.clauses);

            file.WriteLine("\n;Commands");
            file.WriteLine("(check-sat)");
            file.Close();
        }
コード例 #5
0
 public SkolemizationVisitor(ISRS srs)
 {
     this.srs = srs;
 }
コード例 #6
0
ファイル: IU.cs プロジェクト: uriJuhasz/Boogie_verifier
 protected IU(ISRS srs, TermRepository tr) : base(srs, tr)
 {
     addToScope(TruePredicate.get);
 }
コード例 #7
0
ファイル: IU.cs プロジェクト: uriJuhasz/Boogie_verifier
 protected IUNG(ISRS srs, TermRepository tr) : base(srs, tr)
 {
 }
コード例 #8
0
 public MiniScopeVisitor(ISRS srs)
 {
     this.srs = srs;
 }
コード例 #9
0
 public MapReadCollector(ISRS srs)
 {
     this.srs = srs;
 }
コード例 #10
0
 public CNFConverter(ISRS srs)
 {
     this.srs = srs;
 }