A Methodological Guide to the CafeOBJ Logic
Institute of Mathematics “Simion Stoilow”, PO Box 1-764, Bucharest 014700,
1 The CafeOBJ SpeciFcation Language
CafeOBJ is an
industrial-strength algebraic speciFcation language;
it is a modern successor of OBJ and incorporates several new algebraic speciF-
cation paradigms. It was developed in Japan with large-scale support from the
Japanese government. Its deFnition is given in , a presentation of its logical
foundations can be found in , and a presentation of some methodologies
developed around CafeOBJ can be found in [15, 16]. CafeOBJ is intended to
be used mainly for system speciFcation, formal veriFcation of speciFcations,
rapid prototyping, and even programming.
In this chapter we present the logic underlying CafeOBJ and illustrate its
intimate relationship to the speciFcation and veriFcation methodologies.
±irst, let us brieﬂy overview some of CafeOBJ most important features.
1.1 Equational Specifcation and Programming
Equational speciFcation and programming is inherited from OBJ [18, 26] and
constitutes the basis of the language, the other features being somehow built
on top of it. As with OBJ, CafeOBJ is
(by term rewriting), which
gives an elegant declarative method of functional programming, often referred
As with OBJ, CafeOBJ also permits equational
speciFcation modulo several equational theories such as associativity, com-
mutativity, identity, idempotency, and combinations of all these. This feature
is reﬂected at the execution level by term rewriting modulo such equational
Although this paradigm may be used for programming, from the applications
point of view, this aspect is secondary to its speciFcation side.