theodore-norvell / PLAAY

Senior Design Project PLAAY (Programming Language for Adults And Youth)
2 stars 0 forks source link

Multiple execution granularities. #22

Open theodore-norvell opened 7 years ago

theodore-norvell commented 7 years ago

We need:

Except for when execution is complete (i.e. the bottom evaluation is done). Each of the above should always do something, i.e. make at least one step.

We need infinite loop protection, so another reason to stop advancing is that some limit on steps has been reached. In this case we need to feed this information back to the user.

Another reason to stop is that input is required. (In the Teaching Machine, this is accomplished by setting a flag in the vms that says that input is required.)

theodore-norvell commented 6 years ago

Step over and step into should stop when one is about to call a lambda expression. They you can choose whether to step over or into each call on a case by case basis.

It would also be nice to step backwards out of a method call. This would mean making an implicit checkpoint just before a step of a call. This could be implemented by having multiple undo stacks. E.g. have one main undo stack (as now) but also substacks. A push onto a substack entails a push onto the main stack. A an undo from a substack means first undoing transactions on the main stack until the top of the substack is on top of the main stack and then undoing one more time. Each undo of the main stack also pops the transaction off the substacks.