public Substitution without(LVar var) { var newMap = new Dictionary <LVar, ITerm>(termMap); newMap.Remove(var); return(new Substitution(newMap)); }
internal void add(LVar v, ITerm t) { Debug.Assert(v.type.isEquivalent(t.type)); Debug.Assert(!termMap.ContainsKey(v)); Debug.Assert(!(from fv in t.freeVariables select fv).Intersect(termMap.Keys.Union(new[] { v })).Any()); //TODO: check v is not free in termMap.Values termMap[v] = t; }
protected QuantifiedFormulaC(LVar var, IFormula f, IEnumerable <string> attributes, IEnumerable <IEnumerable <ITerm> > triggers) { pVar = var; pF = f; var fv = new HashSet <LVar>(f.ffreeVariables); fv.Remove(var); pFreeVariables = fv; foreach (var a in attributes) { pAttributes.Add(a); } pTriggers = (from ts in triggers select new List <ITerm>(ts)).ToArray(); }
public ExistentialFormula(LVar var, IFormula f, IEnumerable <string> attributes, IEnumerable <IEnumerable <ITerm> > triggers) : base(var, f, attributes, triggers) { }
internal bool hasMap(LVar v) { return(termMap.ContainsKey(v)); }
public ITerm map(LVar var) { ITerm t; return(termMap.TryGetValue(var, out t) ? t : null); }
public Substitution(LVar v, ITerm t) : this() { Debug.Assert(v.type.isEquivalent(t.type)); termMap[v] = t; }
public Variable(LVar var) { variable = var; freeVariables = new HashSet <LVar>(new[] { var }); orderedFreeVariables = new[] { var }; }