Improving The Consistency of Spem-Based Software Processes: Eliana B. Pereira, Ricardo M. Bastos, Michael Da C. Móra
Improving The Consistency of Spem-Based Software Processes: Eliana B. Pereira, Ricardo M. Bastos, Michael Da C. Móra
Improving The Consistency of Spem-Based Software Processes: Eliana B. Pereira, Ricardo M. Bastos, Michael Da C. Móra
SOFTWARE PROCESSES
Toacy C. Oliveira
COPPE Department, Federal University of Rio de Janeiro, Rio de Janeiro, Brazil
[email protected]
Abstract: The main purpose of this paper is to improve the consistency of Spem-Based Software Processes through a
set of well-formedness rules that check for errors in a software process. The well-formedness rules are based
on the SPEM 2.0 metamodel and described using the Unified Modeling Language - UML multiplicity and
First-Order Predicate Logic - FOLP. In this paper, the use of the well-formedness rules is exemplified
using a part of the OpenUP process and the evaluation of the one of the proposed rules is shown.
It is important to consider that both models role allocations. As a result, using a process
presented in Figure 2 and Figure 3 had some metamodel can be cumbersome as the user must deal
multiplicities modified from the SPEM original with several concepts to represent a process.
metamodel. This is so because these models already According to (Atkinson et al., 2007), the errors in a
represent models of sSPEM 2.0 and include some software process are most often introduced by a
well-formedness rules proposed in this paper (which modeller and related to syntax or typographical
will be explained in Section 5). mistakes that affect the process consistency. A
modeller might, for example, make a simple error by
connecting a work product that still was not
produced in the software process as an input in a
task. It would break a dependency because the task
was expecting an unavailable work product.
To avoid errors in a process we propose checking
it before enactment. Process checking is the activity
of verifying the correctness and the consistency of a
process. In this paper, process checking is made
from a set of well-formedness rules specified from
the SPEM 2.0 metamodel. The well-formedness
rules are associated with the metamodel classes and
Figure 3 - Relationships of the TaskUse Class relationships which represent the process elements
and their relations. Every instance of process
4.2 Errors in a Software Process elements and relationships that have one or more
associated well-formedness rules is checked. If
We consider that errors in a process are motivated violated, error messages appear. In the next section,
mainly by the following two reasons: (1) process we explain our well-formedness rules. Some rules
metamodels are typically specified with UML class are expressed using UML multiplicity and others,
diagrams, which are only capable of representing which involve more elements and/or express more
simple multiplicity constraints. As a result they need elaborated rules, are described in FOLP.
an external language such OCL or Natural Language
to represent complex restrictions. As with SPEM
2.0, most constraints are represented in Natural 5 PROCESS CHECKING
Language, which can lead to interpretation errors;
and (2) software process metamodels are usually In this section we describe a set of well-formedness
composed by several elements as they must rules related to software process correctness and
represent activity workflows, information flows and consistency. We propose using these rules for
process checking. The well-formedness rules from software process. (Rule #4); 2) Tasks must have
this research were defined considering the concepts input and/or outputs in terms of work products and
defined in the Process Structure and Process with must be performed by roles. (Rules #1, #2 and #5);
Methods packages of SPEM 2.0 metamodel. and 3) Roles need perform tasks. (Rule #3).
Although the Method Content package has also Since not all well-formedness rules could be
important concepts for software process it only expressed through UML diagrammatic notation we
defines reusable content which is used through the introduced first-order predicate logic (FOLP). To
classes of the Process with Methods package. write the rules, we first translate the classes,
relationships and attributes of SPEM 2.0 metamodel
5.1 Well-Formedness Rules into predicates and logical axioms. Due to space
constraints, the translation is not detailed here. We
As the SPEM metamodel is represented by UML assume that each class and attribute of the
class diagrams we consider that many constraints metamodel represents a predicate. For example, the
already exist in this metamodel through the ProcessPerformer class and its attributes
multiplicity used between the classes. The following linkedRoleUse and linkedTaskUse are expressed
rule is one that is already defined in the SPEM 2.0 using the following predicates:
metamodel and constraints process multiplicity: a processPerformer(x) where x is a instance of a
Process Performer must be associated to exactly one ProcessPerformer. (P1)
TaskUse. There is a “linkedTaskUse” relationship linkedRoleUse(x, y) where x is a instance of a
between TaskUse and Process Performer classes. ProcessPerformer and y is a instance of RoleUse. (P2)
The multiplicity is constrained to have only one linkedTaskUse(x, y) where x is a instance of a
relationship. ProcessPerformer and y is a instance of TaskUse. (P3)
Considering all multiplicities defined between The composition relationship which is a special
the classes of the Process Structure and Process with type of UML association used to model a "whole to
Methods packages we have noted that its parts" relationship is represented in FOLP with
inconsistencies may be introduced into a software the predicate part-of(x,y). In this predicate, x is an
process. For example, it is possible create tasks that instance of part and y represents its whole.
are not performed by anybody because a TaskUse Considering the properties defined in UML for this
can be associated to 0..* ProcessPerformers. This type of association the following logic axioms are
type of error could be introduced by an oversight defined:
that may hinder enactment since every task must be
performed by at least one agent (human or ∀x part-of(x,x) (A1)
automated agent). ∀x,y (part-of(x,y) part-of(y,x)) (A2)
To solve the problem above and others similar to ∀x,y,z (part-of(x,y) part-of(y,z) part-of(x,z)) (A3)
it, we have started our work by redefining some ∀x,y,z (part-of(x,y) part-of(x,z)) (A4)
relationships in the SPEM 2.0 metamodel. The
Some additional predicates that express usual
modified relationships define the rules shown in
relations in a software process were also created.
Table 1. In this Table, each rule contains a
Such predicates are needed as they are reused for
numeration to ease its identification.
many different well-formedness rules. For example,
Table 1 - Relationships modified in SPEM 2.0 the following predicates represent, respectively, a
A TaskUse must be associated to at least one work product that is produced by a task and the
ProcessPerformer. (Rule #1) dependency relationship between two work
A ProcessParameter must be associated to exactly one products. Dependency relationships are used to
WorkProductUse. (Rule #2) express that one work product depends on another
A RoleUse must be associated to at least one work product to be produced in a software process.
ProcessPerformer. (Rule #3) ∀x,y,z((taskUse(x)workProductUse(z)processParameter(y)
A WorkProductUse must be associated to at least one direction(y,‘out’)parameterType(y,z)part-of(y,x))
ProcessResponsabilityAssignment. (Rule #4) taskProduce(x, z)) (P4)
A TaskUse must have at least one ProcessParameter.
(Rule #5 ) ∀z,x,y((workProductUse(x)workProductUse(y)
The classes and relationships that represent the (workProductUseRelationship(z) kind(z,‘dependency’)
source(z, x) target(z, y))) dependency(x, y)) (P5)
rules above are depicted in Figure 2 and Figure 3.
Basically, the rules presented define: 1) Work Similar predicates also exist for the modification
products need to have roles assigned to it in a and consumption relations of the work products by
the tasks in a software process. Such relations are association represented by the part-of predicate.
obtained just replacing the value of the constant These relationships are expressed using UML
‘out’ of the direction predicate by ‘in’ or ‘inout’. classes and attributes and consequently, need to be
When the ‘in’ value is used we have the predicate represented by other predicates and constrained by
taskConsume(x, z) (P6) and when the ‘inout’ value is new rules.
used we have the predicate taskModify(x, z) (P7).
Table 2 – First Well-Formedness Rules to WorkProducts
Activities have the same relations of input and
output (production, consumption and modification) ∀x,y (composition(x,y) composition(y,x)) (Rule # 6)
with work products, so we have considered similar ∀x,y (aggretation(x,y) aggretation(y,x)) (Rule # 7)
predicates to these elements (P8, P9 and P10). ∀x,y (dependency(x,y) dependency(y,x)) (Rule # 8)
Work products also may assume other types of ∀x composition(x,x) (Rule # 9)
relationships, in addition to the dependency ∀x aggretation(x,x) (Rule # 10)
relationship. In the SPEM 2.0 metamodel these types ∀x dependency(x,x) (Rule # 11)
of relationships are „composition’ and „aggregation’. ∀x,y,z (composition(x,y) composition(x,z))
Both relationships express that a work product (Rule # 12)
instance is part of another work product instance. A second important group of consistency well-
However, in the composition relationship the parts formedness rules to the WorkProductUse written in
lifecycle (child work products) are dependent on the FOLP are shown in Table 3.
parent lifecycle (parent work product). The Table 3 - Second Group of Well-Formedness Rules to
composition and aggregation predicates just replace WorkProducts
the value of the constant „dependency’ of the kind
predicate by „composition’ or „aggregation’ (P11, ∀x (workProductUse(x) y (processParameter(y)
P12 and P13). direction(y, ‘out’) parameterType(y, x))) (Rule #13)
The composition, aggregation and dependency ∀x,y(taskProduce(x,y)r,w,z(roleUse(r)processPerf
relationships between work products are transitive omer(z)linkedTaskUse(z,x)linkedRoleUse(z,r))pro
relations. The logical axioms bellow formalizing this cessResponsabilityAssignment(w)linkedRoleUse(w,r)
property: linkedWorkProductUse(w,y)))) (Rule #14 )
∀ x,y,t (workProductUse(x) dependency(x,y)
∀x,y,z(composition(x,y)composition(y,z) taskProduce(t,x) taskConsume(t,y)) (Rule #15)
composition(x,z)) (A5)
∀x,y,z(aggretation(x,y)aggretation(y,z) The well-formedness rules above establish: 1)
aggretation(x,z)) (A6) Work products must be produced by at least one task
∀x,y,z(dependency(x,y)dependency(y,z) in a software process. (Rule #13); 2) At least one
dependency(x,z)) (A7) responsible role by the work product must be
associated in its production tasks. (Rule #14); and 3)
Considering the predicate and logical axioms If a work product has dependencies in terms of other
above the first consistency well-formedness rules to work products these dependencies must be input in
WorkProductUse were expressed in FOLP. They are its production tasks. (Rule #15)
presented in the Table 2 and define: 1) A work The last group of well-formedness rules are
product may not be the whole in a relationship related to TaskUses sequencing. To establish the
(composition, aggregation or dependency) if one of tasks sequence from SPEM 2.0 metamodel the
its parts represent its whole in another relationship WorkSequence class and its linkKind attribute are
or represent its whole by the relation transitivity. used. It is possible using the following values in
(Rule #6, #7 and #8); 2) A work product may not sequencing between TaskUses: finishToStart,
represent the whole and the part in the same finishToFinish, startToStart and startToFinish.
relationship (composition, aggregation or Some predicates and logical axioms related to
dependency). (Rules #9, #10 and #11); and 3) A precedence between the tasks were created. Initially,
work product that represents the part in a to capture the concept of successor and predecessor
composition relationship may not represent part in task we have defined the predicates pre-task(t1, t2)
another relationship of this type. (Rule #12) and pos-task(t2, t1), where t1 and t2 are TaskUse
Note that the well-formedness rules above define instances and indicate, respectively, t1 as predecessor
the same properties that logical axioms of the part-of task of t2, or, inversely, t2 as successor task of t1. The
predicate. However, the well-formedness rules are predicates pre and pos-task are transitive and
necessary once the relationships between the work asymmetric relations. The following logical axioms
products are not expressed using the UML establish these properties to these relations:
products (inputs and outputs). All information
∀(t1, t2) (pre-task(t1, t2) pos-task(t2, t1)) (A8)
shown in the Figure 4 is based on the OpenUP
∀(t1, t2, t3) (pre-task(t1, t2) pre-task(t2, t3) pre- process except the Rule Test which was introduced
task(t1, t3)) (A9) by us only for this evaluation. Originally, in
∀(t1, t2) (pre-task(t1, t2) pre-task(t2, t1)) (A10) OpenUP, the Analyst is also responsible for the
∀ t1 pre-task(t1, t1) (A11) Vision work product.
Based on the predicates and logical axioms
related to precedence between tasks we have defined
new consistency well-formedness rules. These rules,
shown in Table 4, define: 1) The tasks sequencing
must not have duplicated sequences. (Rule #16) 2)
Work Products must be produced before they are
consumed. (Rule #17) and 3) The dependencies of a
work product must be produced before it in a
software process. (Rule #18)
The well-formedness rule #16 shown in the
Table 4 is only to startToFinish transition. Consider
the same rule to the following transitions:
startToStart, finishToFinish and startToFinish.
Table 4 - Well-Formedness Rules to Process Sequence
Figure 4 - Inception Iteration of the OpenUp
∀x,x1,x2((taskUse(x1)taskUse(x2) (workSequence(x)
predecessor(x, x1) sucessor(x, x2) linkKind(x, One of the tasks of Figure 4 (Develop Vision) is
‘startToFinish’)))y(workSequence(y)predecessor also represented with a UML object diagram, which
(x,x1) sucessor(x,x2) linkKind(x, ‘startToFinish’))) is shown in Figure 5. The object diagram show the
(Rule #16) class instances of the SPEM 2.0 used to create tasks,
∀x, y (taskConsume(x, y) x2 (taskProduce(x2, y) work products, roles and their relationships in a
pre-task(x2, x))) (Rule #17) software process. In Figure 5 letters are used to
∀ x,y (dependency(x,y) t1, t2 (taskProduce(t1, x) facilitate its understanding. The letter A indicates the
taskProduce(t2, y) pre-task(t2,t1))) (Rule #18) WorkProductUse classes used to create the objects
Vision and Glossary. The letter B represents the
objects 01 and 02, which are instances of the
ProcessParameter class. These kinds of objects
6 EVALUATION OF THE WELL- represent the inputs and outputs to the task objects.
FORMEDNESS RULES In Figure 5, the object that represents a task is
represented by the DV (Develop Vision) identifier.
This section presents a process checking example This object is an instance of TaskUse class and is
using a part of the OpenUP process. The section also indicated in the Figure 5 by the letter C. The objects
evaluates one of the well-formedness rules proposed representing instances of the RoleUse class are
in this paper. The main goal is demonstrate that the indicated in Figure 5 by the letter D. Finally, the
predicates and logical axioms used in the well- letters E and F represent, respectively, objects of the
formedness rules really express the intended ProcessResponsabilityAssignment (object 01 and 02)
meaning. and ProcessPerformer classes (object 02). The
instances of the ProcessResponsabilityAssignment
6.1 Process Checking Example are used to define roles as responsible for work
products and the instances of the ProcessPerformer
To present a process checking example we have are used to link roles as performer to the tasks.
considered the Inception Iteration of the OpenUP As seen, all process information of this example
process, which is shown in Figure 4. In this Figure, may be represented using classes and relationships
above the dash line, the activities and tasks of the of the SPEM 2.0. It means that the used process is
iteration are represented. Additionally, some compliance with the SPEM 2.0 metamodel. Another
information about activities sequence is also shown. fact that shows the consistency of the used process is
Below the dash line, the tasks of the Initiate Project the validation result of the object diagram found in
activity are detailed in terms of roles and work
the case tools like Rational Software Modeler. This t::= „02‟ t is the Process Parameter „02‟ with
validation result is error free. direction equal to „out‟ and
However, as mentioned in Section 4, not all need parameterType equal to „Vision‟
information in a software process can be expressed z::= „02‟ z is the ProcessPerformer „02‟ with
using only the UML language. Thus, when we carry linkedRoleUse equal to „Analyst‟ and
linkedTaskUse equal to „Develop
out the checking in the same process using our well- Vision‟
formedness rules it presented errors indicating some w::= „01‟ w is the
inconsistencies. The first inconsistency of the ProcessResponsabilityAssignment „01‟
software process used in this example is in the task with linkedRoleUse equal to „Rule
Develop Vision. As seen in Figure 4, the task Test‟ and linkedWorkProductUse equal
Develop Vision produces the work product Vision to „Vision‟
which has as responsible role the role Rule Test.
We have evaluated the task Develop Vision
This role does not perform the task Develop Vision
which presents an error in the software process. The
and this fact violates the Rule #14 which defines that
formalization of the Rule #14 is the following:
at least on responsible role of a work product must
participate of their production tasks. Another ∀x,y(taskProduce(x, y) r, w, z (roleUse(r)
problem can be seen in the task Plan Project. Note processPerfomer(z)linkedTaskUse(z,x)linkedRoleU
that this task has as mandatory inputs the work se(z,r))processResponsabilityAssignment(w)linkedR
products Use Case, Use Case Model and System- oleUse(w,r)linkedWorkProductUse(w,y))))
Wide Requirements which are not yet produced in This rule uses the taskProduce(x, y) that is
the software process when this task is performed. represented by the following sentence in FOLP:
This inconsistency violates the Rule #17.
∀x,y,t((taskUse(x)workProductUse(y)processParam
eter(t) direction(t, ‘out’) parameterType(t, y)) part-
of(t, x)) taskProduce(x, y))