Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/26/17 19:34:13 (7 years ago)
Author:
pkimmesw
Message:

#2665 Fixed analyzer, fixed Plush encoding + operators, adpated print evaluation according to McPhee

Location:
branches/PushGP/HeuristicLab.PushGP
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP

    • Property svn:ignore set to
      *.user
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/PrintExpressions.cs

    r15189 r15289  
    7272
    7373    public override void Eval(IInternalPushInterpreter interpreter) {
    74       Eval(interpreter, interpreter.BooleanStack);
     74      var value = interpreter.BooleanStack.Pop();
     75      interpreter.PrintStack.Push(value);
    7576    }
    7677  }
     
    9293
    9394    public override void Eval(IInternalPushInterpreter interpreter) {
    94       Eval(interpreter, interpreter.CharStack);
     95      var value = interpreter.CharStack.Pop();
     96      interpreter.PrintStack.Push(value);
    9597    }
    9698  }
     
    113115
    114116    public override void Eval(IInternalPushInterpreter interpreter) {
    115       Eval(interpreter, interpreter.ExecStack);
     117      var value = interpreter.ExecStack.Pop();
     118      interpreter.PrintStack.Push(value);
    116119    }
    117120  }
     
    136139      var str = value.ToString(interpreter.Configuration.FloatStringFormat, CultureInfo.InvariantCulture);
    137140
    138       if (interpreter.PrintStack.IsEmpty)
    139         interpreter.PrintStack.Push(str);
    140       else
    141         interpreter.PrintStack.Top += str;
     141      interpreter.PrintStack.Push(str);
    142142    }
    143143  }
     
    180180
    181181    public override void Eval(IInternalPushInterpreter interpreter) {
    182       Eval(interpreter, interpreter.StringStack);
     182      var value = interpreter.StringStack.Pop();
     183      interpreter.PrintStack.Push(value);
    183184    }
    184185  }
Note: See TracChangeset for help on using the changeset viewer.