1.1.4. Generalized Sketches

Sketches are a very expressive specification formalism but reveal some essential deficiencies when it comes to the formalization of diagrammatic specification techniques in Software Engineering, for example (see the discussion in [13]).

We have to deal with other properties than just commutativity, limit or colimit. In addition, we meet structures that go beyond plain graphs like typed graphs or E-graphs [14], for example.

Extending the sketch formalism along the two dimensions–properties and/or structures–we arrive at generalized sketches. Generalized sketches were developed in the 1990s independently by Makkai, motivated by his work on an abstract formulation of Completeness Theorems in Logic [15], and a group in Latvia around Diskin, triggered by their work on data modeling [16,17].

To define a certain generalized sketch formalism, we chose a category Base which may differ from the category Graph of graphs. We coin for each property we want to deal with in our formalism a predicate symbol *P* and define, analogous to the shape graphs in traditional sketches, the arity of this predicate by an object *αP* in Base. Analogous to a diagram in a sketch, we define an atomic statement about an object *K* in Base by a morphism *<sup>δ</sup>* : *<sup>α</sup><sup>P</sup>* <sup>→</sup> *<sup>K</sup>* in Base. A generalized sketch <sup>K</sup> = (*K*, *St*K) is then nothing but an object *<sup>K</sup>* in Base together with a set *St*<sup>K</sup> of atomic statements about *K* (see [13]).
