December 1998        Issue: 5

Journal of Conceptual Modeling
www.inconcept.com/jcm

Validating an Object Oriented Model
By Dr. John K. Sharp

Introduction

Object-Oriented models have become popular, in part, because of the technical tools that can use the O-O paradigm to more efficiently produce applications. The precision in the models that is needed to support the application development tools has required the model to become graphically complex. This is not a problem for the analyst nor for the implementer who have been trained in the technique and who are familiar with graphical models. However these graphically complex models do place a terminology barrier between the subject matter expert and the knowledge expressed in the models. In order to ensure that the requirements expressed in a model meet the form, fit, and function of the problem known to the subject matter expert, the requirements should be validated. The precision contained in the graphical O-O model must be maintained during the validation procedure. To get around the terminology barrier, the validation procedure must also involve only knowledge about the subject area and not knowledge about the structure of the graphical design.

The validation of an O-O model must be considered a technical effort. Since the subject matter expert is usually not capable of reading much less approving the technical content of an O-O model, a procedure is needed to transcribe the O-O model into something the expert can validate. As stated above, this transcription procedure must maintain the precision of the model. Because of the effective tools for O-O implementation, accountability for the resulting application can then be assigned to the subject matter expert who validates the design. The Natural Language Modeling procedure can precisely state the O-O model as a set of simple sentences that can be used to precisely validate the O-O model. This article will discuss aspects of the NLM procedure and provide an example of the validation of an O-O model.

Graphical O-O Models

Graphical O-O models contain a condensed form of the subject area knowledge. This form of knowledge (sometimes thought of as fast facts) benefits the communication among analysts and implementers, but it usually creates a terminology barrier between the subject area experts and the IT professionals. This barrier is nearly unique in the world of engineering because it is one of the few times that the person with the knowledge (namely the subject matter expert) is not responsible for the resulting product. Would management allow parts to be manufactured in the shop without having the person with the most knowledge about the form, fit, and function of the part to be not accountable for the resulting part?

Example Problem

The example problem will be based upon a grocery receipt. The sample receipt in figure 1 provides information that needs to be modeled, but there are potentially several outcomes.

sharp1.gif (7411 bytes)

Figure 1: Grocery Receipt

The usual method would have the analyst interview subject matter expert(s) to determine the appropriate requirements and then document them in a graphical model. The analysis process would include references to the receipt in figure 1, to other examples, and to general knowledge learned from the expert. The O-O model presented in figure 2 is a partial result of this analysis. The subject matter expert must validate the content of the graphical model before the model can be approved. The precision used in the validation must be equivalent to the precision of the model. Without equivalent precision between the model and the validation procedure there is a possibility of miscommunication that will result in errors in the final model. The Natural Language Modeling procedure for validation creates sentences from the O-O model and then has the expert answer questions about populated sentences.

sharp2.gif (5295 bytes)

Figure 2: Initial O-O Model

Within this partial O-O model there are several ways that the grocery store could use to precisely identify receipts. The O-O use of meaningless identifiers for each class remains valid, but the real world identifier printed on the grocery receipt is important for the successful management of the store. Terry Halpin [1] suggests a way that this real world rule can be displayed on the O-O model. Using Terry's suggestion, a primary uniqueness constraint could exist across Store#, Receipt#, and Date. This constraint means that in addition to a receipt number, the store number and the date are required to identify an individual receipt. Placing this information on the O-O design does not guarantee that this is the correct business rule for the grocery store chain. However, this is much better than not having this information displayed. The validation challenge is to have the subject matter expert validate the knowledge content of the O-O model.

Now let's consider the NLM procedure that addresses the subject matter expert's unfamiliarity with the graphical model. The NLM model validation procedure first requests the subject matter expert to supply an instance based sentence taken from the sample (the receipt). The instances are needed because the subject matter expert can more easily and reliably answer questions involving instances than questions involving classes. The NLM procedure requires that every attribute and operation must be included in a sentence for validation. An instance based sentence for the Receipt class is:

1) The receipt with number 0046 was produced by clerk 306 in store 879 on register 02 at 12:03 on 2/05/98.

The analyst can now create the associated "type sentence:"

2) The receipt with number <Receipt#> was produced by clerk <Employee#> in store <Store#> on register <Register#> at <Time> on <Date>.

The NLM analysis procedure consists of a set of questions that the subject matter expert answers about the pertinent sentences. The first question deals with the ability to replace one instance value in sentence 1 to give a new sentence and have both sentences allowed at the same time. An example of the formal statement of Question 1 in the NLM procedure is:

