perlindgren / syncrim

Apache License 2.0
18 stars 5 forks source link

Simulation status #52

Closed perlindgren closed 4 months ago

perlindgren commented 1 year ago

Problem

As of now evaluating (clock) have no return value. So its not possible for the simulator to know if e.g., a halt condition has been encountered.

Solution

Introducing a return type for the Component::clock method.

Something like

enum Condition {
  Error(String),
  Halt(String),
}

And let clock return Result<(),Condition>, where Ok(()) indicates that clocking was successful, and Condition some type of exception. We can later refine the Condition to be more specific if we like but this could work to start out with.

perlindgren commented 1 year ago

PR https://github.com/perlindgren/syncrim/pull/58 should address the basics, and we can work based on that.

onsdagens commented 4 months ago

Addressed with #78 .