Introduction

“Designers work with descriptive devices of many kinds. These may be spatial or symbolic” (Stiny 1991). Descriptions serve as (re)presentations of design. Descriptions may also be useful to compare designs to find similarities and descriptions can sometimes be generated. Shape grammars have been used for both comparison and generation: they are a formal rewriting system for producing languages of shapes (Stiny 1980). When we consider descriptions of historical architecture, we are both interested in describing the specific architectural object as in its relation to other, similar architectural objects. While shape grammars have been extensively used for this purpose, shape descriptions of architectural objects are lacking. As George Stiny (1981: 257) noted, “main details of the functional elements comprising designs in these languages are provided in the informal, verbal descriptions of the shape (rewriting) rules used”. For this reason, Stiny proposed description grammars to construct the intended descriptions of designs.

Descriptions of historical architecture are rarely limited to shape descriptions. On the other hand, descriptions of historical architecture generally offer limited generative capabilities. Where generative schemas for historical architecture exist, these tend not to be developed by architectural historians and offer historians few insights that could lead to a general method for the development of generative schemas from descriptions of historical architecture. We suggest an approach using typological descriptions as generative guides for historical architecture. In this paper, we present an ontological approach to describe the typology of classical period Ottoman mosques, and propose description grammars as the mechanism for generating an instance of the typology from this ontology. We illustrate this process with an example, namely the Şehzade Mosque in Istanbul. Finally we discuss the potentialities and limitations of the approach.

An Ontological Approach to Describing a Family of Designs

Within a discipline, members commonly share a definition and classification of common concepts. This structuring of shared knowledge through common concepts gives insight into that particular discipline (Leupen et al. 1997). Architects generally classify building designs based on spatial and formal features. This classification features the concepts of type and typology. Studies that make use of typological classification have established a rich body of architectural knowledge. Figure 1 shows some types and instances in the context of Ottoman mosques.

Fig. 1
figure 1

Three instances of types in three classical period Ottoman mosques: Şehzade (Istanbul), Süleymaniye (Istanbul), and Selimiye (Edirne). Left top floor plans, left bottom the role of structural piers on the field of vision and right muqarnas above entrances from the respective mosques. Images: after (Egli 1997; Erzen 1996)

Building types generally define classes of buildings that have common, often functional, characteristics. However, the functional classification is not the only aspect of building types. Generally a type can be described as the encoding of prominent features of a design object. Such features include function, form, and context. According to (Moneo 1978), a type can be “defined as a concept which describes a group of objects characterized by some formal structure. It is fundamentally based on the possibility of grouping objects by certain inherent structural similarities”. Type as a formal structure embraces a vast hierarchy of concerns from social activity to building construction. The relationships between all these aspects and the elements that make up the whole define the formal structure. Such an interpretation of types and typologies has been the subject of a number of computational systems where precedent knowledge is represented, usually in case-based systems (Aygen 1998; Casakin and Dai 2002; Madrazo 1999; Mubarak 2004; Pasman 2003).

An ontology is considered as “a formal, explicit specification of a shared conceptualization” (Gruber 1993). An ontology in the context of knowledge management is defined as composed of a domain-specific (expandable) controlled vocabulary, a set of semantic relationships between the terms of the vocabulary, and a set of operators that control how this vocabulary represents the domain objects (Chu and Cesnik 2001). The terms in this vocabulary have various properties assigned. The operators are defined as part of a grammar in an ontology representation language. The rules of the grammar define how to combine the knowledge in the ontology in a meaningful way. An ontology defines a meta-model, with tools and mechanisms in order to create a model within a domain. The creation of an ontology is usually based on consensus. Depending on how ‘formal’ the ontology is, its grammar may have varying degrees of rigor and imposed rule and structure. This degree of ‘formalness’ affects the ease of creation, use and maintenance, similar to any formal knowledge representation formalism.

An ontological Typology of Classical Period Ottoman Mosques

We created an ontology in order to parametrically describe classical period Ottoman mosques. This ontology is based on a literature review and analysis, and derived from the typology of classical period Ottoman mosques of Sinan (Fig. 1). This typology is the result of research of the architectural works and their components and the historical and cultural context (Egli 1997; Ertug 1981; Erzen 1996; Kuban 1980, 1987; Stierlin 1985, 1998).

This ontology decomposes the physical architectural object into its components, in a hierarchical manner (Fig. 2). The ontology is parametric in the sense that not all components need to be present in every mosque, i.e., every instance of the ontology. The ontology is instantiated for every design under consideration. Also, every instance of the ontology may include additional levels of detail that identify or may be relevant only for this particular instance.

Fig. 2
figure 2

An ontology for classical period Ottoman mosques. While this particular ontology contains both physical and conceptual categories, only the physical categories are used in the generation process. The elements that are already defined elsewhere in the network as categories (possibly including substructures) are marked by ‘@’

The level of detail of the ontology is defined in a balance between completeness and flexibility. Completeness is desired in order to achieve a good design product that makes sense within its typology. On the other hand, flexibility is desired in order to be able to facilitate the various instantiations of the ontology successfully. The relationships in the ontology gain importance in this context. Taxonomy (is-a) and meronomy (part-of) relationships are dominant in the ontology. The extent to which these relationships need to be made explicit also depends on the concerns stated above.

The ontology representing the typology of classical period Ottoman mosques of Sinan includes two main branches: physical and conceptual (Fig. 2). The physical types mainly classify the structural and the organizational aspects of the mosques. The main structural element is the domed baldachin that contains the central dome of the mosque. The central dome or a set of domes is supported by arches, piers, buttresses and weight towers, and rests on a transitional structure. Mosques contain arcades at various locations. The exterior shell is also a part of the typology. The organizational structure contains the courtyard, the prayer hall, and the minarets of the mosque. The conceptual dimension of this typology contains perceptual, spatial, philosophical and contextual aspects. The sub-types that are included in the branches may also be present in another location in the structure, making the structure a directed graph rather than a tree. The types that are also located in another part of the typology are marked with a ‘@’ in Fig. 2. The typology is constructed using mainly the concept of decomposition.

A Description Grammar for Ontological Typologies

Given an ontology that describes a typology, and an instance of this typology, a generation process has been conceived that generates the instance from the ontology hierarchically, traversing the ontology elements selected for the instance. We propose a description grammar to provide the mechanism for this.

Stiny (1981) defines description grammars as a means to construct descriptions of designs by use of a recursive schema, noting that in the specification of shape grammars for defining languages of design, “main details of the functional elements comprising designs in these languages are provided in the informal, verbal descriptions of the shape (rewriting) rules used to compose spatial elements (lines) in designs”. Stiny (1981) illustrates the application of a description grammar with designs made up of blocks from Froebel’s building gifts. The descriptions are derived from the generation and reflect the sequence of shape rules used to compose them. Andrew Li (2001) applies a description grammar in the specification of a shape grammar for (teaching) the architectural style of the Yingzao fashi (Chinese building manual from 1103). The descriptions that are generated are those that are found in the annotated Yingzao fashi (Liang 1983) and, similarly to Stiny’s (1981) illustration of description grammars, the descriptions merely reflect on the spatial elements that constitute the design and the way these are combined. In both cases, the description functions (or description rules) that specify how the descriptions are constructed do not impose any conditions on the existing descriptions, they only add to the existing descriptions (with the exception of a few functions for reducing textual descriptions). In our case, the ontology is meant to drive the rule application process; at a minimum, the descriptions must adhere to the hierarchical structure of the ontology, even if the ontology is parametric in the sense that not all terms (or components) need to be present in every instance of the ontology or additional levels of detail may be introduced in an instance of the topology.

José Duarte utilizes description grammars in his definition of a discursive grammar. A discursive grammar is composed of a programming grammar generating design briefs based on user and site data and a designing grammar using the design brief(s) to generate designs in a particular style. Both programming grammars and designing grammars utilize description grammars, though only the designing grammar complements the description grammar with a shape grammar. Additionally, Duarte (2001, 2005) considers the use of heuristics to constrain the rules that are applicable at each step of the design generation. Duarte and colleagues have applied discursive grammars, among others, to the houses designed by the architect Alvaro Siza at Malagueira (Duarte 2001, 2005), to the fabric of the Zaouiat Lakhdar quarter of the Marrakech Medina (Duarte et al. 2006), to urban design (Beirão 2012; Beirão et al. 2012) and to housing rehabilitation (Eloy 2012; Eloy and Duarte 2014). Given that in a discursive grammar, a description grammar generates the design brief and the design brief feeds the generation process, the descriptions do drive the generation and constrain which rules can be applied at every step in the generation process. In our case, the ontology does not act as a design brief but, instead, prescribes the design descriptions we want to arrive at, at least in their hierarchical decomposition. As such, the ontology also drives the rule application process and constrains the selection of rules that can be applied at any step in the process.

With respect to the integration of shape and description in the generation of an instance of the typology as described by the ontology, we will follow Stiny’s (1990: 97) suggestion to consider a design as a member of “an n-ary relation among drawings, other kinds of descriptions, and correlative devices as needed”. Li (2001) does so as well and distinguishes seven drawings (from plan diagram to plan, section and elevation) and nine descriptions (specifying measures and descriptions of width, depth, height). Without being exhaustive, we can at least distinguish the ontological description, a plan drawing and the 3D model of the instance of the typology. The ontology itself is represented as an XML document. The elements in the ontology are created, initially, as spatial elements in a plan diagram and, subsequently, as 3D objects in a 3D model. Their relative positions in relation to each other are retrieved from the ontology. The description grammar, together with the shape production rules, generates the instance both as an ontological description, identifying the instance within the architectural body, and as a geometric model, specifying the spatial form of the instance. Though, conceptually, we distinguish the description grammar from the shape grammar, the latter specifying the shape production rules, under the n-ary relation as suggested by Stiny (1990: 97), we can consider the two grammars to merge into a compound grammar, whose rules each consist of one or more description rule components and one or more shape rule components, corresponding to the specific n-ary relation. We must note that this terminology is not necessarily shared by others, though no single terminology exists and each terminology often strongly reflects the particular approach and viewpoint. Stiny (1981) employs the terms description function and functions, probably owing to the fact that in his view, and his application of a description grammar, these functions are subservient to the shape rules. Stiny (1981: 258) adopts the term function to denote the description rule corresponding to a single (shape production) rule and reserves the term description function for the collection of all functions, including the initial description, generating all possible descriptions. Li (2001: 30) similarly employs the term description function, however, he adopts it instead of the term function as used by Stiny. In contrast to Stiny, Li considers parallel descriptions and, as such, a description function to contain multiple description rule components, but he does not explicitly name the components. Duarte (2001) agrees with Li in the use of the term description function and adopts the term description rule for each description rule (or function) component separately.

Stiny (1981) considers integers, coordinate pairs, tuples of coordinate pairs (specifying the boundary points of (linear) openings or of spaces or ‘rooms’), sequences of coordinate pairs, lists of tuples of coordinate pairs, and an adjacency matrix as descriptions (and their elements). Li (2001) considers integers, tuples or sequences of integers, and tuples of strings as descriptions. Duarte and Correia (2006) and Beirão (2012) consider much more complex description structures, specifically conceived for the task at hand; similarly, their description rules are specifically encoded (hard-coded) to handle these custom description structures. As we consider the ontology represented in XML, the ontological description will be a string, or a sequence of strings to be concatenated at a later stage in the derivation process. As the XML description can become large and possibly difficult for a human to scan quickly in order to understand the stage at which the generation has arrived, we propose to add a second description identifying the horizon of our derivation, i.e., the various elements in the hierarchy that have been arrived at but not yet fully expanded upon. This horizon may be conceived as a set of ontological terms (strings). In the context of shape grammars, these terms may be represented as labels instead of descriptions, though the distinction is irrelevant from a usage point of view. Additional descriptions may be conceived to represent properties that are characteristic of the specific instance and impact the generation process, such as dimensions of the mosque or its elements, and that need to find their place in the ontological description.

Thus, we mainly consider (sequences of) strings as descriptions and, additionally, integers, or floating-point numbers, similar to Li (2001). However, when using a sequence of strings for the XML description, in contrast to Li (2001), we may not know how long the sequence is at any time, or which item in the sequence we need to target in any specific description function. Therefore, instead of sequences of strings, we consider each XML description to consist of a single string, and consider string concatenation as a means to identify parts of a string and insert (or append or prepend) new strings into the description. We propose the following notation: we write the descriptions as strings enclosed in double quotation marks and use the period as concatenation operator on strings. We consider identifiers to denote variable terms in our descriptions, e.g., when matching on a description. We denote the ontological description with o and the horizon of ontological terms that have been arrived at in the ontological description but which may still be further expanded upon with h.

Description rule components take the form lhs → rhs, where, for a single description, lhs may take the form of a single variable referring to the description as a whole, may explicate its value in its entirety, or may explicate part of its value and use one or more variables to refer to the remainder of the description (in the case of a string). In the former case, there is no constraint specified and the description rule component always applies (though accompanying shape and description rule components may not and thereby invalidate the entire rule). In the latter cases, the explication constrains the rule (component) application. As an example of the use of variables in a description rule component, but ignoring the XML format at this time, we may write:

This description rule component inserts the terms “organizational” and “prayer hall” into the ontological description, but fails if the existing description, as a string, does not start with the term “mosque”.

This description rule component makes no changes to the ontological description but ensures that the term “prayer hall” is already present within the description.

In the case of the horizon of ontological terms, the description rule component may specify a set of zero, one or more ontological terms as both the left-hand-side and the right-hand-side of the rule component. For example:

This description rule component takes a possibly empty horizon of ontological terms and adds the term “mosque” to it. As a rule component it would always succeed but in combination with an XML description rule component and, possibly, a shape rule component, it may serve to initialize the horizon.

A Description Grammar as Generative Mechanism Guided by an Ontology

Above, we have described the mechanism of description grammars and the specification of descriptions and description rules for our purpose. However, we have not yet addressed the approach to be taken to conceive of the description rules and grammar that enable the generative process in the first place. In the example here presented, the typology and ontology was already available (Tunçer 2013) and served the conception of the exemplar rules provided below.

While we do want to derive the instance from the ontology’s hierarchical structure, we do not necessarily want to prescribe any specific traversal of the hierarchy, such as depth-first. Nor do we want to prescribe a specific ordering in the application of rules; e.g., once the prayer hall and courtyard have been created, it may not matter whether the prayer hall is expanded upon and detailed before the courtyard, or vice versa, unless there is a parametric relation between both expansions that must be embedded in the rules. However, we do want to provide a guide for the conception of the description rules and grammar from the ontological structure. For this purpose, we suggest to visit in a single rule all sibling elements in the ontology that are children of the same element previously created. For example, we will create the prayer hall and courtyard [and possibly minaret(s)] in a single rule as together they define the main shape and outline of the classical mosque. However, while we propose to add all such sibling terms at once in the horizon h, we may not necessarily opt to create their XML or shape descriptions also all at once. In fact, we may prefer to create some elements as their ontological terms are added to the horizon, while we may opt to create other elements when their ontological terms are removed from the horizon. This provides sufficient flexibility in conceiving the shape rules while, at the same time, adhering to a simple mechanism with respect to traversing the ontology and expanding the horizon of ontological terms.

A related aspect is the form of the ontological description. As our aim is to represent the ontological instance as an XML document, we propose the ontological description o to literally contain the (partial) XML specification. Alternatively, we could choose a more terse description o, of which the conversion to the XML specification could be automated at a later stage in the process. Figure 3 shows part of the XML Schema Definition used.

Fig. 3
figure 3

Part of the XML Schema Definition used to specify the ontology in XML

The fact that the typology and ontology were already available, in XML format, is most obvious from the XML descriptions we will generate, specifically in the IDs (and ID references) assigned to each category, e.g.:

