0
votes

Is an activity diagram is considered algorithmic?

3
What do you mean by algorithmic - Enrique
Honestly, I thought the same thing. It was a question on an exam, and no matter how hard I search, I can't find an answer to it. Seems like a strangely worded question. - mrwienerdog

3 Answers

4
votes

Strange question indeed. Taking a look at dictionary definitions:

  • Algorithmic: of or relating to or having the characteristics of an algorithm
  • Algorithm(1): a precise rule (or set of rules) specifying how to solve some problem
  • Algorithm(2): an effective method for solving a problem expressed as a finite sequence of steps.

So: can Activity Diagrams be used to describe "a method for solving problems expressed as a finite sequence of steps"? Yes - that's their purpose. They support all the usual control structures required to describe algorithms: sequence (A followed by B), alternation (either A or B), iteration. They also provide explicit support for parallel activity.

Areas where they may be considered weak:

  1. The execution semantics are not precisely and unambiguously defined. Whilst the UML spec does provide some semantics, it leaves some points open.
  2. There's no pre-defined set of primitive types defined for Activity Diagrams. Thus, the lowest level primitive activities (adding integers, concatenating strings, etc.) aren't pre-defined. In that sense Activity Diagrams on their own aren't computationally complete.

However: those are nitpicking theoretics. In practice, Activity Diagrams are a popular means to represent algorithms: from the design of software procedures to specifying business processes.

Of course, it all comes down to your definition of algorithmic. If you go with the general definitions above then ADs are algorithmic. If you go with something more specific they might not be.

hth.

1
votes

OMG Meta-Models (i.e. UML, SysML, etc.), starting from the Meta-Meta-Modeling language by means of which they are described (MOF), consists of two different classes of models respectively aimed at definining:

  • The static structure of a system, or architecture (i.e. Class Diagram, Component Diagram, Block Diagram, etc.);

  • The dynamic of the system, or behaviours (i.e. sequence diagram, activity diagrams, state machine diagrams, object interaction diagrams, etc.)

Activity diagrams belong to the second class so they are aimed at describing behaviours. an algorithmic is only of type of behaviour that can be described by means of an activity diagram

1
votes

Activity diagrams complemented with the new UML executable standards can be used to represent any algorithm. Activity diagrams alone can be used to represent the overall control flow but not really the details of data management