Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2895_PushGP_GenealogyAnalysis/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/IPushInterpreter.cs

Last change on this file was 15771, checked in by bburlacu, 7 years ago

#2895: Add solution skeleton for PushGP with genealogy analysis.

File size: 2.0 KB
Line 
1using System.Collections.Generic;
2using System.Threading;
3using System.Threading.Tasks;
4using HeuristicLab.Core;
5
6namespace HeuristicLab.Problems.ProgramSynthesis {
7  public interface IPushInterpreter {
8    IRandom Random { get; }
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; }
17    IPushStack<IReadOnlyList<long>> IntegerVectorStack { get; }
18    IPushStack<IReadOnlyList<double>> FloatVectorStack { get; }
19    IPushStack<IReadOnlyList<bool>> BooleanVectorStack { get; }
20    IPushStack<IReadOnlyList<string>> StringVectorStack { get; }
21    IPrintStack PrintStack { get; }
22    IDictionary<string, Expression> CustomExpressions { get; }
23    IReadOnlyDictionary<StackTypes, IPushStack> Stacks { get; }
24    IReadOnlyPushConfiguration Configuration { get; }
25    void ClearStacks();
26    void Reset(IRandom random = null);
27
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
38    void Run(bool stepwise);
39    void Run(string code, bool stepwise = false);
40    void Run(Expression expression, bool stepwise = false);
41    Task RunAsync(Expression expression, CancellationToken token = default(CancellationToken));
42    Task RunAsync(string code, CancellationToken token = default(CancellationToken));
43    Task AbortAndResetAsync();
44    Task AbortAsync();
45    Task PauseAsync();
46    void Resume();
47    Task ResumeAsync();
48    bool Step();
49  }
50}
Note: See TracBrowser for help on using the repository browser.