Skip to content

Commit

Permalink
typo and remove missing return
Browse files Browse the repository at this point in the history
  • Loading branch information
thorstink committed Jan 6, 2024
1 parent 6b1da1f commit ef2fd78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/symmetri_nets.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ In Symmetri, transitions represent callbacks. The topology of a Petri net determ

## Conflict and priorities

There is also the complication of conflict. Conflict arises if two or more transitions are simultaneously active and share input places - forcing a choice to fire one of the active transitions. In the basic definition of a Petri net, firing is non-deterministic, so a random active transitions is fired, disabling the other transition. It is possible to define a firing policy to make firing in such cases deterministic. One way to achieve this is by [assigning priorities](https://en.wikipedia.org/wiki/Prioritised_Petri_net) (as integers) to transitions. In cases of conflict, the transitions are fired in order of priorities. In the case of equal priorities, the original conflict arises again. This can be mitigated by a higher priority granularity or a specifically tailored policy. In Symmetri we allow only priorities ranging from -128 to 127, and where 0 is the default priority. Priorities should be a ‘tool of last resort’ - and conflict should ideally be avoided when designing the Petri net.
There is also the complication of conflict. Conflict arises if two or more transitions are simultaneously active and share input places - forcing a choice to fire one of the active transitions. In the basic definition of a Petri net, firing is non-deterministic, so a random active transition is fired, disabling the other transition. It is possible to define a firing policy to make firing in such cases deterministic. One way to achieve this is by [assigning priorities](https://en.wikipedia.org/wiki/Prioritised_Petri_net) (as integers) to transitions. In cases of conflict, the transitions are fired in order of priorities. In the case of equal priorities, the original conflict arises again. This can be mitigated by a higher priority granularity or a specifically tailored policy. In Symmetri we allow only priorities ranging from -128 to 127, and where 0 is the default priority. Priorities should be a ‘tool of last resort’ - and conflict should ideally be avoided when designing the Petri net.

## Failure at the level of transitions

Expand Down
6 changes: 2 additions & 4 deletions symmetri/include/symmetri/callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ bool isSynchronous(const T &) {
* @brief The default cancel implementation is naive. It only returns a
* user-exit state and does nothing to the actual Callback itself, and it will
* still complete. Because the transition is by default not cancelled, it will
* produce a reducer, however, it will never be processed.
* produce a reducer which potentially can still be processed.
*
* @tparam T the type of the callback.
* @return Token, can be used to return the state at the moment on
* cancellation.
*/
template <typename T>
void cancel(const T &) {}
Expand Down Expand Up @@ -73,7 +71,7 @@ Token fire(const T &callback) {
}

/**
* @brief Get the Log object. By default it returns an empty list.
* @brief Get the Log object. By default it returns an empty vector.
*
* @tparam T the type of the callback.
* @return Eventlog
Expand Down

0 comments on commit ef2fd78

Please sign in to comment.