Assigning distinct IDs to each category is not too difficult, but identifying the categories that are already defined elsewhere in the ontology and ensuring that each ID reference points to the correct ID and category is a more complex undertaking, and one that could easily lead to errors that would only surface once the entire grammar is specified and tested. Having the ontology available beforehand as an XML document ensures the validity of the ontology before embarking on the grammar development. However, in the case where an XML specification ontology is not yet available, the description grammar can serve to aid in the identification of the categories already defined and can automate the generation and assignment of IDs and ID references to all elements in the ontology. It suffices to introduce two additional descriptions. The first serves to store the numeric value of the last assigned ID, such that new IDs can automatically be generated by incrementing this value and updating the description to the newest numeric ID value. The second description serves to list all categories previously defined and assigned an ID with their IDs, such that any new category can be checked with respect to this list to see if it has already been defined and, if so, its ID can be retrieved and assigned as an ID reference to the new element. Rather than using a string representation for this description, a set representation of tuples (e.g., key-value pairs) could be used to speed up the checking and retrieval process. Though Stiny (1981) only considers tuples within a single description, and Duarte (2001) considers a similar (visual) presentation of a description of tuples, Duarte’s (2001) (Duarte and Correia 2006) usage of custom description structures most certainly includes sets of tuples, and key-value pairs. However, a set of key-value pairs does not necessitate a custom representational structure, and can be achieved as a general solution using sortal structures (Stouffs 2008) and their application to sortal grammars (Stouffs 2012). Nevertheless, work on a formal representation for description rules and their implementation proposes to include support for sets of description tuples (Stouffs 2014). Given the description of all existing categories with their IDs, any rule can be initially developed to check if the categorical terms introduced in this rule are already present in the description. If the categorical terms are already present, the rule should apply as expected. Otherwise, the rule must necessarily be altered. However, the alteration only affects the generation or retrieval of the ID(s), a minor aspect in the specification of the rule.

Illustrative Example: The Şehzade Mosque in Istanbul

We illustrate our approach using the case study of the Şehzade mosque in Istanbul. The Şehzade mosque (Fig. 4) was commissioned by Suleyman the Magnificent in memory of his deceased son Mehmet. Sinan designed and built the mosque between 1543 and 1548. Sinan called this mosque one of his ‘apprenticeship’ artifacts. The mosque has a square plan and is covered by a central dome with four half-domes flanking it. Colonnaded galleries conceal the buttresses along the north and south facades. The central dome has a diameter of 19 m and is 37 m high. The mosque is fronted by a courtyard that is as large in area as the mosque itself. The courtyard has an ablution fountain at the center and an inner colonnade all around it.

Fig. 4
figure 4

Şehzade mosque in Istanbul, by Sinan. Image: (Gurlitt 1912)

We present a few rules that serve the generation or derivation of the Şehzade mosque as an instance of both the ontology and the typology that it describes, traversing the ontology elements selected for the instance. Only the physical categories of the ontology in Fig. 2 are used in the generation process, and we omit the complex and properties categories at this time. Therefore, we consider the category mosque as the root of the ontological instance. We limit the graphical form to a schematic plan drawing as we aim to illustrate the ontological above the graphical generation. At this time, we refer to Şener and Görgül (2008) for the graphical generation of classical period Ottoman mosques using a shape grammar approach.

We will use the term shape grammar to denote our grammar, even though it is a compound grammar whose rules each consist of one or more description rule components and one or more shape rule components. We use the term shape grammar in reference to its definition by Stiny (1992) (initially Stiny and Gips 1971; see also Yue and Krishnamurti 2013), except that we consider the grammar to apply over an algebra that is not only composed of shape algebras (extended with labels and/or weights) but also (a) description algebra(s). To some extent, this can be considered a small variation on the definition of shape grammars and mostly in line with earlier redefinitions of shape grammars by Stiny (see Yue and Krishnamurti 2013). However, to avoid further ambiguity, we will talk about rules instead of shape rules, and forms instead of shapes (the term form is used here in the meaning of an arrangement of parts (Stouffs and Krishnamurti 1997)). Note that we consider the use of labels not only in association with points, but also with line segments and plane segments (or even without association to any geometric element, in the case where we consider the horizon as composed of labels instead of descriptions). All plane segments we consider have their outline additionally represented as line segments. As such, we do not graphically represent the plane segments in our drawings, other than by the labels they are associated with.

