Skip to content

Interpreter: bug in parallel action and assignment? #293

@richardpaynea55

Description

@richardpaynea55

This is related to an earlier bug about replicated parallelism. When I use an action with replicated parallelism, only one of the replications allows state to be updated. In the model below:

channels
  inA : nat * nat
  outA : nat * nat

process p = 
begin
  state
    a: nat :=0

  operations
    updateA : nat ==> ()
    updateA(newA) == 
      a := newA

  @ ||| n in set {1,...,3} @ [{}] inA.n!a -> updateA(n); outA!n!a -> Skip

end

I obtain various trace options, including:

[inA.3.0, outA.3.3, inA.1.0, outA.1.0, inA.2.0, outA.2.0]
[inA.1.0, outA.1.0, inA.3.0, outA.3.3, inA.2.0, outA.2.0]

It appears that the state variable a is updated only when n=3. I am assuming there is no shared state (which would result in a=6), and it seems that only one of the replication branches allows assignments to hold.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions