Formalizing a Casual Requirement

by Conrad Weisert
February 18, 2008
© 2008 Information Disciplines, Inc.


Last month we showed this informal requirement from a classic textbook, and invited readers to help transform it into a rigorous decision rule.
Customers who place more than $10,000 business per year and have a good payment history or have been with us for more than 20 years are to receive priority treatment.

We got several responses that addressed parts of the problem, but we're still a long way from a satisfactory rendering of the rule. I'll show the beginning here that everyone agrees on, and invite further refinements for next month.


We know that logical expressions of the form P AND Q OR R are ambiguous. We have to decide whether the user meant this:

    IF  (customer buys more than $10,000 per year 
         AND  customer has a good payment history)
    OR  has been with us for more than 20 years
or this:
    IF  customer buys more than $10,000 per year 
    AND (customer has a good payment history
         OR  has been with us for more than 20 years)

If we're working closely with a knowledgeable user representative we can ask. If not, then we'll choose the one that we think makes better business sense. In either case we'll document the result for the users' final review.

In this case the second interpretation seems more likely. We shouldn't be surprised if the user representatives will want to refine the rule further after they see it stated unambiguously, but this is what we have for now.

Everyone agreed that the result ("receiving priority treatment") can be a boolean (true-false) function result, assuming that another part of the program knows what priority treatment means.

We've still got lots of problems. For one thing, what does it mean to say that the customer "places orders for more than $10,000 per year"? A new customer placing its first order for $12,000 satisfies that criterion, but that's unlikely to be what the user representative meant. Surely there's some minimum number of years before the criterion is to be satisfied. Furthermore, what does it mean to say that a customer has been "with us" for 20 years? Should someone who bought a $3.00 replacement part in 1982 and nothing since satisfy that criterion. Unlikely. And what defines a "good payment history"?

Let's have your ideas. Conrad Weisert (cweisert@acm.org).


Return to table of contents
technical articles
systems analysis topics

Last modified February 18, 2008