Index: branches/HeuristicLab.ExpressionGenerator/HeuristicLab.ExpressionGenerator/3.4/Expression.cs
===================================================================
--- branches/HeuristicLab.ExpressionGenerator/HeuristicLab.ExpressionGenerator/3.4/Expression.cs	(revision 14409)
+++ branches/HeuristicLab.ExpressionGenerator/HeuristicLab.ExpressionGenerator/3.4/Expression.cs	(revision 14410)
@@ -89,5 +89,5 @@
         case ExpressionType.Function:
           sb.Append(string.Format("{0} (", Label));
-          if (arguments != null) {
+          if (Arguments.Any()) {
             for (int i = 0; i < arguments.Count - 1; ++i)
               sb.Append(string.Format("{0}, ", arguments[i]));
@@ -97,4 +97,29 @@
       }
 
+      return sb.ToString();
+    }
+
+    public string PrintDot() {
+      var stack = new Stack<Expression>();
+      stack.Push(this);
+
+      var sb = new StringBuilder();
+      sb.AppendLine("digraph g {");
+
+      while (stack.Count > 0) {
+        var top = stack.Pop();
+
+        if (!top.Arguments.Any())
+          continue;
+
+        foreach (var arg in top.Arguments) {
+          var from = top.Arguments.Any() ? top.Label : top.ToString();
+          var to = arg.Arguments.Any() ? arg.Label : arg.ToString();
+          sb.AppendLine(string.Format("\"{0}\" -> \"{1}\";", from, to));
+          stack.Push(arg);
+        }
+      }
+
+      sb.AppendLine("}");
       return sb.ToString();
     }
Index: branches/HeuristicLab.ExpressionGenerator/HeuristicLab.ExpressionGenerator/3.4/ExpressionTemplate.cs
===================================================================
--- branches/HeuristicLab.ExpressionGenerator/HeuristicLab.ExpressionGenerator/3.4/ExpressionTemplate.cs	(revision 14409)
+++ branches/HeuristicLab.ExpressionGenerator/HeuristicLab.ExpressionGenerator/3.4/ExpressionTemplate.cs	(revision 14410)
@@ -32,5 +32,5 @@
     protected readonly string label;
 
-    public abstract Expression Instantiate(IRandom random);
+    public abstract Expression Instantiate(IRandom random, bool sampleWithRepetition = false);
 
     protected ExpressionTemplate(string label, Func<IEnumerable<double>, double> transform) {
@@ -62,7 +62,10 @@
     }
 
-    public override Expression Instantiate(IRandom random) {
+    public override Expression Instantiate(IRandom random, bool sampleWithRepetition = false) {
       var arity = (int)Math.Round(arityDistribution.NextDouble());
-      var args = arguments.SampleProportional(random, arity, arguments.Select(x => x.Item2)).Select(x => x.Item1);
+      var weights = arguments.Select(x => x.Item2);
+      var args = sampleWithRepetition
+        ? arguments.SampleProportional(random, arity, weights).Select(x => x.Item1)
+        : arguments.SampleProportionalWithoutRepetition(random, arity, weights).Select(x => x.Item1);
       return Expression.Function(label, transform, args);
     }
@@ -75,5 +78,5 @@
     }
 
-    public override Expression Instantiate(IRandom random) {
+    public override Expression Instantiate(IRandom random, bool sampleWithRepetition = false) {
       var args = arguments.SampleProportional(random, arity, arguments.Select(x => x.Item2)).Select(x => x.Item1);
       return Expression.Function(label, transform, args);
Index: branches/HeuristicLab.ExpressionGenerator/HeuristicLab.ExpressionGenerator/3.4/Interfaces/IExpression.cs
===================================================================
--- branches/HeuristicLab.ExpressionGenerator/HeuristicLab.ExpressionGenerator/3.4/Interfaces/IExpression.cs	(revision 14409)
+++ branches/HeuristicLab.ExpressionGenerator/HeuristicLab.ExpressionGenerator/3.4/Interfaces/IExpression.cs	(revision 14410)
@@ -29,8 +29,8 @@
   public interface IExpression {
     ExpressionType Type { get; }
+    Func<IEnumerable<double>, double> Transform { get; }
     IEnumerable<Expression> Arguments { get; }
+    IRandom Distribution { get; }
     double Value { get; }
-    IRandom Distribution { get; }
-    Func<IEnumerable<double>, double> Transform { get; }
   }
 }
