You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{// preamble// code in this block can be used in the rules' guards and bodiesfunctionprint(v){console.log(v)}functionpred(v){returnv<5}}print_num @ num(v)==> ${ (v)=>print(v)}generate_nums @ num(v)==> ${ (v)=>pred(v)}|num(v+1)//generate_nums @ num(v) ==> v < 5 | num(v+1)
produces this output:
1
ID Constraint
-- ----------
1 num(1)
Should produce a sequence of numbers.
Works when using chr guards without calling javascript:
{// preamble// code in this block can be used in the rules' guards and bodiesfunctionprint(v){console.log(v)}functionpred(v){returnv<5}}print_num @ num(v)==> ${ (v)=>print(v)}//generate_nums @ num(v) ==> ${ (v) => pred(v) } | num(v+1) <--- commented outgenerate_nums @ num(v)==>v<5|num(v+1)
Not working in the playground
Must be a problem with the parser, maybe.
Failing also in node, in a different way
Using JS preamble:
produces this output:
Should produce a sequence of numbers.
Works when using chr guards without calling javascript:
Produces the correct output:
For reference the javascript calling code:
The text was updated successfully, but these errors were encountered: