A FUG is a large FD containing many alternations. At the top-level, a FUG is conventionally made up of a large alternation where each branch describes a different category. The pattern is:
((alt (((cat clause) ...) ((cat noun-group) ...) ((cat verb-group) ...) ...)))
Each branch is an embedded FD containing in turn many disjunctions. For example, the top-level clause grammar is made up of the following alternations:
((cat clause) (alt mood ...) (alt transitivity ...) (alt voice ...) (alt circumstantial ...) (alt displaced-constituent ...) ...)Each one of these alternation in turn is a large FD, with many embedded alternations.
FUF includes a very simple mechanism to allow the grammar writer to develop such large grammars in a modular way. The key aspect is to allow the grammar writer to abstract away from the details of an FD by giving it a name. Named FDs can then be used anywhere a regular FD is allowed. Actually, it turned out that instead of using named FDs, named features were much more convenient. The new syntax distinguishes between two types of named features: named disjunctions and named conjunctions defined by def-alt and def-conj respectively. Named features can then be used in any FD as regular features; that is, instead of a pair, an FD can contain a named feature. The syntax is illustrated below:
(def-alt number (:index number)
(((number singular) ...)
((number plural) ...)))
|
A reference to a named disjunction has the form (:! name); (:& name) is used for named conjunction. These forms can appear anywhere a pair could appear in an FD. A named conjunction works like a bundle of features which get spliced in the embedding FD when it is referenced. A named disjunction accepts all the annotations that an alt can carry (control and tracing annotations). The def-alt and def-conj mechanism works as a macro mechanism for grammars.
This simple syntactic tool allows the use of abstraction in the development of FUGs: by naming parts and hiding levels of details, the structure of the grammar becomes more apparent. Named features can be re-used in different contexts (several places in the grammar and/or in several grammars). Practically, it becomes possible to work separately on a module of the grammar without affecting the other parts; several people can work together on the same grammar; single modules can be re-loaded and re-defined without requiring re-loading the whole grammar. The standard benefits of modularity in programming languages apply to the full extent.