Page 150 - DCAP506_ARTIFICIAL_INTELLIGENCE
P. 150
Artificial Intelligence
Notes
Example: The two sentences: ‘The dog followed the cat’ and ‘The cat followed the dog’
varies only in terms of syntax, yet transmit quite diverse meanings.
11.2.3 Semantic Analysis
The development of object-oriented software starts from requirements expressed commonly as
Use Cases. The requirements are then converted into a conceptual or analysis model. Analysis is
a fundamental stage because the conceptual model can be shown to satisfy the requirements and
becomes the skeleton on which the complete system is built. Most of the use of software patterns
until now has been at the design stage and they are applied to provide extensibility and flexibility.
However, design patterns don’t help avoid analysis errors or make analysis easier. Analysis
patterns can contribute more to reusability and software quality than the other varieties. Also,
their use contributes to simplifying the development of the analysis model. In particular, a new
type of analysis pattern is proposed, called a Semantic Analysis Pattern (SAP), which is in
essence a mini application, realizing a few Use Cases or a small set of requirements. Using SAPs,
a methodology is developed to build the conceptual model in a systematic way. No good design
or correct implementation is possible without good analysis; the best C++ or Java programmers
cannot make up for conceptual errors.
!
Caution The correction of analysis errors becomes very expensive when these errors are
caught in the code.
It is therefore surprising how poorly understood is this stage and how current industrial practice
and publications show a large number of analysis errors. We have found that industrial software
developers usually have trouble with analysis. What are worse, even serious journals and
conferences publish papers or tutorials that contain clear analysis errors.
A possible improvement to this situation may come from the use of patterns. A pattern is a
recurring combination of meaningful units that occurs in some context. Patterns have been used
in building construction, enterprise management, and in several other fields. Their use in software
is becoming very important because of their value for reusability and quality; they distill the
knowledge and experience of many designers. Most of the use of patterns until now has been at
the design stage. However, design patterns don’t help to avoid analysis errors or to make
analysis easier. We believe that we need analysis patterns to improve the quality of analysis and
they can contribute more to reusability and software quality than the other varieties. We also
intend to show that their use contributes to simplifying the development of the application
analysis model. In particular, we propose a new type of analysis pattern, called a Semantic
Analysis Pattern (SAP), which is in essence a mini application, realizing a few Use Cases or a
small set of requirements. Using SAPs we develop a methodology to build the conceptual
model in a systematic way. We use UML (Unified Modeling Language), as a language to describe
our examples.
Analysis Patterns and their Use
The value of analysis is played down in practice. The majorities of the papers published about
object-oriented design as well as the majority of textbooks concentrate on implementation.
Books on Java, C++, and other languages outnumber by far the books on object-oriented
analysis/design (OOA/OOD). On top of that, most books on OOA/OOD present very simple
examples. To make things worse, professional programmers need to implement as soon as
possible, there is pressure to show running code and they may skip the analysis stage altogether.
144 LOVELY PROFESSIONAL UNIVERSITY