using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using HeuristicLab.Core; namespace HeuristicLab.Problems.ProgramSynthesis { public interface IPushInterpreter { IRandom Random { get; } IPushStack CodeStack { get; } IPushStack ExecStack { get; } IPushStack NameStack { get; } IPushStack BooleanStack { get; } IPushStack IntegerStack { get; } IPushStack FloatStack { get; } IPushStack CharStack { get; } IPushStack StringStack { get; } IPushStack> IntegerVectorStack { get; } IPushStack> FloatVectorStack { get; } IPushStack> BooleanVectorStack { get; } IPushStack> StringVectorStack { get; } IPrintStack PrintStack { get; } IDictionary CustomExpressions { get; } IReadOnlyDictionary Stacks { get; } IReadOnlyPushConfiguration Configuration { get; } void ClearStacks(); void Reset(IRandom random = null); void SetInput( IReadOnlyList integers = null, IReadOnlyList floats = null, IReadOnlyList booleans = null, IReadOnlyList chars = null, IReadOnlyList strings = null, IReadOnlyList> integerVectors = null, IReadOnlyList> floatVectors = null, IReadOnlyList> stringVectors = null); void Run(bool stepwise); void Run(string code, bool stepwise = false); void Run(Expression expression, bool stepwise = false); Task RunAsync(Expression expression, CancellationToken token = default(CancellationToken)); Task RunAsync(string code, CancellationToken token = default(CancellationToken)); Task AbortAndResetAsync(); Task AbortAsync(); Task PauseAsync(); void Resume(); Task ResumeAsync(); bool Step(); } }