Author Topic: Action Language usage  (Read 1955 times)

Chris_Reynolds

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
  • Poets have been curiously silent about cheese.
    • View Profile
Action Language usage
« on: December 11, 2002, 12:13:01 pm »
I am trying to document a crop management system and the question concerns how to document how a boringly simple transaction can trigger a state change on it's parent.

For instance, a truck of peas arrives at a weighbridge from a given paddock. For the purposes of this discussion the stand of peas in the particular field is modelled as a crop with an interesting life-cycle {planned, planted, sampling, harvesting, harvested,cancelled}. The transition from sampling to harvesting is show by a 'harvesting-in-progress' signal on the statechart.
There will be several truck-loads from that paddock of peas and each weigh-bridge transaction is called an 'intake'. For the purposes of my scope, an intake is boring. it is created (and may be deleted if it was in error).

If I am using an action language for detailed specification (and hopefully generation), do people think the best place to document the first intake generating the paddock's harvesting-in-progress signal would be :-
1. In the intake notes field with some sort of 'create event' syntax.
2. On the intake/crop-association notes field with some sort of 'create event' syntax.
3. Create a trivial statechart on the intake and document it on the create transition.
4. Create an activity diagram and somehow associate it with the intake.

And finally, is this the sort of question that this new forum is about? 8)

jaimeglz

  • EA User
  • **
  • Posts: 164
  • Karma: +0/-0
    • View Profile
Re: Action Language usage
« Reply #1 on: December 12, 2002, 07:06:56 am »
Hi Chris,

Yes: yours is certainly the type of question that belongs in this forum. But let me ask you (and excuse my ignorance): What is an "action language"? Is is something like the Object Constraint Language (OCL) thas was used in UML's metamodel?

Jaime
« Last Edit: December 12, 2002, 07:46:26 am by jaimeglz »

Chris_Reynolds

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
  • Poets have been curiously silent about cheese.
    • View Profile
Re: Action Language usage
« Reply #2 on: December 12, 2002, 10:13:31 am »
OCL is passive.
Action Language is a sort of simple procedurual language that can be used to more fully describe the dynamics.
It stems from the real-time work of Schler(?) and Mellor but I find it useful for business process stuff.
see http://www.omg.org

jaimeglz

  • EA User
  • **
  • Posts: 164
  • Karma: +0/-0
    • View Profile
Re: Action Language usage
« Reply #3 on: December 15, 2002, 08:23:12 pm »
On Dec. 11 you described the following scenario:

"There will be several truck-loads from that paddock of peas and each weigh-bridge transaction is called an 'intake'. For the purposes of my scope, an intake is boring. it is created (and may be deleted if it was in error).

"If I am using an action language for detailed specification (and hopefully generation), do people think the best place to document the first intake generating the paddock's harvesting-in-progress signal would be..."

Even if I'm not familiar with what an action language is (and did not find a description of it by searching the OMG's web page), here's my two cents worth on your question:

The most important thing to model is the event of the truck arriving at the weight-bridge. This is the confirmation of the fact that the peas have begun the state transition of "harvesting in progress".

When the last truck has arrived (is there a way to signal this?), "harvesting in progress" ends, which happens while the next state (┐selection? ┐prepacking?) is process.

The challenge here is to handle embedded states: while harvesting is in progress, instances of the the pea class (pea_truckload, or something similar) are already undergoing other state transitions.

The way I would model it is as a sequence diagram with states (see Rumbaugh et al.: The Unified Modeling Language Reference Manual, p. 426, in "13. Encyclopedia of Terms", under "sequence diagram". See also my posting for this in the EA forum, two or three months ago).

Trucks keep arriving at the weight bridge, modeled as a message with *iteration, that causes the instance to undergo a state transition, and the while loop ends the last truck arrives.

   Place an embeded messsage in between trucks arriving at the bridge, and the return signal. This embeded message touches off next state transition, and model it also as an *iteration

The return of the "trucks arriving" message closes the iteration loop

Of course, this is just a suggestion, and there are many other ways of modeling this: state machines and collaboration diagrams are two clear possiblities; but (correct me if I'm wrong) I don't think that the action language actually plays such an important part in the modeling of these transitions.

Hope this helps,

Jaime Gonzalez

Chris_Reynolds

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
  • Poets have been curiously silent about cheese.
    • View Profile
Re: Action Language usage
« Reply #4 on: December 15, 2002, 09:21:28 pm »
Personally I prefer to use interlocking statecharts rather than sequence diagrams. I think what I am missing is an ability to tie actions of the onenter-onexit variety (that may include signals to other objects)  directly into transition events.

Tom_Andries

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
  • Unlearn you must.
    • View Profile
Re: Action Language usage
« Reply #5 on: December 24, 2002, 05:59:45 am »
Chris,

I think it was Sally Schlaer, and if I'm not deadly wrong, she passed away not more then a year or so ago. Which, for the world of software engineering is as great a loss as it was to her family. There's just too few of those: there aren't enough that get through to management positions to really prove better processes provide better results.


It stems from the real-time work of Schler(?) and Mellor but I find it useful for business process stuff.
see http://www.omg.org

[/quote]

Tom Andries
     Associate
Method Innovation

dsg

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: Action Language usage
« Reply #6 on: April 29, 2003, 02:07:46 am »
I believe that the proposed UML 2.0 standard provides some additional guidelines for this sort of thing. That you may like to consider adopting

From what I have seen it uses additional/expanded diagrams to formally describe what happens in each state in collaboration with OAL, the semantics but not syntax of which is defined by the OMG.

I think the OAL work is derived from the work done in the Bridgeport UML tools see http://www.projtech.com/pubs/ for details of the language etc.  Additionally some of this work is derived from SDL in the telecomm area.

Telelogic have produced a first cut UML 2.0 tool in the form of TAU 2.0 and Ilogix are close behind. They both have a couple of white papers discussing this on there web sites see: -

http://www.telelogic.com & http://www.ilogix.com

The new diagrams use the existing send and receive signal diagram elements and so could probably be created within EA.

If you intend to model this behavior in code I suggest you look at the excellent quantum-programming framework as it will make coding up you state machines far simpler. See

http://www.quantum-leaps.com/