namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions { using System; using System.Collections.Generic; using HeuristicLab.Problems.ProgramSynthesis.Push.Data.Pool; using Interpreter; [Serializable] public abstract class Expression : IPooledObject { public bool IsProgram { get { return GetType() == typeof(PushProgram); } } public static readonly IReadOnlyCollection EmptyContainer = new Expression[0]; public virtual string StringRepresentation { get { return ExpressionTable.TypeToAttributeTable[GetType()].ExpressionName; } } //public abstract bool IsNoop(IInternalPushInterpreter interpreter); public abstract bool Eval(IInternalPushInterpreter interpreter); public override string ToString() { return StringRepresentation; } void IPooledObject.Reset() { } } }