Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Usage of StateMachine or ProtocolStateMachine
Usage of StateMachine or ProtocolStateMachine [message #477535] Wed, 18 June 2008 08:51 Go to next message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Hello,

i'm not a native english speaker, and sometimes, the similiar sounding
descriptions in the UML Superstructure confusing me. Yesterday, i explored
the differences between StateMachines and ProtocolStateMachines, but i
think, i don't get it at all. It would be nice, if someone could explain
respectively correct me with a not so formalistic kind of speech, if my
following opinion is wrong.

StateMachines are used to describe the behavior of an Classifier. Therefore,
the transitions can be connect with an event (Function Behavior), that is
specificate by any Behavior, that was defined for this Cassifier. Due to the
fact, that an StateMachine is the specialization of Behavior, it is possible
to activate another StateMachine, precisly an included StateMachine, from
within an Transition. StateMachines allows to define very complex scenarios.
But a StateMachine didn't requires to be specified inside of an Classifier.
It is also allowed to define them on their own.

However, ProtocolStateMachines are used for concrete operation calls, and
they forces to be defined in the context of a Classifier, contarty to
StateMachines. So, if opne would model the dynamic behavior for an Class,
for instance, he should use a ProtocalStateMachine, because with it, it is
possible to connect the transition directly to an Operation of the
Classifier instead of with an generic behavior, which could be any
specialization of an Behavior.

Am i right?

Thanks a lot
--Timothy
Re: Usage of StateMachine or ProtocolStateMachine [message #477546 is a reply to message #477535] Fri, 20 June 2008 18:41 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Timothy,

I double checked you question with an OMG member and this is the
response....
Protocol state machines are intended to be used with UML Interfaces to
describe constraints on how the various features of an Interface are to be
used (i.e.., the valid order of accesses to the features). In contrast to
"regular" state machines, protocol state machines do not describe any actual
behavior but only constraints. The guards specify preconditions whereas the
transition actions do not specify behavior that is to be executed but the
postcondition that must hold when a transition is taken. You can think of
them as a special kind of "assert" instructions (as in C or C++) or as Hoare
triples that are dynamically dependent on previous input (i.e., state). You
would never use them to describe the behavior of a Classifier, but only to
define constraints that the behavior of a classifier should conform to.

So, the proposition in the question below is incorrect -- in fact, exactly
the opposite is true.


Cheers,
- James.


"Timothy Marc" <timothymarc@freenet.de> wrote in message
news:g3aia1$vbm$1@build.eclipse.org...
> Hello,
>
> i'm not a native english speaker, and sometimes, the similiar sounding
> descriptions in the UML Superstructure confusing me. Yesterday, i explored
> the differences between StateMachines and ProtocolStateMachines, but i
> think, i don't get it at all. It would be nice, if someone could explain
> respectively correct me with a not so formalistic kind of speech, if my
> following opinion is wrong.
>
> StateMachines are used to describe the behavior of an Classifier.
> Therefore, the transitions can be connect with an event (Function
> Behavior), that is specificate by any Behavior, that was defined for this
> Cassifier. Due to the fact, that an StateMachine is the specialization of
> Behavior, it is possible to activate another StateMachine, precisly an
> included StateMachine, from within an Transition. StateMachines allows to
> define very complex scenarios. But a StateMachine didn't requires to be
> specified inside of an Classifier. It is also allowed to define them on
> their own.
>
> However, ProtocolStateMachines are used for concrete operation calls, and
> they forces to be defined in the context of a Classifier, contarty to
> StateMachines. So, if opne would model the dynamic behavior for an Class,
> for instance, he should use a ProtocalStateMachine, because with it, it is
> possible to connect the transition directly to an Operation of the
> Classifier instead of with an generic behavior, which could be any
> specialization of an Behavior.
>
> Am i right?
>
> Thanks a lot
> --Timothy
>
Re: Usage of StateMachine or ProtocolStateMachine [message #477559 is a reply to message #477546] Mon, 30 June 2008 10:03 Go to previous message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Dear James,

wow, thank you for this understandable explanation. I wouldn't never get
this kind of interpretation from the UML superstructure.

Thanks a lot.
--Timothy
Re: Usage of StateMachine or ProtocolStateMachine [message #626736 is a reply to message #477535] Fri, 20 June 2008 18:41 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Timothy,

I double checked you question with an OMG member and this is the
response....
Protocol state machines are intended to be used with UML Interfaces to
describe constraints on how the various features of an Interface are to be
used (i.e.., the valid order of accesses to the features). In contrast to
"regular" state machines, protocol state machines do not describe any actual
behavior but only constraints. The guards specify preconditions whereas the
transition actions do not specify behavior that is to be executed but the
postcondition that must hold when a transition is taken. You can think of
them as a special kind of "assert" instructions (as in C or C++) or as Hoare
triples that are dynamically dependent on previous input (i.e., state). You
would never use them to describe the behavior of a Classifier, but only to
define constraints that the behavior of a classifier should conform to.

So, the proposition in the question below is incorrect -- in fact, exactly
the opposite is true.


Cheers,
- James.


"Timothy Marc" <timothymarc@freenet.de> wrote in message
news:g3aia1$vbm$1@build.eclipse.org...
> Hello,
>
> i'm not a native english speaker, and sometimes, the similiar sounding
> descriptions in the UML Superstructure confusing me. Yesterday, i explored
> the differences between StateMachines and ProtocolStateMachines, but i
> think, i don't get it at all. It would be nice, if someone could explain
> respectively correct me with a not so formalistic kind of speech, if my
> following opinion is wrong.
>
> StateMachines are used to describe the behavior of an Classifier.
> Therefore, the transitions can be connect with an event (Function
> Behavior), that is specificate by any Behavior, that was defined for this
> Cassifier. Due to the fact, that an StateMachine is the specialization of
> Behavior, it is possible to activate another StateMachine, precisly an
> included StateMachine, from within an Transition. StateMachines allows to
> define very complex scenarios. But a StateMachine didn't requires to be
> specified inside of an Classifier. It is also allowed to define them on
> their own.
>
> However, ProtocolStateMachines are used for concrete operation calls, and
> they forces to be defined in the context of a Classifier, contarty to
> StateMachines. So, if opne would model the dynamic behavior for an Class,
> for instance, he should use a ProtocalStateMachine, because with it, it is
> possible to connect the transition directly to an Operation of the
> Classifier instead of with an generic behavior, which could be any
> specialization of an Behavior.
>
> Am i right?
>
> Thanks a lot
> --Timothy
>
Re: Usage of StateMachine or ProtocolStateMachine [message #626750 is a reply to message #477546] Mon, 30 June 2008 10:03 Go to previous message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Dear James,

wow, thank you for this understandable explanation. I wouldn't never get
this kind of interpretation from the UML superstructure.

Thanks a lot.
--Timothy
Previous Topic:How to access referenced models
Next Topic:Re: Generate XMI instead of UML
Goto Forum:
  


Current Time: Thu Mar 28 21:03:35 GMT 2024

Powered by FUDForum. Page generated in 0.03110 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top