Line | |
---|
1 | namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
|
---|
2 | using System;
|
---|
3 | using System.Collections.Generic;
|
---|
4 | using HeuristicLab.Problems.ProgramSynthesis.Push.Data.Pool;
|
---|
5 |
|
---|
6 | using Interpreter;
|
---|
7 |
|
---|
8 | [Serializable]
|
---|
9 | public abstract class Expression : IPooledObject {
|
---|
10 | public bool IsProgram { get { return GetType() == typeof(PushProgram); } }
|
---|
11 |
|
---|
12 | public static readonly IReadOnlyCollection<Expression> EmptyContainer = new Expression[0];
|
---|
13 |
|
---|
14 | public virtual string StringRepresentation
|
---|
15 | {
|
---|
16 | get
|
---|
17 | {
|
---|
18 | return ExpressionTable.TypeToAttributeTable[GetType()].ExpressionName;
|
---|
19 | }
|
---|
20 | }
|
---|
21 |
|
---|
22 | //public abstract bool IsNoop(IInternalPushInterpreter interpreter);
|
---|
23 |
|
---|
24 | public abstract bool Eval(IInternalPushInterpreter interpreter);
|
---|
25 |
|
---|
26 | public override string ToString() {
|
---|
27 | return this.StringRepresentation;
|
---|
28 | }
|
---|
29 |
|
---|
30 | void IPooledObject.Reset() { }
|
---|
31 | }
|
---|
32 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.