[ATM.Display, operation menu] AND [ATM, ON]
AND [USER.identification, valid] AND [USER.Card,
in
card slot] and [USER.Card.status, valid] AND
[ATM.Display, operation
menu] AND [ATM, ON] AND
[USER.number
of attempts,> 3] AND [USER.Card,in
card slot]
. The second sub-predicate does not include
predicate
[USER.identification, valid]. Therefore,
state
4
allows operation “ATM displays an operation
menu” in a situation where the validity of the USER
identification is not established. This comes from the
fact that step 4 condition (cond
4
) is the conjunction
of the negation of the conditions of alternatives 3.a
and 3.b.
Therefore,
cond
4
=
NOT(NOT([USER.identification, valid])
AND [USER.number
of attempts,<3]) AND
NOT(NOT([USER.identification, valid]) AND
[USER.number
of attempts,==3])
Which after simplification gives
cond
4
=
[USER.identification, valid] OR
[USER.number
of attempts,>3].
The inconsistency is propagated through the sce-
nario as shown by state
11
. It might be the
case that the use case embeds the assumption that
[USER.number of attempts,>3] will never hold be-
cause of the user interface. However, this assumption
could constitute a serious safety vulnerability if the
implementation solely relies on the documented re-
quirements and does not safeguard against the possi-
bly that the number
of attempts could become greater
than 3 (for instance by bypassing the user interface).
It is possible to correct the problem by adding condi-
tion USER identification is valid as a precondition to
operation “display operation menu”. This would re-
move the second part of the disjunction from state
4
and from all subsequent states including state
11
. The
precondition also constitutes a documented record
that helps ensures that the implementation would con-
sider the necessary checks.
5 CONCLUSIONS
We have presented an approach for checking use cases
against operation contracts. This approach is cur-
rently implemented in a prototype tool for use cases
based requirements engineering. The verification ap-
proach helps refine use cases in conjunction with a
domain model. It supplements a full validation based
on simulation. We believe this approach can be ap-
plied in any circumstance where use cases are com-
bined with contracts.
The limitations of the approach depend on the
strength of the underlying logic. In this paper, we il-
lustrated the approach with a simple predicate logic
without quantification. The approach does not pre-
clude from using a stronger form of logic. How-
ever, the stronger the logic, the more sophisticated
the proof engine needs to be. We are currently ex-
perimenting with theorem proving approaches (Duffy,
1991). Beside the need for more sophisticated proof
mechanisms, more complex logic systems involve
languages farther from natural language.
This approach could be extended beyond use
cases. For instance, as a future work, we are con-
sidering the possibility to use the same verification
approach to check design level interaction diagrams
against operations specified in OCL (OMG, 2003).
REFERENCES
Boehm, B. and Basili, V. R. (2001). Software Defect Re-
duction Top 10 List. Computer, 34(1):135–137.
Coleman, D., Arnold, P., Bodoff, S., Dollin, C., Gilchrist,
H., Hayes, F., and Jeremaes, P. (1994). Object-
Oriented Development the Fusion Method. Prentice
Hall.
Duffy, D. A. (1991). Principles of Automated Theorem
Proving. John Wiley & Sons.
Giese, M. and Heldal, R. (2004). From Informal to Formal
Specifications in UML. In UML 2004 - The Unified
Modelling Language: Modelling Languages and Ap-
plications, pages 197–211.
Hoare, C. A. R. (1969). An Axiomatic Basis for Computer
Programming. Communication of the ACM, 12(10).
Jacobson, I., Christerson, M., Jonsson, P., and
¨
Overgaard,
G. (1993). Object-Oriented Software Engineering, A
Use Case Driven Approach. Addison-Wesley, ACM
Press, 2 edition.
Johnson, J. (2006). My Life is Failure. The Standish Group
International, Inc.
Larman, C. (2004). Applying UML and Patterns: An Intro-
duction to Object-Oriented Analysis and Design and
Iterative Development. Prentice Hall PTR.
Meyer, B. (2000). Object-Oriented Software Construction.
Prentice Hall, 2 edition.
OMG (2003). UML 2.0 Superstructure. Object Manage-
ment Group.
Som
´
e, S. (2006). Supporting Use Cases based Require-
ments Engineering. Information and Software Tech-
nology, 48(1):43–58.
Toyama, T. and Ohnishi, A. (2005). Rule-based Verification
of Scenarios with Pre-conditions and Post-conditions.
In 13th IEEE International Conference on Require-
ments Engineering (RE 2005), pages 319–328.
USE CASE BASED REQUIREMENTS VERIFICATION - Verifying the Consistency between Use Cases and Assertions
195