Free cookie consent management tool by TermsFeed Policy Generator

source: addons/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/IPushInterpreter.cs @ 17460

Last change on this file since 17460 was 15273, checked in by pkimmesw, 7 years ago

#2665 Started Plush Encoding, Added Zero Error Individual Count Analyzer

File size: 2.1 KB
Line 
1namespace 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; }
14    IPushStack<Expression> CodeStack { get; }
15    IPushStack<Expression> ExecStack { get; }
16    IPushStack<string> NameStack { get; }
17    IPushStack<bool> BooleanStack { get; }
18    IPushStack<long> IntegerStack { get; }
19    IPushStack<double> FloatStack { get; }
20    IPushStack<char> CharStack { get; }
21    IPushStack<string> StringStack { get; }
22    IPushStack<IReadOnlyList<long>> IntegerVectorStack { get; }
23    IPushStack<IReadOnlyList<double>> FloatVectorStack { get; }
24    IPushStack<IReadOnlyList<bool>> BooleanVectorStack { get; }
25    IPushStack<IReadOnlyList<string>> StringVectorStack { get; }
26    IPrintStack PrintStack { get; }
27    IDictionary<string, Expression> CustomExpressions { get; }
28    IReadOnlyDictionary<StackTypes, IPushStack> Stacks { get; }
29    IReadOnlyPushConfiguration Configuration { get; }
30    void ClearStacks();
31    void Reset(IRandom random = null);
32
33    void SetInput(
34      IReadOnlyList<long> integers = null,
35      IReadOnlyList<double> floats = null,
36      IReadOnlyList<bool> booleans = null,
37      IReadOnlyList<char> chars = null,
38      IReadOnlyList<string> strings = null,
39      IReadOnlyList<IReadOnlyList<long>> integerVectors = null,
40      IReadOnlyList<IReadOnlyList<double>> floatVectors = null,
41      IReadOnlyList<IReadOnlyList<string>> stringVectors = null);
42
43    void Run(bool stepwise);
44    void Run(string code, bool stepwise = false);
45    void Run(Expression expression, bool stepwise = false);
46    Task RunAsync(Expression expression, CancellationToken token = default(CancellationToken));
47    Task RunAsync(string code, CancellationToken token = default(CancellationToken));
48    Task AbortAndResetAsync();
49    Task AbortAsync();
50    Task PauseAsync();
51    void Resume();
52    Task ResumeAsync();
53    bool Step();
54  }
55}
Note: See TracBrowser for help on using the repository browser.