You are on page 1of 10
Functional Grammars: An Introduction William J. Mitchell Harvard University A practical design must be realizable using available materials and fabrication processes, and it must meet specified functional requirements; these are necessary (though not always sufficient) conditions for solution of a design problem. It is possible to write shape grammars that produce designs which satisfy these two conditions, (I shall refer to such specialized shape grammars as functional grammars.) Vocabulary Elements. In general, a shape grammar (Stiny, 1980a) consists of a terminal vocabulary Vé, a marker vocabulary Vm, a set R of rewriting rules, and astarting shape S. ‘The rewriting rules replace subshapes in an evolving design by new shapes. of the rewriting rules to the starting shape. The distinction between terminals and markers may be expressed by graphic convention, or through use of some sort of labeling scheme, When labels are used, terminals and markers are often not explicitly distinguished. For our purposes here, however, it will be essential to preserve a cloar and explicit distinction. The first step toward meeting the condition of realizability is to define the terminal vocabulary as consisting of elements that can be produced using available | materials, fabrication processes and —_ construction processes. Thus terminal vocabularies for cut stone architecture using traditional tools, for timber construction using standard lumber, for poured-in-place conerete, for "Lego" models or for some industrialized component building system, are different in very obvious ways. (All ‘grammars of practical interest, in fact, respond to conditions of realizability in much this way: 167 spoken vocabularies make use of sounds that can be produced by the human vocal apparatus, vocabularies of computer __ programming languages make use of the ASCII character set, and so on.) In some contexts, specification is easy: it may be given my well-established tradition, or by a component manufacturer's catalogue. In other contexts, a specification may be nontrivial: given a new composite material and a knowledge of its microstructural behavior, for example, there may be a problem of determining the range of shapes and components that can be produced with it. In any case, specification of the terminal vocabulary, encodes knowledge of available means. ‘The first step towards meeting the condition of functionality (that is, achieving desired ends) is to associate an architectural function or functions with each terminal vocabulary clement and each marker vocabulary element. ‘The justification for this is simple; if an element did not have any architectural language - just as there would be no point to including “a meaningless sound in the vocabulary of a spoken language. An architectural function is an action applied n a context to achieve a goal. (See Mitchell, 1990, for a more extended discussion of this point.) Such functions are described, at the highest level of abstraction, in terms of inputs and outputs, Thus, for example, a column takes input of a load at an elevated location, and converts this into an output load at the lower location (figure 1). A beam takes a distributed roof load as input, and converts this into point loads acting at its end support points. Inputs and outputs may be described by binary variables (for example load, which is either input or not input), or more precisely by numerical variables. Figure 1: Inputs and outputs of a beam and a column, At a more detailed level of description, functional descriptions include specifications of mapping from inputs to outputs. Generally, these mappings can be described by mathematical formulae. If the total uniform, distributed load on a beam is L, for example, each point load is given by the simple formula 12, Distinguishing Between Terminals and Markers. ‘The distinction between terminals and markers is crucial, and it is drawn as follows. Markers have interface requirements and functions. The interface requirements are represented diagrammatically by boundaries and connection points, details of the element's shape and internal organization are left unspecified. (Thus a supporting clement marker might be described by the end points of its central axis, room marker by its outer boundaries, and 50 on) The functions are presented by input and output parameters, plus partial specifications of the mappings from inputs to outputs. ‘Typically, such a partial specification is a ‘mathematical expression containing terms with unknown values. A terminal element has known geometry and behaviors. (That is, it can be drawn in complete detail, and the expressions mapping from inputs to outputs do not contain terms with unknown values.) The functional description of a terminal represents empirical knowledge of how this type of element actually 168 behaves. This knowledge may be complete or incomplete, approximate or accurate, correct or incorrect. It ean be substantiated or disproved in the usual ways - by building and testing a prototype, for example, Rewriting Rules, Rewriting rules of a functional grammar match and replace subshapes, in the usual way, to derive designs. They have two basic effects: they replace markers by terminals, and they fit markers together to form more complex structures. To assure realizability, the rules must be written 0 that the spatial relationships resulting from their application are physically feasible. (Solid objects should not overlap, objects should not hang unsupported in space, and 60 on.) To put this another way, the rules record knowledge of physically feasible ways to fit together the vocabulary elements. However, only some feasible ways to fit elements together are of practical interest: these are the ones that result in formation of interfaces through which functions are connected. (Locating a beam on top of columns achieves this, but locating it beside columns does not.) Thus, more restrictively, a good sets of rules records knowledge of physically feasible possibilities for interfacing elements in useful ways. To provide for functional interpretation not only of individual elements but also of combinations of elements, these rules for interfacing elements must specify how outputs of one element map across the interface to inputs of another. (In other words, we want the principle of compositionality to hold: the functions of the whole should be explainable in terms of the functions of the parts.) Figure 2 shows a simple example, and suggests one possible notation for expressing this mapping. Notice how the rule specifies both the position of the columns and the values (4/2) to be assigned to their inputs. These assignments, in turn, determine the values of the outputs of the columns - as shown in the diagram. vt ve Vue Vue ue Vue Figure 2 Rule for providing support to a beam. Intuitively, terminal can replace a marker when the terminal fits in the space held by the marker and, through some specific behavior, it performs the function of the marker. More precisely, the terminal must provide the same physical interfaces to other elements as the marker, it must have the same input and output variables as the marker, and its behavior must be a specialization of that specified as the function of the marker. (in other works, substitution of the terminal assigns specific values to the unknown terms in the expression which specify the functions of the marker.) For example, a marker might specify that a roof load is to be distributed to two support points. This support function might be provided by any one of the several different terminals: a beam spanning between two points, an arch, or a truss. Figure 3 shows the corresponding marker replacement rules. Notice that the actions by which the beam, the pom mr Ay moka > Figure 3: Alternative, functionally equivalent ways of replacing a marker. Bottom-up assembly rules record inventions - discovers of ways to convert the known inputs of a given element or subeystem into required outputs by combining it with one or more other elements or subsystems, Given a beam which converts a distributed load to point loads at the ends, and columns which carry point loads down to the ground, for example, you can combine these elements into a subsystem which converts a distributed load into point loads at ground level. Thus the rule shown in figure 2 is a bottom-up assembly rule. (At some time somewhere, somebody invented trabeated construction, and this rule for assembling a beam and columns into such a subsystem records the invention.) ‘Top-down refinement rules record knowledge of how to realize given functional diagrams (that is, markers or assemblies of markers) with available resources. A top-down refinement rule replaces a marker with an assembly of markers or terminals, such that the assembly meets the same spatial interfaces as the marker, has the same input and output variables, and specializes the functional description of the marker. Thus, for example, a marker standing in place of a roof support system might be replaced by an assembly of columns and a beam (figure 4). v v Figure 4: A top-down refinement rule. A termination rule is a special case of a top- 169 down refinement rule. Such rules replace markers by terminals or combinations of terminals. Thus, for example, a marker standing in place of a horizontal supporting element might be replaced by a beam or by a truss. When all markers in a design have been replaced by terminals, the design is complete and has been shown to be realizable with the available resources. If there are markers that cannot be replaced, then a design is not realizable. ‘Top-down and bottom-up rules can express the same knowledge, but they control the process of deriving a design in different ways. Top-down design begins with combination of markers standing for high-level subsystems. The design is then refined to increasing levels of geometric and functional detail by substituting assemblies of markers standing for lower-level subsystems. Eventually, terminals are substituted for markers. ‘The process terminates when the design is fully descried in terms of terminals and their behaviors. That is, a given functional diagram is converted into a realizable physical description. Bottom-up design, on the other hand, begins with terminals. ‘These are fitted together to form lowlevel subsystems. —_Lowevel subsystems are fitted together to produce higher-level subsystems, and so on recursively. ‘The goal is to produce an assembly of terminals that, subject of space and resource constraints, has desired overall behavior. ‘The process terminates when this goal has been achioved. In the case, given physical elements are shown to be capable of achieving some desired function. In general, firing a shape rule during a derivation achieves certain subgoals, at a certain level of performance, at the cost of adding certain constraints to the system and expending certain resources. A choice among alternative rules thus expresses a preference for one thing rather than another, or about the best use of available resources in a given context. Thus a design should be construed less as a solution to fully-predefined problem than as a complex, incrementallyderived expression of preferences and tradeoff points. Top-down design begins with some overall goals, expressed as constraints on the geometry, 170 interfaces, inputs and outputs of the starting shape, and fleshes out this schematic expression of value through choices among lower-level elements and subsystems, Bottom-up design begins with available means, and tries to determine what desirable ends may be achieved by combining them. Parsing and Functionally Interpreting Designs. Rewriting rules of productions; their action is generative. If they are reversed in direction, however, they become reductions which can be used to parse a design. When the reduction rules of a grammar can reduce a design to the starting shape of that grammar, the design is in the language specified by that grammar. Conversely, when such reduction can not be accomplished, the design is not in the language. Furthermore, when terminals and markers have associated architectural functions (as in the functional grammars under consideration here) application of reductions provides a way of recognizing subsystems and so describing a design as a hierarchy of functionally interconnected elements and subsystems. ‘That is, the grammar establishes the units of functional deseription. When a design is in the language, we can employ knowledge of the grammar to produce a parsing and a functional description in terms of these units and their actions. When a design is not in the language, we must regard it as functionally meaningless; we have no way of saying what it does or how it does it - Just as we cannot interpret an ungrammatical string of spoken words. Constraints and Error Conditions. ‘The terminals and markers of a functional grammar may be either rigid or parametric elements. Parametric elements have some range of adaptability to fit different contexts, but rigid elements do not. Rewriting rules for parametric elements describe spatial relationships between elements as dependencies of the size, shape and position parameters of some elements on those of others. These dependencies assure that the elements continue to fit together and maintain their interface as one or another is varied. The size, shape and position parameters of terminal elements may be subject to constraints that reflect the realities of material sizes, fabrication and erection processes. Both terminal and marker elements are also subject to constraints of functional adequacy: elements must be big enough, strong enough, or whatever, to perform their functions in those contexts. (A beam's maximum strength must exceed the load imposed on it, for example. Otherwise, it will fail to perform the function expected of it.) When such conditions are not met, an error condition (which can be expressed by the value of a binary variable) exists in the terminal or marker question. Thus a complete design must not only be grammatically correct and terminal, but also free of error conditions. Proper hierarchical structuring should limit the Propagation of errors, and should make debugging relatively easy. A top-down design process fails (and requires backtracking to a higher level) if no element that is substitutable in a particular context can satisfy relevant constraints of functional adequacy. (Eventually, all the terminals in a completed design must be functionally adequate in their contexts.) Conversely, a bottom-up process fails (and requires, backtracking to a lower level) if the complete system's performance of its overall functions is, not adequate. A good set of rules should encode adequate knowledge of how to put together designs that work, and should thus reduce the likelihood of failure and the amount of backtracking required to find a solution. Emergent Form and Direction of Attention. Proper handing of emergent shapes is a well- known practical difficulty in the computer implementation of standard shape grammars. Fortunately, this is considerably mitigated (though not entirely eliminated) by the specialization of shape grammars to functional grammars. ‘The problem arises because standard shape grammars are not atomic systems; these are no m elementary shape units, Linos and shapes have parts, but not definite parts. Thus parts of lines can be recombined in complex and unexpected ways as designs develop, emergent instances of certain shapes may proliferate riotously, and a grammar does not necessarily assign ‘a tree structure of elements and subsystems to a design. But functional grammars are atomic: the terminals are elementary shape units. The internal structure of a terminal is given, and it is assumed that (as a practical matter, following from the realities of fabrication and construction practice) terminals can not be taken apart and recombined. In other words, the definition of terminals establishes where to stop designing. Furthermore, the definition of subsystems and corresponding markers should (if it is carried ‘out properly) divide a design into a hierarchy of almost-independent subsystems. It should usually be possible, as a practical matter, to focus on the internal structure of a subsystem and not worry too much about the possibility that elements from one subsystem to design an emergent subsystem that should be paid attention. Occasionally it may be found that designs can be parsed in multiple ways to yield alternative functional descriptions - just as sentences such as Time flies like an arrow can be parsed in different ways to yield different interpretations. So, if we consider an evolving design simply as an abstract collection of lines, there are a great many different ways to look at it and to develop it further. But most of these are impractical from a fabrication and construction viewpoint and functionally meaningless. A functional grammar restricts a design's (or computer Program's) attention to substructures of a design that make physical sense and are functionally meaningful. Figure 6 illustrates this. If we consider the design as an abstract collection of lines, there are indefinitely many plausible ways to divide it into subshapes. If ‘we assume that it depicts a collection of discrete physical elements, then there are only a few ways. Finally, if we consider the design as a structural system, there are usually very few natural ways to divide it a hierarchy of elements and subsystems. (For grammars that put together discrete physical elements in this ‘way see Stiny 1980b.) TU Figure 5: A shape and two functionally uninterpretable subshapes. An Example: The Primitive Hut Grammar The following simple grammar, which has been implemented as a computer program for top- down derivation of realizable design, illustrates the essential ideas of a functional grammar. (For simplicity of exposition, functions and functional connections are described verbally, but it is trivial to introduce the corresponding formulae it the vocabulary specifications and shape rules.) ‘This grammar derives designs for structures to support a roof deck over a rectangular volume, ‘The starting shape is a parametric rectangular box, as illustrated in figure 6. The input to this marker is a uniformly distributed roof load over the top face. The outputs are point loads at the four bottom corners. Figure 6: The starting shape ‘The marker vocabulary is illustrated in figure 7. The markers establish four types of subsystems: secondary roof subeystem, primary roof subsystem, vertical support subsystem, and lateral stability subsystems. These subsystems are represented by their boundaries and connection points. m ese aren r I Figure 7: The marker vocabulary. Figure 8 shows the terminal vocabulary. It consists of wooden beams, trusses and columns, masonry columns, and various types of bracing elements. It represents a plausible vocabulary of components for small-scale pavilion construction, but clearly there is nothing absolute about it.: depending on actual availability, economic conditions and 60 on,it could be expanded or contracted. Steel members could be introduced, for example. WO WWe @ar- oF & Zé Figure 8: The terminal vocabulary The top-down refinement rules of the grammar are illustrated in figure 9. Basically, the rules treat the structure as an assembly of secondary roof subsystem, primary roof subsystem, vertical support subsystem, and lateral stability subsystems in two directions - all fitted together within the rectangular box. The secondary roof subsystem takes a roof load as input and converts it into point loads acting along the edges of the box. The primary roof subsystem forms an interface with the secondary roof subsystem such that it collects those point loads and converts them into four point loads acting at the top corners of the box. ‘The vertical support subsystem fits under the primary roof subsystem such that it collects those four point loads and converts them into point loads acting at the bottom corners. Finally, lateral stability subsystems fit into the faces of the box and provide necessary cross- bracing. In most cases, these are alternative ways to refine a subsystem design by substituting subassemblies or terminals. (For clarity, rules are grouped under subheadings and briefly annotated. Size and shape parameters introduced by each substitution are listed on the right.) CORGANZATION OF MAJOR SUBSYSTEMS: Sontag ape Sebamstre and Ieveraot ate eet “Peng Suing stape = Sebamcrr and bye et eytem oa) i Pha em Seenejeg Suting shape Subnctre nd Seen Seeger 173 SEANEMENT OF THE PRIMARY STRUCTURE: f- A (appa ith pray Sn) Bowed primary A- A fi- fl nan aay ol pa my ih ‘Sovecelonas my SUBSTITUTION OF SECONDARY STRUCTURE TERMINALS: Furtotomed Phd tte ‘Sue Toe ‘rn it et eet) ree ‘neal Joie ne soi ty SUBSTITUTION OF LATERAL STABILITY TERMINALS: SUBSTITUTION OF COLUMN TERMINALS: Cote aso tun cee 6 = ZL Dla hmee a to | Como conan ls | mse 1 g = p sn" 6 > oo t Figure 9: The top-down refinement rules. ‘The derivation of a design in the language Pimary tert ne specified by this grammar is illustrated in aan ie figure 10. Each design in this language “Uxppucabie only we masonry columns) performs that same function (of converting a roof load acting on the top surface of the ee — > Xp mento rectangular box into point loads acting at the Rulez bottom corners) and is realizable with the given = Ns cm be terminal vocabulary. However, there may well be differences in cost, in suitability for a particular context, and go on. PA neetnees Furthermore, since different terminals are subject to different constraints of feasibility and 4 “4 Lt Det Secondary functional adequacy, different designs in the lateral salty, y ‘Shear wall language will work at different scales and me under different loading conditions. Secondary Pane oa an ‘SUBSTITUTION OF PRIMARY ROOF STRUCTURE TERMINALS: ree PA mm - “re ni th Z we an sine De 7 rman 14 QAR Ce Al a Aan fet wv oe Figure 10: Derivation of a design in the Nevtnnuaiouia language. asnene ied stecnre BO 1 J 174 The Modification and Evolution Functional Grammars. of Functional grammars, as they have now been defined, are not rigid, fixed set of rules, but reflect specific assumptions about available resourees and a particular state of knowledge about component behaviors and about how to put things together. The terminal vocabulary may be extended as new materials and processes are introduced. More complete and accurate behavioral descriptions of terminals may become available. New functional diagrams may be invented, resulting in augmentation of the rule system (as, for example, when arches were introduced into classical architecture, when flying buttresses were combined with the concept of a basilica, or when Le Corbusier laid out his Five Points of a New Architecture). Grammars may be unioned, to bring together bodies of knowledge. In general, a functional grammar should be regraded as provisional, testable, modifiable, evolving body of knowledge. It defines a complex web of known relationships between available forms and possible functions, and 50 structure a domain of architectural investigation. A design process may involve both application of known rules to solve problems and invention of new rules. (For processes of shape grammar variation, see Knight 1986.) Innovative design projects may not only satisfactorily solve the problem at hand, but also demonstrate an interesting extension of the language which was taken as the starting point for design exploration. (Consider, for example, Albert 's invention of anew church diagram by fitting a triumphal arch onto the front of a traditional organization of nave and aisles.) Typically, the language specified by a functional grammar provides many different ‘ways to solve a practical architectural problem. ‘These differences play a cultural role: they can be (inevitably will be) interpreted as the architect's self-expression, as denotations of the status of a building's occupant, and so on. However, since these languages are much less fixed and stable than spoken languages, ‘meanings are less clear and less stable. 15 Functional Grammars as Frameworks for Reasoning. ‘A functional grammar can be construed as a knowledge base. The vocabulary elements with their associated functional descriptions are the given facts of form and behavior, the shape rules are the rules for operating on these facts, and derivation of a design (new facts about form and behavior) is closely analogous to construction of a chain of inference. Within the framework of a functional grammar, many different types of design investigations may be carried out. Given a prototype (a known design in the language), for example, variants may be generated to reduce the cost, enhance some aspect of performance, fit it to some new context, reduce the part count by combining functions, and so on Given a starting shape providing certain output, a search may carried out to find a design that maximizes that output, Or, given a starting shape that is constrained in certain ways, the objective of a search may be to find the minimum-cost realization that satisfies those constraints. A bottom-up search may have as its goal the invention of some new way to combine the given elements to achieve a specified function, or the discovery of a way to achieve some new function. Just as standard shape grammars may be used to describe historical styles (see, for example, Stiny and Mitchell 1978 and Mitchell 1981, Koning and Eizenberg 1981, Flemming 1986), 0 too many functional grammars. In this application, the terminal vocabulary should describe the components that were actually available to designers working in the style, and the rules should record the appropriate state of knowledge. (A grammar for cathedral designs should not, for example, allow the use of flying buttresses unless there is evidence that designers of the period actually know about this invention.) ‘The Analogy with Software Development. Use of a marker in top-down derivation of a design is analogous to use of a dummy procedure in top-down implementation of a computer program. Where the dummy procedure is later replaced by a developed procedure that accomplishes the required mapping of inputs to outputs, the marker is later replaced by a terminal that performs the required function. Conversely, bottom-up derivation of a design is analogous to beginning with a procedure library, using available library procedures to implement higher-level procedures, and so on recursively until a complete program that functions as required is produced. The difference of course, is that a dummy procedure holds a place in a one- dimensional string of commands, while a marker holds a place in a two-dimensional or three-dimensional configuration of shapes. The vse of abstraction barriers is important in both programming and design derivation. In Programming, the details of a procedure are abstracted to 'a namo and parameter list, In design, the details of a subsystem are abstracted to a schematic shape and a list of inputs and outputs. Conclusions. A functional grammar is grounded in the realities of architecture. The terminal vocabulary is determined by the possibilities of material and fabrication, ‘Behavioral descriptions of terminal elements record empirical knowledge. Rules express inventions - discoveries about how to use known elements to accomplish desired ends. Combinations of markers express functional diagrams that can be fleshed out in various ways. ‘The language specified by the grammar can be extended by introduction of new materials and fabrication methods, and through inventions. Computer programs that automatically or semi- automatically drive designs in languages specified by functional grammars are quite straightforward to implement, and provide an efficient way to explore these languages. The modular character of the shape rules facilitates incremental development, and modifications of such programs to incorporate new components and newly-acquired knowledge of how to put together designs that work. It seems reasonable to suggest (though this has not yet been tested) that large, dynamically-extensible functional grammars, allied with fast search engines, would be capable of producing 176 unexpected, and perhaps valuably innovative, design solutions. References. Flemming, Ulrich 1986. "More Than the Sum of the Parts: The Grammar of Queen Anne Houses" Environment and Planning B, vol, 14: 323-350. Knight Terry W. 1986. "Transformations of Languages of Designs." Phd. Dissertation, Graduate School of Architecture and Urban Planning, University of California, Los Angeles. Koning, Hank and Julie Eizenberg, 1981. “The Language of the Prairie: Frank Lloyd Wright's Prairie Houses." Environment and Planning B vol. 8: 295-323. Mitchell, William J. 1990. The Logic of Architecture. Cambridge MA: MIT Press. Stiny, George. 1980a “Introduction to Shape and Shape Grammars." Environment and Planning B vol. 7: 343-351. Stiny, George. 1980b.__ "Kindergarten Grammars: Designing with Froebel's Building Gifts." Environment and Planning B, vol 7: 409-462. Stiny, George and William J. Mitchell, 1978. "The Palladian Grammar." Environment and Planning B vol 5: 5-18. Stiny, George and William J. Mitchell, 1981. The Grammar of Paradise." Environment and Planning B vol. 7: 209-226.

You might also like