Skip to content

bigraph-toolkit-suite/BiggerBenchmarkSolution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BiGGer Benchmark 2025.1

This repository serves as the benchmark companion project to the paper:

D. Grzelak and M. Hamann, “Improving Bigraph Rewriting with GrGen.NET to Enable Efficient System Simulation,” Form. Asp. Comput., Jun. 2025, doi: 10.1145/3736704.

It includes the exemplary use cases discussed in the paper, providing:

  • The original Bigraph model files (Ecore/XMI),
  • The generated GrGen.NET artifacts (*.gm, *.grs, *.cs), and
  • The corresponding C# model checking procedures utilizing libGr v7.2.
  • The compiled BiGGer tool for re-generating the GrGen.NET artifacts.

Benchmark Preview: Self-Sorting Robots in Action

These transition systems were automatically generated using BiGGer and GrGen.NET, modeling the state space of multiple robots performing physical bubble-sort.

N = 3 Robots N = 4 Robots
SSR3
Nodes: 78
Edges: 96
Time: 0.70 s
SSR4
Nodes: 1,263
Edges: 2,767
Time: 10.02 s
N = 5 Robots N = 6 Robots
SSR5
Nodes: ≈ 9,192
Edges: 22,047
Time: 105.56 s
SSR6
Nodes: ≈ 314,226
Edges: 1,003,215
Time: 19459.07 s

📌 Each dot represents a system state. Edges are transitions. Graphs were rendered from .dot output using Gephi.

Setup

Configure System

$ dotnet --list-sdks
8.0.117 [/usr/lib/dotnet/sdk]
$ dotnet --list-runtimes
Microsoft.AspNetCore.App 8.0.17 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.17 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]

Configure VS Code

Usage

Opening the Project Solution

Clone the repository and move into the project folder:

$ cd BiggerBenchmarkSolution

Open the VS Project Solution via the terminal:

$ code .

vscode screenshot

Understanding the Folder Structure

/BiggerBenchmarkSolution/
├── CAP2/
│   ├── TestCAP.csproj
│   └── Program.cs
├── SSR3/
│   ├── TestSSR.csproj
│   └── Program.cs
├── btsLib/
│   ├── btsLib.csproj
│   └── ReactionGraph.cs
├── assets/
│   ├── cap2
│   ├── cap3
│   ├── ssr2
│   ├── ssr3
│   └── ...
└── BiggerBenchmark.sln

Note that the model checking procedure is defined in each project's Program.cs.

The project is divided into several use cases and a shared class library.

🔹 CAP/: Contains the Concurrent Append Problem project for n "processes".

🔹 SSR/: Contains the Self-Sorting Robots project for n "robots".

🔹 btsLib/: A shared class library that defines core data structures used by both CAP and SSR projects.

🔹 assets/: Contains original source files used for re-generating GrGen.NET artifacts (*.gm, *.grs, *.cs). Derived from Bigraph Ecore/XMI models for CAP and SSR problems (e.g., cap2, ssr3).

Running the Benchmarks

Note: If /opt/grgen/ is not your default installation path of GrGen.NET, you have to change some settings in the *.csproj files.

For example, to run the benchmark for the self-sorting robots problem with 2 robots:

# First build the project (from the folder /BiggerBenchmarkSolution)
$ dotnet build SSR2/SSR2.csproj

Then, to run the specific project:

$ dotnet run --project SSR2/SSR2.csproj

After completion, some files that will be exported into the folder BiggerBenchmarkSolution/SSR2/bin/Debug/net8.0/ are:

  • The individual states in *.vcg format
  • The transition system as DOT file

You can visualize each system state .vcg using ycomp since GrGen.NET is installed:

# From BiggerBenchmarkSolution/SSR2/bin/Debug/net8.0/states/
$ ycomp state_0.vcg

State of the self-sorting robots problem for 2 robots

Regenerating GrGen.NET Model Files

(Optional) For reproducibility, the GrGen.NET graph and rule model files and libraries (*.gm, *.grs, *.cs) can be regenerated from the original Bigraph model files provided in the assets/ directory. To regenerate the GrGen.NET files, you have to rerun the BiGGer tool (which is shipped with this project). These model files have been created using Bigraph Framework. The specific code is available also within the unit tests.

The general procedure is as follows:

  • First, follow the README.txt within each sample folder (e.g., BiggerBenchmarkSolution/assets/ssr2/README.txt)

  • Then, execute (e.g., at BiggerBenchmarkSolution/assets/ssr2/):

    $ GrGen -keep ./foo/ruleset.grg

    The generated files will be kept in: ./foo/tmpgrgen0
    Building libraries...
     - Model assembly "./foo/lgsp-metamodel_graphModel.dll" generated.
     - Actions assembly "./foo/lgsp-rulesetActions.dll" generated.
    

    $ cp export.grs foo/

    $ cd foo && GrShell export.grs, then CTRL+C and cd ..

Finally, copy all required files into the specific project folder of your choice (e.g., BiggerBenchmarkSolution/SSR2):

  • initial_graph.grs, metamodel_graph.gm, ruleset.grg, metamodel_graphModel.cs, rulesetActions.cs
  • e.g.,: cp foo/initial_graph.grs foo/metamodel_graph.gm foo/ruleset.grg foo/tmpgrgen0/metamodel_graphModel.cs foo/tmpgrgen0/rulesetActions.cs ../../SSR2/

Development

Note: If /opt/grgen/ is not your default installation path of GrGen.NET, you have to change some settings in the *.csproj files.

Project Setup

# Create the library of data structures
$ dotnet new classlib -n btsLib

# Add it to the solution
$ dotnet sln add btsLib/btsLib.csproj

# Reference the library in other projects
$ dotnet add TestApp/TestApp.csproj reference btsLib/btsLib.csproj

Adding a New Use Case

First, configure the Studio project files:

$ dotnet new console -n NewUseCase
$ dotnet add NewUseCase/NewUseCase.csproj reference btsLib/btsLib.csproj
$ dotnet sln add NewUseCase/NewUseCase.csproj

Copy the template files from the assets folder to the new use case project folder:

$ cp assets/Program.template.cs NewUseCase/Program.cs
$ cp assets/Project.template.csproj NewUseCase/NewUseCase.csproj

If necessary, adjust the dotnet version or GrGen.NET path in the *.csproj.

How to Cite the Benchmark

BibTeX:

@article{grzelak_ImprovingBigraphRewriting_2025,
  title = {Improving {{Bigraph Rewriting}} with {{GrGen}}.{{NET}} to {{Enable Efficient System Simulation}}},
  author = {Grzelak, Dominik and Hamann, Markus},
  year = {2025},
  month = jun,
  journal = {Form. Asp. Comput.},
  issn = {0934-5043},
  doi = {10.1145/3736704}
}

References

  • Tooling:
  • Theory:
    • D. Grzelak and M. Hamann, “Improving Bigraph Rewriting with GrGen.NET to Enable Efficient System Simulation,” Form. Asp. Comput., Jun. 2025, doi: 10.1145/3736704.

License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages