Index: branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/HeuristicLab.Problems.DataAnalysis-3.3.csproj
===================================================================
--- branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/HeuristicLab.Problems.DataAnalysis-3.3.csproj	(revision 5026)
+++ branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/HeuristicLab.Problems.DataAnalysis-3.3.csproj	(revision 5051)
@@ -154,4 +154,6 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Symbolic\Symbols\Derivative.cs" />
+    <Compile Include="Symbolic\Symbols\Integral.cs" />
     <Compile Include="TableFileParser.cs" />
     <None Include="HeuristicLab.snk" />
Index: branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/FullFunctionalExpressionGrammar.cs
===================================================================
--- branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/FullFunctionalExpressionGrammar.cs	(revision 5026)
+++ branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/FullFunctionalExpressionGrammar.cs	(revision 5051)
@@ -62,4 +62,9 @@
       var timeLag = new TimeLag();
       timeLag.InitialFrequency = 0.0;
+      var integral = new Integral();
+      integral.InitialFrequency = 0.0;
+      var derivativ = new Derivative();
+      derivativ.InitialFrequency = 0.0;
+
       var constant = new Constant();
       constant.MinValue = -20;
@@ -69,6 +74,6 @@
       laggedVariable.InitialFrequency = 0.0;
 
-      var allSymbols = new List<Symbol>() { add, sub, mul, div, mean, sin, cos, tan, log, exp, @if, gt, lt, and, or, not, timeLag, constant, variableSymbol, laggedVariable };
-      var unaryFunctionSymbols = new List<Symbol>() { sin, cos, tan, log, exp, not, timeLag };
+      var allSymbols = new List<Symbol>() { add, sub, mul, div, mean, sin, cos, tan, log, exp, @if, gt, lt, and, or, not, timeLag, integral, derivativ, constant, variableSymbol, laggedVariable };
+      var unaryFunctionSymbols = new List<Symbol>() { sin, cos, tan, log, exp, not, timeLag, integral, derivativ };
       var binaryFunctionSymbols = new List<Symbol>() { gt, lt };
       var functionSymbols = new List<Symbol>() { add, sub, mul, div, mean, and, or };
Index: branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs
===================================================================
--- branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs	(revision 5026)
+++ branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs	(revision 5051)
@@ -22,4 +22,5 @@
 using System;
 using System.Collections.Generic;
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -35,4 +36,9 @@
   // not thread safe!
   public sealed class SimpleArithmeticExpressionInterpreter : NamedItem, ISymbolicExpressionTreeInterpreter {
+    private struct InstructionEvaluation {
+      int instructionIndex;
+      int row;
+    }
+
     private class OpCodes {
       public const byte Add = 1;
@@ -68,4 +74,6 @@
 
       public const byte TimeLag = 22;
+      public const byte Integral = 23;
+      public const byte Derivative = 24;
     }
 
@@ -93,4 +101,6 @@
       { typeof(Argument), OpCodes.Arg },
       { typeof(TimeLag), OpCodes.TimeLag},
+      { typeof(Integral), OpCodes.Integral},
+      { typeof(Derivative), OpCodes.Derivative}
     };
     private const int ARGUMENT_STACK_SIZE = 1024;
@@ -102,4 +112,5 @@
     private double[] argumentStack = new double[ARGUMENT_STACK_SIZE];
     private int argStackPointer;
+    private Dictionary<InstructionEvaluation, double> cachedEvaluations;
 
     public override bool CanChangeName {
@@ -120,8 +131,10 @@
     public SimpleArithmeticExpressionInterpreter()
       : base() {
+      cachedEvaluations = new Dictionary<InstructionEvaluation, double>();
     }
 
     public IEnumerable<double> GetSymbolicExpressionTreeValues(SymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows) {
       this.dataset = dataset;
+      cachedEvaluations.Clear();
       var compiler = new SymbolicExpressionTreeCompiler();
       compiler.AddInstructionPostProcessingHook(PostProcessInstruction);
@@ -133,4 +146,5 @@
         yield return Evaluate();
       }
+      cachedEvaluations.Clear();
     }
 
