Boost logo

Boost :

Subject: Re: [boost] [MSM] Is there any interest in C++14 Boost.MSM-eUML like library which compiles up to 60x quicker whilst being a slightly faster too?
From: Rob Stewart (rob.stewart_at_[hidden])
Date: 2016-02-03 04:36:09

On February 2, 2016 4:29:35 PM EST, Krzysztof Jusiak <krzysztof_at_[hidden]> wrote:
> If it comes to the transition table DSL. I was concidering a lot of
> options. For example MSM3(eUML2) is using src + event [guard] / action
> -> dst
> which looks great, however, having a dst state at the end is not
> really
> practical, especially after a lot of noice introduced by guard and
> actions
> (for example in place lambda expressions).


> Right now, I'm thinking of introducing DSL which would look like that.
> make_transition_table(
> "idle* -> state1"_t + event [ guard ] / action
> , "state1 -> X"_t [ guard ] / action
> );
> Nevertheless, I'm not sure whether such approach would be seen
> positively
> because following MSM approach it should be more like that.
> make_transition_table(
> "state1 <- idle*"_t + event [ guard ] / action
> , "X <- state1"_t [ guard ] / action
> );

We're accustomed to seeing the target on the left of an assignment, so what about "state1 = idle*"?

I get your interest in seeing the current state on the left, because the transition is from the current state to the new one. If there can be multiple transitions from one state, the only readable form puts the current state first, IMO. Using "if_" or "when" to separate the transition from the condition might help:

(from -> to).when(event[guard]/condition)

You could omit "when" with the parens:

from -> to (event[guard]/condition)


(Sent from my portable computation engine)

Boost list run by bdawes at, gregod at, cpdaniel at, john at