hiphop
hiphop copied to clipboard
variation of `causal2.js` raises incorrect causality error.
The following program:
"require hopscript"
let hh = require("hiphop");
let inSig = {accessibility: hh.IN};
let outSig = {accessibility: hh.OUT};
let prg = <hh.module>
<hh.local V_S_C>
<hh.sequence>
<hh.if V_S_C><hh.nothing/> <hh.nothing/>
</hh.if>
<hh.local V_S_i>
<hh.if V_S_i><hh.emit V_S_C/><hh.nothing/></hh.if>
</hh.local>
</hh.sequence>
</hh.local>
</hh.module>;
let machine = new hh.ReactiveMachine(prg, "prog")
machine.react()
reports a causality cycle between V_S_i and V_S_C. However there should be no cycle, because V_S_i is never emitted, which should let us determine that V_S_C is also absent.
This program is basically the same as causal2.js but V_S_i is declared after the first conditional, not before.