1 | namespace HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter {
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Threading;
|
---|
4 | using System.Threading.Tasks;
|
---|
5 | using Core;
|
---|
6 | using Expressions;
|
---|
7 |
|
---|
8 | using HeuristicLab.Problems.ProgramSynthesis.Push.Configuration;
|
---|
9 |
|
---|
10 | using Stack;
|
---|
11 |
|
---|
12 | public interface IPushInterpreter {
|
---|
13 | IRandom Random { get; set; }
|
---|
14 |
|
---|
15 | IStack<Expression> CodeStack { get; }
|
---|
16 | IStack<Expression> ExecStack { get; }
|
---|
17 | IStack<string> NameStack { get; }
|
---|
18 | IStack<bool> BooleanStack { get; }
|
---|
19 | IStack<long> IntegerStack { get; }
|
---|
20 | IStack<double> FloatStack { get; }
|
---|
21 |
|
---|
22 | IDictionary<string, Expression> CustomExpressions { get; }
|
---|
23 |
|
---|
24 | IReadonlyPushConfiguration Configuration { get; }
|
---|
25 |
|
---|
26 | bool IsNameQuoteFlagSet { get; set; }
|
---|
27 |
|
---|
28 | void Clear();
|
---|
29 | void Run(string code, bool stepwise = false);
|
---|
30 | void Run(Expression program, bool stepwise = false);
|
---|
31 | void Run(PushProgram program, bool stepwise = false);
|
---|
32 | Task RunAsync(PushProgram program, bool paused = false, CancellationToken token = default(CancellationToken));
|
---|
33 | Task RunAsync(Expression program, bool paused = false, CancellationToken token = default(CancellationToken));
|
---|
34 | Task RunAsync(string code, bool paused = false, CancellationToken token = default(CancellationToken));
|
---|
35 | Task AbortAndResetAsync();
|
---|
36 | Task AbortAsync();
|
---|
37 | Task PauseAsync();
|
---|
38 | void Resume();
|
---|
39 | Task ResumeAsync();
|
---|
40 |
|
---|
41 | bool Step();
|
---|
42 | void PrintStacks();
|
---|
43 | }
|
---|
44 | } |
---|