InterCompose: Composing Modular Systems
- InterCompose is a comprehensive approach to composing discrete entities—such as security protocols, motion sequences, and concurrency primitives—while preserving their invariant properties.
- It employs systematic term-level interleaving and synthesis techniques, ensuring that essential properties like cryptographic integrity and semantic consistency are maintained.
- The framework integrates post-composition evaluation layers to verify and enforce behavioral, security, and concurrency invariants across diverse application domains.
InterCompose refers to a set of frameworks and methodologies across computer science domains for the systematic composition of discrete entities—protocols, motion sequences, or concurrency primitives—into new composite structures that preserve or enhance their intended properties. The term is used in security protocol engineering, synthetic motion generation, composable concurrency, and formal protocol composition. Each instantiation addresses fundamental challenges in combining independently specified components, ranging from cryptographic invariants to semantic consistency and behavioral coverage.
1. Term-Based Protocol Composition in Security
The term-based InterCompose framework formalizes the parallel composition of security protocols by operating directly at the message-term level. Genge et al. propose an extension of Fabrega–Herzog–Guttman strand spaces—known as the k-strand-space model—that augments the tracking of term construction, participant knowledge, and dynamic memory (0908.3083). Terms are recursively defined algebraic structures using the grammar:
supporting participant names, nonces, cryptographic keys, pairings, and nested cryptographic operations.
The essential InterCompose algorithm systematically constructs all consistent message interleavings between two protocols, enforcing sender-receiver coherence. For every message alignment, it composes terms as follows: merging encryptions under the same context (key, operation) by forming higher-order encrypted pairs, otherwise composing directly via pairings, and rejecting interleavings that cross cryptographic boundaries. Memory strands are attached to each participant to model dynamic knowledge flow; all composed outputs are then checked for constructability from the union of static and dynamic knowledge.
Security invariance is enforced by explicit connection structures:
- Partial connections (): subterms in cleartext within encrypted terms.
- Complete connections (): encrypted subterms or matched decryption–pair structures.
By preserving these connections, InterCompose guarantees that composed protocols uphold original secrecy and authentication properties. The paradigm is exemplified by combining Woo–Lam Pi3 and modified Yahalom protocols, yielding valid composed protocols only if all term connections are preserved (0908.3083).
2. Synthesis-by-Composition in Human Motion Modeling
In the synthetic human interaction domain, the InterCompose pipeline—integral to the Text2Interact framework—enables scalable generation of two-person motion sequences from textual prompts without additional motion capture (Wu et al., 7 Oct 2025). InterCompose bridges the gap between limited motion capture datasets and the requisite diversity for robust interaction generation by:
- LLM-Guided Prompt Synthesis: Using clustered interaction themes and fine-grained tags, LLMs generate diverse paired-agent textual scenarios.
- Role Decomposition and Motion Retrieval: Prompts are decomposed into actor-specific subprompts, each translated into a motion sequence using single-agent priors (e.g., pretrained MoMask text-to-motion models).
- Conditional Reaction Generation: A DDPM-based transformer synthesizes the response motion sequence, conditioned on the first agent’s trajectory and joint text prompt, optimizing an MSE loss on diffused noise.
- Neural Evaluation and Filtering: A dual-path contrastive encoder (frozen CLIP for text, Transformer for motion) filters synthesized pairs based on cosine similarity to prompt, followed by a distributional novelty test using Euclidean distance in motion-embedding space. Only sequences satisfying strict alignment and novelty criteria are retained.
InterCompose thus expands interaction coverage from ∼6 K real to ∼25 K synthetic candidates, yielding a high-quality filtered set (~1.2 K) with demonstrable FID and R-Precision improvements when used to fine-tune text-to-interaction models. Importantly, this augmentation is realized entirely from LLMs and trained priors, without extra MoCap collection (Wu et al., 7 Oct 2025).
3. Composable Concurrency and Programming Abstractions
In the context of concurrency model design, InterCompose denotes the systematic composition of distinct concurrency abstractions—actors, CSP, STM, atomics, futures/promises—such that safety and liveness properties are maintained (Swalens et al., 2014). Each model is defined as a labeled transition system with explicit small-step semantics. The composition of two such models and (denoted ) involves embedding the primitives of within the operational contexts of , with attention to critical semantic invariants:
- Determinism/Serializability: Ensuring transactional or ordering properties across composed models.
- Side-Effect Isolation: Operations with irrevocable effects cannot occur in retryable contexts; e.g., STM transactions must delay side effects until commit.
- Blocking Semantics: Strict prohibition of blocking operations in non-blocking contexts to avoid deadlock or livelock.
- Compositional Laws: Maintenance of associativity and commutativity for effect-free operations and composition contexts.
Empirical analysis of Clojure concurrency primitives exposes nuanced (un)safe embeddings—e.g., re-executed swaps causing races, side effects in transactions leading to non-repeatable sends, and futures or channels breaking liveness when used in actor or STM contexts. The resulting InterCompose recommendations include effect/context typing, static and dynamic checks on embedding legality, and runtime scheduling/enforcement layers to guarantee safe and live composition (Swalens et al., 2014).
4. Interleaving Composition in Formal Protocol Engineering
Bocchi et al. introduce a theory of interleaving composition for software protocols specified in a process algebra with assertion-based synchronization (Bocchi et al., 2022). Individual protocols, written as terms in a labeled calculus with assertions (pre/post conditions, contact points), are composed via a recursive search algorithm that merges their execution traces subject to user-defined constraints.
The composition operator () orchestrates stepwise interleaving, applies synchronization at assertion points, and merges branching and recursion constructs with semantics that preserve both original protocols’ intended behaviors. The method yields a canonical composed protocol where assertions (assert, require, consume) synchronize protocol interaction at semantically meaningful contact points. Key theorems guarantee:
- Behavior Preservation: Every execution of the composite simulates feasible executions of both components.
- Fairness: Infinite runs never starve any constituent protocol.
A significant application is the Erlang/OTP protocol composer, which translates composite specifications into executable state machine code, further supporting round-trip extraction and recomposition from live modules (Bocchi et al., 2022).
5. Synthesis and Domain-Specific Design Considerations
InterCompose frameworks share a common architectural pattern:
- Modeling Individual Components: Whether protocols, motions, or concurrency primitives, each is formalized with precise operational semantics.
- Component Decomposition and Role Assignment: Complex entities are split into role- or agent-specific subcomponents for independent generation or analysis.
- Synchronous or Synthesis-driven Composition: Composition proceeds via either explicit term-by-term or action-by-action alignment, guided by semantic, cryptographic, or assertion invariants.
- Filtering/Evaluation Layer: Synthesized candidates are subject to post-hoc or runtime checks for invariant preservation, security properties, coverage, or behavioral soundness.
- Tool Support and Automation: Implementations range from protocol combinator tools with code generation (Erlang) to data pipelines in interaction synthesis.
The domain-dependent design constraints are summarized in the following table:
| Domain | Invariant Preserved | Key Composition Operator |
|---|---|---|
| Security protocols | Security connections () | k-strand interleaving + term composition |
| Human motion synthesis | Motion–text alignment, distributional novelty | Prompt-based retrieval + DDPM reaction |
| Concurrency abstractions | Effect, blocking, serializability | Context embedding (0), effect typing |
| Protocol algebra | Assertion-based behavior | Interleaving with contact-point sync (1) |
6. Significance and Impact
The InterCompose paradigm represents a unifying approach for designing complex composite systems:
- In security, it enables systematic protocol engineering without invalidating core properties.
- In data-driven generative modeling, it scales the synthetic corpus while maintaining semantic and distributional integrity.
- In systems and language design, it provides safety and liveness guarantees for multi-model concurrency.
- In formal methods and protocol synthesis, it establishes a robust foundation for the integration and interaction of heterogeneous protocol specifications and implementations.
This approach ensures that the compositionality of software artifacts, behavioral models, or engineering primitives does not compromise correctness, expressiveness, or coverage, and is central to advancing scalable, verifiable system design (0908.3083, Wu et al., 7 Oct 2025, Swalens et al., 2014, Bocchi et al., 2022).