Manuscript Offprint
arXiv:2610.40377A Hierarchy of Composition Procedures for Logic-Based Workflow Patterns
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Logic-based workflow patterns capture recurring behavioural structures together with reusable temporal specifications. Their composition raises distinct problems as workflow structures become richer, including instantiation, nesting, conditional execution, repeated occurrences, and traceability of generated formulae. This paper proposes a hierarchy of Pattern Composition (ΠC) procedures, from ΠC₀ to ΠC₄, that organizes these requirements as progressively richer compositional capabilities. The hierarchy separates compositional complexity from the expressive power of the temporal-logic fragment, represented by TLₙ, yielding a framework ΠCᵢ[TLₙ] for developing logical workflow specifications. We develop activation-aware Pattern Composition (ΠC₂), which distinguishes the structural presence of a nested pattern from its execution in a particular workflow context. We formalise its recursive procedure, analyse its properties, and define an evaluation protocol for conditional activation, conservativity under mandatory composition, and specification growth. The hierarchy also characterizes selective occurrence qualification for iterative patterns (ΠC₃) and provenance for tracing generated formulae to their sources (ΠC₄). Finally, we outline ΠCₐssist, an orthogonal mode in which AI proposes and refines pattern expressions subject to the hierarchy’s compositional checks.
1 Introduction
Formal behavioural specification is a fundamental part of the modelling and analysis of software and workflow-based systems [3, 4]. Although concrete systems may differ considerably, many behavioural structures recur across applications. Sequences of activities, alternatives, parallel executions, synchronization, and other control-flow structures represent reusable forms of behaviour rather than properties specific to a single system.
Logic-based workflow patterns provide a reusable way of associating recurring behavioural structures with their temporal specifications. A pattern captures a characteristic form of behaviour together with a set of logical formulae describing its intended properties. The key principle is to formalise such behaviour once and reuse its specification whenever the corresponding behavioural structure occurs, rather than derive the required temporal formulae from scratch for each workflow. Thus, the effort of defining and validating the logical properties is incurred once, while the resulting specification can be instantiated repeatedly with different actual activities and reused across different workflows and applications. Logical patterns therefore provide both reusable behavioural abstractions and reusable units of formal specification.
The usefulness of individual patterns, however, depends fundamentally on their composition. Compositionality is a well-established principle for constructing and reasoning about complex systems from simpler components [26, 25]. Realistic behaviours are rarely represented by a single isolated pattern; instead, they are built from multiple patterns combined into larger structures.
Pattern Composition, denoted by , applies this principle to logic-based workflow patterns, providing a systematic mechanism for deriving complex behavioural specifications from local and reusable pattern specifications. Thus, composition enables the reuse of individual logical patterns to scale towards the specification of increasingly complex behaviours.
Not all forms of composition, however, pose the same problem. Instantiating a flat pattern, embedding one pattern within another, selecting conditionally executed branches, and reasoning about repeated executions require different kinds of compositional information. Increasing the structural complexity of a workflow therefore does not merely produce a larger instance of the same composition problem, but introduces qualitatively different requirements on the composition mechanism. Nesting requires an interface between the internal behaviour of a sub-pattern and its enclosing pattern; conditional execution requires distinguishing structural presence from actual execution; iteration introduces repeated occurrences and may require them to be distinguished; and combinations of these mechanisms may introduce further interactions between their respective composition requirements.
These observations motivate the central thesis of this work: Pattern Composition should be organised as a hierarchy of procedures rather than treated as a single universal composition mechanism. We introduce the levels , progressing from flat and hierarchical composition through conditional activation and iteration to their combined use. The hierarchy identifies distinct mechanisms for composing logical patterns and specifies their respective applicability conditions.
There is also another source of complexity that should be distinguished from pattern composition itself: the expressive power of the logical language used to specify behaviour. Temporal logic is a well-established formalism [5, 16] for describing behavioural properties evolving over time and provides a natural foundation for logical workflow specifications. Temporal specifications, however, may range from relatively simple uses of temporal modalities to formulae involving increasingly complex nesting and interaction of temporal operators. Increasing compositional complexity and increasing temporal expressiveness are therefore two different dimensions of the specification problem.
This distinction also matters for automated reasoning. Although theorem provers exist for temporal logic, the automated-reasoning ecosystem for first-order logic appears substantially broader and more mature. Consequently, whenever a temporal specification admits a suitable translation into FOL, such a translation may provide access to a wider range of reasoning tools. The translatability of temporal fragments to FOL is therefore an important practical consideration alongside their expressive power.
The broader objective is to bring together several complementary aspects of logic-based behavioural specification: stable and reusable behavioural patterns captured by logical formulae, different levels of compositional complexity represented by , different levels of temporal expressiveness represented by , and the practical availability of automated reasoning support. These aspects should be considered jointly: reusable logical patterns provide the specification units, Pattern Composition determines how such units can be combined, the temporal fragment determines the expressive power of their properties, and the available reasoning ecosystem influences how these properties can be verified in practice. In particular, suitable translations from temporal fragments to FOL may provide access to its broader theorem-proving ecosystem.
The main contributions of this work are as follows:
-
We organize Pattern Composition as a - hierarchy, progressing from flat instantiation and hierarchical composition through activation-aware composition and occurrence qualification to provenance preservation. The hierarchy identifies the additional compositional information required at each level.
-
We separate compositional complexity, represented by , from temporal-logic expressiveness, represented by . This provides a two-dimensional framework in which composition mechanisms and temporal expressiveness can be studied independently.
-
We develop activation-aware Pattern Composition ( ), which distinguishes the structural presence of a nested pattern from its execution in a particular context. We formalise the procedure recursively using parent–argument activation relations, with exclusive choice as the principal case of conditional execution.
-
We analyse the properties of and define an evaluation protocol based on systematically constructed pattern-expression families. The protocol examines conditional-activation correctness, conservativity under mandatory composition, and specification growth.
-
We introduce a provenance model for tracing generated formulae to their originating pattern instances, composition rules, and contexts, and outline as an orthogonal mode for AI-assisted proposal, validation, and refinement of pattern expressions.
2.1 Behavioural Patterns as Reusable Logical Specifications
Patterns constitute a well-established means of capturing recurring structures and solutions in computing. Their use is particularly prominent in software design and architecture, where a pattern encapsulates knowledge that can be defined once and subsequently reused in different systems and contexts [7]. The same principle applies to system behaviour. Recurrent control-flow structures, such as sequences, alternatives, parallel execution, synchronisation, and iteration, occur across different workflow and process models and can therefore be treated as reusable behavioural patterns [28, 22].
In this work, behavioural patterns are considered from a logical perspective. A pattern is not merely a recurring structural configuration, but is associated with a predefined set of temporal formulae characterising its intended behaviour. It can thus be viewed as a local logical specification schema: its structure represents a recurring behavioural situation, while its formulae specify the properties expected of every valid instance of that situation. Such a specification should capture both liveness properties, describing behaviour that is eventually required to occur, and safety properties, excluding undesirable behaviour [11, 1, 16].
Definition 1 (Behavioural pattern). A behavioural pattern is a tuple
where:
• op is the pattern name (identifier);
• is a finite set of formal arguments representing atomic activities;
-
Spec ⊂ TL is a finite set of temporal formulae specifying the intended behaviour of the pattern;
-
ini and fin are propositional formulae over Args representing the initial and final expressions of the pattern, respectively.
The conditions under which such a pattern constitutes a well-composed logical specification are introduced below.
A pattern P can be written schematically as
It constitutes a local specification entity, while its use in a particular behavioural model follows the standard mechanism of formal and actual arguments. The formal arguments serve as placeholders for activity roles and may occur in the temporal formulae defining the pattern. When the pattern is instantiated, they are replaced by actual arguments representing concrete activities. Consequently, the same pattern schema and its logical specification can be reused in different behavioural contexts without modifying its definition.
Associated with P is its logical specification, denoted by , consisting of temporal formulae that characterise the complete intended behaviour of the pattern. The pattern additionally exposes distinguished expressions describing its initial and final behaviour, and . A pattern can consequently be viewed at two related levels. Its internal behavioural specification, represented by , describes the properties of the pattern itself, whereas and constitute its externally visible compositional interface. This distinction allows a pattern to remain a local specification entity while providing the abstraction required for its subsequent use as a component of a larger behavioural structure.
The logical specification associated with an individual behavioural pattern should be internally consistent and should properly relate the initial and final behaviour exposed by its interface. In particular, the initial and final expressions should not hold simultaneously, which gives the basic safety requirement
while every initiation of the pattern should eventually lead to its completion, expressed by the liveness requirement
Moreover, both interface expressions should represent reachable behaviour rather than being trivially false. These requirements lead to the following local notion of well-composedness.
Definition 2 (Well-composed behavioural pattern). A behavioural pattern
is well-composed if:
-
Spec ∪ {□¬(ini ∧ fin), □(ini → ◇fin)} is satisfiable;
-
ini and fin are reachable under the specification, i.e., there exist behaviours satisfying the specification in which the corresponding initial and final conditions occur.
Well-composedness is therefore a local property of an individual behavioural pattern. It concerns the consistency of its internal logical specification and the meaningfulness of the behavioural interface through which the pattern can subsequently participate in larger compositions. It does not, by itself, impose conditions on interactions between different pattern instances; such conditions arise only when patterns are composed into larger behavioural structures.
This locality is essential for composition: it allows the internal properties of a pattern to be established independently of a particular composition context, while composition can focus on the relations between the participating pattern instances and their interfaces.
For example, consider a simple sequence pattern . Its interface is given by
while its logical specification invariably includes the liveness property
A central practical motivation for logical patterns is reuse. The logical properties of a recurring behavioural structure are defined and validated once and can subsequently be instantiated whenever that structure occurs, rather than being reconstructed for every workflow. Moreover, the definition and validation of such patterns may be carried out by a logician or a specialist experienced in formal methods, while their subsequent use can be delegated to analysts who need not derive the underlying temporal formulae themselves. The resulting pattern library can therefore separate the expertise required to construct formal specifications from that required for their routine application, supporting broader and repeated use of formal behavioural specification.
In summary, a well-composed behavioural pattern provides a reusable, context-independent logical specification that can be instantiated and composed into larger structures while preserving its local correctness.
2.2 Compositionality in Behavioural Specification
Compositionality is a fundamental principle for managing complexity in computer science. Complex systems are routinely constructed from smaller units that can be developed, understood, analysed, and reused as identifiable entities. This principle underlies modular software design, component-based systems, hierarchical modelling, and compositional verification [18, 2, 26]. More generally, it reflects a natural strategy for dealing with complexity: complex entities are constructed from smaller entities with well-defined roles and boundaries rather than treated monolithically.
Importantly, compositionality is not a single uniform operation. Compositional verification, for example, relies on mechanisms such as abstraction, simplification, hiding, and property-preserving equivalences, depending on what is composed and which properties are to be preserved [8, 15]. This illustrates a more general principle: extending compositional capability may require new mechanisms rather than repeated application of the same composition operation.
For behavioural specification, this principle naturally complements the reuse provided by logical patterns. Individual behavioural patterns are local, reusable specification units; composition makes it possible to construct larger behavioural specifications from such units. Instead of deriving a monolithic temporal specification for every workflow, we aim to obtain it systematically from logical specifications already defined and validated for its constituent behavioural patterns.
This leads to Pattern Composition, denoted by , understood as a systematic procedure for constructing the logical specification of a composite behaviour from instantiated specifications of its constituent behavioural patterns. The logical definition of an individual pattern remains local and reusable, while the composition procedure determines how its instances contribute to the specification of the whole.
A pattern expression is an instantiated behavioural pattern whose actual arguments are either atomic activities or, whenever admissible, other pattern expressions. Thus, pattern expressions provide the structural representation of behaviours to which Pattern Composition is applied. For example,
is a flat pattern expression, whereas
is a hierarchical pattern expression containing the nested expression .
Abstractly, Pattern Composition can be represented as a mapping
where denotes the class of admissible behavioural pattern expressions. For an expression ,
where is the temporal specification generated for .
Different compositional capabilities can then be associated with increasingly rich classes of admissible pattern expressions,
Intuitively, each extension of the admissible expression class may introduce structures that cannot be handled by the preceding composition mechanism and therefore require additional compositional information. The corresponding composition procedures will be formalised later as the hierarchy of levels.
In the simplest case, all actual arguments are atomic activities. Composition then essentially reduces to instantiation: formal arguments are replaced by the corresponding actual activities and the predefined logical specification is instantiated accordingly. No additional compositional mechanism is required.
This is no longer sufficient when an actual argument represents a structured behaviour, as in the hierarchical expression above. The nested expression has its own internal structure and logical specification and cannot be treated simply as an atomic activity. Hierarchical composition therefore requires an additional mechanism that provides an appropriate abstraction of the nested behaviour at its composition boundary. Moreover, not every nesting is necessarily admissible; composition must respect the behavioural roles and interfaces of the participating patterns.
Further behavioural constructs introduce different requirements. Conditional behaviour raises the distinction between structural presence and actual execution: a component may occur in the behavioural structure without being active in a particular execution. Iteration introduces repeated executions of the same behavioural component and therefore raises the problem of distinguishing its occurrences.
The progression can be summarised as follows:
This progression captures the key point: increasing compositional complexity does not merely produce larger instances of the same problem. Each step introduces a new kind of information that the preceding mechanism does not provide. A new composition procedure is therefore justified when a class of behavioural structures introduces such a new requirement. The hierarchy developed in the following section follows precisely this principle: successive levels extend compositional capability by addressing qualitatively new requirements rather than merely increasing syntactic size or nesting depth.
2.3 Temporal Expressiveness in Behavioural Specification
The complexity of Pattern Composition is not the only dimension relevant to behavioural specification. A separate dimension concerns the temporal language in which behavioural properties are expressed. The two dimensions should not be conflated: increasing the structural capability of composition does not necessarily require a corresponding increase in the complexity or expressive power of the temporal language.
We restrict attention to propositional linear-time temporal logic over discrete executions. To keep the temporal dimension focused on the requirements relevant to behavioural patterns, we consider future-time operators only. Past-time operators and branching-time temporal logics, although providing further dimensions of temporal expressiveness, are outside the scope of this work.
Temporal operators provide different ways of relating the occurrence of activities along an execution. In the setting considered here, the basic temporal vocabulary relies primarily on the “eventually” and “always” operators, denoted by ♢ and □, respectively. They naturally express properties such as eventual occurrence,
response,
and invariance or safety,
These forms already cover many of the liveness and safety requirements associated with the behavioural patterns considered in this work.
Even a vocabulary based only on ♢ and □ admits temporal formulae of different structural complexity. Simple occurrences of a temporal operator can be combined into response properties, while nesting permits properties such as
expressing recurrence and persistence, respectively. More involved formulae may combine several such structures, for example
Thus, temporal specification complexity may increase through the operators being used, their combinations, and their nesting depth.
These dimensions should not, however, be identified automatically with expressive power. Temporal nesting, syntactic complexity, and expressive power are related but distinct notions. In particular, adding another level of nesting does not in general justify claiming a new level of expressiveness without a corresponding formal result. This distinction is important here because the increasingly advanced forms of Pattern Composition developed in this work do not currently require increasingly deep nesting of temporal operators.
Other temporal operators introduce qualitatively different specification capabilities. The next operator refers to the immediate successor of the current state:
Unlike eventuality, which requires to hold at some future point, requires it at the next point of the execution. This makes particularly dependent on the discrete step structure and distinguishes it from the stutter-invariant fragment of LTL without next [20]. The operator is therefore best viewed not simply as a “more complex” version of or , but as providing a different form of temporal resolution.
The until operator U introduces another, stronger form of temporal structure. A formula
requires not only that q eventually occur, but also constrains the behaviour preceding that occurrence: p must hold until the relevant occurrence of q. In standard LTL, eventuality can itself be defined using until,
and always can subsequently be obtained by duality,
Thus, the ♢/□ vocabulary used by our current behavioural patterns represents a restricted temporal fragment rather than the full range of standard LTL constructs.
The distinction becomes particularly significant when until operators are nested. Unlike an informal progression based merely on formula size, the nesting depth of U has a precise theoretical foundation: successive until depths form a strict hierarchy of expressive power in linear temporal logic [6]. Related results also show that nesting of next and until gives rise to meaningful temporal hierarchies [14]. Consequently, richer temporal structure is not merely a matter of writing longer formulae; for appropriate operator fragments it may correspond to genuine differences in what temporal properties can be expressed.
For the purposes of this work, these observations suggest a progression of temporal specification capabilities rather than a universal ordering of temporal operators:
basic ♢/□ properties occurrence and invariance,
combined ♢/□ properties response and related dependencies,
nested ♢/□ structures recurrence, persistence, and richer dependencies,
○ immediate-successor sensitivity,
constraints over temporal intervals,
nested structures further temporal distinctions.
This progression is deliberately not presented as a strict hierarchy of expressive power. Its purpose is to distinguish increasingly involved or qualitatively different temporal specification requirements. Some of these distinctions, notably those based on until depth, correspond to formally established expressiveness hierarchies, whereas others identify different temporal capabilities or syntactic structures.
Let denote the restricted temporal fragment sufficient for the behavioural pattern specifications considered in this work. Possible extensions of the temporal language can be represented abstractly as
where richer fragments may admit additional temporal constructs or more involved combinations of operators. We do not fix these subsequent levels here: their definition should be driven by temporal properties actually required by future behavioural specifications rather than by an artificial increase in operator nesting.
This temporal dimension is independent of the hierarchy of Pattern Composition. Hierarchical composition may require structural abstraction, conditional composition may require activation information, and iteration may require occurrence information while the generated properties remain within the same temporal fragment. Conversely, the temporal language may be extended without changing the composition mechanism. In the present work, we therefore advance primarily along the compositional dimension while retaining the temporal specification within ; richer temporal fragments remain an independent direction of extension. This independence is a key methodological principle: it allows us to study compositional mechanisms independently of the expressive richness of the temporal fragment, and to extend the temporal language without necessarily revising the composition hierarchy.
2.4 Automated Reasoning Ecosystems and Logic Translation
Formal behavioural specifications are intended not only to describe system behaviour, but also to support automated deduction. This introduces a practical dimension that complements both compositional complexity and temporal expressiveness: different logical formalisms are supported by different reasoning ecosystems, with different proof procedures, input languages, tool infrastructures, and levels of automation and maturity. A logic that provides a natural and compact language for expressing behavioural properties need not therefore offer the most suitable reasoning infrastructure for every deductive task. The choice of a specification language should not unnecessarily restrict the reasoning technology that can subsequently be employed.
Temporal logic is the natural specification formalism in the present setting because the properties of interest describe behaviour evolving over time. Dedicated reasoning procedures and tools for temporal logics are well established. For propositional linear temporal logic, for example, systems such as TRP++ provide temporal-resolution-based reasoning, while TeMP and TSPASS illustrate corresponding developments for fragments of first-order temporal logic. The temporal reasoning landscape therefore provides specialised deductive machinery, although its tools are distributed across particular temporal formalisms and reasoning procedures.
We therefore treat temporal expressiveness as an independent dimension, since it determines not only what behavioural properties can be specified, but also which automated reasoning routes are available.
Our interest is primarily deductive: generated logical specifications are intended to serve as objects of automated inference rather than only as properties to be checked against a given system model. From this perspective, first-order logic is particularly attractive because it is supported by a broad and mature ecosystem of automated theorem provers. Systems such as Vampire, E, iProver, and Prover9 coexist with standardised problem representations, extensive benchmark libraries, and common infrastructures provided by TPTP [23]. Importantly, this ecosystem has also supported long-established competitive evaluation through the CADE ATP System Competition (CASC) [24]. This combination of mature provers and shared infrastructure provides a strong practical motivation for exploiting first-order reasoning whenever a suitable translation of the temporal specification is available.
This motivates a deliberately flexible reasoning strategy. Behavioural properties should be specified in a logic that represents them naturally, while deduction should exploit a reasoning ecosystem appropriate to the resulting problem. Reasoning may therefore be performed directly in the source temporal logic when appropriate deductive machinery is available. Alternatively, when a controlled translation to another logic is feasible and advantageous, the translated specification may be submitted to the corresponding reasoning tools. First-order logic constitutes a particularly relevant target in this respect. The resulting reasoning strategy can therefore follow two principal routes:

