Skip to main content

Welcome to Bigraph Framework

A Complete Guide to the Bigraph Framework.

  • Stable: 1.1.0 (main branch)
    • Previous Stable Versions: 1.0.0, 0.9.7, 0.9.6
  • Latest Version: 2.0.0-SNAPSHOT (develop branch)
Notice

The API is subject to change. Use at your own risk. This documentation reflects always the latest version.

Caution

Since version 1.0.0 of Bigraph Framework: The new groupID and base package name org.bigraphs.* is used instead of the former one de.tudresden.inf.st.bigraphs.*.

What is Bigraph Framework​

Bigraph Framework is a Java software framework for the creation and simulation of bigraphs and bigraphical reactive systems to expedite the experimental evaluation of the bigraph theory in real-world applications.

The goal of this framework is to facilitate the implementation of reactive systems, including context-aware, agent-based systems or cyber-physical systems. The high level API eases the programming of bigraphical systems for various applications. The framework is developed around a metamodel-first approach, when working with bigraphical structures.

Overview of the Features​

  • Dynamic creation of bigraphs at design time and runtime based on an EMOF-based metamodel
  • Read and write the meta and instance model of a bigraph from and to the file system
  • Visualization
    • Graphical export via GraphViz/DOT, VCG
    • PNG, JPG, ...
    • Interactive visualization UI via GraphStream
  • Bigraphical Reactive System support: Simulate the evolution of bigraphs by reaction rules
    • Bigraph matching and rewriting via jLibBig
    • Synthesisation of a labeled transition system (LTS)
    • Simulation and Model Checking (BFS, Random)
    • Predicate checking, logical connectors, LTL
    • Specify order of reaction rules
    • Conditional rules (not yet integrated in model checking procedure but available for custom usage)
    • Tracking rules (a rule can be assigned a tracking map)
  • Model transformation / Conversions
    • Export to common graph formats, e.g., DOT, GraphML, GXL
    • Export to formats of other bigraph tools: BigMC, BigraphER, and BigRed
    • Translate bigraphs to other graph classes: Ranked Graphs, multigraphs, ...
  • Attributed Bigraphs
    • Add arbitrary attributes to nodes
    • Attributes are preserved when rewriting

What are Bigraphs?​

Bigraphs are an emerging theory and metamodel for global ubiquitous systems, mobile computing, context-aware systems and the Internet of Things (IoT), or in general: for reactive systems. It is grounded on category theory and regarded as a unifying framework for many process calculi, including the ambient calculus, action calculi, Petri nets, the Calculus of Communicating Systems (CCS) and π-calculus. The theory provides an algebra and a graph rewriting mechanism to describe, study and analyze the dynamic behavior of reactive systems.

Requirements​

  • Java 17
  • Maven or Gradle
    • Minimum version of Maven: 3.8.3

Use / Install / Dependency Settings​

Bigraph Framework and its parts are online available as Maven dependencies.

Artifacts are deployed to the Central Repository.

Building from Source

To build the source by yourself, follow the README.md inside the code repository.

Quick Start: Empty Project Skeleton​

To get started using Bigraph Framework right away, download the Maven-based Project Skeleton

The README contained therein, describes how to compile and start an application.

Alternatively, follow the step-by-step project setup as described in the following.

Package Dependencies​

Depending on the build management tool you are using, one of the following configuration for Maven or Gradle is necessary.

Add this inside the dependencies section of your project's *.pom file. Replace VERSION with the latest version.


<!-- the core module -->
<dependency>
<groupId>org.bigraphs.framework</groupId>
<artifactId>bigraph-core</artifactId>
<version>VERSION</version>
</dependency>
<!-- the simulation module (matching and rewriting) -->
<dependency>
<groupId>org.bigraphs.framework</groupId>
<artifactId>bigraph-simulation</artifactId>
<version>VERSION</version>
</dependency>
<!-- the visualization module -->
<dependency>
<groupId>org.bigraphs.framework</groupId>
<artifactId>bigraph-visualization</artifactId>
<version>VERSION</version>
</dependency>
<!-- the converter module -->
<dependency>
<groupId>org.bigraphs.framework</groupId>
<artifactId>bigraph-converter</artifactId>
<version>VERSION</version>
</dependency>

Repository Setup for SNAPSHOT Releases​

No additional configuration is necessary to resolve the dependencies above!

However, if you want SNAPSHOT releases, the following custom repository must be added as well. The configuration for Maven and Gradle is provided below.

The following Maven repository entry must be added to the repositories element of a pom.xml of a Maven-based Java project:

<repository>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</repository>

Logging Configuration​

Bigraph Framework employs SLF4J as a facade for the log4j logging framework.

Depending on your project setup, you may need to include the following libraries in your pom.xml:

<!-- For any Maven project in general -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.9</version>
</dependency>
<!-- Use a no-operation (NOP) logger implementation -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>2.0.7</version>
</dependency>
<!-- or, for example, the reload4j implementation (fork of log4j) -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
<version>2.0.9</version>
</dependency>

<!-- When used within a Spring project -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>

Not including these dependencies will result in warnings. The example above shows how to use a NOP logger or a reload4j as the underlying logging framework in your project.