Boost logo

Boost Users :

From: Andreas Huber (ahd6974-spamgroupstrap_at_[hidden])
Date: 2006-05-03 15:15:52


Tim Milward wrote:
> Adding an intermediate state containing S00 and S01 and moving E into
> that but making it external is not equivalent. For example
> transitioning via E from S000 to S000 would call the entry & exit
> actions for S00. Putting the intermediate state inside S00 doesn't
> work either because you've lost the ability to transition from S01 to
> S000.

Ok, I misunderstood how local transitions work. An innermost state where
any of its direct *or* *indirect* outer states define local transitions
behaves as if all those local transitions originated at the state
itself. I guess we'll have to go the sc::local_transition /
sc::simple_state::transit_locally route then...

>> 1. The modification in the history case should be trivial and
>> non-breaking, I guess I should be able to come up with a beta before
>> next Sunday. Would you be willing to test it?
>
> I would be glad to, but unfortunately I may be away around that time.

I won't make it anyway, I just learned that I'll have to do some
overtime at work before I can leave for my holidays. After the holidays
there'll typically be another hot week so I won't have anything before
start of June. Sorry.

> It's interesting that you have to treat shallow and deep history
> separately, since the shallow history can (in theory) be automatically
> determined from the deep history.

I don't really have to, it's just the way it's currently implemented.
What you say occurred to me also but at that time (about 2.5 years ago)
would have meant major changes in the then existing history facility. I
believe it would be much easier now as the history implementation has
evolved quite a bit since then.

> [I'd like to see an nth level
> history
> in UML. n=infinity is deep, n=1 is shallow, n<0 and you count levels
> up from the bottom (for example).]

I'm not sure whether that's so useful in practice. IIRC, I could have
benefitted from such history just once, where I used shallow history
initial states that were nested over two levels. I guess I could've
implemented that with n=2 and saved some repetition... Who knows, if I
ever get around to do more refactoring I might support such history.

> Something to think about then. I don't have a good enough
> understanding
> of the library yet to comment on the best approach. When I come across
> any real examples in my work that need local transitions I'll let you
> know.

As stated above, I'm now convinced that support for local transitions
must be added to Boost.Statechart in some way but I'll have to think
some more what the best approach is...

Thanks & Regards,

-- 
Andreas Huber
When replying by private email, please remove the words spam and trap
from the address shown in the header. 

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net