next up previous
Next: State Machines Up: What Does Satisfies Mean? Previous: What Does Satisfies Mean?

Binary Relations

Consider a simpler problem of determining when one binary relation satisfies another. Suppose we have a specification for a square_root procedure:

1

 squareĒ_root(x: int)/ok(int)

pre tex2html_wrap_inline345

post tex2html_wrap_inline347

that denotes the binary relation:

tex2html_wrap_inline349

I could choose to implement this procedure such that I always return the positive square root of an integer. Its relation is:

tex2html_wrap_inline351

Informally, my implementation satisfies the specification because tex2html_wrap_inline353 just narrows the possible choice of the integer returned allowed by tex2html_wrap_inline355 and the implementation defines some value for each input integer that is defined for the specification.

More formally, we have, given an abstract relation, tex2html_wrap_inline355 , and a concrete relation, tex2html_wrap_inline353 :

defn670

The first property says that any pair in the concrete relation is also an element of the abstract relation. The second property says that for each input that is related by tex2html_wrap_inline355 , we want tex2html_wrap_inline353 to be defined. Without the second property, tex2html_wrap_inline353 could be empty and the satisfies relation would holdgif.



Norman Papernick
Mon Mar 18 14:58:51 EST 1996