The first route preserves the source temporal formalism and employs deductive machinery available for that logic. The second introduces a controlled translation to a target logic, with FOL being particularly relevant because of its mature ATP infrastructure. Translation is thus not intended to replace temporal logic as the specification language, but to provide an additional deductive route whenever such a route is feasible and advantageous.
Temporal-to-first-order translation has a well-established logical basis. Let temporal formulae be interpreted over a linear order of time points , and let denote the standard translation of a temporal formula evaluated at time point . For the basic future operators used extensively in our behavioural specifications, the translation is comparatively direct:
and
Thus, the familiar intuition
is useful only as shorthand. Temporal operators are not replaced by quantifiers alone; their temporal meaning is recovered by quantifying over explicitly ordered time points.
For example, the response property
has the first-order representation
What is implicit in the temporal formulation—quantification over the future of the current point—becomes explicit in the first-order representation. Even this common behavioural property already introduces a quantifier dependency of the form .
Other temporal operators illustrate why translation should not be understood as a mechanical replacement of modalities by quantifiers. For discrete executions, the next operator depends on the immediate successor structure. Schematically,
where identifies u as the immediate successor of t. The until operator introduces a different kind of structure:
Here, translation must identify a point at which holds while simultaneously constraining the interval preceding that point. The resulting first-order representation is therefore structurally more involved than that of a basic eventuality or invariance property.
Increasing temporal complexity does not, within the propositional linear-time setting considered here, imply a loss of translatability to first-order logic. It may, however, substantially affect the structure of the resulting first-order representation. Simple uses of ♢ and □ give rise to comparatively direct quantification over ordered time points; combinations and nesting of temporal operators may introduce more involved quantifier dependencies; ○ depends on the successor structure of discrete time; and U requires constraints over an interval of temporal positions. These cases should therefore not be interpreted as a simple hierarchy of increasingly “difficult” temporal operators. Rather, different temporal constructs introduce different representational requirements, which may in turn affect the subsequent deductive task.
This leads to an important distinction. For practical automated deduction, at least three questions have to be separated:
translatability : can the temporal property be represented in the target logic?
translation complexity : what additional logical structure does the translation introduce?
deductive tractability : how effectively can available provers reason over the result?
These questions are related but should not be conflated. A translation may be theoretically available while producing a representation that is unattractive for practical automated deduction. Conversely, restricted temporal fragments may admit comparatively transparent translations whose resulting formulae are well suited to existing automated reasoning technology. Translation should consequently be treated as a reasoning opportunity rather than as an obligatory processing step.
The relationship between temporal and first-order logic is not incidental. Classical results, most notably Kamp's theorem [10], establish an expressive correspondence between temporal logic with Until and Since over linear orders and an appropriate monadic fragment of first-order logic with order. More generally, van Benthem's model-theoretic account of modal and temporal logics shows how such languages can be systematically related to first-order logic through relational semantics and standard translation [27].
In this view, temporal logic provides a natural and compact language for describing temporal behaviour, whereas first-order logic makes time points and their ordering explicit. The two formalisms should therefore not be placed in a simplistic hierarchy of logical “strength”. Rather, they provide different representations of temporal structures, which can be exploited when selecting an appropriate route for automated deduction.
For the framework developed in this work, the resulting methodological principle is pragmatic. We retain temporal logic as the primary language of behavioural specification, but do not bind automated deduction to a single logic or prover family. Direct temporal reasoning remains possible where suitable deductive machinery is available; controlled translation provides an additional route where another reasoning ecosystem is advantageous. In particular, translation to first-order logic provides access to a broad ATP ecosystem whenever the temporal fragment and the resulting translation make this route practically attractive. The choice of temporal fragment is therefore relevant not only to what behavioural properties can be expressed, but also to which automated-deduction routes remain effectively available.
3 A Hierarchy of Pattern Composition Procedures
The conceptual dimensions introduced in the preceding sections provide the basis for a hierarchy of Pattern Composition procedures. Rather than treating nesting, conditional activation, and iteration as variants of a single composition problem, we organise them into successive levels of composition capability. Each level addresses a qualitatively new compositional requirement while retaining the mechanisms introduced at the preceding levels.
The resulting hierarchy progresses from direct pattern instantiation through structural abstraction, activation-sensitive composition, and occurrence-sensitive reasoning, ultimately combining these mechanisms within a single composition procedure:
Instantiation
Structural abstraction
Activation context
Occurrence identity
→ ...
The central idea of the proposed hierarchy is that increasing behavioural complexity introduces qualitatively different composition problems. Successive procedures therefore extend the applicability domain of Pattern Composition step by step:
The hierarchy should not be interpreted merely as a sequence of increasingly elaborate algorithms. Each transition introduces a qualitatively different composition problem and removes a corresponding restriction of the preceding level. The final level addresses the interaction of mechanisms that can first be considered separately at the preceding levels. An informal characterisation of these problems is:
: How is a flat pattern instantiated?
: How is a nested pattern represented?
: When is a nested pattern activated?
: Which occurrence of a repeated pattern is considered?
: How do these mechanisms interact?
increasing compositional information

