Message sequence chart
A Message Sequence Chart (MSC) is a graphical and textual language standardized by the International Telecommunication Union (ITU-T) for specifying and describing the interactions between independent entities in a system, particularly through sequences of message exchanges that represent communication behavior over time.[1] It serves as a trace language to visualize and document system runs, aiding in the design, simulation, validation, testing, and verification of real-time and distributed systems, such as those in telecommunications.[2] The MSC notation originated in the early 1980s as a tool for protocol engineering but was first formally standardized in ITU-T Recommendation Z.120 in 1992 (MSC'92), with subsequent revisions enhancing its expressiveness, including the addition of inline expressions, data interfaces, and time constraints in versions from 1996 onward.[3] The current version, ITU-T Z.120 (02/2011), refines these elements while maintaining backward compatibility, supporting both basic MSCs for simple traces and high-level MSCs (HMSCs) for modular, hierarchical specifications of complex interaction patterns. MSCs are widely integrated with other formal description techniques, such as the Specification and Description Language (SDL) and the Testing and Test Control Notation (TTCN), to provide complementary views of system behavior.[2] In an MSC diagram, vertical lifelines represent entities (or instances), horizontal arrows depict messages passed between them, and the horizontal axis indicates the progression of time, with optional elements like conditions, actions, timers, and structural operators (e.g., alternatives, loops, parallels) to capture conditional, repetitive, or concurrent behaviors.[1] This notation's simplicity and intuitiveness make it suitable for requirement elicitation, conformance testing, and interoperability analysis in standards bodies like ETSI and ITU, as well as in industry for software and protocol development.[2]Overview
Definition and Purpose
A Message Sequence Chart (MSC) is a graphical and textual language for the specification and description of interactions between system components, standardized as part of the ITU-T Recommendation Z.120.[4] As a member of the Specification and Description Language (SDL) family, an MSC describes one or more traces of an SDL system specification, emphasizing message exchanges over internal processes.[5] The primary purpose of an MSC is to provide a trace language for specifying and describing the communication behavior of system components and their environment through message interchanges.[5] It enables the visualization of how entities, such as processes or objects in distributed systems, interact over time, capturing the sequence of events without delving into the internal state transitions of individual components.[6] This focus on temporal ordering makes MSCs particularly useful for requirement specification, interface design, validation, and documentation in real-time systems, including telecommunication applications.[5] Key characteristics of MSCs include their intuitive graphical representation, which uses vertical lifelines for entities and horizontal arrows for messages to denote causality and ordering.[6] Unlike more comprehensive modeling languages, MSCs prioritize external communications and local actions, omitting detailed internal logic to maintain clarity and simplicity.[5] For example, a basic MSC for a client-server interaction might illustrate a client entity sending a "request" message to a server entity, followed by the server emitting a "response" message back, thereby highlighting the ordered flow of communication without specifying the server's processing steps.[7] Originating in the context of telecommunications modeling, MSCs were developed to address the need for traceable interaction diagrams in complex distributed environments.[5]Applications and Scope
Message Sequence Charts (MSCs) are primarily applied in the specification of communication protocols within telecommunications, where they model signaling interactions in networks such as those defined by ITU-T standards.[8] They also facilitate the description of interactions in distributed software systems and serve as a tool in requirements engineering to capture high-level behavioral specifications.[9] In these domains, MSCs support phases from initial design and documentation to verification of system behaviors.[10] The scope of MSCs centers on depicting the external observable behavior of system entities through sequences of message exchanges over time, without addressing internal computations or state transitions.[8] This focus on message flows makes them suitable for outlining trace-like interactions but limits their use to observable interfaces rather than detailed implementation logic.[5] MSCs have inherent limitations in handling real-time constraints or probabilistic behaviors, as the core notation lacks mechanisms for timing specifications or probability distributions unless augmented by extensions such as timed or probabilistic MSCs.[11] They emphasize deterministic message sequences, making them less appropriate for systems requiring stochastic modeling without additional formalisms.[12] In practice, MSCs integrate with Specification and Description Language (SDL) to aid protocol design by providing visual traces that inform SDL process definitions.[9] They are also employed in conformance testing to generate scenarios for verifying protocol message exchanges against expected sequences, often combined with tools like TTCN for automated test case derivation.[13]Historical Development
Origins and Early Concepts
Message sequence charts (MSCs) originated in the 1980s as a graphical notation within the Specification and Description Language (SDL), a formalism developed by the ITU-T Study Group 10 for specifying telecommunication systems.[14] SDL aimed to provide a structured way to describe the behavior of complex, distributed systems in telecommunications, where MSCs served as an informal tool to visualize interactions early in the design process.[15] The early concepts of MSCs were influenced by trace languages used for modeling distributed systems, which captured sequences of events and message exchanges to represent system executions.[3] These concepts emphasized an intuitive graphical depiction of message flows between system components, allowing engineers to sketch interactions without delving into detailed behavioral specifications.[15] Such depictions proved particularly useful in telecommunication protocol design, where understanding inter-component communication was essential for ensuring system reliability.[7] A key milestone in the development of MSCs occurred with their introduction in the SDL-88 edition, where they were presented as a complementary notation to SDL's block diagrams.[15] In the SDL-88 user guidelines, MSCs were described as auxiliary diagrams for illustrating system traces, bridging high-level overviews with more formal SDL process descriptions.[15] This integration highlighted their role in facilitating communication among development teams and stakeholders in the telecommunications industry.[16] At their conceptual foundation, early MSCs focused on partial orders of events rather than rigid timelines, enabling the representation of concurrency in distributed systems.[3] This approach allowed for flexible modeling of asynchronous interactions, where events on different instances could occur independently without implying a total sequence.[3] By prioritizing causal relationships over strict temporal ordering, MSCs provided a more realistic depiction of parallel processes in telecommunication environments.[15]Standardization by ITU
The standardization of Message Sequence Charts (MSCs) was led by the International Telecommunication Union Telecommunication Standardization Sector (ITU-T), with initial development under Study Group 10 from 1993 to 1996 and subsequent maintenance responsibility transferred to Study Group 17 following the 2001 merger of Study Groups 7 and 10.[4][17][5] ITU-T Recommendation Z.120, first published in March 1993, established MSCs as a formal language for graphically specifying message-based interactions among entities in distributed systems, emphasizing traces of communication events.[8][18] This initial version provided foundational syntax for textual and graphical representations, enabling tool support and interoperability in telecommunications specifications.[8] The recommendation was amended in October 1996, introducing refined core syntax for basic elements like instances, messages, and conditions, along with informal semantics to clarify behavioral interpretations.[8][5] High-level constructs for combining multiple charts were introduced in the 1996 amendment. Further amendments in November 1999 and a corrigendum in December 2001 addressed clarifications and extensions to these and other features.[8][19][3] Subsequent editions included the 2004 revision, which continued and refined the 1999 version; amendments in 2008 and 2009 providing application guidance; and the 2011 edition, which further refined concepts including inline expressions and time constraints while maintaining backward compatibility. As of 2025, the 2011 edition remains in force with no further revisions.[8][20] These updates facilitated integration with other ITU-T languages, notably TTCN-3, where MSCs form the basis of the Graphical Presentation Format (GFT) for test specifications.[21][22] Global adoption has seen Z.120 incorporated into standards bodies like the European Telecommunications Standards Institute (ETSI), particularly in TTCN-3-based testing methodologies for conformance and interoperability in telecommunications protocols.[23][21] This integration supports specification, validation, and documentation in domains such as protocol engineering and system design.[23]Core Notation
Basic Symbols and Elements
Message sequence charts (MSCs) employ a set of fundamental graphical symbols to depict interactions between system entities over time. The core structure consists of vertical lifelines, represented as straight lines extending downward from an instance head symbol, which is a rectangular box at the top containing the instance name and type (e.g., process or block). These lifelines symbolize the entities involved, such as system components or processes, with time progressing implicitly from top to bottom along each line, establishing a total ordering of events for that entity.[8] Messages, the primary means of interaction, are illustrated as horizontal or slightly sloped solid arrows connecting lifelines, with the arrowhead indicating the direction from sender to receiver; the tail attaches to the sending lifeline at the send event point, and the head to the receiving lifeline at the receive event point. Both synchronous (where the sender awaits a response) and asynchronous (non-blocking) messages use this same solid arrow notation, with no graphical distinction between them in basic MSCs—the semantics determine the behavior. For interactions with external elements, messages may connect to the chart's boundary frame, representing the environment, often via labeled gates.[8][7] Additional events include conditions and actions. Conditions, which specify states or guards that must hold (e.g., "system idle"), are depicted as hexagonal symbols containing textual labels; these can be local to one lifeline, span a subset of instances (non-global), or cover all instances (global), drawn as a hexagon straddling the relevant lifelines. Actions, representing internal computations or state changes within an instance (e.g., "increment counter"), are shown as rectangular boxes attached to the lifeline, aligned with the event axis and containing descriptive text. Timers are represented as rectangular boxes on a lifeline labeled with operations such as "start timer T" or "stop timer T," allowing the modeling of time-based events.[8][7] To handle concurrency and partial ordering, co-regions are used, marked by pairs of dashed vertical lines flanking a segment of a lifeline (or multiple aligned segments across lifelines), indicating that events within the region occur in parallel without a specified order among them—only the order relative to events outside the co-region is preserved. The environment is denoted by a rectangular frame enclosing the entire chart, with no inherent ordering assumed for external interactions.[8][7] A basic example illustrates a two-entity exchange: Instance "Client" (left lifeline, topped by a rectangle labeled "Client [process]") sends a synchronous message "request" via a solid horizontal arrow to instance "Server" (right lifeline, labeled "Server [process]") at the receive point on the Server lifeline. The Server then performs an action in a rectangle ("process data") before sending a reply message "response" back to the Client via another solid arrow. This depicts a simple request-response interaction, with all events ordered top-to-bottom on each lifeline.[8]Structure and Semantics of MSCs
A Message Sequence Chart (MSC) is structured with a header that specifies the chart's name and declares the participating instances, represented as vertical lifelines or columns denoting system entities such as processes or objects. The body follows, comprising time-ordered events along these instances, including message exchanges, local actions, conditions, and timer operations, with events positioned to reflect their sequence. Optional footnotes may attach explanatory text or references to specific events or instances for additional context.[5] The semantics of MSCs are based on a partial order of events, where the order is total and strict along each individual lifeline—meaning events on the same instance occur sequentially from top to bottom—but partial across different lifelines, allowing for interleaving of independent events unless constrained by message causality. Causality is enforced such that a message's sending event precedes its receiving event in the overall order, establishing dependencies between instances, while coregions (delimited by pairs of dashed vertical lines) permit unordered execution of concurrent events within an instance. Cycles in the order relation are prohibited to ensure acyclicity and prevent paradoxes in execution traces.[6][5][7] Optional frames, such as alternative (alt) and optional (opt) constructs, enclose regions of the chart within rectangular boundaries to specify conditional or elective behaviors; for instance, an alt frame divides a sequence into mutually exclusive branches based on conditions, while an opt frame indicates a sequence that may or may not occur. These frames apply to groups of events across multiple instances, maintaining the partial order within each branch.[5] Formally, MSCs represent possible traces of system executions, where the chart depicts a partial specification of behaviors through event sequences linked by causality relations derived from message arrows, enabling the modeling of both synchronous and asynchronous communications in distributed systems. This trace-based interpretation aligns MSCs with process calculi, viewing the chart as a projection of interleaved actions from parallel processes.[6] Validation of an MSC requires adherence to rules ensuring well-formedness, including no lost messages—where every sent message must have a corresponding reception—and balanced communication, mandating a one-to-one matching between output (send) and input (receive) events without unpaired or dangling arrows except at defined gates for environmental interactions.[5][7]Advanced Features
High-level Message Sequence Charts (HMSCs)
High-level Message Sequence Charts (HMSCs) extend basic Message Sequence Charts (MSCs) by providing a graphical means to compose and relate multiple MSCs into a cohesive overview of system behavior. Defined as directed graphs, HMSCs consist of nodes representing individual MSCs (or sub-HMSCs) and edges that specify the order or transitions between them, enabling the modeling of complex interactions at a higher level of abstraction. According to ITU-T Recommendation Z.120, nodes include a start symbol (a downward-pointing triangle marking the entry point), an end symbol (an upward-pointing triangle indicating termination), MSC reference symbols (depicted as frames with rounded corners to reference basic MSCs), condition symbols (hexagons for global states that guard transitions), and parallel frames (rectangles enclosing sub-HMSCs for concurrent execution). Edges, shown as arrows, connect these nodes to represent sequential flow, alternatives, or repetitions, with multiple outgoing arrows from a node denoting choices.[5][3] The primary purpose of HMSCs is to capture the control flow and structural relationships among related basic MSCs, facilitating the specification of scenarios that involve choices, loops, and modularity in large-scale systems such as communication protocols. By abstracting away low-level event details, HMSCs allow designers to focus on the overall architecture and possible execution paths, supporting decomposition for reusable components and aiding in the verification of system properties. This modularity is particularly valuable in telecommunications, where HMSCs enable the hierarchical organization of behaviors, such as sequencing service requests or handling alternative responses in a protocol. Semantics are defined through graph traversal: execution begins at the start symbol and proceeds along edges, with conditions evaluated to restrict paths (e.g., only if an initial condition matches a final one from a prior MSC), generating a set of valid basic MSC traces that represent all possible system runs. Operators implicit in the graph include weak sequential composition (vertical stacking via single edges), delayed choice for alternatives (multiple edges delaying resolution until necessary), and free merge for parallels, with cycles allowing loops and recursion for infinitary behaviors.[6][24][5] For instance, consider an HMSC modeling a simplified call completion busy subscriber (CCBS) service in a telephony system. The graph starts at a "CCBS Idle" condition node, followed by an MSC reference to a "REQUEST" basic MSC handling user activation. From there, arrows branch to alternative paths: one to an "ACTIVATION" MSC if accepted, leading to a loop via a "MONITORING" MSC that repeatedly checks call status until connected or canceled; the other to a "REJECT" MSC if denied, returning to "CCBS Idle." A parallel frame might enclose monitoring and notification sub-HMSCs to interleave status updates with other events, ending at a "CCBS Free" condition. This structure generates traces encompassing all valid sequences, such as successful activation loops or immediate rejections, while conditions ensure state consistency across transitions.[3]Extensions to the Core Notation
The ITU-T Recommendation Z.120 defines several extensions to the core notation of Message Sequence Charts (MSCs) to enhance expressiveness for complex interactions, including inline expressions that incorporate data manipulation, timing, and error handling. Inline expressions allow for the embedding of structured behaviors such as alternatives, loops, and exceptions directly within an MSC, using frames with operators like alt for alternatives guarded by conditions (e.g., when (expr)) or loop for repetitions. These expressions support data aspects through definitions (e.g., def variable), bindings (e.g., variable =: value), and validations (e.g., valid(expression)), enabling the representation of dynamic variable assignments and checks without leaving the chart's flow.[25] Timers, or clocks, extend the notation to model time-dependent behaviors, depicted as hourglass symbols on instance axes for starting (starttimer T [duration]), crosses for stopping (stoptimer T), and arrows for timeouts (timeout T). These allow specification of time intervals, such as supervision periods where a timer starts upon an event and triggers an action or exception upon expiration, providing semantics for bounded or unbounded durations (e.g., [0, inf)). Exceptions handle error scenarios through the exc inline expression operator, which encloses alternative paths for faults like message loss or timeouts; semantically, it acts as a shorthand for an alternative where the second operand is the continuation of the MSC, ensuring the chart resumes after the exception or skips to the end.[25] Additional symbols include MSC references for function calls, represented as rectangular boxes with gates that invoke nested sub-MSCs (e.g., reference SubMSC(param)), supporting modular decomposition and parameter passing for synchronous or asynchronous interactions. State references integrate with the Specification and Description Language (SDL) via condition symbols—hexagonal or rectangular boxes on instance axes—that set or guard states (e.g., condition state_name or when (state_expr)), linking MSC traces to SDL state machines for hybrid behavioral modeling. These extensions were refined in subsequent versions, such as the 1996 edition (MSC'96) introducing coregions for simultaneous events, inline expressions, and data concepts, with further refinements in the 2004 and 2011 editions correcting inconsistencies while preserving compatibility.[25][5] In research contexts, informal extensions have been proposed to annotate MSCs with probabilities and performance metrics, addressing limitations in the core notation for stochastic or quantitative analysis. For instance, Probabilistic Message Sequence Charts (PMSCs) extend Z.120 by adding probability values to messages, conditions, and alternatives (e.g., p=0.7 on an edge), enabling the modeling of uncertain interactions in systems like protocols with failure rates.[11] Similarly, Performance Message Sequence Charts (PMSCs) incorporate annotations for timing distributions, resource usage, and throughput (e.g., ~N(10,2) for normal-distributed delays), facilitating performance evaluation through simulation or formal verification.[26] ITU supplements propose integration of MSCs with the User Requirements Notation (URN) for goal-oriented modeling, where MSCs complement Use Case Maps (UCMs) in URN by providing detailed scenario traces linked to high-level paths, as outlined in Z.150; this enhances requirements elicitation without altering core MSC symbols. Despite no major notational overhauls since 1999, these extensions remain compatible with modern tools supporting XML-based rendering and verification. For example, an MSC might depict a client-server interaction where a starttimer T [27] begins upon message send, followed by a timeout T event triggering an exc frame with an error message and recovery path, resuming the main flow afterward.Related Concepts and Comparisons
Live Sequence Charts
Live Sequence Charts (LSCs) are an expressive extension of Message Sequence Charts (MSCs), developed by Werner Damm and David Harel to enable the specification of both universal ("must" occur in all system runs) and existential ("may" occur in at least one run) behaviors in scenario-based modeling.[28] This distinction addresses the primary limitation of standard MSCs, which only describe possible interactions without enforcing liveness or mandating progress.[28] LSCs originated in foundational work during the late 1990s and early 2000s, with the seminal paper "LSCs: Breathing Life into Message Sequence Charts" published in 2001, building on ITU-standardized MSCs to incorporate temporal and modal aspects for reactive systems.[28] Subsequent developments, including executable semantics, appeared in related publications around 2002–2003, emphasizing their role in behavioral modeling for complex, inter-object communications. Key differences from core MSCs include specialized symbols such as cold starts (dashed boxes for provisional, non-mandatory initiation) and warm starts (solid boxes for required activation), as well as progress lines—solid for enforced continuation and dashed for optional advancement—to capture liveness properties.[28] Locations and messages can also be annotated as universal (mandatory in every execution trace) or existential (required to occur somewhere), separating obligatory elements from possible ones while retaining basic MSC notations like lifelines and arrows as a foundation.[28] The purpose of LSCs is to support scenario-based specification in object-oriented design and formal verification of reactive systems, allowing designers to model both required and alternative behaviors explicitly for improved system validation.[28] They integrate with execution environments like the Play-Engine tool, which enables interactive simulation and checking of LSC specifications to detect inconsistencies early in development.[29] For a representative example, consider an LSC specifying a mandatory login sequence: the universal fragment requires that upon user credential submission, the system must validate and respond with access grant or denial, while existential sub-charts handle optional error paths, such as retry prompts for invalid inputs, ensuring the interaction progresses without deadlock.[28]Comparison to UML Sequence Diagrams
Message Sequence Charts (MSCs) and UML Sequence Diagrams both employ lifelines—vertical axes representing entities such as processes or objects—and horizontal arrows to illustrate message exchanges, thereby visualizing the temporal ordering of interactions in distributed or collaborative systems.[30][31] This shared notation facilitates the depiction of dynamic behaviors, with an emphasis on the sequence of events over structural relationships.[30] Key differences arise in their notation and semantics, reflecting their distinct origins and applications. MSCs, standardized by ITU-T in Recommendation Z.120, prioritize partial orders and trace representations for protocol specifications in telecommunications, using solid lifelines without activation bars and supporting asynchronous messages exclusively.[32][31] In contrast, UML Sequence Diagrams, defined by the Object Management Group (OMG), incorporate activation bars to denote object activation periods, explicit return messages, and combined fragments (e.g., alt for alternatives, loop for iterations) to handle synchronous/asynchronous calls and fragmented views in object-oriented software design.[30] MSCs address concurrency through co-regions—unordered parallel message sets—while lacking native support for UML's advanced fragments, though High-level MSCs (HMSCs) provide overview structures akin to UML interaction occurrences.[32][31] Regarding expressive power, UML Sequence Diagrams offer greater flexibility for modeling complex software interactions, including guards and sequence numbering, making them suitable for general-purpose object-oriented modeling.[30] MSCs, however, provide formal semantics based on process algebra, enabling precise trace analysis for distributed protocols, but with less emphasis on procedural elements like method invocations.[32][31] Historically, UML Sequence Diagrams evolved in the 1990s from earlier notations like Object Modeling Technique (OMT) and were influenced by MSCs, which originated in ITU-T's 1992/1993 standards; this convergence occurred as UML 1.0 emerged in 1997, post-dating initial MSC development.[31][30] In practice, MSCs are preferred for formal verification of telecommunication protocols due to their trace-oriented semantics, whereas UML Sequence Diagrams excel in broader software engineering contexts, such as use case elaboration in object-oriented analysis and design.[32] This distinction guides their selection: MSCs for specifying reactive, distributed behaviors in standards like SDL, and UML for iterative software development processes.[31][30]Implementations and Tools
Software Tools for Creating and Rendering MSCs
Several software tools facilitate the creation, editing, and rendering of Message Sequence Charts (MSCs), ranging from open-source renderers to commercial suites integrated with broader modeling environments. These tools typically support the ITU-T Z.120 standard's graphical and textual notations, enabling users to visualize interactions between system entities over time. Open-source options emphasize lightweight, text-based generation, while commercial tools offer advanced editing capabilities within development workflows. Among open-source tools, Mscgen is a prominent text-based renderer that parses simple textual descriptions of MSCs and generates output in formats such as PNG, SVG, and EPS. It supports core MSC elements like lifelines, messages, and conditions, making it suitable for documentation and rapid prototyping in protocol design.[33] Similarly, msc-generator extends this approach by supporting not only MSCs but also generic graphs and block diagrams from textual input, producing graphical outputs in multiple formats for integration into reports or web pages.[34] PlantUML, another open-source utility, provides MSC-like sequence diagrams through its declarative syntax, allowing embedding in wikis, IDEs, or documents, though it aligns more closely with UML conventions than pure ITU-T MSCs.[35] Commercial tools include PragmaDev Studio, which supports editing and rendering of MSCs alongside Specification and Description Language (SDL) and Testing and Test Control Notation (TTCN-3) models for specifying, simulating, and testing communicating systems. It offers graphical creation of MSCs with features for validation and code generation, suitable for telecommunications and real-time software development.[36] Cinderella MSC is a dedicated visual modeling tool for analysis, specification, documentation, and testing of communication protocols using MSCs, supporting ITU-T Z.120 features including high-level MSCs (HMSCs).[37] Microsoft Visio supports the creation of sequence diagrams akin to MSCs via its UML template library, where users can draw lifelines, activation bars, and synchronous/asynchronous messages for visualization in professional documents.[38] Integration with integrated development environments (IDEs) enhances accessibility; for instance, the Message Sequence Chart (MSC) Plugin for JetBrains IDEs provides syntax support and rendering using Mscgen for sequence chart visualization within IntelliJ-based IDEs.[39] Additionally, the Eclox plugin for Eclipse incorporates Mscgen for automated diagram generation from code documentation, streamlining rendering in software projects.[40] Textual notations underpin many of these tools for programmatic generation. Mscgen employs a concise, DOT-inspired language where entities and interactions are described linearly, such asmsc { a,b; a->b [label="message"]; }, enabling script-based creation and version control.[33] PragmaDev Studio uses MSC/PR, a textual profile for MSCs that supports instance-oriented and event-oriented descriptions, convertible to graphical views.[41]
Common features across these tools include syntax checking to validate MSC conformance, export options to PDF and SVG for high-quality rendering, and basic simulation of message traces to preview execution flows.[33][34] As of November 2025, MSC tools remain niche, primarily serving protocol and systems engineering domains, but their integration into IDEs like Eclipse and JetBrains has broadened adoption for collaborative design in embedded and distributed systems.[42][39]