All languages

BOBJ languagedormant

Java reimplementation of OBJ3 adding hidden algebra: behavioural theories, auto-generated cobases and circular coinductive rewriting. It is the family member built specifically to prove that two specifications are observationally equal, and the only one with higher-order parameterized programming.

Overview

BOBJ is UCSD's Java reimplementation of OBJ, extending it with behavioural specification and circular coinductive rewriting. Where OBJ3 proves equalities by rewriting, BOBJ proves them by observation: two hidden-sorted terms are equal when every observer agrees.

Code

***> behavioural set theory: the observer is _in_
bth SET is
  sort Set .
  pr NAT .
  op empty : -> Set .
  op _in_ : Nat Set -> Bool .
  var N : Nat .
  eq N in empty = false .
end
The same equation is false under red and true under cred: rewriting can only see the terms, while coinduction sees the cobasis — here the single observer _in_. That gap is exactly the difference between initial and behavioural semantics, and proving it closed is what BOBJ exists to do.

Distinctive traits

  • Behavioural theories (bth) give hidden sorts a semantics from their observers, so infinite objects such as sets and streams need no axiom of extensionality.
  • The cobasis is computed automatically from the theory's congruence structure; set cobasis selects one explicitly when the default is too large.
  • cred combines behavioural rewriting with circular coinduction, and cases adds case analysis so proofs split on conditions such as N = 0 or N > 0.
  • Higher-order parameterized programming allows modules parameterized by modules and instantiated with morphisms — BOBJ was the first language to implement it.
  • Concurrent connection M1 || M2 composes systems by tupling their principal sorts, with ncong marking the projection operators that are non-congruent.
  • Written in pure Java, so it runs where OBJ3's Common Lisp does not, and it uses JavaCC for a more flexible term syntax than OBJ3's.

Status

Dormant. Development centred on the UCSD Tatami project, with the last distributed builds reporting version 0.9.x (2002); sources are available from the BOBJ site and its FTP archive. Maude and CafeOBJ are the actively maintained descendants.

History

BOBJ extends OBJ3 with the hidden algebra that Goguen, Rosu and Lin developed through the late 1990s; the circular coinductive rewriting algorithm was published at ASE 2000. The implementation is credited entirely to Kai Lin.

Sources & references