Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Interpreter/IPushInterpreter.cs @ 14746

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

#2665 PooledPushProgram reduces memory usage and increases performance

File size: 1.6 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  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
23    IDictionary<string, Expression> CustomExpressions { get; }
24
25    IReadonlyPushConfiguration Configuration { get; }
26
27    IManagedPool<PushProgram> PushProgramPool { get; }
28
29    bool IsNameQuoteFlagSet { get; set; }
30
31    void Clear();
32    void Run(string code, bool stepwise = false);
33    void Run(Expression expression, bool stepwise = false);
34    //void Run(PushProgram program, bool stepwise = false);
35    //Task RunAsync(PushProgram program, bool paused = false, CancellationToken token = default(CancellationToken));
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}
Note: See TracBrowser for help on using the repository browser.