Index: branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/FlushExpressions.cs
===================================================================
--- branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/FlushExpressions.cs	(revision 14875)
+++ branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/FlushExpressions.cs	(revision 14952)
@@ -2,4 +2,5 @@
   using System.Collections.Generic;
 
+  using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
   using HeuristicLab.Problems.ProgramSynthesis.Push.Attributes;
 
@@ -11,92 +12,204 @@
   /// </summary>
   /// <typeparam name="T">Stacktype</typeparam>
+  [StorableClass]
   public abstract class FlushExpression<T> : StatelessExpression {
-    public bool Eval(IPushStack<T> stack) {
+    protected FlushExpression() { }
+    [StorableConstructor]
+    protected FlushExpression(bool deserializing) : base(deserializing) { }
+
+    protected void Eval(IPushStack<T> stack) {
       stack.Clear();
-      return true;
     }
   }
 
   [PushExpression(StackTypes.Integer, "INTEGER.FLUSH")]
+  [StorableClass]
   public class IntegerFlushExpression : FlushExpression<long> {
-    public override bool Eval(IInternalPushInterpreter interpreter) {
-      return Eval(interpreter.IntegerStack);
+    public IntegerFlushExpression() { }
+    [StorableConstructor]
+    protected IntegerFlushExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.IntegerStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.IntegerStack);
     }
   }
 
   [PushExpression(StackTypes.Float, "FLOAT.FLUSH")]
+  [StorableClass]
   public class FloatFlushExpression : FlushExpression<double> {
-    public override bool Eval(IInternalPushInterpreter interpreter) {
-      return Eval(interpreter.FloatStack);
+    public FloatFlushExpression() { }
+    [StorableConstructor]
+    protected FloatFlushExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.FloatStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.FloatStack);
     }
   }
 
   [PushExpression(StackTypes.Boolean, "BOOLEAN.FLUSH")]
+  [StorableClass]
   public class BooleanFlushExpression : FlushExpression<bool> {
-    public override bool Eval(IInternalPushInterpreter interpreter) {
-      return Eval(interpreter.BooleanStack);
+    public BooleanFlushExpression() { }
+    [StorableConstructor]
+    protected BooleanFlushExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.BooleanStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.BooleanStack);
     }
   }
 
   [PushExpression(StackTypes.Name, "NAME.FLUSH")]
+  [StorableClass]
   public class NameFlushExpression : FlushExpression<string> {
-    public override bool Eval(IInternalPushInterpreter interpreter) {
-      return Eval(interpreter.NameStack);
+    public NameFlushExpression() { }
+    [StorableConstructor]
+    protected NameFlushExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.NameStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.NameStack);
     }
   }
 
   [PushExpression(StackTypes.Exec, "EXEC.FLUSH")]
+  [StorableClass]
   public class ExecFlushExpression : FlushExpression<Expression> {
-    public override bool Eval(IInternalPushInterpreter interpreter) {
-      return Eval(interpreter.ExecStack);
+    public ExecFlushExpression() { }
+    [StorableConstructor]
+    protected ExecFlushExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.ExecStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.ExecStack);
     }
   }
 
   [PushExpression(StackTypes.Code, "CODE.FLUSH")]
+  [StorableClass]
   public class CodeFlushExpression : FlushExpression<Expression> {
-    public override bool Eval(IInternalPushInterpreter interpreter) {
-      return Eval(interpreter.CodeStack);
+    public CodeFlushExpression() { }
+    [StorableConstructor]
+    protected CodeFlushExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.CodeStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.CodeStack);
     }
   }
 
   [PushExpression(StackTypes.Char, "CHAR.FLUSH")]
+  [StorableClass]
   public class CharFlushExpression : FlushExpression<char> {
-    public override bool Eval(IInternalPushInterpreter interpreter) {
-      return Eval(interpreter.CharStack);
+    public CharFlushExpression() { }
+    [StorableConstructor]
+    protected CharFlushExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.CharStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.CharStack);
     }
   }
 
   [PushExpression(StackTypes.String, "STRING.FLUSH")]
+  [StorableClass]
   public class StringFlushExpression : FlushExpression<string> {
-    public override bool Eval(IInternalPushInterpreter interpreter) {
-      return Eval(interpreter.StringStack);
+    public StringFlushExpression() { }
+    [StorableConstructor]
+    protected StringFlushExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.StringStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.StringStack);
     }
   }
 
   [PushExpression(StackTypes.IntegerVector, "INTEGER[].FLUSH")]
+  [StorableClass]
   public class IntegerVectorFlushExpression : FlushExpression<List<long>> {
-    public override bool Eval(IInternalPushInterpreter interpreter) {
-      return Eval(interpreter.IntegerVectorStack);
+    public IntegerVectorFlushExpression() { }
+    [StorableConstructor]
+    protected IntegerVectorFlushExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.IntegerVectorStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.IntegerVectorStack);
     }
   }
 
   [PushExpression(StackTypes.FloatVector, "FLOAT[].FLUSH")]
+  [StorableClass]
   public class FloatVectorFlushExpression : FlushExpression<List<double>> {
-    public override bool Eval(IInternalPushInterpreter interpreter) {
-      return Eval(interpreter.FloatVectorStack);
+    public FloatVectorFlushExpression() { }
+    [StorableConstructor]
+    protected FloatVectorFlushExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.FloatVectorStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.FloatVectorStack);
     }
   }
 
   [PushExpression(StackTypes.BooleanVector, "BOOLEAN[].FLUSH")]
+  [StorableClass]
   public class BooleanVectorFlushExpression : FlushExpression<List<bool>> {
-    public override bool Eval(IInternalPushInterpreter interpreter) {
-      return Eval(interpreter.BooleanVectorStack);
+    public BooleanVectorFlushExpression() { }
+    [StorableConstructor]
+    protected BooleanVectorFlushExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.BooleanVectorStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.BooleanVectorStack);
     }
   }
 
   [PushExpression(StackTypes.StringVector, "STRING[].FLUSH")]
+  [StorableClass]
   public class StringVectorFlushExpression : FlushExpression<List<string>> {
-    public override bool Eval(IInternalPushInterpreter interpreter) {
-      return Eval(interpreter.StringVectorStack);
+    public StringVectorFlushExpression() { }
+    [StorableConstructor]
+    protected StringVectorFlushExpression(bool deserializing) : base(deserializing) { }
+
+    public override bool IsNoop(IInternalPushInterpreter interpreter) {
+      return interpreter.StringVectorStack.IsEmpty;
+    }
+
+    public override void Eval(IInternalPushInterpreter interpreter) {
+      Eval(interpreter.StringVectorStack);
     }
   }
