Пример #1
0
        public Substitution without(LVar var)
        {
            var newMap = new Dictionary <LVar, ITerm>(termMap);

            newMap.Remove(var);
            return(new Substitution(newMap));
        }
Пример #2
0
 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;
 }
Пример #3
0
        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();
        }
Пример #4
0
 public ExistentialFormula(LVar var, IFormula f, IEnumerable <string> attributes, IEnumerable <IEnumerable <ITerm> > triggers)
     : base(var, f, attributes, triggers)
 {
 }
Пример #5
0
 internal bool hasMap(LVar v)
 {
     return(termMap.ContainsKey(v));
 }
Пример #6
0
        public ITerm map(LVar var)
        {
            ITerm t;

            return(termMap.TryGetValue(var, out t) ? t : null);
        }
Пример #7
0
 public Substitution(LVar v, ITerm t)
     : this()
 {
     Debug.Assert(v.type.isEquivalent(t.type));
     termMap[v] = t;
 }
Пример #8
0
 public Variable(LVar var)
 {
     variable             = var;
     freeVariables        = new HashSet <LVar>(new[] { var });
     orderedFreeVariables = new[] { var };
 }