Q1.1) Given that fact instance "The receipt with number 0046 was produced by clerk 306 in store 879 on register 02 at 12:03 on 2/05/98." is true, is it allowed for another valid Store Number [for example "754"] to exist such that the fact "The receipt with number 0046 was produced by clerk 306 in store 754 on register 02 at 12:03 on 2/05/98." is also true? Yes (says the subject matter expert [and this is displayed in the matrix in Figure 3.])

The results from repeatedly asking such questions for each instance in sentence 1) can be displayed as:

2) The receipt with number <Receipt#> was produced by clerk <Employee#> in store <Store#> on register <Register#> at <Time> on <Date>.

0046

306

879

02

12:03

2/05/98

 

-----------

----------

----------

----------

----------

----------

Another?

another

306

879

02

12:03

2/05/98

Yes

0046

another

879

02

12:03

2/05/98

No

0046

306

another

02

12:03

2/05/98

Yes

0046

306

879

another

12:03

2/05/98

Yes

0046

306

879

02

another

2/05/98

No

0046

306

879

02

12:03

another

Yes

Figure 3: Expert's answers to Question 1

Given the Yes/No answer vector in the matrix the NLM procedure specifies the next analysis step. In the model validation portion of the NLM procedure, the answers to the same questions are now determined by the analyst from the graphical model. The skilled analyst can derive these answers directly from the O-O model in Figure 2. The results of the derivation from the model are shown in Figure 4.

2) The receipt with number <Receipt#> was produced by clerk <Employee#> in store <Store#> on register <Register#> at <Time> on <Date>.

0046

306

879

02

12:03

2/05/98

 

-----------

----------

----------

----------

----------

----------

Another?

another

306

879

02

12:03

2/05/98

Yes

0046

another

879

02

12:03

2/05/98

No

0046

306

another

02

12:03

2/05/98

Yes

0046

306

879

another

12:03

2/05/98

No

0046

306

879

02

another

2/05/98

No

0046

306

879

02

12:03

another

Yes

Figure 4: Graphical O-O model's answers to Question 1

The model is validated when the subject matter expert's answers are the same as the analyst's answers. For this example five of the six answers match. The fourth answer is different. This difference must be investigated. A dependency exists for every "No" answer in the answer vector. The independent portion of the sentence that creates the dependency must be established. The NLM procedure does this through generating a set of questions that will establish all rules that apply to this sentence. In this example the uniqueness constraint that identified a receipt instance was incorrect. The real world identification of a receipt includes the Register# as well as Store#, Receipt#, and Date. The NLM procedure will also establish that the real world identifier for a register includes the Register# and the Store#. All such real world identifiers will be established as part of the NLM procedure.

These business rules which dictate the dependencies uncovered above must be enforced by the supporting information system. Otherwise, bad data can corrupt the system directly through the application or through data administration maintenance. The corrected O-O model is shown in Figure 5. Now that the rules identifying a receipt and a register are known and modeled, they can be properly enforced by the application.

sharp3.gif (5897 bytes)

Figure 5: Corrected O-O model

Conclusion

The analysis just completed is based upon the mathematical dependencies that exist in the subject area expert's world. These dependencies exist whether or not the graphical model specifying the requirements is based upon relational, object-oriented, NIAM, or any modeling methodology. Any system resulting from erroneous modeling will be a long-term failure (continued maintenance required even for the initially successful project) if the inherent dependencies are not enforced. The object-oriented extensions suggested by Terry Halpin [1] are a step in ensuring that these dependencies are well documented in an O-O model.

Subject matter experts, who cannot validate O-O models, are enabled to validate them by the application of the NLM procedure. Is your company even attempting to validate O-O models?

Happy Modeling!

Dr. John Sharp is the founder and principal consultant for Sharp Informatics.Before starting Sharp Informatics in 1997 he was employed by Sandia National Laboratories in Albuquerque, NM for 18 years. While at Sandia he held staff and management positions in all areas of information technology, including analysis, design, implementation, maintenance, information architecture, data administration, and information technology research. He has worked closely with Prof. Shir Nijssen of The Netherlands to improve the NIAM analysis methodology. Dr. Sharp is the creator of the first information analysis procedure known to be mathematically precise.This procedure reformulates the usual (imprecise and inaccurate) statements and examples from a subject area into verified fact types. The output of this productivity enhancing process (a set of information requirements) is compatible with all the latest and most productive database application creation tools. John is the editor of the international standard for conceptual schemas. He has co-chaired two international conferences on natural language modeling and he has presented numerous papers and seminars at professional conferences.

Contact information:

Dr. John Sharp
Sharp Informatics
1604 Vassar SE
Albuquerque, NM 87106
sharp@sharp-informatics.com
505-243-1498
fax 505-248-0345
http://www.sharp-informatics.com

© Copyright, 1998-2004 InConcept (Information Conceptual Modeling, Inc.) All Rights Reserved. Privacy Statement.
ISSN: 1533-3825