Page 281 - Artificial Intelligence for the Internet of Everything
P. 281

Compositional Models for Complex Systems  259


              Importantly, the formal syntax of an operad can often be presented graph-
              ically, providing support for the intuitive architectural diagrams that engi-
              neers already draw.
                 Operad semantics attach coherent meanings to the components and
              interactions declared in the syntax. Here we will focus on the logical seman-
              tics underlying contracts, but operads can be interpreted in many other con-
              texts including dynamical systems, computational logic, and probability.
              The ability to attach different models and different kinds of models to the
              same underlying architecture provides some of the power and flexibility that
              will be needed to provide a good compositional representation for the other
              engineering elements like designs, tests, and models.
                 Formally, an operad has two types of elements: objects and operations.
              Objects describe (the types of ) component and system boundaries. For
              us, these will be the interfaces (sets of typed boundaries) found in the model.
              The HVAC component shown in Fig. 13.1A is a typical example, defined
              by the pair of boundaries:


                                    HVAC ¼fsettings,airg
              The decomposition in Fig. 13.1B involves five interfaces: four for the inte-
              rior components and one for the exterior system boundary. In some exam-
              ples, like the one here, every component may have its own unique interface;
              in others, such as electrical circuits, all boundaries may have the same type
              (i.e., wires).
                 The rest of the information in an architecture diagram, which we can
              think of as a set of interactions, is encoded in the operations of the operad.
              Each interaction involves two or more boundaries that must have the same
              type, but other than this we are essentially free to draw whatever sort of dia-
              grams we would like. We can allow different classes of interaction, such as
              the logical/physical distinction (solid and dashed lines) in Fig. 13.1B. Our
              example uses undirected interactions, but we can add in oriented edges.
              Graphs are restricted to binary interactions, but more general structures
              called hypergraphs allow for interaction between several parties, including
              wires that split and recombine. However, there is a catch: the more structure
              we introduce into the syntax of our operations, the more is required to inter-
              pret these diagrams semantically.
                 The key feature of operations is that they can be composed; in diagram-
              matic syntax, this usually involves pasting component decompositions into
              system decompositions, in order to obtain new decompositions across mul-
              tiple levels of abstraction. For example, we might represent the AC as a
   276   277   278   279   280   281   282   283   284   285   286