reasoning with optional and preferred requirements
DESCRIPTION
Presented at ER2010, NovemberTRANSCRIPT
Reasoning with optional and preferred requirements
Neil A. Ernst, John Mylopoulos, Alex Borgida, Ivan Jureta
Universities of Toronto, Trento, Rutgers, Namur
ER – Nov 1, 2010 2
Motivation•Most RE processes assume we derive a single implementation
•RE models express a landscape of alternative solutions, from which we can select those suitable
•Q1. how do we find solutions (efficiently)?
•Q2. what solution(s) should we choose?
ER – Nov 1, 2010 3
The requirements problem• Find a specification S which will create a
system to satisfy desired requirements R in a domain D.
↪ D, S ⊢ R1
• Let’s assume R is represented using goals.
• Then a solution to our problem is a set of input goals satisfying our mandatory goals.
• Represent this model using the Sebastiani formulation (QGM).2
1 P. Zave and M. Jackson. Four Dark Corners of Requirements Engineering. ToSEM, 6:1–30, 1997.
2 Sebastiani, R., Giorgini, P., Mylopoulos, J.: Simple and Minimum-Cost Satisfiability for Goal Models.CAISE 2004
A
B C
OR
L
J K
OR
F
G H
AND
OR
AND
OR
D
M M
E
OROR ++
– –
1. Our solution must have {A,L}
++
– –
2. {E} would be nice, and we prefer {C} to {B} 3. S1={D,J} S2 = {D,K} S3 = {E,K} S4 = {G,H,J}
P
4. Preferred soln: {E,K}
ER – Nov 1, 2010 5
Accounting for taste• Preferences are binary relations over
goals (prefer G1 G2)➡ prefer solutions with G1 over those
with G2.
• Options are requirements it would be nice to have in our solution (prefer O1∈S O1∉S)
• Noriaki Kano1 would call these attractive requirements, as separate from must-be or performance requirements.1Kano, N., et al. “Attractive quality and must-be quality.” Journal of
the Japanese Society for Quality Control 14, no. 2 (1984): 39-48.
Client attitude
Requirement status
ER – Nov 1, 2010 7
Finding solutions
1. Identify admissible models (‘possible solutions’);
2. Satisfy as many optional requirements as possible;
3. Identify alternatives; 4. Filter the set of alternatives using user-
expressed preferences.
ER – Nov 1, 2010 8
Finding solutions (2)
1.Separate model into must-be and optional.
2.Find admissible solutions:
• one which satisfies all must-be requirements.
3. Find maximal set(s) of options which keep model admissible
ER – Nov 1, 2010 9
Finding solutions (3)4. Identify alternatives (OR)
• Admissible solutions + options
• Boolean satisfiability solver to find #SAT
• Set of optionset + alternatives5. Prune alternatives using preferences
• Dominate(P,Q) ⇔ for every q∈Q, there is an p∈P which is preferred or equivalent
• E.g.P = (A,B,C), Q = (B,C,D), (pref A D)
• P is dominant
ER – Nov 1, 2010 10
Initial optimizations
1.Scale option selection using cardinality or membership queries
2. Filter using preferences over options3. Find near-optimal sets with Tabu
search1
1Glover, Fred. Tabu Search--Part I. INFORMS Journal on Computing 1, no. 3 �(January 1989): 190-206.
ER – Nov 1, 2010 11
Tabu search of options• Search the lattice formed by subset closure of option sets
• Improvements measured using cardinality
• Tabu search allows for intelligent backtracking
• Limit number of moves for speed
• No guarantees of optimality, only of termination
X
✓
ER – Nov 1, 2010 13
Experimental evaluation
• Implementation code at
• http://github.com/neilernst/er2010
ER – Nov 1, 2010 14
Summary
• We have used options and preferences to select between solutions to the requirements problem.
• We introduced several optimizations in order to find solutions efficiently.