RIAPS / riaps-pycom

Python implementation of the RIAPS component model
Apache License 2.0
7 stars 8 forks source link

Cannot disable leader in riaps file #180

Closed imadari closed 4 years ago

imadari commented 4 years ago

The code assumes that the leader can be disabled, however the RIAPS language doesn't allow that.

In relevant code the else part never runs, because self.coordinated cannot be False. self.coordinated is assigned here.

Related part in the RIAPS language.

gkarsai commented 4 years ago

The syntax for groups is: Group: 'group' name=ID (kind=GroupKind)? 'using' message=[Message] (timed='timed')? ';' ;

GroupKind: 'with' (kind='leader' | kind='consensus') ; If the 'kind' clause is missing, it is 'default', i.e. no leader election/etc. See small fix in riaps/run/dc.py: do not throw exception if an uncoordinated group is used.