ArticlePDF Available

# Aspects across Software Life Cycle: A Goal-Driven Approach

Authors:

## Abstract and Figures

Goal modeling fits model-driven engineering (MDE) in that it captures stakeholder concerns and the interdependencies using concepts that are much less bound to the underlying implementation technology and are much closer to the problem languages. Aspect-oriented software development (AOSD) provides language constructs to facilitate the representation of multiple perceptions and to alleviate tangling and scattering concerns. Synthesis of AOSD and MDE not only manages software complexity but also improves productivity, as well as model quality and longevity. In this paper, we propose a model-driven framework for tracing aspects from requirements to implementation and testing, where goal models become engineering assets and straightforward model-to-code transformation bridges the gap between domain concepts and implementation technologies. We test our hypotheses and evaluate the framework’s applicability and usefulness with a case study of an open-source e-commerce platform written in PHP.
Content may be subject to copyright.
Aspects across Software Life Cycle: A
Goal-Driven Approach
Nan Niu1,YijunYu
2, Bruno Gonz´alez-Baixauli3,NeilErnst
1,
Julio Cesar Sampaio do Prado Leite4, and John Mylopoulos1
1Dept. of Computer Science, University of Toronto, Canada
{nn,nernst,jm}@cs.toronto.edu
2Computing Dept., The Open University, UK
y.yu@open.ac.uk
3Dept. de Inform´atica, Universidad de Valladolid, Spain
bbaixauli@infor.uva.es
4Dept. de Inform´atica, PUC-Rio, Brazil
julio@inf.puc-rio.br
Abstract. Goal modeling ﬁts model-driven engineering (MDE) in that
it captures stakeholder concerns and the interdependencies using con-
cepts that are much less bound to the underlying implementation tech-
nology and are much closer to the problem languages. Aspect-oriented
software development (AOSD) provides language constructs to facilitate
the representation of multiple perceptions and to alleviate tangling and
scattering concerns. Synthesis of AOSD and MDE not only manages
software complexity but also improves productivity, as well as model
quality and longevity. In this paper, we propose a model-driven frame-
work for tracing aspects from requirements to implementation and test-
ing, where goal models become engineering assets and straightforward
model-to-code transformation bridges the gap between domain concepts
and implementation technologies. We test our hypotheses and evaluate
the framework’s applicability and usefulness with a case study of an
open-source e-commerce platform written in PHP.
1 Introduction
We use models when we try to understand phenomena, when we think about
problems, when we construct mechanisms, when we describe solutions, and when
we communicate to each other. The role of modeling in engineering is similar:
Models help in developing artifacts by providing information about the conse-
quences of building those artifacts before they are actually made [20]. The use
of models in engineering software is pervasive across diﬀerent phases, from re-
quirements and design to veriﬁcation and validation. It is the emerging paradigm
of model-driven engineering (MDE) [36], which advocates the systematic use of
models as primary engineering artifacts throughout the software life cycle.
Model-driven engineering is simply the notion that we can construct a model
of a system that we can then transform into the real thing [36]. One of the
S. Katz et al. (Eds.): Transactions on AOSD VI, LNCS 5560, pp. 83–110, 2009.
c
Springer-Verlag Berlin Heidelberg 2009
84 N. Niu et al.
challenges faced in MDE is the escalating complexity of software and system
models [13]. For large-scale software development, the sheer size of models, the
intertwining relationships between intra- and inter-model elements, and the con-
cerns expressed across diﬀerent models present a high adoption barrier to MDE
practice. A fundamental principle in addressing complexity is separation of con-
cerns [32]. Maintaining a clear separation of concerns throughout the software life
cycle has long been a goal of the software community. Aspect-oriented software
development (AOSD) provides explicit means to model concerns that crosscut
multiple system components. It is argued that the synthesis of MDE and AOSD
can not only provide eﬀective support for managing software complexity but also
improve model quality and productivity [13].
In this paper, we propose a framework for tracing aspects from requirement
goal models to implementation and testing. Goal-oriented requirements engi-
neering (RE) uses goal models to elicit, specify, and analyze requirements [41].
We provide language support for modeling goal aspects and mechanisms for
transforming models to aspect-oriented programs. Test cases are derived from
requirements models to guide veriﬁcation and validation of aspects. The bene-
ﬁts of leveraging our framework are twofold. By separating crosscutting concerns
throughout requirements, implementation, and testing phases, we achieve a high
degree of modularity and traceability in software development. By driving im-
plementation and validation from stakeholder goals, we achieve a high level of
software quality and user satisfaction.
Our aim is to lay a foundation for goal-driven development techniques that
exploit aspect orientation to modularize concerns and to compose them into the
system implementation. We are also interested in exploring the extent to which
early aspects [1] can be traced and validated across software life cycle. To demon-
strate the idea, we present an exploratory case study showing the approach’s ap-
plication to an open-source e-commerce platform written in PHP. The purpose is
to describe our initial investigation into designing a model-driven framework for
capturing and implementing goal aspects, instantiate the framework to engineer
a real-world system, discuss the ﬁndings and preliminary results, examine costs,
beneﬁts, and the scope of applicability of the proposed framework, and open up
new research avenues arising from our investigation. Our work also helps replace
hype with sound technical insights and lessons learned from experience with
complex systems.
Preliminary work on goal aspects was published in [45,46,47]. The emphasis
of [45] was to discover candidate aspects during goal-oriented requirements anal-
ysis, while the idea of tracing and validating the early identiﬁed goal aspects was
sketched in [47] and detailed in [46]. This paper brings together the essentials from
our earlier work, integrates the full-ﬂedged aspect tracing method, and describes
a systematic empirical study, to oﬀer a more complete treatment and a more crit-
ical evaluation of our framework. Section 2 lays the background and provides the
context of our research. Section 3 articulates and discusses the goal-oriented
model-driven aspect framework. Section 4 presents the case study and reports
Aspects across Software Life Cycle: A Goal-Driven Approach 85
Fig. 1. A strategic dependency model for media shop
our experience. Section 5 reviews related work. Section 6 draws some concluding
remarks and outlines future work.
2 Background
This section aims to situate our research within the existing literature on RE,
MDE and AOSD.
2.1 Goal Models
Recent research in RE has generated a number of notations for modeling stake-
holder goals and the relationships between them. Goals express, at various levels
of abstraction, stakeholders’ many objectives for the system under considera-
tion. Goal-oriented RE uses goal models to elicit, elaborate, structure, specify,
analyze, negotiate, document, and modify requirements [41].
Goal modeling shifts the emphasis in requirements analysis to the actors in
an organization, their goals, and the interdependencies between those goals,
rather than focusing on processes and objects, as in, for example, object-oriented
analysis [2]. This helps us understand why a new system is needed and lets
us eﬀectively link software solutions to business needs. The iframework [44]
uses goal models to provide criteria for justifying the presence of requirements,
for determining requirements completeness and trade-oﬀs, and for validating
stakeholder concerns.
In i, stakeholders are represented as (social) actors who depend on each other
for goals to be achieved, tasks to be performed, and resources to be furnished.
Two types of models are involved in i: the strategic dependency model for
describing the network of relationships among actors and the strategic rationale
model for describing and supporting the reasoning that each actor goes through
concerning its relationships with other actors [44].
As an example, a strategic dependency model for media shop is shown in
Fig. 1. Media shop is a store selling diﬀerent kinds of media items such as books,
86 N. Niu et al.
newspapers, magazines, audio CDs, and videotapes. The goal models developed
for media shop were presented in detail in [5]. As shown in Fig. 1, actors are
represented as circles, dependums—goals, softgoals, tasks, and resources—are
respectively, represented as ovals, clouds, hexagons, and rectangles, and depen-
dencies have the form depender dependum dependee. In Fig. 1, for in-
stance, customer depends on media shop to buy media items and media shop,
in turn, depends on customer to increase market share. Modeling such depen-
dencies among organizational actors helps tease out the business goals of the
intended software.
Goal-modeling frameworks such as idistinguish between hard (functional)
goals—states that actors can attain—and softgoals, which can never be fully
satisﬁed. Non-functional requirements (NFRs) [6] such as reliability and eﬃ-
ciency are typically expressed as softgoals to suggest that the intended software
is expected to satisfy them within acceptable limits, rather than absolutely.
Extensive work on goal-oriented RE has been carried out for the past decade.
A guided tour of this line of research is given in [41]. Experience shows that goal
modeling is particularly useful in the early requirements analysis phase [44],
which is concerned with the understanding of a problem by studying and mod-
eling the intentions of stakeholders and the strategic relationships amongst those
organizational actors. To make goal models a true engineering asset that
drives software development beyond the early-RE phase, detailed design and
implementation of goal models must be sought.
2.2 Engineering Goal Models Using Agent-Oriented Programming
An earlier eﬀort to transform goal models into implementations was made in the
T ropos project [5]. The intuition is that using an agent-oriented programming
platform for the implementation seems natural, given that the requirements
model is deﬁned in terms of actors, goals, and interdependencies amongst them.
An agent is an entity whose state is viewed as consisting of mental components
(e.g., capabilities, choices, and commitments), and so agenthood is in the mind
of the programmer [39]. The T ropos programming environment is supported by
JACK, a commercial product based on the beliefs-desires-intentions (BDI) agent
architecture rooted in artiﬁcial intelligence [3].
The natural and basic transformation from requirements to design and im-
plementation is to map actors to agents. Then, resources and tasks in imodels
are mapped to beliefs and intentions, and both functional goals and softgoals
are mapped to desires in the BDI architecture. Model reﬁnement (e.g., decom-
positions and dependencies) and design generation are driven by the fulﬁllment
of each actor’s (agent’s) obligations.
A set of stereotypes, tagged values, and constraints are proposed to accommo-
date T ropos concepts with UML [2]. As an example, Fig. 2a depicts a reﬁned i
strategic dependency model for media shop in UML using the stereotypes deﬁned
in [5], notably iactor and idependency . Such mapping in UML
could also be done in a similar way for strategic rationale or goal analysis models.
Making further design decisions requires the introduction of additional details
Aspects across Software Life Cycle: A Goal-Driven Approach 87
Fig. 2. Representing imodels for media shop in UML with stereotypes. aStrategic
dependency model. bSequence diagram for ordering media items.
for each strategic actor and architectural component of a system. In T ropos,this
involves actor communication and actor behavior. Figure 2b presents such a de-
sign model for media shop: A sequence diagram that provides basic speciﬁcation
for an intra-agent order processing protocol.
Despite the eﬀort made by T ropos to implement imodels via agent-oriented
programming paradigm, a number of problems remain to be addressed. First,
agent-oriented programming has yet to prove its constructability and applicabil-
ity in mainstream software development, partly due to the lack of support for un-
derlying programming constructs and integrated development environments [4].
To overcome these deﬁciencies, the JACK intelligent agents development envi-
ronment adopts the widespread object-oriented (OO) concepts and extends the
popular Java language with the BDI model.
A second problem thus refers to the mismatch between agent and object ori-
entations, which can adversely aﬀect design reﬁnement and model transforma-
tion [4]. For example, the parameters for deﬁning an object are unconstrained,
whereas those for deﬁning an agent must be constrained by the notions of beliefs,
commitments, and choices. Another example is that no constraint needs to be
88 N. Niu et al.
speciﬁed on object message passing and responding, but honesty constraints on
agent methods must be speciﬁed [39]. A workaround solution used in T r opos,to
mitigate the mismatch, is to treat each actor as a single class, and then model
the behavior and communications among actors, as indicated in Fig. 2. However,
such an “actorclass” mapping is rarely the case in OO modeling and design.
For instance, to eﬀectively encapsulate information [2], we might design a single
“processor” abstract class, rather than having ﬁve distinct “processor” classes
in Fig. 2b. In this way, the specialized classes may be implemented as interfaces
atthecodelevel.
Third, the distinction between hard goals and softgoals made in the early-RE
phase is blurred in design and implementation because both are transformed to
desires in T ropos BDI. As we shall see, this distinction needs to be preserved
throughout the software life cycle. Our proposed approach aims at addressing
the above limitations by leveraging ideas and techniques from AOSD.
2.3 Goal Aspects
Aspect-oriented software development applies the principle of separation of con-
cerns [32] to make systems modular so that the intended software is easier to
produce, maintain, and evolve [17]. The AOSD community has recognized the
importance of considering aspects early on in the software life cycle during anal-
ysis and design, as opposed to only at the implementation stage [31]. Aspects at
the requirements level present stakeholder concerns that crosscut the problem
domain, with the potential for a broad impact on questions of scoping, prioriti-
zation, and architectural design [26]. Discovering aspects early can help detect
conﬂicting concerns early, when trade-oﬀs can be resolved more economically [1].
Aspects in goal models can be discovered using the correlations from hard
goals to softgoals along with a goal elicitation and reﬁnement process based on
the V-graph model [45]. The formal process can be brieﬂy explained as follows.
Initially, the stakeholders’ high-level concerns are elicited as abstract goals. The
functional ones are represented by hard goals and the non-functional ones are
represented by softgoals. Relations are also elicited as abstract contribution (cor-
relation) links from the hard goals to the softgoals that must be fulﬁlled by the
prescribed system-to-be.
During the reﬁnement process, these abstract goals are recursively decom-
posed into more concrete ones through AND/OR decomposition rules [44]. When
a goal gis AND-decomposed into g1,...,g
nthen gis satisﬁed if and only if gi
are satisﬁed for all 1 in.Ifgis OR-decomposed, it is satisﬁed if and only
if there exists an isuch that giis satisﬁed. As a result, several hierarchies of
the goal trees are derived. One must make sure that the abstract contribution
(correlation) links are maintained by introducing contribution links from more
concrete hard goals to the high-level softgoals.
At the end of the model reﬁnement, all abstract goals are decomposed into a
set of goals that no longer need further decompositions. A model is well reﬁned
if all intentional goals are operationalized, i.e. speciﬁc operations are deﬁned
for the intended software to fulﬁll the goals [8]. These leaf-level operations are
Aspects across Software Life Cycle: A Goal-Driven Approach 89
Fig. 3. Illustration of goal aspects in media shop imodel. Goal aspects, together with
their advising tasks, are represented as ﬁrst-class modules in the upper-right corner of
the goal model. The contribution links, from hard goals and functional tasks to goal
aspects, modularize the crosscuts that would otherwise be tangled and scattered in the
goal model.
called tasks that can be carried out by certain functions of the system-to-be.
The set of tasks are further categorized into functional and non-functional one,
depending on whether they are at the bottom of the decomposition hierarchy of
an abstract hard goal, or of an abstract softgoal. This model reﬁnement must
be validated to maintain the abstract contribution links, which can often be
fulﬁlled by weaving the concrete non-functional (operationalized) tasks into the
functional tasks. As such, every OR-decomposed subgoal must fulﬁll the same
commitment to the softgoals as their parent goal does. It is often the case, if not
always, that non-functional tasks crosscut several functional ones that belong to
diﬀerent OR-decomposed subtrees.
Figure 3 illustrates goal aspects for media shop. The top level softgoals, such
as “Security [system]” and “Usability [language]”, are captured as goal aspects,
which are represented as cloud-shape entities in Fig. 3. The softgoals are decom-
posed and eventually operationalized into advising tasks (hexagons in Fig. 3).
For modularization purposes, we represent the model entities that are relevant
to a goal aspect inside a dash-dotted circle, as shown in the upper-right corner
of Fig. 3.
The weaving of goal aspect is achieved by composing the advising tasks with
the functional tasks of eﬀected hard goals. Such a weaving is similar to the
90 N. Niu et al.
weaving deﬁned in aspect-oriented programming [17] in that it is the aspect’s
responsibility to specify the conditions (e.g. where and when) and the content
(advice) of weaving. Since a (weaved) goal model need not be executed, goal
aspect weaving is simpler than program aspect weaving. As an example, the
goal aspect “Customization [language]” is operationalized into an advising task
“Translate [language, NLS]”, meaning that the media shop is advised to trans-
late occurrences of natural language strings (NLS) into the desired language.
This advice crosscuts all hard goals that display Web pages and is intended to
enhance system usability for native users of the desired language. While the
weaving aﬀects certain hard goals in the usability aspect, the basic function-
alities (e.g. “Informing”, “Reporting”, and “Shopping”) deﬁned by these hard
goals via functional tasks shall remain functioning as expected.
It is crucial to represent and use NFRs during the development process be-
cause the quality concerns captured by NFRs are often regarded as architectural
drivers that evoke trade-oﬀ analysis among design alternatives [21]. However,
NFRs are hard to be allocated into independent modules and usually represent
tangled and scattered concerns; therefore they have huge potential to become
candidate early aspects [24]. The V-graph model [45] provides an eﬀective way
to identify NFR-related goal aspects. Next, we introduce an approach to tracing
the aspects throughout software development.
3 Tracing Aspects across Software Life Cycle
The goal model not only captures stakeholder intentions and strategic depen-
dencies but also represents design decisions during goal decomposition and re-
ﬁnement. These decisions, such as the advising tasks related to softgoals, can
be transformed into concrete aspect-oriented implementations, thereby elevating
the goal model to be a primary artifact of development.
3.1 Framework Overview
Figure 4 gives an overview of our aspect-tracing framework. As in most MDE
approaches, two kinds of model transformation are present: model-to-model and
model-to-code [38]. Model-to-model transformation refers to the reﬁnement of
goal models (Sect. 2.3). Model-to-code transformation, in our framework, refers
to the mapping from a goal model construct (e.g., goal aspect, advising task,
etc.) to some artifact in the code base.
The upper part of Fig. 4 highlights the early aspects discovery process dis-
cussed in Sect. 2.3. Aspect-oriented concepts are modeled explicitly in require-
ments at the beginning of the development process. Advising tasks, which
operationalize softgoals and relate to hard goals, are modularized as aspects
and weaved into the goal model to enable aspect-oriented requirements analy-
sis [31]. The resulting model, notably the goal model augmented with aspects, is
amenable to be transformed into aspect-oriented programs (AOP) [17]. To ease
this transformation, we provide language support for modeling goal aspects in
Aspects across Software Life Cycle: A Goal-Driven Approach 91
Fig. 4. Process overview of the aspect-tracing framework
Q7 (Sect. 3.2). It is worth bearing in mind that the requirements goal model
provides a cornerstone for system validation.
Key concepts of AOP implementation are depicted in the middle of Fig. 4.
Functional modules (f) and code aspects (advice + pointcut) are derived from
functional and advising tasks, respectively. The distinction between functional
goals and softgoals made in the requirements model is respected and preserved.
We choose diﬀerent subject matters to include into program modules and ignore
others. Namely, the fmodules focus on functionalities, whereas aspects mod-
ularize crosscutting NFR concerns in terms of operationalized advising tasks.
Such a separation-of-concern strategy results in an uncluttered structure. It also
mandates the separated concerns to be weaved together in the implementation.
The weaved system (fa) is obtained by composing advice (a)withbases
according to the pointcut expression (p). Some aspects identiﬁed at the require-
ments level may not be mapped to code at all. For example, a typical performance
requirement might state that the system shall complete a speciﬁc task within
2 seconds. These early identiﬁed aspects play a key role in monitoring the sys-
tem’s behavior. We record them as quality issues to establish their traceability
throughout the software life cycle. Deciding whether to implement a goal aspect
or to record it as an issue depends on two activities: prioritizing softgoals [21] and
deﬁning quantitative measures [35]. While handling quality issues is important,
92 N. Niu et al.
we consider it to be our future work and discuss related research in Sect. 5. The
success criteria for aspects are speciﬁed in a test case (t), which gathers quality
metrics and shares with athe same pointcut (p). In another word, pis reused
from goal aspects to implementation (a)andtesting(t). It is important to incor-
porate the metrics tso that one can measure system qualities with (fat)and
without (ft) aspects. Note that our framework is viable for applying diﬀerent
programming languages and weaving mechanisms such as AspectC, AspectJ or
HyperJ. We use phpAspect to illustrate our approach in Sect. 3.3.
System validation is shown in the lower part of Fig. 4 and is further discussed
in Sect. 3.4. The weaved system (fa) is subject to two tests. The ﬁrst test
ensures that systems with and without aspects have the same functionality de-
ﬁned by hard goals: H(f)=H(fa). Existing testing mechanisms, such as
unit testing, can be reused to validate whether the weaved system satisﬁes the
functional requirements. The second test checks whether the weaved system in-
deed improves system qualities in terms of the degree of softgoal satisfaction:
S(ft)<S(fat). It is evident that validation is directed by stakeholder
goals and the many concerns emerged in design and implementation.
Our goal-driven framework enables not only forward mapping of crosscutting
concerns (e.g. from requirements to implementation) but also backward tracing
of aspects (e.g. from implementation to requirements). The case study presented
in Sect. 4 shows examples of both kinds. We intend a straightforward model
transformation scheme [38]—the heart and soul of our MDE framework—to
easily capture the application domain knowledge. In most cases, the relationship
between goal aspects and program aspects is a one-to-one mapping or is at least
intuitively clear from goal model reﬁnement. Our framework currently focuses on
one-to-one mappings, trying to work out the basic scenarios. We plan to extend
the framework to deal with more complex cases that may involve many-to-many
mappings.
3.2 Goal Aspects in Q7
Q7, or 5W2H—why,who,what,when,where,how,how much—is a pseudo
programming language that captures the structure of requirements goal graphs,
including the major entities of the NFR framework [6]. The syntax of the lan-
guage is designed to facilitate the reuse of solutions in the non-functional do-
mains [18]. The semantic domain is formally depicted in GRL [12]. We exploit
the Q7 language to support the description of aspects in goal models.
The answers to the why and how questions respectively indicate the com-
position and decomposition relations between abstraction and implementation.
Adapted from the goal model of Fig. 3, the following example shows the
AND/OR decomposition relations among the hard goals for media shop. The
front page of the shop has the functionality for “informing” the end-users and
administrators. This goal is decomposed into “ﬁnding” and (&) “reporting”
relevant information. To ﬁnd information, a user is allowed to “search” or (|)
“navigate” the shop. The nesting structure of curly braces helps visualize the
decomposition hierarchy of the goals.
Aspects across Software Life Cycle: A Goal-Driven Approach 93
Informing { &
Finding { |
Searching
Navigating
}
Reporting
...
}
The answers to the how much question show the degree of contributions be-
tween hard goals and softgoals. Q7 uses the labels “++”, “+”, “”, and “−−
to indicate the “make”, “help”, “hurt”, and “break” relations between the goals.
The answers to the what question connect the goal to its subject matter [48].
In Q7, such information is placed inside square brackets as topics of the goals or
softgoals. For example, when the system meets the media shop’s “Front [page]”
goal, it also makes (++) major top-level softgoals (“”), such as “Security
[system]” and “Usability [language]”.
Front [page] {
...
} => ++ Security [system],
++ Usability [language] ...
The answers to the when question indicate the feasibility of the goals [18], and
those to the who question attribute a goal to an encapsulating module. In the
iterminology [44], such a module is called an actor that either processes or
delegates a goal or a task to other actors via strategic dependencies. In Q7, we
use the idea of “namespaces” to represent the actor names. For example,
<MediaShop>::Front [page] { &
Managing [page]
...
}
Here, “MediaShop” is the actor that processes the goal “Front [page]”. If the
actor is not explicitly speciﬁed, a goal inherits the namespace from its parent
goal. Thus, “Managing [page]” belongs to the same “MediaShop” actor.
As an extension of the encapsulating actors, we create a new namespace to
modularize the aspect that cuts across multiple entities in the goal model. As
an example, the security aspect in Fig. 3 is represented as follows.
<aspect>::Security [system] { &
Confidentiality [credentials] <=+ [page] { &
}
Security [information flow] <=+ [account] { &
SSL [connection]
}
}
94 N. Niu et al.
The goal hierarchy within the aspect module is an advice and the leaf-level
tasks in the hierarchy are called advising tasks. These tasks do not exist by
themselves, since they have to be weaved into the functional goals by indicating
where to attach the advice. The answers to the where question are designed to
express the pointcut of an aspect, indicating which functional goals are suitable
for applying the advice. For example, the following Q7 statements show a point-
cut expression after the “”symbol:+ * [page], which matches the hard goals
of any name (indicated by the wildcard *), of the subject matter Web “page”,
and those helping (+) achieve the usability softgoal. The advising task translates
the “natural language string” (NLS) appeared in the Web page into the desired
language (e.g. Spanish or German). Note that a pointcut can also be speciﬁed
by enumerating the eﬀected hard goals.
<aspect>::Usability [language] { &
Customization [language] <= + * [page] { &
Translate [language, NLS]
}
}
All matched goals are therefore the joinpoints of the aspect. A weaving algorithm
at the requirements level [18] has been implemented in the OpenOME modeling
tool [28] to identify the joinpoints and attach the advising tasks as siblings to
parent, which is called the weaved goal. The weaving algorithm implemented in
Q7 makes it possible to analyze the weaved goal model through a goal analy-
sis tool, e.g. a goal reasoning algorithm [11]. It is important to articulate the
advice and pointcut of a goal aspect. Such an exercise not only supports aspect-
oriented requirements analysis [31] but also provides reusable information for
implementing and validating aspects, as shown in Fig. 4.
As we can see from the examples presented above, Q7 provides a quality-based
reuse mechanism for representing and modularizing crosscutting concerns in the
goal model. The Q7 language is capable of not only handling the characteristics
of the quality knowledge but also relating those with functional descriptions. In
addition, the textual form of Q7 greatly facilitates the tracing of stakeholder
concerns throughout the software life cycle, as we shall demonstrate via a case
study in Sect. 4.
3.3 Implementation in phpAspect
The early candidate aspects discovered in the goal model are suited to be engi-
neered as code aspects, but developers may choose other means to address these
crosscutting concerns (e.g. recorded as quality issues to monitor the resulting
system), as previously stated. Nevertheless, our approach explores the possibil-
ity to equip developers with a full-ﬂedged aspect-oriented framework so that a
clear separation of concerns is promoted throughout software development.
Aspects across Software Life Cycle: A Goal-Driven Approach 95
Fig. 5. The weaving process implemented in phpAspect
As one can see from Fig. 4, functional and advising tasks from the require-
ments model are transformed into functional and aspectual modules in the imple-
mentation, respectively. Since the subject in our case study—osCommerce [29]—
is implemented in PHP, we select a solution for AOP in this language, ph-
pAspect1, to facilitate the discussion in implementing early aspects.
The phpAspect language is designed as an extension to PHP. It adds new
constructs, such as aspects, pointcuts, advices, and inter-types declarations, in-
spired by AspectJ for expressing aspects relating to objects and classes while
embracing speciﬁc features for Web-based applications. It provides pointcut ex-
pressions for constructions used in these applications, such as function call and
execution, Web-based variable access, XML/HTML enclosing context identiﬁca-
tion, and the like. Moreover, phpAspect is able to weave aspect components in
portions of code that are embedded into XML or HTML elements.
Figure 5 shows how the weaving is performed in phpAspect. It uses a static
weaving process that performs source code transformation of a PHP program
with aspect extensions into a standard PHP program. The full implementation is
based on YAXX [42], which ﬁrst converts the PHP program into a YACC parsing
tree in XML, then weaves the XML representation of the components with the
XML representation of the aspects through a customized XSLT stylesheet. The
weaved XML representation of the program is then transformed into the source
code through another reusable XSLT stylesheet that does the inverse of parsing
(unparsing).
The following code snippet shows an example of the security aspect for a Web
application. This aspect ﬁrst introduces a credential checking around all Web
pages that require access authentication (captured with the checkCredentials
pointcut on goto method call). This checking prevents users from accessing a
1Developed by William Candillon during the Google Summer of Code, see
96 N. Niu et al.
Web page if they are not logged in or do not have the right credentials. In these
cases, users are redirected to a more appropriate page, either the login or index
page. Second, the security aspect checks that all cart operations performed by
the client are done in an HTTPS (SSL) mode and deny them otherwise.
<?php
aspect Security {
//Intercept all instantiations of a page
pointcut checkCredentials:call(Page->goTo($arg2)); //Intercept all method execution of the cart pointcut checkSSL:exec(Cart->*(*)); //Around all page instantiations, check the credentials around(User$user) checkCredentials {
if($user->hasCredentials($_GET[’page’],
$_GET[’action’])) { proceed(); } elseif (!$user->isLoggedIn()) {
$thisJoinPoint->getObject()->goTo(’login.php’); } else {$thisJoinPoint->getObject()->goTo(’index.php’);
}
}
//Around all method execution of the Cart,
//We check whether the connection is SSL
around checkSSL {
if(!$_SERVER[’https’]) { header("Location: https://{$_SERVER[’HTTP_HOST’]}
{$_SERVER[’REQUEST_URI’]}"); } else { proceed(); } } } ?> The above example not only demonstrates phpAspect’s competence in work- ing out the implementation of goal aspects in question but also shows its capac- ity to build the model-to-code transformation of interdependent concerns in the system. 3.4 Aspects Validation It is crucial to validate the implementation against stakeholder requirements to check the faithfulness and appropriateness of the model transformation. We Aspects across Software Life Cycle: A Goal-Driven Approach 97 propose a goal-based testing approach to ensure that system functionalities are preserved and system qualities are enhanced by weaving aspects into base mod- ules. This concept is highlighted by the validation ﬂows in Fig. 4. When it is concrete enough to express the function of a task in terms of input and the expected output, a unit test case can be created to check whether the function is violated bycomparing the output of the implemented function with the expected output of the required function. Therefore, the leaf-level functional task in the goal model corresponds to a set of unit test cases that tells whether the base program delivers the required functionality. Having enough unit test cases in terms of the coverage of the input domain, the functional task can be labeled “tested”. Aspects discovered in the goal model provide a baseline for code aspects val- idation. If an advising task cuts across multiple functional tasks, the unit test cases of the functional tasks at the joinpoints can be reused to test the function- ality of the weaved system. This is because goal aspects must not change basic functionalities deﬁned by hard goals and functional tasks. The implementation of aspects, therefore, has to preserve this property. On the other hand, the degree of certain softgoal satisfaction must be en- hanced by the weaved system. In other words, certain qualities in the system with weaved aspects must outperform the one without aspects so that the ef- fort of managing aspects in MDE can be justiﬁed. Measuring quality attributes typically presents an obstacle to traditional testing mechanisms, since NFRs are not always easy to be quantitatively measured. Our eﬀort of modeling aspects early in the requirements pays oﬀ here. The results from goal-oriented analysis, including the quality metrics, the advising task and pointcut of goal aspects, can be reused and extended to test softgoal satisfaction. For example, the media shop keeps users from accessing a Web page if they are not logged in or do not have the right credentials. We model this requirement as a security aspect, and transform it to a code aspect in phpAspect, as explained in Sect. 3.3. We can deﬁne a set of unit test cases that act as unauthorized agents and try to break into the system. The expected output would be redirecting these malicious visits to the login or index page. Since these security-related test cases crosscut the ones devoted to testing system functionalities (e.g. shopping and searching), they can be regarded as unit testing aspects [19], thereby reusing the security aspect’s pointcut description to perform the test case weaving. Note that validating goal aspects can be carried out by other means than deﬁning unit testing aspects. For example, typical Web layer components do not lend themselves to unit testing, unless proper frameworks such as HttpUnit or PHPUnit are employed. In order to ensure that shopping is done securely, testing scripts can be developed to automatically verify that all cart operations are performed in an HTTPS (SSL) mode. Even though such a test may not manifest itself as a testing aspect, it takes full advantage of the early aspects analysis results to check whether the desired level of softgoal satisfaction is achieved. Another point worth noting is that to separate concerns in functional and non-functional requirements, our use of goal aspects avoids changing basic func- tionalities deﬁned by hard goals and functional tasks. If one has to constrain a 98 N. Niu et al. hard goal due to a goal aspect, such as “controlling certain access privilege to a user”, then the hard goal is the same; yet it is constrained by an additional con- dition caused by aspect weaving. As a result, the softgoal associated with access control, namely security, is helped. A side eﬀect of our weaving mechanism is that the original function test must be extended, in this case, by constraining the precondition of the function of the original hard goal. Thus, for those instances that satisfy the constrained precondition, the hard goal functionality is still sat- isﬁed; for the instances that fail the new precondition, the postcondition of the composed function is undeﬁned, i.e. they are not comparable to the postcondi- tion of the original functions. The above example also explains the necessity of generating testing aspects from goal aspects and their related functionalities. 3.5 Evolving Requirements Aspects An important component of working with requirements models is adapting to change: We do not expect our models to be valid for all situations. Consequently, we have been developing a framework for managing requirements models much like conﬁguration management (CM) of source code. Our system consists of an object-oriented version control system, named Molhado [22]; a query language in OCL; and custom code to provide conﬁguration support: temporal query, commit, checkout, reporting and so on. Our implementation is implemented in Eclipse, using the EMF modeling framework. Changes to a model’s entities are mirrored and updated to the graph struc- tures in the model-driven CM repository. The mirror maintains a mapping be- tween the model in memory and the model in persistent storage. The mirror mapping is necessary as the EMF-generated model does not use the Molhado- speciﬁc in-memory data structure. Our mapping is implemented as follows. For each modeling project, the mirror contains (with decreasing granularity): 1) a folder object, representing the project name; 2) leaf folders containing model objects that are uniquely identiﬁed by name of goal model ﬁles; and 3) model objects containing Molhado graph structure objects (i.e. nodes and edges) that maintain a one-to-one mapping with the model ob jects in the EMF model. In other words, not only the versions of ﬁles but also the versions of individual objects are being maintained. We have validated the tool using both aspect and aspect-less requirements models. We convert the models from the textual Q7 language losslessly to our EMF-derived metamodel. This allows us to leverage the suite of modeling tools in the Eclipse project. Once the model is in the EMF format, we can edit it in our custom graphical editor, and commit versions of that model to Molhado’s ﬁle-based storage. The versioning system is ﬁne-grained, with each object in the model—goal, aspect, relation—getting a separate version. How well does this conﬁguration management system support changes in aspect-oriented requirements models? We committed a version of our example models using both aspects and no aspects to see how the tool performed. Version 1 of each model is a goal model with two aspects: usability and security. Version 2 adds the notion of language customization to the usability aspect as advice (Goal: Aspects across Software Life Cycle: A Goal-Driven Approach 99 Usability [language], children Goal: Customization, Task: Translate). In the non- woven model, this advice is separate, but in the non-aspectual context, the advice is tightly integrated. From version 1 to version 2 of the non-woven model, a mere three changes are made, reﬂecting the new advice. In the non-aspectual model, in contrast, there are now those three advice elements, as well as the contribution links between the functional elements and the aspects, amounting to six additional linkages, which is nearly 15% more linkages in our small proof-of-concept model (for reference, version 1 of the aspect model contains 22 links and 26 nodes). There are 11 added links between version 1 of the aspect model and version 1 of the non- aspectual model. We conclude that maintaining an evolving aspect version of the model places less demand on the modeler than its non-aspectual counterpart. 4 Case Study Case studies are an empirical inquiry to investigate a contemporary phenomenon within its real-life context. We used an exploratory case study [43] as the basis for our empirical evaluation. An exploratory case study is an in-depth exploration of one particular case (situation or subject) for the purpose of gaining depth of understanding into the issues being investigated. The design of a case study, in the most elementary sense, is the logical sequence that connects the empirical data to a study’s initial research questions, and ultimately, to its conclusions. Our research questions focus on leveraging our framework in a real-world setting and examining the consequences. Speciﬁcally, we derive the following hypotheses to guide the study design: 1. Tracing broadly-scoped non-functional concerns across the software life cycle is enabled by our framework; 2. The goal model, together with its reﬁnement and transformation deﬁned in our framework, becomes a primary artifact in the development and validation process; and 3. Software complexity is addressed by the synthesis of MDE and AOSD. 4.1 Data Collection The subject in our study is osCommerce [29], an open-source platform written in PHP, on which a Web-based media shop [5] development can be fully based. In our previous work [45], we used osCommerce to show how to discover aspects from media shop goal models. In particular, seven goal aspects were identiﬁed in [45], among which we choose security and usability aspects as two embedded units of analysis within the current case study. Such a selection is guided by the previous work in a familiar e-commerce domain, and represents a typical case and units of analysis since both security and usability are commonly discussed early aspects in the literature [31]. The data collection in our study consisted of three parts. First, the goal model with aspects for media shop was presented in [45] and further represented in 100 N. Niu et al. Table 1. Tracing security (S) and usability (U) aspects in an osCommerce media shop Concept Q7 phpAspect Validation aspect (S)<aspect>::Security [system] aspect Security Use PHPUnit to verify pointcut (S)<= + * [page] call(Page->goTo($arg2)) http authentication
<= + * [cart] exec(Cart->*(*)) and page redirection.
{& SSL [connection] }checkSSL{...}security insured.
aspect (U)<aspect>::Usability [language] aspect Usability Language Use pspell and native-
pointcut (U)<= + * [page] call(Page->*printf(*)) speaker testers to check
<= + * [date] call(Data->strftime($arg2)) the correctness of lang- <= + * [amount] exec(Amount->display($arg2)) uage translation, date
advice (U){& Translate [language, NLS] }translatePage{...}display, and currencies.
{& Display [format, date] }dateTimeFormat{...}Validation result:
{& Convert [currency, amount] }convertCurrency{...}usability enhanced.
Q7. Second, the implementation of osCommerce in PHP was accessible through
open-source repositories. Our implementation of osCommerce’s code aspects in
phpAspect was available at [30]. Note that, currently, a human agent has to man-
ually carry out the model-to-code transformation; automatic support is planned
for future research. Third, the goal-based validation instrumentation was devel-
oped and gathered by some of the authors of this paper (also available at [30]).
It should be noted that case studies, like experiments, are generalizable to
theoretical propositions and not to populations or universe. In this sense, the case
study, like the experiment, does not represent a “sample”, and in doing a case
study, our goal will be to expand and generalize theories (analytic generalization)
and not to enumerate frequencies (statistical generalization) [43]. To this end,
we regard the selection of subject and units of analysis in our study suﬃcient.
We explicitly formulated three plausible hypotheses for testing, and expect to
make analytic generalization about these theoretical propositions.
4.2 Data Analysis
Table 1 summarizes the analysis results of tracing aspects in our subject osCom-
merce system. The mappings between goal aspects in Q7 and code aspects in
phpAspect can be readily spotted in Table 1. Speciﬁcally, the name of a goal
aspect corresponds to that of a code aspect. Moreover, we map goal’s topics into
parameterized pointcuts, and map softgoal’s operationalizations into advices.
The one-to-one correspondence between model aspect and code aspect pre-
sented in Table 1 is rather a coincidence due to the chosen units of analysis
than the norm of our framework. In more general and complex cases, advanced
many-to-many tracing mechanisms may be needed. Nevertheless, we favor a
straightforward model-to-code transformation scheme to bridge the gap between
domain concepts and implementation technologies. The results in Table 1 hap-
pen to illustrate this point.
Aspects across Software Life Cycle: A Goal-Driven Approach 101
We focus on the usability aspect in this section, as security is discussed in the
previous section as an illustration of our approach. The goal aspect “Usability
[language]” is AND-decomposed into 3 parts. One translates natural language
strings (NLS) appearing in a Web page to the local language. Another deals
with displaying date and time in the desired conventional format. The third
converts money amounts from a country’s currency into the local currency. The
Q7 representations for each pointcut and advice of the usability aspect (U)are
given in the second column of Table 1. Correspondingly, Table 1’s third col-
umn highlights these concepts’ counterparts in the phpAspect implementation.
The implemented aspects were weaved into osCommerce’s base modules by the
phpAspect weaver, as explained in Fig. 5.
The goal model plays a crucial role in system validation, and validation in
turn justiﬁes the eﬀort of modeling aspects early in the requirements phase. We
tested the weaved system in two respects: hard goal preservation and softgoal
enhancement. Unit test cases existed for validating the functional requirements of
the osCommerce system. Such test cases should not be aﬀected by introducing
the aspects that implemented the NFRs. Therefore, we reused the functional
testing units without any change for checking the functionalities of the weaved
system. For example, the shopping cart sum computation must be the same
regardless of which natural language is used by the media shop customer. A unit
test case using PHPUnit [33] was reused.
require_once ’PHPUnit/Framework/TestCase.php’;
require_once ’classes/cart.class.php’;
class CheckoutTest extends
PHPUnit_Framework_TestCase {
private function getOrder(){
$cart = new Cart();$cart->addItem(’Bread’, 2);
// 2.20 each in USD
$cart->addItem(’Butter’, 1); // 3.20 each in USD return$cart->getAmount();
}
public function testCheckoutTotal(){
$this->assertEquals(Currency::convert( 2*2.20+1*3.20, ’usd’),$this->getOrder());
}
}
We reused 22 functional unit test cases for the weaved system to ensure that
introducing goal aspects does not change the function of osCommerce. If one
introduces an aspect that does change the functionality of the original system,
we consider that either the function is not intended originally or new test case
needs to be designed and weaved into the original set of test cases along with
the code aspect. However, it is beyond the scope of this paper to discuss how
102 N. Niu et al.
Fig. 6. Screenshot of an osCommerce media shop shown in default language (English)
an aspect should implement a functional requirement, and how such an aspect
should be traced and validated.
Having checked that the weaved system preserved system functionalities, we
wanted to test whether the aspects indeed addressed the quality concerns, and
more importantly, whether they helped better achieve the original stakeholder
softgoals. Such a validation was guided by the quality metrics derived from
goal-oriented analysis. Taking “Usability [language]” for example, osCommerce
currently supported English, German, Spanish, and Japanese users. Figure 6
shows a Web page in the default language—English. The usability aspect should
render a Web page by using the language chosen by the user as natural as
possible. This included showing textual strings, date, and currency in the desired
language and format, as described earlier and indicated in Table 1. Figure 7
shows two screenshots of the weaved system after the language customization
aspect is applied.
We validated the usability aspect via two means. Native-speaker (in our case
Spanish and Japanese) testers conﬁrmed that the language customization aspect
worked very well, in that most Web page contents shown in the desired language,
including date and currency, were semantically correct. To evaluate this result
in a triangulating fashion [43], we also chose the pspell testing harness [34] to
check the syntax of the resulting Web page texts automatically. The fact that
all customized pages contained less than 5% syntactic errors increased our conﬁ-
Aspects across Software Life Cycle: A Goal-Driven Approach 103
Fig. 7. Screenshots of the weaved system that enhances usability for Spanish (upper)
and Japanese (lower) users
104 N. Niu et al.
dence that the aspects “weaved system indeed helped better meet stakeholders”
usability requirements.
4.3 Validity Discussion
Several factors can aﬀect the validity of our exploratory case study: construct
validity, external validity, and reliability [43]. Construct validity concerns es-
tablishing correct operational measures for the concepts being studied. The key
construct in our study is the idea of a goal aspect. Although softgoals have huge
potential to become early aspects [24], others may argue that goal aspects can be
functional as well. We believe that goal aspects are intended to enhance system
qualities while preserving functionalities, and the early aspects community needs
to address it more thoroughly. External validity involves establishing the domain
to which a study’s ﬁndings can be generalized. In regard to external validity, we
chose Q7, phpAspect, and various testing mechanisms in tracing aspects across
an e-commerce application. Further empirical studies are needed to examine the
applicability and generality of our framework in coping with other modeling no-
tations, programming languages, and application domains. To reduce the threats
to reliability, which cares about demonstrating that the operations of a study
can be repeated with the same results, we selected an open-source project and
made all our empirical data publicly accessible [30]. Thus, our reported study
is replicable, and we believe we would obtain similar results if we repeated the
study.
When a developer needs to choose an approach to apply in (re-)engineering
an application such as osCommerce, which approach is most appropriate will de-
pend on the task at hand and what type of input is already available. We found
out from our case study that our proposed framework could be particularly
useful if multiple stakeholder roles were involved in the problem domain, inten-
tionally relying on each other for achieving their individual goals and softgoals.
In addition, goal-oriented modeling was preliminary to goal aspects discovery,
tracing, and validation, which seemed to be a major cost of applying our ap-
proach. Some limitations also arose from the study that we plan to investigate
further. First, deciding how to map a goal aspect, either to a code aspect or to
a quality issue, turned out to be non-trivial, and the framework should provide
guidelines or heuristics to facilitate the decision making. Second, the framework
should be extended to allow multiple, possibly conﬂicting, aspects to be weaved
at the same time. Third, automatic support for model transformation, especially
complex many-to-many mappings, was necessary for the framework to be more
scalable and extensible.
It is worthwhile discussing some experience from our study. When re-
engineering osCommerce using aspects, we wanted to achieve a high degree of
maintainability to facilitate modiﬁcation and reuse. Aspects modularized code
that would be tangled and scattered otherwise. This not only led to a cleaner
code base but also addressed the complexity issue in that uncluttered views were
modeled and preserved in the development process. For instance, in the original
implementation, 603 natural language string variables were deﬁned in each of
Aspects across Software Life Cycle: A Goal-Driven Approach 105
the English, German, Spanish, and Japanese language header ﬁles to be included
in speciﬁc Web pages. This caused scattered code duplication. We deﬁned a sin-
gle usability aspect to modularize these language customization concerns, and
removed 3,990 lines of code, 7.6% from the whole code base. In addition to the
reduced complexity at the implementation level, the goal model is much closer
to the problem situation, which circumvents complexity at the conceptual level.
The above ﬁnding helped address the “maintainability” softgoal from the
developer’s perspective. However, “maintainability” was not originally an NFR
concern in the media shop goal model presented in [45]. Thus, we successfully
uncovered a missing part of the goal model during the engineering process. This
eﬀectively improved the model’s quality and longevity because there were no
conceptual discontinuities that precluded backtracking. In this sense, one shall
not apply our framework in a strict forward-engineering way, but in an iterative
fashion within an integrated MDE process. We, therefore, conclude that the
exploratory case study presented positive empirical evidence for accepting our
three initial hypotheses.
5 Related Work
Goal modeling has become a central activity in RE [41]. It expresses concepts
that are fundamental for understanding and specifying stakeholder intentions
and concerns. The resulting goal model is a critical mass that supports various
kinds of analysis: trade-oﬀs [6], completeness [8], propagation [11], semantics [12],
NFRs [21], interferences [25], aspects [45], and many more [41]. Unfortunately,
the literature has paid little attention to leveraging the goal model to drive the
software development. As a result, practitioners often consider the goal model a
nice-to-have artifact or document in the daily practice. Of course, if the model
ends up merely as documentation, it is of limited value because documentation all
too easily diverges from reality. Consequently, a key premise behind MDE is that
programs are (automatically) generated from their corresponding models [37].
The T ropos project [5] avoided the shortsighted view of treating models
merely as documentation, and used the goal model as a driving force in subse-
quent implementation. In particular, agent-oriented programming platform was
used to develop the goal model, because it seemed natural to map actors to
agents. As discussed in Sect. 2.2, several problems exist, among which the dis-
tinction between hard goals and softgoals is obscured in the software life cycle.
Because these model constructs were not explicitly connected to the actual soft-
ware, there was no way of ensuring that the developers followed the analysis
and design decisions captured in the goal model during implementation. They
would often change design intent during implementation—thereby invalidating
the model. Unfortunately, because the mapping between models and code is im-
plicit and the code is diﬃcult to comprehend, such digressions would remain
undetected and could easily lead to downstream integration and maintenance
problems. Note that changing design intent is not necessarily a bad thing, but
it is bad if the change goes unobserved [37]. In contrast, we fully appreciate
106 N. Niu et al.
the distinction between hard goals and softgoals, and have devised a full-ﬂedged
AOSD framework to transfer the design intent into implementations.
The straightforward model-to-code transformation proposed in our framework
shall not de-emphasize the model-to-model transformation, which in our case is
the reﬁnement of goal models. It is well recognized that NFRs may not be aligned
cleanly and they often depend on or contradict with each other [6]. A major ad-
vantage of modeling aspects in goal models is to gain insights into the interplays
of NFRs and detect conﬂicting concerns early, when trade-oﬀs can be resolved
more economically [1]. In [23], we presented a rigorous approach to based on
the repertory grid technique [9] and formal concept analysis [10], analyzing, re-
ﬁning, and prioritizing stakeholders’ interrelated concerns. This concept-driven
approach [23] deals with goal model transformation in-depth, and can be seam-
lessly integrated with our current framework to capitalize on the productivity
improvements oﬀered by MDE and AOSD.
When abstract NFRs (softgoals) are concretized, some concerns manifest
themselves as quality issues rather than speciﬁc code fragments, as shown in
Fig. 4. One way to handle these quality issues is to deﬁne the speciﬁcation of
measurements independent of speciﬁc applications. Aside from the structural
transformation proposed in our framework, non-functional measurement reﬁne-
ment can be applied to support MDE [35]. The idea is to have deﬁnitions of
measurements at diﬀerent levels of abstraction, including provision of transfor-
mation rules. The measurement repository can be constructed independent of
application development and preferably at a far earlier time, so that the appli-
cation engineer can reuse the repository when addressing speciﬁc quality issues.
Structural and measurement reﬁnements are by no means orthogonal: they both
connect to the functional models and their reﬁnement [35]. Our approach com-
plements quality measurement development by providing mechanisms to specify
the joinpoints in the goal model and its transformations.
Aspects at the requirements level have been studied extensively in recent
years. A requirements aspect has been discovered (or more accurately made ex-
plicit) in many RE frameworks: a collaboration in requirements for software
components [14], an extension in a use case diagram [15], a softgoal in a goal
model [45], an instance of terminological interference in viewpoint-based require-
mentsmodels[24],anNFRinasoftwarerequirements speciﬁcation [7], and more.
A taxonomy of asymmetric requirements aspects is provided in [26]. Asymmetric
approaches have made the base-aspect distinction clear, i.e. aspects are relative
to the dominant decomposition criterion. On the contrary, a symmetric approach
does not separate base from aspects: requirements are decomposed in a uniform
fashion. This makes it possible to project any particular set of requirements on
a range of other requirements and to support a multi-dimensional separation of
concerns [40].
However, most work failed to take advantage of the early aspects model to
direct software development. A notable exception is the work presented in [16],
where proof obligations were introduced to formalize the validation of the aspec-
tual requirements. Their approach can be applied to programs of well-deﬁned
Aspects across Software Life Cycle: A Goal-Driven Approach 107
axiomatic semantics. For the quality attributes that do not have a clear-cut
answer to satisfaction, it is necessary to validate whether and how much the
system can be improved after weaving the proposed aspects. For example, in-
stead of proving that a word is Spanish, we show how well it is understandable
by the Spanish-speaking users. Although we reuse unit testing for functional
requirements, we believe a complementary approach based on generating proof
obligations can better guide the validation of functional requirements.
6 Conclusions
Aspect-oriented software development oﬀers language constructs to tackle soft-
ware complexity. Aspects provides the mechanism that enables the source code
to be structured to facilitate the representation of multiple perceptions and to
alleviate tangling and scattering concerns. Many of these concerns often arise
in the problem domain [27]. Therefore, it is important to identify and repre-
sent concerns that arise during the early phases of software development, and to
determine how these concerns interact.
Model-driven engineering tackles conceptual complexity in software develop-
ment. The major advantage of MDE is that we express models using concepts
that are much less bound to the underlying implementation technology and are
much closer to the problem languages [37]. Goal modeling ﬁts in the MDE pic-
ture in that it captures stakeholder intentions, beliefs, commitments, and the
relationships among the various concerns. This higher level of abstraction makes
the goal model easier to specify, understand, and maintain.
In this paper, we have presented our initial investigation into designing a goal-
based framework that synthesizes AOSD and MDE, thereby managing complex-
ity in both language and conceptual dimensions. A goal aspect models a system
from a stakeholder-deﬁned viewpoint. The aspect is a slice of a system model
that contains only information pertinent to the viewpoint. Our framework keeps
a clear separation of concerns across software life cycle, and the straightforward
model-to-code transformation helps bridge the gap between domain concepts and
implementation technologies. The goal model plays a key role in system valida-
tion and becomes a primary artifact in software development. Evolving require-
ments aspects help increase the model’s longevity. We evaluated the approach
via an exploratory case study that re-engineered a public domain e-commerce
platform. The study collected positive evidence to conﬁrm the framework’s ap-
plicability and usefulness, as well as our hypotheses. We also veriﬁed the initial
AOP claim that it is natural to implement the globally concerned NFRs as
aspects that cut across the subsystems [17].
Our work can be continued in many directions. More in-depth empirical stud-
ies are needed to lend strength to the preliminary ﬁndings reported here. As-
pects other than security and usability can be carried out, and AOP languages
other than phpAspect can be tried out. It would be useful to extend our frame-
work’s ability to handle conﬂicts and trade-oﬀs when composing multiple as-
pects at the same time. Also of interest would be providing automation support
108 N. Niu et al.
for our framework. The future research agenda also includes investigating the
framework’s applicability to handle functional aspects, incorporating advanced
many-to-many tracing mechanisms to cope with complex transformations, and
integrating non-functional measurement reﬁnement to deal with quality issues.
Synthesis of AOSD and MDE has a rich value in tackling complexity and im-
proving productivity. We hope our work can become a key enabler for more
rigorous investigation in this area.
Acknowledgments. We would like to thank William Candillon, Steve Easter-
brook, Gilles Vanwormhoudt, Robin Laney, Bashar Nuseibeh, Eric Yu, and Rick
Salay for helpful discussions and for insightful comments on the osCommerce case
study. We also thank the anonymous reviewers for their constructive suggestions.
References
1. Baniassad, E., Clements, P.C., Ara´ujo, J., Moreira, A., Rashid, A., Tekinerdo˘gan,
B.: Discovering early aspects. IEEE Software 23(1), 61–70 (2006)
2. Booch, G., Rumbaugh, J., Jacobson, I.: The Uniﬁed Modeling Language: User
3. Bratman, M.: Intention, Plans, and Practical Reason. Harvard Univ. Press,
Cambridge (1987)
4. Bresciani, P., Giorgini, P., Giunchiglia, F., Mylopoulos, J., Perini, A.: Towards an
agent oriented approach to software engineering. In: Wkshp on Objects and Agents
(2001)
5. Castro, J., Kolp, M., Mylopoulos, J.: Towards requirements-driven information sys-
tems engineering: the Tropos project. Information Systems 27(6), 365–389 (2002)
6. Chung, L., Nixon, B.A., Yu, E., Mylopoulos, J.: Non-Functional Requirements in
Software Engineering. Kluwer Academic Publishers, Dordrecht (2000)
7. Cleland-Huang, J., Settimi, R., Zou, X., Solc, P.: The detection and classiﬁcation of
non-functional requirements with application to early aspects. In: Intl. RE Conf.,
pp. 39–48 (2006)
8. Dardenne, A., van Lamsweerde, A., Fickas, S.: Goal-directed requirements acqui-
sition. Sci. Comput. Programming 20(1-2), 3–50 (1993)
9. Fransella, F., Bell, R., Bannister, D.: A Manual for Repertory Grid Technique, 2nd
edn. John Wiley & Sons, Ltd., Chichester (2004)
10. Ganter, B., Wille, R.: Formal Concept Analysis. Springer, Heidelberg (1996)
11. Giorgini, P., Mylopoulos, J., Nicchiarelli, E., Sebastiani, R.: Reasoning with goal
models. In: Spaccapietra, S., March, S.T., Kambayashi, Y. (eds.) ER 2002. LNCS,
vol. 2503, pp. 167–181. Springer, Heidelberg (2002)
12. Goal-oriented requirement language (GRL): http://www.cs.toronto.edu/km/GRL/
(last accessed on February 20, 2009)
13. Gray, J., Lin, Y., Zhang, J.: Automating change evolution in model-driven engi-
neering. Computer 39(2), 51–58 (2006)
14. Grundy, J.: Aspect-oriented requirements engineering for component-based soft-
ware systems. In: Intl. Symp. on RE, pp. 84–91 (1999)
15. Jacobson, I.: Use cases and aspects – working seamlessly together. Journal of
Object Technology 2(4), 7–28 (2003)
16. Katz, S., Rashid, A.: From aspectual requirements to proof obligations for aspect-
oriented systems. In: Intl. RE Conf., pp. 48–57 (2004)
Aspects across Software Life Cycle: A Goal-Driven Approach 109
17. Kiczales, G., Lamping, J., Menhdhekar, A., Maeda, C., Lopes, C., Loingtier, J.-M.,
Irwin, J.: Aspect-oriented programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP
1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)
18. Leite, J., Yu, Y., Liu, L., Yu, E., Mylopoulos, J.: Quality-based software reuse. In:
Pastor, ´
O., Falc˜ao e Cunha, J. (eds.) CAiSE 2005. LNCS, vol. 3520, pp. 535–550.
Springer, Heidelberg (2005)
19. Lesiecki, N.: Unit test your aspects – eight new patterns for verifying crosscutting
behavior. IBM Developer Works (2005)
20. Ludewig, J.: Models in software engineering – an introduction. Softw. and Systems
Modeling 2(1), 5–14 (2003)
21. Mylopoulos, J., Chung, L., Nixon, B.: Representing and using nonfunctional re-
quirements: a process-oriented approach. IEEE Trans. Softw. Eng. 18(6), 483–497
(1992)
22. Nguyen, T., Munson, E., Boyland, J., Thao, C.: An infrastructure for development
of object-oriented, multi-level conﬁguration management services. In: Intl. Conf.
Softw. Eng., pp. 215–224 (2005)
23. Niu, N., Easterbrook, S.: Analysis of early aspects in requirements goal models: a
concept-driven approach. In: Rashid, A., Aksit, M. (eds.) Transactions on AOSD
III. LNCS, vol. 4620, pp. 40–72. Springer, Heidelberg (2007)
24. Niu, N., Easterbrook, S.: Discovering aspects in requirements with repertory grid.
In: Early Aspects Wkshp at ICSE, pp. 35–41 (2006)
25. Niu, N., Easterbrook, S.: So, you think you know others’ goals? a repertory grid
study. IEEE Software 24(2), 53–61 (2007)
26. Niu, N., Easterbrook, S., Yu, Y.: A taxonomy of asymmetric requirements aspects.
In: Moreira, A., Grundy, J. (eds.) Early Aspects Workshop 2007 and EACSL 2007.
LNCS, vol. 4765, pp. 1–18. Springer, Heidelberg (2007)
27. Nuseibeh, B.: Crosscutting requirements. In: Intl. Conf. on AOSD, pp. 3–4 (2004)
28. Open OME (organization modelling environment):
http://www.cs.toronto.edu/km/openome/ (last accessed on February 20, 2009)
29. osCommerce: http://www.oscommerce.org/ (last accessed on February 20, 2009)
30. osCommerce’s phpAspect portal: http://www.cs.toronto.edu/~yijun/aspectPHP
(last accessed on February 20, 2009)
31. Rashid, A., Sawyer, P., Moreira, A., Ara´ujo, J.: Early aspects: a model for aspect-
oriented requirements engineering. In: Intl. RE Conf., pp. 199–202 (2002)
32. Parnas, D.: On the criteria to be used in decomposing systems into modules. Comm.
ACM 15(12), 1053–1058 (1972)
33. PHPUnit: http://phpunit.sourceforge.net/ (last accessed on February 20,
2009)
34. pspell: http://php.net/manualen/ref.pspell.php (last accessed on February 20,
2009)
35. R¨ottger, S., Zschaler, S.: Tool support for reﬁnement of non-functional speciﬁca-
tions. Softw. and Systems Modeling 6(2), 185–204 (2007)
36. Schmidt, D.C.: Model-driven engineering. Computer 39(2), 25–31 (2006)
37. Selic, B.: The pragmatics of model-driven development. IEEE Software 20(5),
19–25 (2003)
38. Sendall, S., Kozaczynski, W.: Model transformation: the heart and soul of model-
driven software development. IEEE Software 20(5), 42–45 (2003)
39. Shoham, Y.: Agent-oriented programming. Technical Report STAN-CS-1335-90,
Stanford Univ. (1990)
110 N. Niu et al.
40. Tarr, P.L., Ossher, H., Harrison, W.H., Sutton, S.M.: N degrees of separa-
tion: multi-dimensional separation of concerns. In: Intl. Conf. on Softw. Eng.,
pp. 107–119 (1999)
41. van Lamsweerde, A.: Goal-oriented requirements engineering: a guided tour. In:
Intl. Symp. on RE, pp. 249–262 (2001)
42. YAXX: http://yaxx.sourceforge.net/ (last accessed on February 20, 2009)
43. Yin, R.: Case Study Research: Design and Methods. Sage Publications, Thousand
Oaks (2003)
44. Yu., E.: Towards modelling and reasoning support for early-phase requirements
engineering. In: Intl. Symp. on RE, pp. 226–235 (1997)
45. Yu, Y., do Prado Leite, J.C.S., Mylopoulos, J.: From goals to aspects: discovering
aspects from requirements goal models. In: Intl. RE Conf., pp. 38–47 (2004)
46. Yu, Y., Niu, N., Gonz´alez-Baixauli, B., Mylopoulos, J., Easterbrook, S., do Prado
Leite, J.C.S.: Requirements Engineering and Aspects. In: Lyytinen, K., Loucopou-
los, P., Mylopoulos, J., Robinson, B. (eds.) Design Requirements Engineering: A
Ten-Year Perspective (to appear, 2009)
47. Yu, Y., Niu, N., Gonz´alez-Baixauli, B., Candillon, W., Mylopoulos, J., Easterbrook,
S., do Prado Leite, J.C.S., Vanwormhoudt, G.: Tracing and validating goal aspects.
In: Intl. RE Conf., pp. 53–56 (2007)
48. Zave, P., Jackson, M.: Four dark corners of requirements engineering. ACM
TOSEM 6(1), 1–30 (1997)
... For reasons of being crosscutting [22], we exclude the above two mistakes from our current RQ 2 analysis. Figure 5 helps visualize the modeling mistakes that the SysML diagrams are susceptible to. ...
... Table 1 lists the four open-source projects of our study. These projects tackle problems in different domains where different concerns such as security [13] and dependability [16] are important. For each project, we extracted the data from its initial release to its latest stable release. ...
Conference Paper
To understand requirements traceability in practice, we present a preliminary study of identifying questions from requirements repositories and examining their answering status. Investigating four open-source projects results in 733 requirements questions, among which 43% were answered successfully, 35% were answered unsuccessfully, and 22% were not answered at all. We evaluate the accuracy of using a state-of-the-art natural language processing tool to identify the requirements questions and illuminate automated ways to classify their answering status.
... In [25] a framework is proposed for tracing aspects from requirements goal models to implementation. The framework provides language support for modeling goal aspects and mechanisms for transforming models to aspect-oriented programs. ...
Article
Full-text available
Goal-Oriented Requirements Engineering (GORE) has received increasing attention over the past few years. There are several goal-oriented approaches, each one using different kinds of models. We believe that it would be useful to relate them or even perform transformations among them automatically, in order to understand their similarities and differences, their advantages and disadvantages, allowing a possible migration or comparison between approaches. This is something that has not received enough attention. In this paper we propose the definition and implementation of goal model transformations between i* and KAOS. As an immediate contribution, the approach can be used to migrate from one goal model to another through automatic model transformations. This approach also contributes to relate the concepts of i* and KAOS models and will help, for example, a development team in making the decision on which approach to follow, according to the nature of the project and the expressiveness of an approach to represent certain concepts (e.g., obstacles are represented explicitly in KAOS, but not in i*). Another contribution is to facilitate communication among members of the same team, if they are specialized in different approaches.
... Nan et al. [35] proposes a framework for tracing aspects from requirements goal models to implementation. The framework provides language support for modeling goal aspects and mechanisms for transforming models to aspectoriented programs. ...
Data
Full-text available
The KAOS framework aims to avoid eliciting ambiguous or irrelevant requirements and allows efficient and easy communication between stakeholders. Nevertheless, KAOS is designed mainly for requirements engineers, not so much for other important stakeholders, that understand better other kinds of models, such as mind maps. Thus, this paper proposes an approach for generating KAOS goal models from mind maps by adopting model-driven techniques. The use of mind maps, as a creative and agile requirements technique, aims to encourage the construction of KAOS goal models more effectively and in a simpler way by involving all kinds of stakeholders that do need to know about KAOS. Our approach also contains the definition of a systematic process and is applied to an industrial case application.
Chapter
Scientific software often involves many input and output variables. Identifying these variables is important for such software engineering tasks as metamorphic testing. To reduce the manual work, we report in this paper our investigation of machine learning algorithms in classifying variables from software’s user manuals. We identify thirteen natural-language features, and use them to develop a multi-layer solution where the first layer distinguishes variables from non-variables and the second layer classifies the variables into input and output types. Our experimental results on three scientific software systems show that random forest and feedforward neural network can be used to best implement the first layer and second layer respectively.
Article
Context: Goal modeling is an important instrument for the elicitation, specification, analysis, and validation of early requirements. Goal models capture hierarchical representations of stakeholder objectives, requirements, possible solutions, and their relationships to help requirements engineers understand stakeholder goals and explore solutions based on their impact on these goals. To reuse a goal model and benefit from the strengths of goal modeling, we argue that it is necessary (i) to make sure that analysis and validation of goal models is possible through reuse hierarchies, (ii) to provide the means to delay decision making to a later point in the reuse hierarchy, (iii) to take constraints imposed by other modeling notations into account during analysis, (iv) to allow context dependent information to be modeled so that the goal model can be used in various reuse contexts, and (v) to provide an interface for reuse. Objective: In this two-part systematic literature review, we (i) evaluate how well existing goal modeling approaches support reusability with our five desired characteristics of contextual and reusable goal models, (ii) categorize these approaches based on language constructs for context modeling and connection to other modeling formalisms, and then (iii) draw our conclusions on future research themes. Method: Following guidelines by Kitchenham, the review is conducted on seven major academic search engines. Research questions, inclusion criteria, and categorization criteria are specified, and threats to validity are discussed. A final list of 146 publications and 34 comparisons/assessments of goal modeling approaches is discussed in more detail. Results: Five major research themes are derived to realize reusable goal models with context dependent information. Conclusion: The results indicate that existing goal modeling approaches do not fully address the required capabilities for reusability in different contexts and that further research is needed to fill this gap in the landscape of goal modeling approaches.
Article
In many critical industrial information systems, tracking a dependability requirement is instrumental to the verification and validation (V&V) of security, privacy, and other dependability concerns. Automated traceability tools employ information retrieval methods to recover candidate links, which saves much manual effort. Integrating relevance feedback (RF) could potentially improve the retrieval effectiveness by soliciting the relevance judgments on a subset of the retrieval results and then incorporating the feedback into subsequent retrieval. However, little is known about how to use RF to trace dependability requirements. In this paper, we propose a novel term-based RF algorithm that leverages the term usage context to recommend positive and negative feedback. Experiments on two software datasets show that our algorithm significantly outperforms the contemporary link-based RF tracing method. Our work not only contributes a new solution to dependability requirements’ V&V, but also enables further automation to reduce the manual effort in the development life cycle of dependable industrial systems.
Article
Aspect-oriented requirements modelling separates the early crosscutting concerns as quality requirements such that one can reason about such requirements without cluttering with another. In this chapter, we propose a step further to reason about the dynamic goal models while the separated aspectual requirements are also dynamic. The key to this step is a list of change propagation rules for the goal models such that it is possible to reuse as much previous reasoning results as possible. To demonstrate, we use the Crisis Management System case study to indicate the application of these rules. © Springer-Verlag Berlin Heidelberg 2013. All rights are reserved.
Article
Full-text available
Aspect-oriented software development (AOSD) techniques support the systematic modularization and composition of crosscutting concerns, the so-called "aspects". Though AOSD techniques have been proposed to handle crosscutting concerns at various stages during the software life cycle, there are gaps between the aspects at the requirements level, those at the design level, and those implemented at later development stages. It is not clear what proof obligations about an aspect-oriented implementation follow from the initial aspectual requirements, or from design elements given in UML. This validation problem is further compounded by the lack of traceability of aspectual requirements and their associated trade-offs through to subsequent design and implementation-level refinements. This paper presents PROBE, a framework for generating proof obligations for aspect-oriented systems from the initial aspectual requirements and associated trade-offs, as well as from designs of aspects. The abstract proof obligations are expressed in standard linear temporal logic. Key components of the framework include an extended ontology with parametric temporal formulas and functions, and extensive treatment of conflicts among requirements. The proof obligations generated from designs of aspects are integrated with those from the requirements stage. The resultant temporal logic assertions, grouped into specifications of aspect implementations, can then be instantiated in terms of the implementation and intended verification tool. The result provides input to formal methods tools such as model-checkers, or can be used in the specification and generation of test cases.
Chapter
A complex concept lattice can possibly be split up into simpler parts. Here the mathematical model must prove its worth by providing efficacious and versatile methods for the decomposition. Every such decomposition principle can be reversed to make a construction method. Therefore, some of the following subjects will be taken up again in the next chapter with this second focus.
Chapter
Maps between concept lattices that can be used for structure comparison are above all the complete homomorphisms. In Section 3.2 we have worked out the connection between compatible subcontexts and complete congruences, i.e., the kernels of complete homomorphisms. A further approach consists in coupling the lattice homomorphisms with context homomorphisms. In this connection, it seems reasonable to use pairs of maps, i.e., to map the objects and the attributes separately. Those pairs can be treated like maps. We do so without further ado and write, for instance,$$(\alpha ,\beta ):(G,M,I) \to (H,N,J),$$if we mean a pair of maps $$\alpha :G \to H,\beta :M \to N,$$ using the usual notations for maps by analogy. This does not present any problems, since in the case that $$G \cap M = + H \cap N$$ we can replace such a pair of maps (α,β) by the map \alpha \cup \beta :G\dot \cup M \to H\dot \cup N