public ProgramState(IMyStack<IMyStatement> executionStack, IMyDictionary<string, int> myDictionary, IMyList<string> output, IHeap<int, int> heap, IMyStatement originalProgram) { this.executionStack = executionStack; this.myDictionary = myDictionary; this.output = output; this.originalProgram = originalProgram; this.executionStack.push(originalProgram); this.heap = heap; this.stateId = globalStateId++; }
public SwitchStatement(IExpressions expression, IExpressions case1, IExpressions case2, IMyStatement statementDefault, IMyStatement statementCase1, IMyStatement statementCase2) { this.expression = expression; this.case1 = case1; this.case2 = case2; this.statementDefault = statementDefault; this.statementCase1 = statementCase1; this.statementCase2 = statementCase2; }
/** * The constructor * @param expression The expression * @param thenStatement The correct statement * @param elseStatement The false statement */ public IfStatement(IExpressions expression, IMyStatement thenStatement, IMyStatement elseStatement) { this.Expression = expression; this.thenStatement = thenStatement; this.elseStatement = elseStatement; }
public void setThenStatement(IMyStatement thenStatement) { this.thenStatement = thenStatement; }
public void setElseStatement(IMyStatement elseStatement) { this.elseStatement = elseStatement; }
/** * Creating a new program based on initial statement * @param initialStatement initial IStatement */ public void createProgram(IMyStatement initialStatement) { repository.createProgram(new WrapperStack<IMyStatement>(), new WrapperDictionary<string, int>(), new WrapperList<string>(), new MyHeap<int, int>(), initialStatement); }
public void createProgram(IMyStack<IMyStatement> mExecutionStack, IMyDictionary<String, int> myDictionary, IMyList<String> mOutput, IHeap<int, int> heap, IMyStatement mInitialProgram) { programStateList.Add(new ProgramState(mExecutionStack, myDictionary, mOutput, heap, mInitialProgram)); }
public void setSecondStatement(IMyStatement secondStatement) { this.secondStatement = secondStatement; }
public void setFirstStatement(IMyStatement firstStatement) { this.firstStatement = firstStatement; }
/** * The constructor * @param firstStatement The first statement * @param secondStatement The second statement */ public CompoundStatement(IMyStatement firstStatement, IMyStatement secondStatement) { this.firstStatement = firstStatement; this.secondStatement = secondStatement; }
public void setStatement(IMyStatement statement) { this.statement = statement; }
public WhileStatement(IMyStatement statement, IExpressions expression) { this.statement = statement; this.expression = expression; }
public ForkStatement(IMyStatement statement) { this.statement = statement; }
public void setOriginalProgram(IMyStatement originalProgram) { this.originalProgram = originalProgram; }