## 11. Specification functions

These specification functions are part of the Cleanroom methodology. They
define short names for certain conditions used in peer
verification of the code's correctness.

fosox.py

# - - - - - S p e c i f i c a t i o n f u n c t i o n s
# de-camel(s) ==
# a copy of s with all sequences 'aB', where a is any lowercase
# letter and b is any uppercase letter, replaced by 'a-b', and
# periods replaced by "_"
#
# decimal-okay ==
# any Python value acceptable as an argument to the
# decimal.Decimal() constructor
# dict-de-camel(d) ==
# a new dictionary with the elements of d, but with each key K
# replaced by de-camel(K)
# dim-okay ==
# a dimension as either an XSL-FO string (e.g., '2.5in') or
# as a FoDim instance
# units-okay ==
# any of the values in {"in", "mm", "cm", "pc", "pt"}