[15771] | 1 | using System.Collections.Generic;
|
---|
| 2 | using System.Threading;
|
---|
| 3 | using System.Threading.Tasks;
|
---|
| 4 | using HeuristicLab.Core; |
---|
| 5 | |
---|
| 6 | namespace HeuristicLab.Problems.ProgramSynthesis { |
---|
[14744] | 7 | public interface IPushInterpreter {
|
---|
[15273] | 8 | IRandom Random { get; }
|
---|
[14834] | 9 | IPushStack<Expression> CodeStack { get; }
|
---|
| 10 | IPushStack<Expression> ExecStack { get; }
|
---|
| 11 | IPushStack<string> NameStack { get; }
|
---|
| 12 | IPushStack<bool> BooleanStack { get; }
|
---|
| 13 | IPushStack<long> IntegerStack { get; }
|
---|
| 14 | IPushStack<double> FloatStack { get; }
|
---|
| 15 | IPushStack<char> CharStack { get; }
|
---|
| 16 | IPushStack<string> StringStack { get; }
|
---|
[15017] | 17 | IPushStack<IReadOnlyList<long>> IntegerVectorStack { get; }
|
---|
| 18 | IPushStack<IReadOnlyList<double>> FloatVectorStack { get; }
|
---|
| 19 | IPushStack<IReadOnlyList<bool>> BooleanVectorStack { get; }
|
---|
| 20 | IPushStack<IReadOnlyList<string>> StringVectorStack { get; }
|
---|
[15189] | 21 | IPrintStack PrintStack { get; }
|
---|
[14744] | 22 | IDictionary<string, Expression> CustomExpressions { get; }
|
---|
[14914] | 23 | IReadOnlyDictionary<StackTypes, IPushStack> Stacks { get; }
|
---|
[14777] | 24 | IReadOnlyPushConfiguration Configuration { get; }
|
---|
[15273] | 25 | void ClearStacks();
|
---|
| 26 | void Reset(IRandom random = null);
|
---|
[15017] | 27 |
|
---|
[15189] | 28 | void SetInput(
|
---|
| 29 | IReadOnlyList<long> integers = null,
|
---|
| 30 | IReadOnlyList<double> floats = null,
|
---|
| 31 | IReadOnlyList<bool> booleans = null,
|
---|
| 32 | IReadOnlyList<char> chars = null,
|
---|
| 33 | IReadOnlyList<string> strings = null,
|
---|
| 34 | IReadOnlyList<IReadOnlyList<long>> integerVectors = null,
|
---|
| 35 | IReadOnlyList<IReadOnlyList<double>> floatVectors = null,
|
---|
| 36 | IReadOnlyList<IReadOnlyList<string>> stringVectors = null);
|
---|
| 37 |
|
---|
[15017] | 38 | void Run(bool stepwise);
|
---|
[14744] | 39 | void Run(string code, bool stepwise = false);
|
---|
[14745] | 40 | void Run(Expression expression, bool stepwise = false);
|
---|
[14834] | 41 | Task RunAsync(Expression expression, CancellationToken token = default(CancellationToken));
|
---|
| 42 | Task RunAsync(string code, CancellationToken token = default(CancellationToken));
|
---|
[14744] | 43 | Task AbortAndResetAsync();
|
---|
| 44 | Task AbortAsync();
|
---|
| 45 | Task PauseAsync();
|
---|
| 46 | void Resume();
|
---|
| 47 | Task ResumeAsync();
|
---|
| 48 | bool Step();
|
---|
| 49 | }
|
---|
| 50 | } |
---|