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

Abort statement not working #15

Open
MohamedGhardallou opened this issue Oct 2, 2023 · 1 comment
Open

Abort statement not working #15

MohamedGhardallou opened this issue Oct 2, 2023 · 1 comment

Comments

@MohamedGhardallou
Copy link

MohamedGhardallou commented Oct 2, 2023

Hello ,
with the last compiler version i have this behavior :

activity inc()(x: int32)

  repeat
    x = x + 1
    await true
  end

end

@[EntryPoint]
activity Ctrl()(x: int32 , y: int32)
  y = 0
  x = 0
  await true

  when x > 5 abort
      cobegin 
        run inc()(x)
      with
        run inc()(y)
      end
  end
end

the output sequence of this program is :
x 0 y 0
x 1 y 1
x 2 y 2
x 3 y 3
x 4 y 4
x 5 y 5
x 6 y 6
x 6 y 6
x 6 y 6
x 6 y 6
...

if you replace the condition x > 5 by y > 5 the program should have that same output sequence
but we have this output instead:

x 0 y 0
x 1 y 1
x 1 y 1
x 1 y 1
x 1 y 1
x 1 y 1
x 1 y 1
x 1 y 1
x 1 y 1
x 1 y 1
...

@MohamedGhardallou
Copy link
Author

MohamedGhardallou commented Oct 3, 2023

the bug is apparently related to the use of external environment variables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant