Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign Timer Prim #264

merged 4 commits into from Sep 3, 2018


2 participants
Copy link

commented Jul 24, 2018

This PR adopts the tracing of non-deterministic inputs for the TimerPrims
to make timed behaviour deterministic in replay executions.
The mechanism of TimerPrims was changed from resolving a Promise to sending a (external) Message that targets a Block.
The Validation replay tests are re-enabled as they now pass.

This solves Issue #262

@daumayr daumayr changed the title Redesign timer prim Redesign Timer Prim Jul 24, 2018

@smarr smarr force-pushed the daumayr:Redesign-Timer-Prim branch from d0cd9e2 to a583259 Sep 3, 2018

@smarr smarr added this to the v0.7.0 milestone Sep 3, 2018

@smarr smarr added this to To Do in Actor Record & Replay via automation Sep 3, 2018

@smarr smarr added the enhancement label Sep 3, 2018

@smarr smarr self-assigned this Sep 3, 2018

timerActor = vm.getMainActor();
SInvokable s =
(SInvokable) Classes.blockClass.lookupMessage(SELECTOR, AccessModifier.PUBLIC);
rct = createOnReceiveCallTarget(SELECTOR,

This comment has been minimized.

Copy link

smarr Sep 3, 2018


Any reason not to use the ValueNonePrim directly here?

Think, I'd just use that. Will perhaps also reduce code complexity here.

This comment has been minimized.

Copy link

smarr Sep 3, 2018


Hm, I see, AbstractMessageSendNode is expected by ReceivedMessage.

@smarr smarr force-pushed the daumayr:Redesign-Timer-Prim branch from a583259 to e183b39 Sep 3, 2018

daumayr and others added some commits Jul 24, 2018

Simplify changes
- need only one primitive
- initialize timer as part of the actor module init
- avoid use of method references (requires lambda infrastructure)
- use same style for the fields
- initialize structures only in replay mode
- change naming to be more explicit about semantics

Signed-off-by: Stefan Marr <>

@smarr smarr force-pushed the daumayr:Redesign-Timer-Prim branch from e183b39 to 50a0556 Sep 3, 2018


smarr approved these changes Sep 3, 2018

Copy link

left a comment

I simplified the change a little, and change the naming of variables to make the code more explicit.

@smarr smarr merged commit 42b4d97 into smarr:dev Sep 3, 2018

2 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
continuous-integration/travis-ci/pr The Travis CI build passed

Actor Record & Replay automation moved this from To Do to Done Sep 3, 2018

@smarr smarr referenced this pull request Oct 4, 2018


Trace TimerPrim #262

@daumayr daumayr deleted the daumayr:Redesign-Timer-Prim branch Oct 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.