Skip to content

Tree Pattern

Mark Blackburn edited this page Mar 12, 2018 · 2 revisions

Provided by Henson Graves

One of the most common patterns occurring in SE is that of a tree. A tree is a directed graph with nodes and arrows. Informally, a tree has a unique root, each node in the tree can be reached from the root, and the paths never loop back. Organizational hierarchies, product decompositions are examples. A tree is a pattern as it does not specify a fixed number of branches or have a fixed dept. An SE ontology often contains multiple trees such as organization and product or system decompositions, as well as relations between classes in different hierarchies. However, these trees may not have exactly the same structure. Where reasoning and analysis of ontologies can pay off is to see that rules relating different trees within an ontology are followed. A typical problem is to check that say all requirements have an owner. This is a relation between nodes that occur in two trees. One can generalize this example to obtain a pattern where again for example every requirement has an owner in an organizational hierarchy.

Trees can be represented in OWL and in SysML. In OWL the nodes are classes and the arrows are (functional) relations. Generally other axioms are needed such as the disjointness of the classes are need, as Steve has noted. In ontologies particular sets of classes and relations form trees. The ontology may contain lots of other classes and relations. A specific axiom set in OWL can contain a tree, however the tree pattern is a meta-level description about a class of axiom sets. Checking that an axiom set conforms to the tree pattern is decidable and so it is not too hard to have a model/axiom development tool check that a tree pattern is enforced. Patterns are also called templates.

Material about patterns and templates is common in computer science courses and even in undergraduate courses in data structures. One might expect that the material about patterns is a prerequisite for SE, even before ST4SE. The need to represent a pattern as a meta-level artifact occurs in OMG documents. Our focus presumably is on how to apply patterns in SE. We hardly need to reinvent the wheel of patterns.

A Tree pattern not only does occurs frequently, but axioms can be given that can be checked and can be used to determine problematic relationships between multiple trees such as requirements decompositions and product decompositions.

Clone this wiki locally