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 | using HeuristicLab.Problems.ProgramSynthesis.Push.Data.Pool;
|
---|
10 |
|
---|
11 | using Stack;
|
---|
12 |
|
---|
13 | public interface IPushInterpreter {
|
---|
14 | IRandom Random { get; set; }
|
---|
15 |
|
---|
16 | IStack<Expression> CodeStack { get; }
|
---|
17 | IStack<Expression> ExecStack { get; }
|
---|
18 | IStack<string> NameStack { get; }
|
---|
19 | IStack<bool> BooleanStack { get; }
|
---|
20 | IStack<long> IntegerStack { get; }
|
---|
21 | IStack<double> FloatStack { get; }
|
---|
22 | IStack<char> CharStack { get; }
|
---|
23 | IStack<string> StringStack { get; }
|
---|
24 |
|
---|
25 | IDictionary<string, Expression> CustomExpressions { get; }
|
---|
26 |
|
---|
27 | IReadOnlyPushConfiguration Configuration { get; }
|
---|
28 |
|
---|
29 | InterpreterPoolContainer PoolContainer { get; }
|
---|
30 |
|
---|
31 | bool IsNameQuoteFlagSet { get; set; }
|
---|
32 |
|
---|
33 | void Clear();
|
---|
34 | void Run(string code, bool stepwise = false);
|
---|
35 | void Run(Expression expression, bool stepwise = false);
|
---|
36 | Task RunAsync(Expression expression, bool paused = false, CancellationToken token = default(CancellationToken));
|
---|
37 | Task RunAsync(string code, bool paused = false, CancellationToken token = default(CancellationToken));
|
---|
38 | Task AbortAndResetAsync();
|
---|
39 | Task AbortAsync();
|
---|
40 | Task PauseAsync();
|
---|
41 | void Resume();
|
---|
42 | Task ResumeAsync();
|
---|
43 |
|
---|
44 | bool Step();
|
---|
45 | void PrintStacks();
|
---|
46 | }
|
---|
47 | } |
---|