@@ -295,12 +309,47 @@
         case OpCodes.TimeLag: {
             var timeLagTreeNode = (LaggedTreeNode)currentInstr.dynamicNode;
+            if (row + timeLagTreeNode.Lag < 0 || row + timeLagTreeNode.Lag >= dataset.Rows)
+              return double.NaN;
+
             row += timeLagTreeNode.Lag;
-            if (row < 0 || row >= dataset.Rows) {
-              row -= timeLagTreeNode.Lag;
-              return double.NaN;
-            }
             double result = Evaluate();
             row -= timeLagTreeNode.Lag;
             return result;
+          }
+        case OpCodes.Integral: {
+            int nextPc = pc;
+            var timeLagTreeNode = (LaggedTreeNode)currentInstr.dynamicNode;
+            if (row + timeLagTreeNode.Lag < 0 || row + timeLagTreeNode.Lag >= dataset.Rows)
+              return double.NaN;
+            double sum = 0.0;
+            if (timeLagTreeNode.IterateNodesPrefix().OfType<VariableTreeNode>().Any()) {
+              for (int i = 0; i < Math.Abs(timeLagTreeNode.Lag); i++) {
+                row += Math.Sign(timeLagTreeNode.Lag);
+                sum += Evaluate();
+                pc = nextPc;
+              }
+              row -= timeLagTreeNode.Lag;
+              sum += Evaluate();
+            } else sum = Math.Abs(timeLagTreeNode.Lag) * Evaluate();
+            return sum;
+          }
+
+        //mkommend: derivate calculation taken from: 
+        //http://www.holoborodko.com/pavel/numerical-methods/numerical-derivative/smooth-low-noise-differentiators/
+        //one sided smooth differentiatior, N = 4
+        // y' = 1/8h (f_i + 2f_i-1, -2 f_i-3 - f_i-4)
+        case OpCodes.Derivative: {
+            if (row - 4 < 0) return double.NaN;
+            int nextPc = pc;
+            double f_0 = Evaluate(); row--;
+            pc = nextPc;
+            double f_1 = Evaluate(); row -= 2;
+            pc = nextPc;
+            double f_3 = Evaluate(); row--;
+            pc = nextPc;
+            double f_4 = Evaluate();
+            row += 4;
+
+            return (f_0 + 2 * f_1 - 2 * f_3 - f_4) / 8; // h = 1
           }
         default: throw new NotSupportedException();
Index: branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Derivative.cs
===================================================================
--- branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Derivative.cs	(revision 5051)
+++ branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Derivative.cs	(revision 5051)
@@ -0,0 +1,37 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
+  [StorableClass]
+  [Item("Derivative", "Represents the derivative over the specified subtree.")]
+  public sealed class Derivative : Symbol {
+    [StorableConstructor]
+    private Derivative(bool deserializing) : base(deserializing) { }
+    private Derivative(Derivative original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new Derivative(this, cloner); }
+
+    public Derivative() : base("Derivative", "Represents the derivative over the specified subtree.") { }
+  }
+}
Index: branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Integral.cs
===================================================================
--- branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Integral.cs	(revision 5051)
+++ branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Integral.cs	(revision 5051)
@@ -0,0 +1,36 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
+  [StorableClass]
+  [Item("Integral", "Represents the integral over the specified subtree.")]
+  public sealed class Integral : LaggedSymbol {
+    [StorableConstructor]
+    private Integral(bool deserializing) : base(deserializing) { }
+    protected Integral(Integral original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new Integral(this, cloner); }
+
+    public Integral() : base("Integral", "Represents the integral over the specified subtree.") { }
+  }
+}
Index: branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/TimeLag.cs
===================================================================
--- branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/TimeLag.cs	(revision 5026)
+++ branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/TimeLag.cs	(revision 5051)
@@ -31,7 +31,6 @@
     private TimeLag(bool deserializing) : base(deserializing) { }
     private TimeLag(TimeLag original, Cloner cloner) : base(original, cloner) { }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new TimeLag(this, cloner);
-    }
+    public override IDeepCloneable Clone(Cloner cloner) { return new TimeLag(this, cloner); }
+
     public TimeLag() : base("TimeLag", "Represents a symblol whose evaluation is shifted.") { }
   }
