rems-project / sail

Sail architecture definition language
Other
563 stars 92 forks source link

Simple REPL question. #588

Closed kodyvajjha closed 1 week ago

kodyvajjha commented 1 week ago

A noob question about the REPL: is there a way in the REPL to set and propagate global state of the registers that I define? I see that there is a :fix_registers option but that doesn't seem to do what I want. In particular, I want to initialize the registers to a particular value and observe how the instructions change them within a REPL session. It seems like the evaluation scope of an instruction is delimited to its definition.

Alasdair commented 1 week ago

Yes, each time we evaluate something the REPL resets the state.

You are right that it would be more useful if it didn't do this, I'll change the behaviour.

kodyvajjha commented 1 week ago

Thank you, I tested out the latest commits and it looks very good!