public void addInstance(ExpressionList arguments)
 {
     argumentInstances[arguments.ToString()] = arguments;
     if (arguments.isGround)
     {
         groundArgumentInstances[arguments.ToString()] = arguments;
     }
     else
     {
         nonGroundArgumentInstances[arguments.ToString()] = arguments;
     }
 }
        public override Expression getEarliestIncarnation(ExpressionList indices, PropositionalFormula condition)
        {
            var result = incarnation;
            var s      = indices.ToString();

            if (!cache.TryGetValue(indices.ToString(), out result))
            {
                if (mapAnalyzer.isDisjoint(indices, updatedIndices))
                {
                    result = predecessor.getEarliestIncarnation(indices, condition); //TODO:add guard/inbetween
                }
                else
                {
                    result = incarnation;
                }

                cache[s] = result;
            }

            return(result);
        }
Ejemplo n.º 3
0
        public void testTuple()
        {
            String       statement = "(1,\"John\",'12:12:12')";
            ETestParser  parser    = new ETestParser(statement, false);
            TupleLiteral literal   = parser.parse_tuple_literal();

            Assert.IsNotNull(literal);
            ExpressionList list = ((TupleLiteral)literal).Expressions;

            Assert.AreEqual("1", list[0].ToString());
            Assert.AreEqual("\"John\"", list[1].ToString());
            Assert.AreEqual("'12:12:12'", list[2].ToString());
            Assert.AreEqual("1, \"John\", '12:12:12'", list.ToString());
        }
Ejemplo n.º 4
0
 private static String ToTupleString(ExpressionList expressions)
 {
     return("(" + expressions.ToString() + (expressions.Count == 1 ? "," : "") + ")");
 }
Ejemplo n.º 5
0
 public ListLiteral(ExpressionList expressions, bool mutable)
     : base("[" + expressions.ToString() + "]", new ListValue(MissingType.Instance))
 {
     this.expressions = expressions;
     this.mutable     = mutable;
 }
Ejemplo n.º 6
0
 public override string ToString() => functionName + "(" + (callArgs == null? "" : callArgs.ToString()) + ")";
Ejemplo n.º 7
0
 public SetLiteral(ExpressionList expressions)
     : base("<" + expressions.ToString() + ">", new SetValue(MissingType.Instance))
 {
     this.expressions = expressions;
 }
Ejemplo n.º 8
0
 public override String ToString()
 {
     return("store " + storables.ToString());
 }