Figure 5 shows the initial form of our shape grammar. Here, we have selected to start with only a shape, an arrow, reflecting upon the location, orientation and size of the mosque, and leave the initial horizon and XML description empty. However, we could as easily opt for the horizon to initially contain the term “mosque”, already identifying the type of the building, and, similarly, the XML description to contain the initialization of the XML specification. For this reason, we consider a rule zero to bridge both options, though other variations may also be considered. Figure 6 shows rule 0. Figure 7 shows rules 1 through 5 creating the prayer hall and courtyard, the central dome and part of the supporting structure (among others) for the Şehzade mosque. Rule 1 creates the prayer hall and courtyard and indicates the position of the minarets. These terms, as well as the terms structural and decoration, replace the term mosque in the horizon of ontological terms. Rule 2 expands upon the prayer hall, identifying the central space, the qibla wall, the interior galleries and the prayer hall façade. Within the ontological description, we also consider the imam’s platform, but we left it out from the plan drawing as it can be added later with respect to the qibla wall. Rule 3 adds the central dome above the central space. Structurally, the central dome forms part of the domed baldachin. Rules 4, 5a and 5b add the piers and arches supporting the central dome. There are always four piers encircling the central dome; however, the presence of an arch may be conditioned by the boundary conditions of the central space. As such, we consider two rules, 5a and b, adding the arches. Rule 5a adds an arch to the plan, on condition that the term arch is already present in the horizon of ontological terms. Rule 5b adds nothing to the plan and replaces the term arch with the term tympanum in the horizon of ontological terms.

Fig. 5
figure 5

The initial form of the grammar. The arrow reflects upon both the size and the orientation of the mosque. The North direction is considered up

Fig. 6
figure 6

Rule 0 initializes the XML description o and horizon h. Alternatively, the result from applying rule 0 to the initial form in Fig. 5 could be considered as initial form instead

Fig. 7
figure 7figure 7

Rule 1 through rule 5a and b creating the prayer hall and courtyard, the central dome and part of the supporting structure (among others) for the Şehzade mosque

Figure 8 shows the partial derivation resulting from the application of the above rules to the initial form. Each step in the derivation corresponds to the application of a single rule, except the last step, which follows from the application of rule 5a four times followed by the application of rule 5b.

Fig. 8
figure 8figure 8figure 8

The (partial) derivation process from the application of rules 1 through 5b to the initial form. Each step in the derivation corresponds to the application of a single rule, except the last step, which follows from the application of rule 5a four times followed by the application of rule 5b

Conclusion

The example above emphasizes the utilization of the description grammar in the generative process of an instance of the typology of classical period Ottoman mosques as an ontological instance. The spatial forms are rudimentary and only in 2D and the rules are obviously conceived in correspondence to the ontological instance of the Şehzade mosque, rather than illustrating the spatial and formal commonalities of classical period Ottoman mosques. This is of course the main objective of this paper, demonstrating the use of typological descriptions as generative guides for historical architecture. Future research and developments will aim to improve the integration of ontological and spatial/formal aspects in the specification of a (compound) shape grammar. The shape grammar of classical Ottoman mosques developed by Görgül (Şener and Görgül 2008) may serve as a partial example for this.

Stiny, in his definition of description grammars, argues that “even the current enthusiasm for the ‘semantics’ of designs, especially in architecture, has yet to lead to any kind of successful or even promising account of descriptions of designs” (1981: 258). We would like to argue that ontologies offer a promising account of descriptions of historical architectural typologies and that description grammars may reinforce this by offering the possibility to use such ontologies as generative guides. This approach enables architectural designers and historians to engage in generative design through their analytical work processes. A study of a historical architectural style can be compiled as an ontology, as in the example in this paper, and a generative description grammar can be achieved by using the ontology as a guide.

We have presented an ontological approach supported by description grammars in the context of the generation of a historical architectural typology, specifically, classical period Ottoman mosques of the architect Sinan. Starting from an ontological description of classical period Ottoman mosques, we have illustrated the specification of a combination of shape and description grammar with a few rules and the application of these rules in a partial derivation of the ontological instance and schematic plan drawing of the Şehzade mosque in Istanbul. We have argued that typological descriptions are powerful as generative guides for historical architecture and that description grammars as a generative technique are well suited to support the generation of historical architectural typologies.