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)); }
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 }
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)); }
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(); }
public SkolemizationVisitor(ISRS srs) { this.srs = srs; }
protected IU(ISRS srs, TermRepository tr) : base(srs, tr) { addToScope(TruePredicate.get); }
protected IUNG(ISRS srs, TermRepository tr) : base(srs, tr) { }
public MiniScopeVisitor(ISRS srs) { this.srs = srs; }
public MapReadCollector(ISRS srs) { this.srs = srs; }
public CNFConverter(ISRS srs) { this.srs = srs; }