arXiv:2610.40377cs.LOOct 2026

Manuscript Offprint

arXiv:2610.40377

A Hierarchy of Composition Procedures for Logic-Based Workflow Patterns

Radosław Klimek

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 ΠC\Pi C, 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 ΠC0,ΠC1,…\Pi C_{0}, \Pi C_{1}, \ldots, 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 ΠCi\Pi C_i, different levels of temporal expressiveness represented by TLjTL_j, 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:

  1. We organize Pattern Composition as a ΠC0\Pi C_0- ΠC4\Pi C_4 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.

  2. We separate compositional complexity, represented by ΠCi\Pi C_i, from temporal-logic expressiveness, represented by TLjTL_j. This provides a two-dimensional framework ΠCi[TLj]\Pi C_i[TL_j] in which composition mechanisms and temporal expressiveness can be studied independently.

  3. We develop activation-aware Pattern Composition ( ΠC2\Pi C_{2}), 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.

  4. We analyse the properties of ΠC2\Pi C_{2} 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.

  5. We introduce a provenance model for tracing generated formulae to their originating pattern instances, composition rules, and contexts, and outline ΠCAssist\Pi C_{Assist} as an orthogonal mode for AI-assisted proposal, validation, and refinement of pattern expressions.