Journal of Object Technology | RESEARCH ARTICLE Specifying and Composing Layered Architectures Manfred Broy ∗ and Bran Seli ´ c †‡ ∗ Technische Universität München, Germany † Malina Software Corp., Canada ‡ Monash University, Australia ABSTRACT We define the layered architectural style as an architectural pattern and a structuring method in terms of precise specifications of interface behavior and modular composition, based on a formal model. Interface predicates and interface assertions are used to specify the interface behavior of systems, which is a description of the services that they require and provide. We give both a syntactic and a semantic description of the design pattern of layered system architectures. Moreover, we prove that the composition of multiple layers also generates layers, subject to the condition that the services provided by lower layers are refinements of the required services of upper layers. We demonstrate the approach by examples. We seek two goals: (a) to give a precise semantic characterization of the concept of layered architectures, and (b) to provide a method for specifying and for structuring layered system architectures. We show how to decompose services as offered and used by layered architectures into encapsulated subservices called functional features. A related issue is the identification of feature interactions between these subservices. Feature interactions between functional features can be identified by studying their interface behavior. A number of small examples is given to illustrate the introduced notions and concept. KEYWORDS Architecture Specification, Verification, Layered Architecture, Feature Interaction. 1. Introduction Layered structures are an essential way of designing the ar- chitecture of software systems, communication systems, and cyber-physical systems, among others. The big advantage of this approach is that it gives a very clear structuring style that supports modularity, encapsulation, information hiding, main- tainability, changeability, and portability. At the same time, it also allows a crisp and incremental separation of concerns. One notable advantage is that layered architectures can be flexibly deployed onto distributed platforms. These clear and undisputed advantages of layered architec- tures have led to its almost ubiquitous deployment in software engineering practice. It is fair to say that, at the highest level, most practical software systems exhibit some form of a layered architecture. Yet, despite this widespread adoption, there is still JOT reference format: Manfred Broy and Bran Seli´ c. Specifying and Composing Layered Architectures. Journal of Object Technology. Vol. 23, No. 1, 2024. Licensed under Attribution 4.0 International (CC BY 4.0) http://dx.doi.org/10.5381/jot.2024.23.1.a2 Figure 1 A common graphical approach to depicting layered system architectures some lack of clarity and consensus regarding what constitutes the essential nature of layers and layered systems (Seli´ c 2021). Consider, for example, the most common graphical repre- sentation of layers involved in a layering relationship, which is typically rendered as a vertical stack, as depicted in Figure 1. This representation is intended to convey the essential fea- tures of the layering relationship. The vertical arrangement suggests a hierarchical ordering, whereby layers lower in the stack “support” higher layers in some way. Thus, layering is sometimes referred to as constituting “verti- cal” composition of components, in contrast to “horizontal” (or An AITO publication