Nancy-Playground: A Console Calculator for Deterministic Network Calculus
Abstract
Deterministic Network Calculus (DNC) provides a rigorous algebra for worst-case performance analysis of networks. It allows researchers to compute bounds on worst-case characteristics of systems through algebraic expressions that may appear simple on paper but often require heavy computations, making software support essential. Libraries such as Nancy offer a rich API for DNC computations in C#, but they require programming expertise. In contrast, RTaW’s min-plus playground (MPPG) provides a simpler, calculator-like syntax for DNC computations; however, it is proprietary and web-hosted, limiting offline use and reproducibility. We present nancy-playground, an open-source, locally runnable console that implements the same MPPG syntax while executing computations through the Nancy library. This tool enables reproducible scripting, interactive exploration, and a seamless transition to full programs by converting MPPG scripts into C# code. In this paper, we describe the design and implementation of nancy-playground, as well as its main features for researchers and practitioners in the DNC community.
Keywords and phrases:
Deterministic Network Calculus, min-plus algebra, toolingCopyright and License:
2012 ACM Subject Classification:
Computer systems organization Real-time systems ; Networks Network performance analysis ; Mathematics of computing Mathematical software performanceSupplementary Material:
Software (Source Code): https://github.com/rzippo/nancy-playground [42]
archived at
swh:1:dir:dd85728ac2a89f688e349e3d80e4b04e2a966ad4
Funding:
This work was supported in part by the Italian Ministry of Education and Research (MIUR) in the framework of the FoReLab project (Departments of Excellence).Supplementary Material:
Software (ECRTS 2026 Artifact Evaluation approved artifact): https://doi.org/10.4230/DARTS.12.2.6Editor:
Angeliki KritikakouSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Deterministic Network Calculus (DNC) is a mathematical framework for analysis of worst-case performance bounds in networked systems. Originating in the 1990s, DNC has evolved into a mature tool for guaranteeing performance in complex systems, with applications extending beyond the original Internet QoS context. Today, DNC is applied in diverse domains, e.g., Time-Sensitive Networks (TSN) for industrial automation and automotive systems [36, 22, 37], avionics for AFDX network certification [7], heterogeneous system-on-chip architectures [29, 4, 5].
While DNC computations can be performed manually for simple examples, in most practical cases they require software support for efficiency and correctness. The research community has developed several software tools, which offer a choice between two extremes. On one side, libraries such as Nancy [43] and Nancy.Expressions [34] provide a rich API for DNC computations in C#. These libraries are powerful and flexible, include many recent algorithmic results [46, 40, 41], and provide a solid base for transparent integration of future results (e.g., [30]) whose research is aided by the open-source nature. However, using them requires some C# programming knowledge and non-trivial “boilerplate” code. On the other side, RTaW’s min-plus playground (MPPG) [27] offers a simpler, calculator-like interface with its own scripting syntax. It is a free-to-use web-hosted counterpart to their commercial offering. This MPPG syntax is minimal and intuitive, and has been used in published research (e.g., [19, 18, 32, 23, 33]). However, RTaW’s playground has significant limitations that hinder its use for research and industrial applications. First, it is proprietary software, with a web-only interface that cannot be used offline, whose license prohibits use for benchmarking and sharing performance results, and which discloses the executed code to the provider. Thus, its use for algorithmic research is severely restricted as one cannot verify, compare or improve the code run by [27]. Second, the MPPG syntax is limited in expressiveness (no functions, branching, loops), which prevents one from generalizing a script to study a network of nodes and flows rather than a fixed amount of each. Thus, extending a prototype into a network analysis tool requires a full rewrite in a general-purpose programming language. This friction conflicts with common research and industrial needs: quickly reproducing published results, experimenting with new algorithmic ideas and sharing their performance, quickly extending prototype analyses into full programs.
We address this gap with nancy-playground, a cross-platform command-line interface (CLI) tool that offers a simple, scripting-oriented syntax for DNC computations while addressing the limitations of existing tools. The tool is open source and runs locally, improving transparency, enabling offline work, and supporting code ownership and verifiability. It can run scripts from file or from an interactive command line, supporting the same MPPG syntax as RTaW’s min-plus playground, while performing the actual computations through the Nancy and Nancy.Expressions libraries, thus integrating the latest algorithmic results. Furthermore, nancy-playground is capable of converting MPPG scripts into C# programs that use the Nancy library, thus easing the transition from quick prototyping to full-fledged network analysis tools.
In this paper, we describe the design and implementation of nancy-playground, a tool that bridges the gap between simple script-based exploration and full-program DNC libraries. We present the MPPG syntax, explain the architecture that decouples parsing from computation, and demonstrate how the tool supports interactive exploration, plotting, and translation to C# for production use. nancy-playground is released as open-source software with MIT license [42], and distributed as binary packages for ease of installation [6]. The repository contains many example scripts demonstrating DNC computations across various use cases, providing a reference for researchers and practitioners in the DNC community.
2 Background and Related Work
Deterministic Network Calculus (DNC) is a mathematical framework for analysis of worst-case performance bounds in networked systems, which dates back to the early 1990s, and it is mainly due to the work of Cruz [16, 17], Le Boudec and Thiran [21], and Chang [15]. It characterizes constraints on traffic arrivals (due to traffic shaping) and on minimum received service (due to scheduling) as curves, i.e., functions of time, and uses (min,+) and (max,+) algebra to combine the above in order to compute bounds on the traffic at any point in a network traversal.
However, algebraic expressions which look simple on paper can in fact require lengthy computations. The research community has therefore developed several software packages to automate this task, finding efficient data structures to represent functions and curves, and efficient algorithms to implement basic operations. Works [13, 11] provided an “algorithmic toolbox” for DNC: they showed that piecewise affine functions that are ultimately pseudo-periodic (UPP) represent suitable models for both traffic functions and curves, and provided algorithms for most (min,+) and (max,+) algebra operations. The toolbox was first implemented in the COINC free library [12], which is not available anymore, and later by the commercial library RTaW-Pegase [28] and the open-source library Nancy [43, 45, 44].
After its first release, the Nancy library has been extended with more operators and several algorithmic optimizations [46, 39, 40, 41], and a complementary library, Nancy.Expressions [34], has been developed to support lazy evaluation of expressions. Lazy evaluation is a computation strategy where operations are not immediately executed; instead, expressions are represented symbolically, and computations are deferred until the result is actually needed. This approach enables further optimizations that can reduce computation time and memory usage by skipping unnecessary computations. For example, one can employ algebraic simplifications, such as if and is subadditive [21, Sec. 3.1.7], shown in action in [34]; or different strategies of computations that can reduce runtime, like reordering commutative operations [30]. Furthermore, the lazy computation approach will naturally skip computing expressions which are never evaluated, e.g. when the code introduces variables whose value is never used. The Nancy and Nancy.Expressions libraries are suited to large, structured programs that parse complex network configurations and provide a rich API for modeling. To address the need for interactive prototyping, they also support Polyglot Notebooks [3], however, users still need to write C# and manage the surrounding program structure, which can be a barrier for quick experimentation and reproducibility. Moreover, Microsoft recently announced its sudden deprecation, casting doubts on its reliability while open-source forks are being developed.
The RTaW min-plus playground (MPPG) [27] is a web-hosted tool that provides a calculator-like interface for DNC computations using a simple scripting syntax. It supports the same UPP function models and (min,+) operations described above, likely by using the RTaW-Pegase library [28] to implement its computations. It has been used in scientific research (e.g., [32, 23, 33]), in some cases with published code for reproducibility (e.g., [19, 18]). Its simplicity makes it also well-suited for writing accessible tutorials and for postgraduate teaching, as the content can focus on the DNC results rather than programming nuances. However, the RTaW min-plus playground has significant limitations that restrict its utility for research and industrial applications.
First, it is a proprietary web-hosted service that cannot be used offline, and its license explicitly prohibits use for benchmarking and sharing performance results. This creates a fundamental barrier for algorithmic research, where the ability to reproduce results, verify computations, and transparently report performance metrics is essential. Recent advancements such as [46, 41] would not be possible to investigate on RTaW’s playground, even though it is based on the same core toolbox from [13], as researchers using RTaW’s playground cannot share their computation traces or performance evaluations in a verifiable manner, which undermines reproducibility and limits the contribution to the scientific community.
Second, the tool’s code ownership and proprietary nature raise concerns for industrial use in safety-critical and certification contexts. While the web-hosted tool does not satisfy these requirements, we assume the commercial offerings from RTaW may address this point.
Third, the MPPG syntax lacks support for programming constructs such as loops, conditionals, and function definitions, limiting its expressiveness. While this simplicity can be an advantage for interactive exploration, it prevents generalizing scripts to handle parameterized problems (e.g., computing bounds for networks of arbitrary size), forcing researchers to rewrite scripts manually or resort to other tools for structured analyzes. This friction between quick prototyping and full-program development means that users face a costly transition when scaling from simple explorations to production tools.
Other tools and applications for DNC exist, which do not cover the same use cases and needs of the above, and are surveyed in [38]. The most common limitation among these tools is that only a subset of (min,+) and (max,+) functions and operators are supported, limited to the specific use cases supported by that tool. In constrast, Nancy and RTaW-Pegase implement a wide range of operators and function models, leveraging the algorithmic toolbox from [13], making them suitable for general-purpose DNC computations.
RTC Toolbox [35] is a Matlab/Java library that implements variability characterization curves, a model similar to the one from [13], but that assumes operands to be left- or right-continuous based on the operation being performed, and constrains all period lengths to have integer values. It uses floating-point arithmetic and has limited operation support, e.g. it does not support subadditive closure, while Nancy and RTaW-Pegase do. Generally, all computations that can implemented in RTC Toolbox can be implemented in Nancy and RTaW-Pegase, but not the opposite.
Tools like NCorg DNC (originally named DiscoDNC) [9] and CyNC [31] provide an interface focused on network modelling, automating a variety of DNC network analyses and internally using RTC Toolbox for their computations. These may be more suitable for users whose use case is already well supported, but require significant effort to extend to new use cases. [38] also mentions commercial tools that may cover more use cases, including domain-specific models and comparison with simulation.
Some approaches instead rely on DNC to express linear programming problems, rather than (min,+) algebra expressions. Examples of this can be found in tools such as DEBORAH [8] and PANCO [10]. The MPPG syntax is not designed to express such linear programming problems, thus these tools are not directly comparable to nancy-playground.
3 The MPPG syntax
The main advantage of the RTaW min-plus playground is its simple syntax, which allows users to express DNC computations concisely, without the overhead of a full programming language. The goal of nancy-playground is to reuse this syntax, to provide a familiar interface to users of the RTaW playground, while enabling local execution and reproducibility, as well as an easier transition to the full capabilities of the Nancy library for network analysis programming.
Using the example from [19], we show in Listing 1 a comparison between the MPPG syntax and the equivalent C# code using the Nancy library. As the example shows, the MPPG syntax is more concise and easier to read, making it ideal for rapid prototyping and experimentation.
MPPG is a concise algebraic language for manipulating min-plus and max-plus curves. It supports scalar values (rationals and ) and function values (curves). Its core functionality centers around defining curves, performing operations on them, and either printing values to the console (e.g., a horizontal deviation) or plotting the computed curves. The main statement types are summarized in Table 1: note that there are no equivalents to common programming constructs such as if-then-else or while loops – MPPG can only be used for simple, linear scripts.
Functions can be built from standard constructors (e.g., ratency, bucket, affine) or as piecewise definitions using ultimately affine (uaf) and ultimately pseudo-periodic (upp) forms. Tables 2, 3, 4, and 5 summarize the core syntax used to define curves and run computations on them. These tables do not show all the available constructs, but cover the core syntax needed to express DNC computations.
For more details, the nancy-playground documentation provides a complete reference for all MPPG constructs, both inside the tool through the !help command and in its repository [42, syntax.md]. This documentation is based on the official documentation of RTaW’s min-plus playground [27], which is however not complete, plus our own insights from experimentation with the tool. As a notable example, the assert statements are not mentioned at all in the documentation of [27].
| Statement | Meaning |
|---|---|
| f := expr | Assignment of a function or scalar expression |
| expr | Print the value of an expression |
| // comment | Line comment (also %, #, >) |
| plot(f1, f2, ...) | Plot one or more named functions |
| assert(...) | Test a property, e.g. equivalence between functions |
| Constructor | Meaning |
|---|---|
| ratency(a, b) | Rate-latency service curve with rate and latency |
| bucket(a, b) | Leaky-bucket arrival curve with slope and burst |
| affine(a, b) | Affine curve with slope and intercept |
| step(o, h) | Step curve at time with height |
| stair(o, l, h) | Staircase curve with step length and height |
| delay(o) | Burst-delay curve occurring at time |
| zero | for |
| epsilon | for |
| uaf(...) | Ultimately Affine curve, defined via list of segments |
| upp(...) | Ultimately Pseudo-Periodic curve, defined via list of segments |
| Operator | Meaning |
|---|---|
| f /\ g | Pointwise minimum |
| f \/ g | Pointwise maximum |
| f + g | Sum |
| f - g | Difference |
| f * g | (min,+) convolution |
| f *ˆ g | (max,+) convolution |
| f / g | (min,+) deconvolution |
| f /ˆ g | (max,+) deconvolution |
| star(f) | Subadditive closure |
| hShift(f, n) | Horizontal shift by |
| vShift(f, n) | Vertical shift by |
| inv(f) | Lower pseudo-inverse |
| up_inv(f) | Upper pseudo-inverse |
| upclosure(f) | Upper non-decreasing closure |
| f comp g | Composition |
| left-ext(f) | Left-continuous projection |
| right-ext(f) | Right-continuous projection |
| a * f | Scalar multiplication |
| f / a | Scalar division |
| Operator | Meaning |
|---|---|
| f(x) | Value of at |
| f(x+) | Right limit of at |
| f(x-) | Left limit of at |
| hDev(f, g) | Horizontal deviation between and |
| vDev(f, g) | Vertical deviation between and |
| Operator | Meaning |
|---|---|
| v1 /\ v2 | Minimum |
| v1 \/ v2 | Maximum |
| v1 + v2 | Sum |
| v1 - v2 | Difference |
| v1 * v2 | Multiplication |
| v1 / v2 | Division |
The design of MPPG prioritizes simplicity and readability, eliminating the boilerplate code overhead required by general-purpose languages. Furthermore, the availability of this simple syntax through nancy-playground lowers the barriers to entry for researchers new to DNC, supporting its adoption in teaching and research communities.
4 Architecture and Implementation
nancy-playground is a cross-platform CLI application, written in C# using .NET 10. It is architected to provide a clear separation of concerns between parsing, execution, and code generation. This modular design enables us to support multiple execution backends (immediate vs. lazy evaluation) and output targets (console output, plots, and C# code) without duplicating logic, while also providing a high degree of maintainability for future extensions of the tool capabilities. The core processing pipeline consists of three stages: parsing the MPPG script into an abstract syntax tree (AST), traversing this AST using the visitor pattern to perform computations or generate output, and integrating with the Nancy and Nancy.Expressions libraries to execute DNC operations.
4.1 MPPG Parsing
In nancy-playground, the MPPG syntax is implemented using a formal grammar defined in
ANTLR [25, 24], which allows parsing scripts into an abstract syntax tree (AST). This grammar definition can be found in [42, MPPG.g4], Listing 2 shows an extract: a program is a list of line statements; a statement can be one of multiple types (those in Table 1); a function expression is given by the composition of other expressions via operators (those in Table 3) or the definition of a new one (using a constructor from Table 2). This structure provides an important decoupling between 1) defining the syntax of the language, and thus its parsing, and 2) the programmatic implementation of operations on the result of parsing.
About point 1, using a formal grammar provides an explicit, versioned definition of the language syntax, improving parsing accuracy and maintainability. It allows us to expand the syntax with new constructs easily, while the ANTLR compiler ensures that the parser implementation remains correct and efficient. In fact, even using the longest examples found in literature (those in [18]), we measured the parsing time to remain in the order of hundreds of milliseconds, which is neglible in this context.
Benefitting from the above decoupling, we can improve and the extend the MPPG syntax, and there are a few already apparent aspects in which this could be done. For one, the syntax lacks an operator for superadditive closure, which is useful in DNC to improve service curves [11, Prop. 9.3]. Furthermore, recent results may introduce new operators that could be added to the syntax, such as the -deviation introduced in [20] which enables residual service semantics from non-strict service curves. The assert statements may also be expanded. From our testing on [27], they currently support only equality or weak inequality between two variables (=, !=, >=, <=), which could be expanded to include strict inequality as well as more general properties, such as assert(f is subadditive). Lastly, using Nancy.Expressions enables us not only to support lazy evaluation, but also to print the mathematical expression behind each computation. At the time of writing, only the latter feature has been implemented in nancy-playground with the new statement printExpression(f), as exemplified in Figure 2.
Moving on to point 2, the AST produced by the parser is a data structure that represents the MPPG script in a way that can be programmatically traversed and, using the visitor pattern [24, Sec. 7.3], it is straightforward to implement a variety of operations, such as script execution or conversion to C# code, which we discuss in the following subsections. Figure 3 shows an example of this data structure, obtained by parsing Line 9 of the script in Figure 1(a).
4.2 Script execution
For script execution, our objective is to translate the AST into a series of DNC operations, expressed via Nancy.Expressions objects, and variable manipulations. We handle variables by maintaining a dictionary that maps variable names to their corresponding Nancy.Expressions objects. Assignment statements update this dictionary, while expression, plot and assertion statements read from it.
Nancy.Expressions provides an abstraction layer that can model all DNC operations without immediately evaluating them. In fact, we do not need to perform any computation until a final result is needed, e.g. to print a value or generate a plot. This lazy evaluation will trivially skip over any intermediate computations that are not needed for the final result, and may also enable algebraic simplifications that reduce computation time, as discussed in [34]. Alternatively, nancy-playground can also evaluate the AST directly using Nancy methods, which perform immediate computation. The two modes can be selected via the --run-mode command-line option, with lazy evaluation being the default. The performance implications of these two modes are all related to the use of Nancy.Expressions over Nancy: we thus refer to works on these two libraries for their discussions, e.g., [34], [30].
Furthermore, nancy-playground can be used either to run full scripts from a file, using nancy-playground run <file.mppg>, or as an interactive console where each line is typed in one by one, using nancy-playground interactive.
4.3 Plot generation
A key feature of MPPG is the ability to easily generate plots of the computed curves. Nancy supports plotting through various libraries, which can be selected via the Nancy.Plots.* packages: at the time of writing, these include TikZ, ideal for scientific writing; XPlot.Plotly, ideal for interactive environments; and ScottPlot, which is ideal for simple generation of static images. The architecture of these packages is modular, allowing Nancy to support multiple plotting backends without changing its core. In nancy-playground, we use the Nancy.Plots.ScottPlot package, which yields the best trade-off between ease of installation and quality of output. In fact, it can output high quality plots, including automated export to .png, while including minimal dependencies.
4.4 Conversion to C# programs
While MPPG scripts are useful for quick prototyping and experimentation, they lack the expressiveness of a full programming language. DNC analyses are often applied to networks of arbitrary size and structure, and therefore require branching and looping structures to be expressed. To address this gap, nancy-playground supports conversion of MPPG scripts into C# programs that use the Nancy library. This is implemented as another visitor over the AST, which generates C# code snippets for each statement and expression in the script. The generated code preserves the computation semantics of the original script, while providing a starting point for further development into a full network analysis tool. An example of this conversion was, actually, already shown: Figure 1(b) is in fact the output of nancy-playground when converting the MPPG script in Figure 1(a), with only a few minor changes to fit in the small space.
The conversion allows as well to choose between immediate computation, using Nancy, or lazy computation using Nancy.Expressions, by selecting the appropriate code templates during generation. The immediate computation is the one chosen by default, while the lazy computation can be selected via the --use-expressions command-line option.
The kind of C# programs produced by nancy-playground, exemplified in Figure 1(b), is called file-based apps, meaning that everything is contained in a single .cs file which can be executed by simply running dotnet run <file.cs>. This is conveniently similar to the experience of running a script file, but will likely be constraining when expanding it towards a network analysis tool. In that case dotnet project convert <file.cs> will convert it automatically to a C# project which can be composed of multiple files. We refer to the Microsoft documentation for more details [1].
Since nancy-playground parses and interprets the MPPG syntax to execute it, while the C# code generated by nancy-playground is to be compiled in an executable, it should not be surprising that the latter option is more performant. We show in Table 6 a comparison of the execution time of the script in Figure 1(a) when run directly as a script, and when converted to C# and then executed. These measurements were taken on a Linux system with an AMD Ryzen 7 5800X processor. The example used, taken from [19], is a long script with many simple computations, thus highlighting the overhead of parsing and interpreting the script. While the difference is measurable, it is small in the intended context of nancy-playground, which is prototyping and experimentation. In fact, the conversion to C# is not meant to be a performance optimization, but rather a way to ease the transition from a simple script to a more complex tool.
| Runtime (ms) | Peak Memory (MB) | |
|---|---|---|
| Nancy-Playground run | 688.8 | 1.53 |
| Nancy-Playground convert | 141.2 | 0.3 |
| Converted C# | 430.2 | 0.29 |
4.5 Testing and Validation
Testing is a crucial aspect of nancy-playground, as it ensures that the tool correctly implements the MPPG syntax and semantics, as well that the same results are obtained between the original RTaW min-plus playground and nancy-playground, in its various modes. The testing suite uses both MPPG scripts from literature, and custom scripts designed to cover all aspects of the MPPG syntax, to ensure that
-
when run, they produce the same results as the expected output from RTaW’s playground;
-
when converted to C#, the generated program produces the same results as the script;
-
both immediate and lazy evaluation modes yield the same results.
One core benefit of such testing suite is to ensure that changes and improvements to nancy-playground do not break existing functionality, thus ensuring stability and reliability over time. At the time of writing, the testing suite includes over 250 test cases, whose test coverage is shown in Table 7. Note that most of uncovered lines and branches are due to error handling and edge cases of ambiguous syntax which are harder to cover with “usual” scripts: e.g., a + b may be the sum of two function variables, two number variables, or a mix of the two.
| Assembly | Line coverage | Branch coverage |
|---|---|---|
| Unipi.Nancy.Playground.MppgParser | 66.2% | 47.4% |
| Unipi.Nancy.Playground.Cli | 77.2% | 61.5% |
| Total | 67.4% | 48.9% |
Despite the efforts above, we note that nancy-playground cannot guarantee perfect compatibility with RTaW’s playground, as the latter does not have a public specification of its syntax, only an informal user manual. For example, internal rules such as operator precedence and implicit conversions are not explicitly defined, and must be inferred from edge case experimentation. Furthermore, we cannot exclude the presence of more features of the RTaW’s playground that, like assert statements, are not documented, or that are only available in the commercial version. Nevertheless, the software and testing architecture is designed to minimize the effort required to address any discrepancies as they are discovered.
Another concern is the reliability of the results, which are computed using Nancy and Nancy.Expressions. These libraries also come with their own large test suites, but cannot avoid the possibility of bugs. Future work may consider integrating the results of [26, 14, 2] to formally verify the correctness of results obtained from nancy-playground.
5 Distribution and Usage
nancy-playground is distributed as open-source software under the permissive MIT license [42]. nancy-playground can run on any system supported by the .NET runtime (8 or above), and we tested it on Linux (Ubuntu 24.04, Fedora 43), Windows 11, Windows 11 on ARM. A compiled version is published on nuget.org [6], which is the standard package manager for .NET applications, using GitHub’s CI/CD features to automatically build and publish new versions. To install nancy-playground from nuget.org, users need to install the .NET SDK and then run the command:
This will download and install nancy-playground to be globally available in the user’s shell. There are three main commands available: run to execute MPPG scripts, interactive to start an interactive prompt, and convert to translate MPPG scripts into C# programs. In the interactive mode, users can also use the !help command to access the integrated manual.
6 Examples
The nancy-playground repository [42] contains example scripts that demonstrate DNC computations, both to show existing techniques in practice and as contexts in which algorithmic results improve computations significantly. These examples are also used within the testing suite mentioned in Section 4.5. We provide here a few of those that can be shown succinctly, with reference to literature for complete explanations. Examples like this can provide reference implementations for users new to DNC, serve as teaching materials for postgraduate courses, and they enable reproducibility of published results. While we cannot directly compare performance with [27], the availability of these open-source examples allows researchers to verify that complex analyses complete in reasonable time and to experiment with variations of the problem.
Listing 3 shows the foundational results from DNC, which are worst-case delay and backlog bounds for a single traffic flow traversing a single node. Listing 4 shows how to address the case with multiple nodes traversed by a single flow: on one hand, we could compute per-node WCDs and sum them, but on the other hand the Pay-Burst-Only-Once result shows that concatenation of service curves yields better bounds.
Listing 5 shows instead how to address a single node contended between multiple flows. To be precise, this is the blind multiplexing case, i.e., where we do not specify the multiplexing policy that the server applies. Note the assumption of strict service curve: recently, [20] provided a new technique that remove this restriction, but requires a new -deviation operator that is currently not supported by MPPG. As discussed in Section 4.1, the architecture of nancy-playground is designed to facilitate the future addition of operators as this one.
The approach illustrated in Listing 4 requires computing the concatenation of service curves via (min,+) convolution. In practice, this operation may be costly, and algorithmic optimizations are needed to make many studies feasible to analyze, as addressed in [46, 40, 41]. Listings 6 and 7 show examples of convolutions where nancy-playground performs the computation with ease, thanks to the results above being implemented in Nancy.
7 Conclusion
This paper has presented nancy-playground, a tool that addresses a significant gap in the DNC software landscape, the one between full-program DNC libraries and lightweight script-based exploration. nancy-playground provides an open-source, cross-platform and locally-runnable alternative to proprietary web-hosted solution by RTaW.
The tool’s key contributions are threefold. First, it reuses the familiar MPPG syntax from RTaW’s min-plus playground [27], reducing the learning curve for users already familiar with that tool while providing a more accessible entry point for new users compared to C# libraries. Second, by leveraging the Nancy and Nancy.Expressions libraries, nancy-playground executes computations using state-of-the-art algorithms and implementations, integrating recent algorithmic results that may not be available in other tools. Third, it provides a clear transition path from simple script-based prototyping to full-fledged network analysis tools through automatic conversion of MPPG scripts to C# code.
The architecture of nancy-playground demonstrates how formal language design (via ANTLR) can be effectively decoupled from computation, enabling flexible execution strategies (immediate vs. lazy evaluation) and multiple output targets (console, plots, C# code) without code duplication. The modular design also facilitates future extensions, such as support for emerging DNC operators or integration with new algorithmic results.
Beyond the technical contributions, nancy-playground addresses critical non-technical concerns for the DNC community. Being open source software that runs locally on the user’s machine, it enables full reproducibility of research results and supports exploration of new algorithmic techniques. It can also be expanded to address new needs and syntax constructs, such as more powerful asserts, new DNC operators, or plotting features.
References
- [1] Microsoft documentation on file-based apps. URL: https://learn.microsoft.com/en-us/dotnet/core/sdk/file-based-apps.
- [2] NCCoq - Formally Proven Network Calculus. URL: https://gitlab.rts.mpi-sws.org/proux/nc-coq.
- [3] Polyglot Notebooks in VS Code. URL: https://code.visualstudio.com/docs/languages/polyglot.
- [4] Matteo Andreozzi, Frances Conboy, Giovanni Stea, and Raffaele Zippo. Heterogeneous systems modelling with Adaptive Traffic Profiles and its application to worst-case analysis of a DRAM controller. In 2020 IEEE 44th Annual Computers, Software, and Applications Conference (COMPSAC), pages 79–86. IEEE, 2020. doi:10.1109/COMPSAC48688.2020.00020.
- [5] Matteo Andreozzi, Antonio Frangioni, Laura Galli, Giovanni Stea, and Raffaele Zippo. A MILP approach to DRAM access worst-case analysis. Computers & Operations Research, 143:105774, 2022. doi:10.1016/j.cor.2022.105774.
- [6] Raffaele Zippo and Giovanni Stea. Nancy-Playground binary packages on Nuget, 2026. URL: https://www.nuget.org/packages/Unipi.Nancy.Playground.Cli.
- [7] Henri Bauer, Jean-Luc Scharbarg, and Christian Fraboul. Worst-case end-to-end delay analysis of an avionics afdx network. In 2010 Design, Automation & Test in Europe Conference & Exhibition (DATE 2010), pages 1220–1224. IEEE, 2010. doi:10.1109/DATE.2010.5456993.
- [8] Luca Bisti, Luciano Lenzini, Enzo Mingozzi, and Giovanni Stea. Deborah: A tool for worst-case analysis of fifo tandems. In International Symposium On Leveraging Applications of Formal Methods, Verification and Validation, pages 152–168. Springer, 2010. doi:10.1007/978-3-642-16558-0_15.
- [9] Steffen Bondorf and Jens B. Schmitt. The DiscoDNC v2 – a comprehensive tool for deterministic network calculus. In Proc. of the International Conference on Performance Evaluation Methodologies and Tools, ValueTools ’14, pages 44–49, December 2014. URL: https://dl.acm.org/citation.cfm?id=2747659.
- [10] Anne Bouillard. Performance Analysis with Network Calculus and Optimization (PANCO) on GitHub, 2022. URL: https://github.com/anne-bou/panco.
- [11] Anne Bouillard, Marc Boyer, and Euriell Le Corronc. Deterministic Network Calculus: From Theory to Practical Implementation. Wiley, Hoboken, NJ, 2018. doi:10.1002/9781119440284.
- [12] Anne Bouillard, Bertrand Cottenceau, Bruno Gaujal, Laurent Hardouin, Sébastien Lagrange, Mehdi Lhommeau, and Éric Thierry. COINC library: a toolbox for the Network Calculus. In VALUETOOLS’09, 2009.
- [13] Anne Bouillard and Éric Thierry. An algorithmic toolbox for network calculus. Discrete Event Dynamic Systems, 18(1):3–49, 2008. doi:10.1007/s10626-007-0028-x.
- [14] Marc Boyer, Pierre Roux, and Hugo Daigmorte. Checking validity of the min-plus operations involved in the analysis of a real-time embedded network. In ERTS 2022-11th European Congress Embedded Real Time System, 2022.
- [15] Cheng-Shang Chang. Performance guarantees in communication networks. Springer-Verlang, New York, USA, 2000. doi:10.1007/978-1-4471-0459-9.
- [16] Rene L Cruz. A calculus for network delay, part I: Network elements in isolation. IEEE Transactions on information theory, 37(1):114–131, 1991. doi:10.1109/18.61109.
- [17] Rene L Cruz. A calculus for network delay, part II: Network analysis. IEEE Transactions on information theory, 37(1):132–141, 1991. doi:10.1109/18.61110.
- [18] Damien Guidolin-Pina. Evaluation of worst-case performances of systems in Network Calculus. Theses, ISAE - Institut Supérieur de l’Aéronautique et de l’Espace, November 2024. URL: https://hal.science/tel-05023338.
- [19] Damien Guidolin Pina and Marc Boyer. The lost equation of Network Calculus. working paper or preprint, March 2024. URL: https://hal.science/hal-04513292.
- [20] Anja Hamscher, Vlad-Cristian Constantin, and Jens B Schmitt. Extending network calculus to deal with min-plus service curves in multiple flow scenarios. In 2024 IEEE 30th Real-Time and Embedded Technology and Applications Symposium (RTAS), pages 95–107. IEEE Computer Society, 2024. doi:10.1109/RTAS61025.2024.00016.
- [21] Jean-Yves Le Boudec and Patrick Thiran. Network calculus: a theory of deterministic queuing systems for the internet. Springer Science & Business Media, Berlin, Germany, 2001. doi:10.1007/3-540-45318-0.
- [22] Lisa Maile, Kai-Steffen Hielscher, and Reinhard German. Network calculus results for tsn: An introduction. In 2020 Information Communication Technologies Conference (ICTC), pages 131–140. IEEE, 2020.
- [23] Ehsan Mohammadpour, Eleni Stai, and Jean-Yves Le Boudec. Improved network-calculus nodal delay-bounds in time-sensitive networks. IEEE/ACM Transactions on Networking, 31(6):2902–2917, 2023. doi:10.1109/TNET.2023.3275910.
- [24] Terence Parr. The definitive ANTLR 4 reference. The Pragmatic Bookshelf, 2013.
- [25] Terence J. Parr and Russell W. Quong. Antlr: A predicated-ll (k) parser generator. Software: Practice and Experience, 25(7):789–810, 1995. doi:10.1002/SPE.4380250705.
- [26] Lucien Rakotomalala, Pierre Roux, and Marc Boyer. Verifying min-plus computations with coq. In Aaron Dutle, Mariano M. Moscato, Laura Titolo, César A. Muñoz, and Ivan Perez, editors, NASA Formal Methods, pages 287–303, Cham, 2021. Springer International Publishing. doi:10.1007/978-3-030-76384-8_18.
- [27] RealTime-at-Work. RealTime-at-Work online Min-Plus interpreter for Network Calculus. URL: https://www.realtimeatwork.com/minplus-playground.
- [28] RealTime-at-Work. RTaW-Pegase (min,+) library. URL: https://www.realtimeatwork.com/rtaw-pegase-libraries/.
- [29] Falk Rehm, Jörg Seitter, Jan-Peter Larsson, Selma Saidi, Giovanni Stea, Raffaele Zippo, Dirk Ziegenbein, Matteo Andreozzi, and Arne Hamann. The Road towards Predictable Automotive High-Performance Platforms. In 2021 Design, Automation & Test in Europe Conference & Exhibition (DATE), pages 1915–1924. IEEE, 2021. doi:10.23919/DATE51398.2021.9473996.
- [30] Antonio Andrea Salvalaggio, Raffaele Zippo, and Giovanni Stea. Improving (min,+) convolutions by heuristic operation reordering. JRWRTC 2024, page 1, 2024.
- [31] Henrik Schiøler, Hans-Peter Schwefel, and Martin B. Hansen. Cync: a matlab/simulink toolbox for network calculus. In Peter W. Glynn, editor, Proceedings of the 2nd International Conference on Performance Evaluation Methodolgies and Tools, VALUETOOLS 2007, Nantes, France, October 22-27, 2007, ACM International Conference Proceeding Series, page 60. ICST/ACM, 2007. doi:10.4108/VALUETOOLS.2007.1804.
- [32] Seyed Mohammadhossein Tabatabaee, Marc Boyer, Jean-Yves Boudec Le, and Jörn Migge. Efficient and accurate handling of periodic flows in time-sensitive networks. In 2023 IEEE 29th Real-Time and Embedded Technology and Applications Symposium (RTAS), pages 303–315, 2023. doi:10.1109/RTAS58335.2023.00031.
- [33] Seyed Mohammadhossein Tabatabaee and Jean-Yves Le Boudec. Deficit round-robin: A second network calculus analysis. In 27th IEEE Real-Time and Embedded Technology and Applications Symposium, RTAS 2021, Nashville, TN, USA, May 18-21, 2021, pages 171–183. IEEE, 2021. doi:10.1109/RTAS52030.2021.00022.
- [34] Andrea Trasacco, Raffaele Zippo, and Giovanni Stea. Nancy.Expressions: Towards a Computer Algebra System for Deterministic Network Calculus. In EAI VALUETOOLS 2024, 2024. doi:10.1007/978-3-032-06818-7_23.
- [35] Ernesto Wandeler and Lothar Thiele. Real-Time Calculus (RTC) Toolbox, 2006. URL: http://www.mpa.ethz.ch/Rtctoolbox.
- [36] Jiayi Zhang, Lihao Chen, Tongtong Wang, and Xinyuan Wang. Analysis of tsn for industrial automation based on network calculus. In 2019 24th IEEE International Conference on Emerging Technologies and Factory Automation (ETFA), pages 240–247. IEEE, 2019. doi:10.1109/ETFA.2019.8869053.
- [37] Luxi Zhao, Paul Pop, Zhong Zheng, Hugo Daigmorte, and Marc Boyer. Latency analysis of multiple classes of AVB traffic in TSN with standard credit behavior using network calculus. IEEE Trans. Ind. Electron., 68(10):10291–10302, 2021. doi:10.1109/TIE.2020.3021638.
- [38] Boyang Zhou, Isaac Howenstine, Siraphob Limprapaipong, and Liang Cheng. A survey on network calculus tools for network infrastructure in real-time systems. IEEE Access, 8:223588–223605, 2020. doi:10.1109/ACCESS.2020.3043600.
- [39] Raffaele Zippo, Paul Nikolaus, and Giovanni Stea. Extending the Network Calculus Algorithmic Toolbox for Ultimately Pseudo-Periodic Functions: Pseudo-Inverse and Composition. Discrete Event Dynamic Systems, 2023. doi:10.1007/s10626-022-00373-5.
- [40] Raffaele Zippo, Paul Nikolaus, and Giovanni Stea. Isospeed: Improving (min,+) convolution by exploiting (min,+)/(max,+) isomorphism. In 35th Euromicro Conference on Real-Time Systems (ECRTS’23), pages 24–pp. IEEE, 2023. doi:10.4230/LIPIcs.ECRTS.2023.
- [41] Raffaele Zippo, Paul Nikolaus, and Giovanni Stea. Exploiting (min,+)/(max,+) Isomorphism to Speed up Convolutions. ACM Transactions on Mathematical Software, 2026. doi:10.1145/3793250.
- [42] Raffaele Zippo and Giovanni Stea. rzippo/nancy-playground. Software, swhId: swh:1:dir:dd85728ac2a89f688e349e3d80e4b04e2a966ad4 (visited on 2026-05-28). URL: https://github.com/rzippo/nancy-playground, doi:10.4230/artifacts.25795.
- [43] Raffaele Zippo and Giovanni Stea. Nancy: An efficient parallel Network Calculus library. SoftwareX, 19:101178, 2022. doi:10.1016/j.softx.2022.101178.
- [44] Raffaele Zippo and Giovanni Stea. Nancy source repository archived on Software Heritage, 2022. URL: https://archive.softwareheritage.org/swh:1:dir:411ec10f456b07eb84f8f0c404d2c6f10ce5b7a7.
- [45] Raffaele Zippo and Giovanni Stea. Nancy source repository on GitHub, 2022. URL: https://github.com/rzippo/nancy.
- [46] Raffaele Zippo and Giovanni Stea. Computationally efficient worst-case analysis of flow-controlled networks with Network Calculus. IEEE Transactions on Information Theory, 2023. doi:10.1109/TIT.2023.3244276.