Figure 1: Pattern Composition hierarchy and its independent dimensions. Each successive level adds compositional information. The orthogonal AI-assisted mode can propose and refine expressions checked by the applicable level. The temporal-logic fragment is selected independently, yielding configurations .
The individual levels can be characterised more formally by corresponding classes of admissible pattern expressions
and composition procedures
Each extension of admits a class of behavioural structures requiring compositional information not provided at the preceding level. The hierarchy of procedures therefore corresponds to a progressive extension of the behavioural structures to which Pattern Composition can be applied.
The hierarchy is intentionally open-ended. The levels through capture the compositional requirements identified in the present work; further levels may be introduced when additional classes of behavioural structures require qualitatively new compositional information.
The following subsections define each level in turn, starting with the simplest case and progressively removing restrictions to cover richer behavioural structures.
Figure 1 summarizes the Pattern Composition hierarchy, its interaction with the orthogonal AI-assisted mode, and the independent temporal-logic dimension.
3.1 : Flat Pattern Composition
The base level, , concerns local behavioural structures that can be represented by a single pattern whose actual arguments are atomic activities. A typical pattern expression has the form
where each argument is an atomic activity rather than another pattern expression.
At this level, Pattern Composition does not yet require any additional mechanism for handling internal structure, execution context, or repeated occurrences. Its essential task is to identify the behavioural pattern that matches the analysed structure and then instantiate its predefined logical specification. Thus, before logical reuse takes place, the analysed behavioural fragment must be recognised as an instance of an appropriate pattern and its activities must conform to the structural roles defined by that pattern.
Once the base pattern has been identified, composition reduces to the standard formal–actual argument mechanism. If
is the predefined pattern schema and
is its concrete instance, then the generated specification is obtained by substituting the actual activities for the corresponding formal arguments in . Schematically,
The simplicity of should therefore not be confused with the absence of analysis. Pattern identification and structural conformance must precede instantiation. What is absent at this level is additional compositional machinery: there is no nested behaviour to abstract, no conditional activation to represent, and no repeated occurrence to distinguish.
This level is also meaningful from a modelling perspective. Behavioural analysis frequently begins locally, with individual recurring structures whose properties can be considered independently before interactions and larger structural dependencies are introduced. captures this local stage and provides the baseline against which subsequent levels of Pattern Composition can be characterised.
Accordingly,
while the transition to occurs precisely when an actual argument ceases to be atomic and becomes a structured behavioural component. At that point, direct substitution alone is no longer sufficient.
3.2 : Hierarchical Pattern Composition
The first genuine compositional extension arises when an actual argument of a behavioural pattern is no longer restricted to an atomic activity, but may itself be a pattern expression. For example,
contains the nested expression as an argument of P. Consequently, the behavioural structure can no longer be handled by the direct formal–actual substitution used at level .
Pattern expressions provide a compact structural representation of such hierarchical behaviours. A pattern expression can be viewed as a tree-like expression: a recursively constructed term whose leaves are atomic activities and whose internal nodes are behavioural patterns. Subject to the admissibility conditions of the pattern formalism, its structure may be described schematically by
where a is an atomic activity and P is a behavioural pattern. An expression such as
therefore provides a linear notation for an underlying tree-like behavioural structure while preserving the boundaries of its constituent patterns.
This additional structural capability creates a new compositional problem. A nested pattern such as Q has its own logical specification, which must remain part of the specification of the complete behaviour. At the same time, the enclosing pattern P cannot treat the complete internal specification of Q as though it were an atomic actual argument. Instead, it requires an appropriate abstraction of the nested behaviour at the composition boundary.
This role is played by the consolidated expression, denoted by ConsEx(Q). The consolidated expression represents the nested pattern to its parent using the behavioural information required at the composition boundary. Hierarchical composition therefore introduces an important distinction between
internal behavioural specification
and
compositional interface.
The former preserves the logical properties of the nested pattern, whereas the latter provides the representation through which that pattern participates in the specification of its enclosing pattern. Thus, ConsEx is an abstraction mechanism for composition rather than a replacement for the internal specification of the nested behaviour.
Schematically, processing a nested pattern produces
The first component contributes the local logical properties of Q to the resulting specification, while the second supplies the representation required for instantiating the parent pattern. For
the parent can consequently be processed using
while the specification generated for Q is retained as part of the specification of the complete expression.
This mechanism naturally leads to bottom-up composition. Nested pattern expressions are processed before their enclosing patterns, so that their consolidated expressions are available when the corresponding parent is instantiated. At the algorithmic level, can therefore be summarised by the following processing scheme:
nested expression
local specification
structural abstraction
enclosing-pattern instantiation
The procedure is applied recursively from the innermost patterns towards the root of the pattern expression. The detailed construction of consolidated expressions and the complete hierarchical composition algorithm are given in [12]. Here, this procedure is recast as level of the proposed hierarchy in order to expose the specific compositional capability that it provides: structural abstraction of nested behaviour.
Accordingly,
where extends the flat expressions of with admissible hierarchical pattern expressions. The transition from to is therefore not merely an increase in expression size or nesting depth. It removes the restriction that actual arguments must be atomic and introduces the first additional compositional mechanism required by the hierarchy: a structural abstraction through which nested behaviour can be represented to its parent.
3.3 : Activation-Aware Pattern Composition
Hierarchical representation does not resolve every composition problem. Level provides a structural abstraction through which a nested pattern can be represented to its enclosing pattern. It does not, however, distinguish between the structural presence of that pattern and its execution in a particular behaviour. This distinction becomes essential whenever the enclosing control-flow structure permits only conditional execution of its arguments.
The fundamental observation underlying is therefore
structural presence behavioural activation.
A nested pattern may belong to the pattern expression, contribute its structural abstraction to the enclosing pattern, and yet remain unexecuted in a particular run.
Exclusive choice provides the simplest example. Consider
where both P and Q are nested behavioural patterns. Structurally, both alternatives belong to the expression and must therefore be represented during composition. Semantically, however, an execution of the exclusive choice selects exactly one of them.
This difference becomes problematic if the local specifications of the nested patterns independently impose unconditional existence requirements such as
Combined with the semantics of exclusive choice, the resulting global specification may then contain, schematically,
which may be inconsistent. Even when only one alternative is nested, as in
an unconditional requirement may semantically force the nested branch and thereby eliminate the alternative represented by a. Thus, the problem is not exclusive choice itself, but the unconditional activation of a local pattern independently of the context in which it occurs.
This exposes a compositional requirement that is qualitatively different from the structural abstraction introduced by . The two levels answer different questions:
: How is a nested pattern represented to its enclosing pattern?
: Under what conditions is that nested pattern required to execute?
Representation and activation must therefore be treated separately.
The corresponding design principle is
local semantics activation semantics.
A nested pattern should define the behaviour that must hold if the pattern is executed, whereas the enclosing pattern should determine whether its execution is required in the current behavioural context. For a mandatory sequential component, execution may be required unconditionally; for an exclusive alternative, execution is conditional; parallel and iterative contexts may impose still different activation requirements.
This principle does not necessarily require the introduction of an explicit proposition such as . One possible realisation is to guard local requirements by an activation condition,
with the enclosing pattern constraining the activation of its children. For example,
could capture an exclusive choice. An alternative, and potentially less intrusive, realisation is to retain the existing pattern interface and make the propagation of existence requirements context-sensitive: a nested pattern contributes its local behavioural specification, while the enclosing pattern determines whether must be imposed. The precise realisation is developed later; at this level, activation awareness is the essential compositional capability.
Accordingly, extends conservatively. Consolidated expressions and bottom-up processing remain responsible for structural representation. The additional mechanism concerns the propagation of execution requirements through the enclosing pattern structure. At the algorithmic level, the extension can be summarised as
hierarchical composition
determine execution requirements
propagate parent
activation semantics
conditional local
requirements
This scheme captures the additional capability introduced at level ; the detailed activation-aware composition procedure and its algorithmic realisation are developed in Section 4.
Exclusive choice is the principal motivating case, but is not defined by the presence of an XOR operator. Its defining condition is more general: whenever structural inclusion of a behavioural component does not imply unconditional execution, Pattern Composition must separate the local semantics of that component from the activation semantics imposed by its context.
3.4 : Iteration-Aware Pattern Composition
Iteration introduces a further qualitative change in Pattern Composition. Activation-aware composition distinguishes between components that are structurally present and those that are required to execute. Iteration introduces a different problem: the same behavioural component may be executed repeatedly, and some specification tasks may require these executions to be distinguished from one another.
Not every iterative structure requires such a distinction. Many properties of repetitive behaviour can be expressed without identifying individual executions. Temporal properties concerning recurrence, response, progress, or repeated reachability may treat successive executions uniformly. This view is consistent with the classical temporal treatment of reactive and repeatedly evolving behaviour [16]. Explicit occurrence identity becomes necessary only when the intended analysis must distinguish individual executions or relate information belonging to different executions.
For this reason, does not automatically introduce occurrence-sensitive reasoning for every loop encountered in a pattern expression. Instead, the relevant iterative structure is selected externally. Let
denote the set of iterative pattern instances occurring in a pattern expression E. The user supplies a selection
identifying those iterative instances for which individual executions are relevant. This distinction is important when several loops occur in the same expression, or when the same pattern occurs in more than one iterative position: the selection refers to a particular structural instance rather than merely to a pattern type.
The distinction between the preceding level and can therefore be expressed as
: Under what conditions is a pattern required to execute?
: How are individual executions of a selected iterative pattern distinguished and related?
The latter question arises only when occurrence-sensitive reasoning has been explicitly requested.
Let denote a selected iterative pattern instance. The new information introduced by is an occurrence identity. We denote the -th execution associated with schematically by
The two arguments have different roles: identifies the structural instance selected in the pattern expression, whereas i distinguishes one execution of that instance from another. Thus,
structural instance identity
and
execution occurrence identity
remain explicitly separated.
Occurrence identity can subsequently qualify the behavioural interface of the selected pattern. If denotes the pattern occurring at the selected iterative position , its otherwise undifferentiated interface
can be refined, schematically, to
under the occurrence condition . The occurrence identifier does not introduce a new behavioural pattern; it identifies a particular execution of the same pattern and allows the generated specification to preserve this distinction.
This qualification makes two forms of reasoning possible. Properties may relate events belonging to the same occurrence, for example
or they may relate different occurrences of the selected iterative structure, for example
The notation is deliberately schematic at this level. Its purpose is to identify the additional compositional information required by occurrence-sensitive reasoning; the precise logical encoding is developed separately.
Importantly, iteration itself does not imply a change of logical formalism. If individual executions need not be distinguished, the iterative behaviour may remain within the temporal specification mechanisms used at the preceding levels. Even a fixed and bounded set of distinguished executions can, in principle, be represented by explicit occurrence qualification. A different representational problem arises when reasoning must range symbolically over an unbounded family of individually identifiable occurrences. In that case, explicit occurrence identifiers and relations between them may motivate a richer logical representation, potentially involving first-order or first-order temporal machinery. The need for such an extension follows from the required occurrence-sensitive reasoning, not from iteration alone.
At the algorithmic level, extends the preceding composition mechanisms by adding occurrence qualification only to user-selected iterative structures. Its essential processing scheme is
identify iterative instances
user selection
occurrence qualification
occurrence-sensitive specification
Accordingly, can be characterised schematically as
where admits iterative behavioural structures and identifies those structural instances for which occurrence-sensitive treatment is required. For iterative components not selected by , explicit occurrence identity is not introduced.
The transition from to therefore does not mean that every loop is unfolded into separately identified executions. Rather, adds a new compositional capability—occurrence qualification—that can be applied selectively when the intended analysis requires individual executions of an iterative structure to be distinguished. Occurrence identity is introduced on demand, not by default.
3.5 : Explainable Pattern Composition
The preceding levels establish how patterns are instantiated ( ), abstracted ( ), activated ( ), and distinguished ( ). None of these levels, however, preserves information about why a particular formula was generated. This becomes problematic when the generated specification is used for automated reasoning: a prover may return an unsatisfiable core or a set of involved formulae, but such results are expressed at the logical level and no longer directly reveal which elements of the original behavioural structure produced them. This challenge has been identified in recent work on explainable verification of hierarchical workflows: “it remains unclear why such models satisfy or violate logical properties, or how individual elements contribute to overall behavior” [13].
This problem mirrors challenges in process mining, where discovered models are often too complex to interpret (the “spaghetti model” problem) [19], discovery algorithms operate as black boxes that do not explain their results [21, 9], and analysts struggle to relate model elements to their organisational context. Explainable Process Mining (XPM) has emerged to address these concerns by integrating XAI principles into process mining techniques [17]. Similarly, analytic provenance has been proposed to support validation, reproducibility, and reuse of analysis results in exploratory process mining [30]. generalises these insights to the level of logical specification.
3.5.1 Provenance Data Structure
For each generated formula , the provenance record is a tuple:
where:
- is a unique structural identifier assigned to the pattern instance that generated (e.g., for the third child of the second child of the root);
• rules is the set of composition rules applied to derive (e.g.,
- captures the context at generation time (e.g., iteration index , branch , nesting depth );
• deps ⊆ F is the set of formulae on which φ depends (e.g., {Act(P, i), Act(Q, i)}).
3.5.2 Instrumentation of Composition Rules
To populate provenance records, each composition rule is instrumented. The instrumentation is defined uniformly for all rules and takes the form of a wrapper that intercepts formula generation. For a rule with input patterns and output formula , the instrumented rule:
-
Computes sid as the structural identifier of the pattern instance being processed;
-
Computes ctx from the current execution context (iteration index, branch identifier, etc.);
-
Records r in rules;
-
Sets deps to the set of formulae generated by the input patterns;
-
Returns annotated with the resulting provenance record.
This instrumentation is modular: rules are wrapped without modifying their core logic, and provenance is accumulated as composition proceeds.
3.5.3 Provenance Propagation Rules
The following table defines how provenance is propagated through the composition hierarchy. Each rule specifies the provenance transformation that must be applied when combining sub-expressions.
| Composition Rule | Provenance Transformation |
For example, for an expression , the provenance of the formula is:
This trace reveals that appears in the first branch of XOR (position 1.1.1), which is nested inside a loop, and that the formula was derived through three composition rules.
3.5.4 Provenance Consolidation and Query Interface
For human interpretation, provenance records are consolidated into higher-level explanations. The consolidation process applies the following transformations:
-
Grouping by source: All formulae originating from the same sid are grouped together.
-
Path compression: For each formula, the sequence of rules in rules is summarised as a path in the composition tree (e.g., "root XOR Seq P").
-
Contextual annotation: For each formula, the context ctx is translated into a human-readable description (e.g., "inside loop iteration 3, branch 1").
The provenance system supports the following queries, formalised as functions over the provenance space:
3.5.5 Integration with Automated Reasoning
When a theorem prover returns a set of formulae (e.g., an unsatisfiable core), provenance enables projection back to the behavioural structure:
This projection returns the set of structural identifiers, composition rules, and contexts that contributed to the detected issue. For example, if an inconsistency is detected, the analyst can immediately identify which pattern instances are involved and which composition decisions led to the conflict. This directly addresses the challenge identified in the literature on explainable verification of hierarchical workflows [13].
3.5.6 Illustrative Example
The central question of is therefore:
How can reasoning results over the generated specification be traced back to the behavioural structures that pro
This question directly addresses the challenge identified in recent work on explainable verification of hierarchical workflows: “it remains unclear why such models satisfy or violate logical properties, or how individual elements contribute to overall behavior” [13].
By introducing provenance as a first-class artefact, enables:
-
Traceability: every formula can be traced back to its structural origins via sid;
-
Diagnosability: verification failures can be explained through trace and project;
-
Trust: analysts can query provenance to understand and validate the composition process;
-
Feedback for AI: provenance provides structured feedback for , enabling agents to refine their proposals based on specific structural issues.
therefore extends Pattern Composition from specification generation towards explainable specification generation.
3.6 Summary of the Composition Hierarchy
The hierarchy introduced above organises Pattern Composition according to the additional information that must be preserved or introduced as the behavioural structure becomes more demanding. The levels are cumulative: each procedure retains the capabilities of its predecessor and adds a mechanism required by a qualitatively new composition problem.
The resulting progression can be summarised as follows:
| Level | Composition problem | Additional mechanism |
|---|---|---|
| flat pattern instantiation | direct instantiation | |
| hierarchical nesting | structural abstraction (ConsEx) | |
| conditional execution | activation qualification (Act) | |
| repeated execution | occurrence qualification (Occ) | |
| explainability of composition | provenance preservation (Prov) |
Thus, the hierarchy can be read as a sequence of increasingly rich composition capabilities:
instantiate → abstract → qualify activation → qualify occurrence → preserve provenance.
The progression is not intended merely as a classification of workflow constructs. Each transition identifies information that is absent at the preceding level but becomes necessary for preserving the intended behavioural semantics during composition. In this sense, the hierarchy characterises increasing demands placed on the composition procedure, rather than increasing syntactic complexity alone.
The hierarchy remains orthogonal to the hierarchy of temporal fragments introduced earlier. A composition procedure determines how behavioural structures are transformed compositionally, whereas determines the temporal expressive resources available for representing the resulting properties. A particular configuration can therefore still be characterised by
without assuming that increasing composition complexity necessarily requires increasing temporal expressiveness.
This separation is important because the two dimensions need not evolve together. A structurally demanding composition problem may still generate properties within a comparatively simple temporal fragment, whereas a structurally simple pattern may require a temporally richer property. The framework therefore treats composition capability and logical expressiveness as independent dimensions whose interaction can be investigated explicitly.
Finally, the hierarchy is intentionally open-ended. The levels through capture the compositional requirements identified in the present framework; further levels may be introduced when additional classes of behavioural structures require qualitatively new compositional information.
3.7 An Orthogonal Extension:
The hierarchy assumes that pattern expressions are given explicitly by the analyst. In practice, however, behavioural requirements are often expressed in natural language, and identifying the appropriate pattern structure requires interpretation. Recent advances in large language models (LLMs) and generative AI have enabled the automatic generation of behavioural artefacts from natural-language descriptions, offering a promising avenue for reducing the effort required to produce initial modelling results [29].
The extension introduced in this section is not a successor to , but an orthogonal mode of interaction with the hierarchy. Its purpose is not to introduce additional compositional information beyond that captured by , but to enable AI systems to propose, refine, and validate pattern expressions under the guidance of the composition hierarchy.
3.7.1 Interaction Model
operates through a feedback loop between an AI agent and the composition hierarchy:
-
Proposal: The AI agent receives a natural-language description of a behavioural requirement and proposes a candidate pattern expression (e.g., ).
-
Verification: The candidate is verified against conditions: structural well-formedness ( ), nested abstraction ( ), activation consistency ( ), occurrence soundness ( ), and provenance traceability ( ).
-
Feedback: If verification fails, the hierarchy returns structured feedback indicating which condition was violated and which structural elements are responsible.
-
Refinement: The AI agent revises its proposal based on the feedback and repeats the loop.
This interaction model is illustrated in Figure 2.

Figure 2: Interaction model for . The AI agent proposes a pattern expression based on natural-language requirements or event logs, the hierarchy verifies it, and structured feedback guides iterative refinement.
3.7.2 Relationship to the Hierarchy
is neither a successor to nor a replacement for any of the existing levels. It is an orthogonal extension that operates over the hierarchy rather than within it. The hierarchy provides the verification machinery; provides the AI-assisted interface to that machinery.
The central question of this level is therefore:
How can AI systems propose, refine, and validate pattern expressions under the guidance of the composition hierarchy?
3.7.3 Relationship to Explainability
The provenance mechanism introduced in is essential for . When a candidate expression fails verification, the AI agent needs to know which structural element caused the failure and why. Provenance provides this information in a structured form that can be consumed by the agent, enabling targeted refinement rather than blind resubmission.
This distinguishes from purely conversational AI-assisted modelling, where feedback is typically provided in natural language and may lack the precision required for systematic correction.
3.7.4 Summary
extends the applicability of Pattern Composition to settings where pattern expressions are not given explicitly but must be derived from natural-language requirements. It introduces no new compositional information, but enables AI systems to interact with the hierarchy through a feedback loop mediated by provenance.
4 Activation-Aware Pattern Composition
The transition from to addresses a limitation that cannot be resolved by structural abstraction alone. A nested pattern may be structurally present in a pattern expression while its execution depends on the behavioural context imposed by its enclosing pattern. Pattern composition must therefore preserve two different kinds of information: the representation of a nested pattern at the composition boundary and the condition under which that pattern participates in a particular execution.
The central distinction is
structural presence behavioural activation.
Structural presence is determined by the pattern expression and handled by hierarchical composition through consolidated expressions. Behavioural activation, in contrast, is determined by the execution semantics of the enclosing pattern.
Consider, for example,
Both P and Q are structurally present and must therefore be represented during composition. Their structural presence does not, however, imply that both are executed in the same run: the semantics of XOR activates exactly one of its alternatives. The same issue arises when only one alternative is a nested pattern, as in : the presence of P in the expression must not by itself require the execution of P.
The principle underlying is consequently
a nested pattern specifies how it behaves; the enclosing pattern determines whether it is activated.
Activation-aware Pattern Composition therefore extends rather than replacing it. Consolidated expressions continue to provide the structural representation of nested patterns, while activation introduces the execution context in which their execution-dependent requirements become applicable.
4.1 Activation Semantics
Let denote a particular pattern occurrence in an expression, and let denote the condition under which this occurrence participates in the execution under consideration. Activation must be distinguished from structural membership. For a pattern expression E,
states that the instance occurs structurally in E, whereas
states that it is activated in a particular execution. Activation is therefore contextual rather than intrinsic to a pattern: the same pattern specification may occur in different enclosing structures without changing its internal behavioural meaning, while the condition under which its execution is required may differ.
To make the relationship between activation and the pattern interface explicit, define an activation representative for a compositional argument x:
Thus, for a nested pattern occurrence with schema , its interface-level activation representative is . The representative connects the parent's activation semantics to the event-level interface of its arguments. The root occurrence is active by convention, ; its initial occurrence is required once for the complete expression, as specified in the recursive procedure below.
The pattern schema can expose the activation semantics of its arguments as part of its interface:
where op denotes the pattern operator, Args its formal arguments, Spec its local temporal specification, and ini and fin its initial and final interface conditions. ActRel specifies how the activation of the pattern constrains the activation representatives of its arguments. This makes the activation requirements available to the composition procedure without changing the local behavioural meaning of the pattern.
Consider, for example,
and
If the enclosing sequence is activated, both components are required to participate in its execution. For a sequential pattern with arguments , the corresponding relation is
For an exclusive choice, an active parent selects exactly one argument, whereas an inactive parent selects none:
For the expression , with the choice as the root, this relation requires
If is selected, its own activation relation governs its arguments; if is selected, is not required. More generally, for a parent pattern with arguments , let
denote the activation constraints induced by its semantics. Mandatory structures require all relevant arguments to participate, whereas alternative structures select among them.
This separation captures the central principle of activation-aware composition:
a pattern specifies what holds when it executes; its context determines whether it is required to execute.
Structural abstraction is constructed bottom-up:
whereas activation context originates in the enclosing structure and flows towards its components:
The two directions therefore carry different compositional information:
bottom-up : structural abstraction and ConsEx,
parent-to-child : execution context and activation.
Hierarchical abstraction tells the parent how a nested pattern is represented compositionally; activation semantics determines under which execution context that pattern's execution-dependent requirements become applicable. These different directions do not require separate composition algorithms: they can be handled within one recursive procedure.
4.2 Activation-Aware Logical Specifications
The need for activation-aware composition becomes visible when a local pattern specification contains a requirement that can itself force the pattern to occur. Suppose that the local specification of P contains the existence requirement
If P occurs in a mandatory context, requiring this occurrence is consistent with the semantics of the enclosing structure. If P occurs as an alternative branch, however, the same requirement must not force P to execute independently of whether that branch has been selected.
For example, if both arguments of
are nested patterns and their local specifications contribute unconditionally
the resulting specification may require both alternatives to occur, while the enclosing pattern permits exactly one of them to be activated. Even when only one alternative is nested, as in , an unconditional requirement may implicitly force the selection of .
The problem is therefore not exclusive choice itself, but the presence of local constraints that impose execution independently of the activation context of the nested pattern. We call such constraints activation-producing. Other constraints merely describe behaviour once the pattern is executing and do not themselves require its execution. We call these activation-neutral constraints.
Activation-producing constraints must be conditional on the activation of the corresponding pattern. In an explicit-activation presentation, this qualification takes the form
In the interface-based presentation used here, the standalone initial occurrence of a nested pattern is instead represented by its activation representative, , and is constrained by the enclosing pattern's ActRel. It is therefore not added a second time as an unconditional local requirement. Activation-producing constraints other than this standalone initial-occurrence requirement remain subject to qualification.
This qualification should not be applied indiscriminately to the whole local specification. Consider, for example,
This formula constrains the behaviour of P once its initial condition occurs, but it does not itself require P.ini to occur. If P is not activated and P.ini never holds, the formula does not force execution. The same observation applies to a safety property such as
which restricts possible behaviour without requiring either interface condition to occur.
Let
denote the set of activation-producing formulae of a pattern instance P, excluding the standalone initial-occurrence requirement when that requirement is represented by . For a local specification L and an activation condition , define
where denotes the activation-producing constraints contained in L. The activation-aware local specification is then
For a legacy pattern specification that includes Exist(P.ini) as a local formula, this formula is activation- producing and must be qualified as above. In the interface-based formulation, the same occurrence condition is supplied through and the parent relation, and must not be imposed independently a second time.
This formulation makes deliberately conservative. Formulae that do not create an execution obligation remain unchanged; activation qualification is introduced only where a local specification would otherwise force execution independently of context. Well-composedness, consolidated expressions, and activation therefore retain distinct roles: well-composedness concerns internal behavioural coherence, ConsEx provides structural abstraction, and activation controls the applicability of execution-producing requirements.
4.3 The Algorithm
The procedure extends hierarchical Pattern Composition by propagating activation context through the pattern-expression tree, using the interface-level activation representatives of compositional arguments, and qualifying any additional local constraints that may force execution.
Let E be a hierarchical pattern expression represented by a rooted tree. For a pattern instance , let
denote its pattern schema, let
denote its ordered compositional arguments, and let nested( ) be the subset consisting of pattern instances. For a nested child , its activation condition is represented by
For an atomic argument , its representative is .
For a local specification L and activation condition , define the qualification operator
where contains the activation-producing constraints in L, excluding a nested pattern's standalone initial-occurrence requirement when it is already represented by . Activation relations between a parent and its arguments are determined by the semantics of the parent pattern:
The recursive procedure returns a specification and a consolidated expression for each subtree:
where is the specification generated for the subtree rooted at , and is its consolidated expression.
- Let
be the ordered arguments of , and let nested( ) be the nested pattern instances among them.
- For every argument , use its activation representative . Construct the activation constraints
For sequential composition, these constraints require every argument to participate whenever the parent is active. For exclusive choice, they require exactly one argument when the parent is active and no argument when it is inactive.
- For every nested child , recursively compute
- Let denote the argument passed to the parent after recursive processing:
Instantiate the local specification of using these consolidated arguments:
- Qualify any activation-producing constraints in the local specification:
The occurrence condition represented by is not duplicated in ; it is imposed through the parent relation, or once for the complete expression when is the root.
- Construct the consolidated expression
according to the hierarchical composition rules of .
- Add the initial-occurrence requirement only for the root:
Return
For the complete expression E with root r, the root is active by convention:
The resulting specification is
where selects the specification component of the returned pair. The root consolidated expression is retained internally for composition but is not part of the external result.
The procedure combines the two information directions required by activation-aware composition within a single recursion. Activation conditions are supplied from parent to child, whereas consolidated expressions are returned from child to parent:
This directionality explains why hierarchical abstraction and activation can be handled together without requiring a separate top-down traversal.
If all nested pattern instances are mandatory, their activation representatives are equivalent to the activation of their parent. Since the root is active, every nested activation condition reduces to . Consequently,
and the activation relations reduce to tautologies. The root-only initial-occurrence requirement is the same as in hierarchical composition, so
Thus, is a conservative extension of hierarchical Pattern Composition: it adds conditional activation where needed while preserving the result for mandatory compositions.
Recursive characterization. Let be a rooted pattern-expression tree. For each pattern instance , let be its ordered arguments, and let be the subset of arguments that are pattern instances. The root is active by convention, . For every nested instance , its activation representative is . The procedure returns a specification and a consolidated expression for each subtree:
For each argument , let if is a nested instance, and let otherwise. The recursive construction is defined by
where each nested child is processed recursively as . Here, excludes the standalone initial-occurrence requirement represented by ; any other activation-producing constraints are qualified by Qual. The complete procedure returns the specification component for the root:
5 Evaluation
5.1 Research Questions and Experimental Setup
The evaluation investigates whether activation-aware Pattern Composition provides the intended semantics for conditionally executed nested patterns while preserving the behaviour of hierarchical composition in mandatory contexts. We formulate the following research questions:
RQ1: Does preserve the intended activation alternatives in conditionally composed pattern expressions?
This question evaluates whether activation-aware composition avoids unintended execution obligations introduced by unconditional local existence constraints.
RQ2: Does reduce to when all nested patterns are mandatory?
This question evaluates the conservative-extension property of the proposed procedure.
RQ3: What additional specification cost is introduced by activation-aware composition?
This question considers the number of activation conditions, activation-qualified constraints, and generated formulae as the size and nesting depth of pattern expressions increase.
The evaluation uses systematically constructed families of hierarchical pattern expressions. The principal cases contain exclusive-choice structures, since these expose the difference between structural presence and behavioural activation most directly. Representative expressions include
together with recursively generated variants of increasing nesting depth.
Mandatory hierarchical expressions based on sequential composition are used as control cases, for example
For each expression E, we generate the specification produced by hierarchical composition, , and the corresponding activation-aware specification, . Conditional structures are then examined with respect to three properties.
For an exclusive choice between nested alternatives P and Q, we check:
ensuring exclusiveness, and the satisfiability of
and
ensuring that both intended alternatives remain feasible.
This distinction is important because satisfiability of the complete specification alone is insufficient. A specification may remain satisfiable while an unconditional local requirement such as eliminates one of the alternatives admitted by the workflow structure.
For mandatory expressions, we additionally compare the specifications generated by and under
for all relevant nested instances. This provides an empirical check of the reduction property
Finally, for each expression we record its number of pattern instances, nesting depth, number of generated logical formulae, number of activation relations, and number of activation-producing constraints qualified by . These measurements characterise the additional specification overhead introduced by activation-aware composition.
5.2 Conditional-Activation Correctness
Conditional-activation correctness concerns whether the generated specification preserves the alternatives admitted by the enclosing workflow structure.
For an exclusive choice
the intended activation space consists of exactly two admissible cases:
and
The case
must be excluded.
Accordingly, for every exclusive-choice expression considered in the evaluation, we check the following conditions:
Condition verifies exclusiveness, whereas and verify that neither admissible branch has been eliminated by local execution requirements.
The same principle is applied recursively to nested alternatives. If an exclusive-choice node has children and , then correct activation requires
while both branch-selecting assignments must remain satisfiable whenever holds.
This criterion distinguishes activation correctness from satisfiability of the global specification alone. Consider, for example,
where the local specification of the nested pattern P contains
Under ordinary hierarchical composition, the global specification may remain satisfiable while the unconditional existence requirement forces the branch containing P, thereby eliminating the alternative a. Satisfiability alone would therefore fail to reveal the compositional problem.
Under , the corresponding requirement becomes
so that the local specification of P constrains its behaviour only when the branch containing P is activated.
For each evaluated expression, we therefore compare and with respect to:
global satisfiability + exclusiveness + feasibility of every intended alternative.
A conditional composition is considered activation-correct only when all three requirements are satisfied.
5.3 Conservativity and Specification Growth
A desirable property of is that activation awareness should not modify hierarchical composition when the enclosing structure makes all nested components mandatory. In such a case, activation introduces no additional behavioural choice.
Let E be a hierarchical pattern expression in which every nested pattern instance is mandatory in its enclosing context. Then, for every pattern instance ,
For its local specification , the qualification operator therefore satisfies
Hence activation qualification does not change the local specification. After eliminating activation relations that become tautological in a fully mandatory context, the resulting specification satisfies
This property expresses conservativity of with respect to hierarchical Pattern Composition: activation-aware composition extends the applicability of without changing its result for structures in which conditional activation is absent.
The second evaluation aspect concerns the additional specification introduced by activation awareness. Let
denote the number of pattern instances in E, and let
denote the total number of activation-producing constraints occurring in their local specifications. Let
be the set of activation relations generated for the expression. Since activation qualification replaces an activation-producing formula by
rather than introducing an additional local formula, the increase in the number of generated formulae is determined primarily by the activation relations:
Formula count alone does not capture the complete overhead, because qualification also increases the syntactic size of activation-producing constraints. We therefore record separately:
For a fixed pattern library with bounded pattern arity and bounded local specification size, both the number of activation relations and the number of qualified constraints grow at most linearly with the number of pattern instances. The evaluation examines whether this expected behaviour is observed for increasingly nested expression families.
The purpose of this analysis is not primarily to benchmark execution time, but to determine the logical overhead introduced by conditional activation and to verify that it remains proportional to the structural growth of the composed expression.
5.4 Results
Table 1 summarises the results for the conditional-expression families. For each expression, we report whether the specification is satisfiable, whether exclusiveness is preserved, and whether every alternative admitted by the workflow structure remains feasible.
RQ1: Conditional-activation correctness. The comparison focuses on whether ordinary hierarchical composition can introduce unintended execution obligations and whether removes them. In particular, satisfiability is considered together with branch feasibility: a specification is not regarded as activation-correct merely because it is satisfiable if one of the alternatives admitted by the workflow structure has become impossible.
For every exclusive-choice node with alternatives P and Q, the activation-aware specification is checked against
Table 1: Conditional-activation results.
| Expression | Method | SAT | Exclusive | All alternatives feasible |
|---|---|---|---|---|
| - | - | - | ||
| - | - | - | ||
| - | - | - | ||
| - | - | - | ||
| - | - | - | ||
| - | - | - | ||
| - | - | - | ||
| - | - | - |
Table 2: Specification growth under activation-aware composition.
| Expression | depth | |||||
|---|---|---|---|---|---|---|
| - | - | - | - | - | - | |
| - | - | - | - | - | - | |
| - | - | - | - | - | - | |
| - | - | - | - | - | - |
and against the satisfiability of
and
The experimental results therefore determine whether preserves the complete intended activation space rather than only global consistency.
RQ2: Conservativity. For mandatory hierarchical expressions, the specifications generated by and are compared after setting the activation conditions of all nested instances to . The expected reduction property is
The result of this comparison determines whether activation-aware composition changes specifications in cases where no conditional execution is present.
RQ3: Specification growth. Table 2 reports the structural size of the evaluated expressions together with the additional logical material introduced by activation-aware composition.
The measurements are used to distinguish two sources of additional logical structure. Activation-producing constraints are qualified rather than duplicated, whereas activation relations constitute genuinely new formulae. Consequently, the principal growth of the specification is expected to follow the number of activation relations induced by the pattern-expression structure.
6 Discussion
6.1 Pattern Composition as an Information-Preserving Approach
The proposed hierarchy treats Pattern Composition as a way of preserving the information required to derive a global behavioural specification from reusable local specifications. This perspective differs from treating composition as the repeated substitution of larger expressions into a single formula. Substitution alone does not identify which information about a nested pattern must be exposed to its parent, whether that pattern participates in a particular execution, or how the generated formulae can later be related to their sources.
A nested pattern retains its local specification, while its consolidated expression provides the abstraction needed at the composition boundary. This separates the behaviour internal to a pattern from the interface through which the pattern contributes to its enclosing structure. The resulting specification can therefore be constructed recursively, from nested patterns towards the root, without treating a complete nested specification as an atomic activity.
The correctness of this construction depends on the adequacy of pattern interfaces and composition rules. A consolidated expression must expose the information required by its parent, while preserving the meaning of the nested behaviour. Consequently, the hierarchy does not eliminate the need to define and validate pattern schemas. It makes their compositional obligations explicit: each pattern must provide an interface and rules that are compatible with the structures in which it can occur.
6.2 Structural Abstraction and Activation Context
The distinction between structural presence and behavioural activation illustrates why richer composition requires more than deeper nesting. At , a nested pattern can be represented compositionally through ConsEx. At , the parent must also determine whether that pattern participates in the current execution. These mechanisms carry information in different directions: structural abstraction is assembled from child to parent, whereas activation is determined by the enclosing pattern and propagated to its arguments.
This distinction is especially important for alternative structures. In XOR(P, Q), both patterns are present in the expression, but exactly one alternative participates in an execution. If the local specifications unconditionally require the initial occurrences of both patterns, their composition can contradict the intended choice semantics. The parent–argument relation ActRel makes the selection explicit, while activation qualification prevents other local constraints from imposing execution independently of that selection. Thus, local specifications continue to describe pattern behaviour, and the enclosing structure determines when execution-dependent requirements apply.
The interface-based activation representative makes this relationship concrete, but it also introduces an assumption: the occurrence of must adequately represent the participation of in the enclosing execution. Pattern libraries must therefore define their initial conditions consistently with this interpretation. If an initial event can occur without the corresponding pattern being selected, or if participation is not reflected by that event, the pattern requires a different activation representative. Moreover, each control-flow operator needs an appropriate ActRel. The relations for sequential composition and exclusive choice illustrate the approach; additional operators require their own semantics and constraints.
6.3 Compositional Complexity and Temporal Expressiveness
The separation between and distinguishes two sources of complexity. The composition level characterizes the information needed to combine workflow structures. The temporal fragment characterizes the properties that can be expressed in the resulting specification. A hierarchically complex expression does not necessarily require a more expressive temporal logic, just as a simple expression may require a richer fragment to state its desired properties.
The notation provides a way to discuss these dimensions jointly, but it does not imply that every pair is automatically well-defined or useful. A particular composition procedure must generate formulae supported by the selected fragment, and any translation to another logic must preserve the relevant semantics. The separation therefore supports independent analysis of composition and expressiveness while leaving their compatibility to be established for each configuration.
6.4 Scope and Extension of the Hierarchy
The levels identify different compositional information requirements: instantiation at , structural abstraction at , activation context at , occurrence identity at , and provenance at . The progression is not intended as a measure of syntactic size. A small expression may require activation information, whereas a deeply nested expression composed only of mandatory patterns may not. A new level is justified when a workflow construct requires information that the preceding levels do not preserve.
The current treatment develops as a recursive procedure. The discussion of iteration at identifies when repeated executions must be distinguished, rather than requiring every loop to be unfolded into separate occurrences. Likewise, identifies provenance as information needed to connect generated formulae with pattern instances, composition rules, and execution context. These levels point to further compositional capabilities, but their full procedures and interactions remain to be developed. In particular, combining conditional activation, occurrence-sensitive iteration, and provenance will require rules that preserve the meaning of each mechanism when they appear together.
6.5 Evaluation and AI-Assisted Composition
The evaluation design focuses on properties that can be examined systematically: whether conditional alternatives remain feasible, whether preserves the result of for mandatory compositions, and how the generated specification grows with expression size. Constructed expression families make these checks controlled and repeatable. They do not, by themselves, establish that the approach scales to realistic workflow models or that the selected pattern interfaces capture their intended domain semantics. Evaluation on realistic models is therefore needed alongside the proposed controlled checks.
The orthogonal mode uses the hierarchy to check AI-proposed or refined pattern expressions and to return structured feedback. These checks can identify violations of compositional conditions, but they do not establish that an expression faithfully represents its natural-language requirement. That question requires separate evaluation of the AI-assisted modelling process. The hierarchy therefore provides a formal basis for checking compositional consistency, while semantic adequacy remains a distinct concern.
7 Conclusions
This paper organizes Pattern Composition as a hierarchy of procedures that preserve different kinds of compositional information: instantiation, structural abstraction, activation context, occurrence identity, and provenance. The hierarchy is independent of the expressive power of the temporal-logic fragment used to express the resulting specifications. These dimensions can therefore be studied jointly as .
The main formal contribution is activation-aware Pattern Composition ( ). Its recursive procedure distinguishes the structural presence of a nested pattern from its participation in a particular execution. Parent-argument activation relations express the execution semantics of enclosing patterns, while consolidated expressions retain the structural abstractions required for composition. The procedure preserves hierarchical composition for mandatory structures and supports conditional execution, with exclusive choice as the principal case.
The hierarchy also identifies occurrence qualification for iterative patterns ( ) and provenance for tracing generated formulae ( ). The paper outlines these capabilities and an orthogonal AI-assisted mode, , in which proposed pattern expressions are checked against the applicable compositional conditions. The evaluation protocol defines checks for activation correctness, conservativity, and specification growth; executing these checks on larger expression families and realistic workflows remains future work. Further work will also develop the procedure, refine the provenance model into an implemented composition mechanism, and evaluate whether AI-generated expressions faithfully capture their source requirements. Compositional validity alone does not establish that semantic fidelity.
References
[1] Bowen Alpern and Fred B. Schneider. Defining liveness. Information Processing Letters, 21(4):181–185, 1985.
[2] Matthias Blume and Andrew W. Appel. Hierarchical modularity. ACM Transactions on Programming Languages and Systems, 21(4):813–847, July 1999.
[3] Manfred Broy. On the role of logic and algebra in software engineering. In Peter Paule, editor, Mathematics, Computer Science and Logic – A Never Ending Story: The Bruno Buchberger Festschrift, pages 51–68. Springer International Publishing, 2013.
[4] Manfred Broy. A logical approach to systems engineering artifacts: Semantic relationships and dependencies beyond traceability—from requirements to functional and architectural views. Software System Modeling, 17(2):365–393, May 2018.
[5] Ernest Allen Emerson. Temporal and modal logic. In Jan van Leeuwen, editor, Handbook of Theoretical Computer Science, volume B, pages 995–1072. MIT Press, 1990.
[6] Kousha Etessami and Thomas Wilke. An until hierarchy for temporal logic. In Proceedings of the 11th Annual IEEE Symposium on Logic in Computer Science, LICS '96, page 108, USA, 1996. IEEE Computer Society.
[7] Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-oriented Software. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1995.
[8] Thomas A. Henzinger, Shaz Qadeer, and Sriram Rajamani. You assume, we guarantee: methodology and case studies. In 10th International Conference, CAV'98, pages 440–451. Springer Berlin Heidelberg, July 1998.
[9] Tjalling Hoogendoorn, Jeewanie Jayasinghe Arachchige, and Faiza A. Bukhsh. Survey of explainability within process mining: A case study of bpi challenge 2020. In 2023 International Conference on Frontiers of Information Technology (FIT), pages 43–48, 2023.
[10] Hans Kamp. Tense Logic and the Theory of Linear Order. PhD thesis, University of California, Los Angeles, 1968.
[11] Ekkart Kindler. Safety and liveness properties: A survey. EATCS-Bulletin, 53:268–272, 1994.
[12] Radosław Klimek. Pattern-based and composition-driven automatic generation of logical specifications for workflow-oriented software models. Journal of Logical and Algebraic Methods in Programming, 104:201–226, 2019.
[13] Radoslaw Klimek and Jakub Błazowski. Towards diagnostic explainability in workflow verification via Shapley attribution. In Proceedings of 41st IEEE/ACM International Conference on Automated Software Engineering (ASE 2026), October 12-16, 2026, Munich, Germany, ASE '26, New York, NY, USA, 2026. Association for Computing Machinery.
[14] Antonín Kučera and Jan Strejček. The stuttering principle revisited. volume 41, page 415–434, Berlin, Heidelberg, June 2005. Springer-Verlag.
[15] Robi Malik, Sahar Mohajerani, and Martin Fabian. A survey on compositional algorithms for verification and synthesis in supervisory control. Discrete Event Dynamic Systems, 33(3):279–340, August 2023.
[16] Zohar Manna and Amir Pnueli. The Temporal Logic of Reactive and Concurrent Systems – Specification. Springer-Verlag New York, Inc., 1992.
[17] Patrick Mukala. A framework for explainable process mining (xpm): Steps toward adopting ai transparency principles applied to process mining. In Richi Nayak, Namita Mittal, Ajay Khunteta, and Manoj Kumar, editors, Recent Advancements in Artificial Intelligence, pages 1–14, Singapore, 2026. Springer Nature Singapore.
[18] D. L. Parnas. On the criteria to be used in decomposing systems into modules. Communications of the ACM, 15(12):1053–1058, December 1972.
[19] Viki Peeva, Lisa L. Mannel, and Wil M. P. van der Aalst. From place nets to local process models. In Application and Theory of Petri Nets and Concurrency: 43rd International Conference, PETRI NETS 2022, Bergen, Norway, June 19–24, 2022, Proceedings, pages 346–368, Berlin, Heidelberg, 2022. Springer-Verlag.
[20] Doron Peled and Thomas Wilke. Stutter-invariant temporal properties are expressible without the next-time operator. Inf. Process. Lett., 63(5):243–246, September 1997.
[21] Eva Piccirilli, Claudio Di Ciccio, Marco Montali, Rafael Peñaloza, Luigi Pontieri, and Francesco Ricca. Explainable knowledge-aware process intelligence. KI - Künstliche Intelligenz, 39(4):311–316, December 2025.
[22] Nick Russell, Wil M.P. van van der Aalst, and Arthur H. M. ter Hofstede. Workflow Patterns: The Definitive Guide. The MIT Press, 2016.
[23] Geoff Sutcliffe. The TPTP Problem Library and Associated Infrastructure. Journal of Automated Reasoning, 59:438–502, 2017.
[24] Geoff Sutcliffe. The 10th ijcar automated theorem proving system competition – casc-j10. AI Commun., 34(2):163–177, jan 2021.
[25] Stavros Tripakis. Compositional model-based system design and other foundations for mastering change. In Bernhard Steffen, editor, Transactions on Foundations for Mastering Change I, volume 9960 of Lecture Notes in Computer Science, pages 113–129. Springer, 2016.
[26] Stavros Tripakis. Compositionality in the science of system design. Proceedings of the IEEE, 104(5):960–972, 2016.
[27] Johan van Benthem. The Logic of Time: A Model-Theoretic Investigation into the Varieties of Temporal Ontology and Temporal Discourse, volume 156 of Synthese Library. Kluwer Academic Publishers, Dordrecht, 2nd edition, 1991.
[28] Wil M.P. van der Aalst, A.H.M. ter Hofstede, B. Kiepusewski, and A.P. Barros. Workflow patterns. Distributed and Parallel Databases, 4(1):5–51, 2003.
[29] Fares Wael, Youssef Maklad, Ali Hamdi, and Wael Elsersy. An agentic flow for finite state machine extraction using prompt chaining. In 2025 Intelligent Methods, Systems, and Applications (IMSA), pages 328–333, 2025.
[30] Francesca Zerbato, Andrea Burattin, Hagen Völzer, Paul Nelson Becker, Elia Boscaini, and Barbara Weber. Supporting provenance and data awareness in exploratory process mining. In Advanced Information Systems Engineering: 35th International Conference, CAiSE 2023, Zaragoza, Spain, June 12–16, 2023, Proceedings, pages 454–470, Berlin, Heidelberg, 2023. Springer-Verlag.