- BDSL user guide: https://nbn-resolving.org/urn:nbn:de:bsz:14-qucosa2-752170
- For users: See Getting Started and Running Examples to install and run the standalone interpreter.
- For development details: See the separate
DEVELOPMENT.md(building, dependencies, deployment).
The BDSL Interpreter Framework provides an extensible foundation for bigraphical language engineering with the Bigraphical Domain-specific Language (BDSL).
It is organized as a multi-module Maven project and is designed to let you integrate BDSL parsing and execution into your own applications.
The framework depends on specific versions of the BDSL grammar and the Bigraph Framework.
| BDSL Interpreter Release | BDSL Grammar | Bigraph Framework |
|---|---|---|
| 2.2.2 (current) | 2.1.0 | 2.2.1 |
| 2.2.1 | 2.0.1 | 2.2.0 |
| 2.2.0 | 2.0.1 | 2.2.0 |
| 2.0.1 | 2.0.1 | 2.0.1 |
The most convenient way to experiment with BDSL is via the standalone command-line interface (CLI).
After building the tool (see Building the Interpreter), you can run BDSL scripts directly from the command line.
java -jar bdsl.jar --version
java -jar bdsl.jar --main=./program.bdsl <other-options...>
java -jar bdsl.jar --helpThis prints the interpreter version, executes a BDSL script, or shows available command-line options.
Screenshot
A simple example script is provided under the test resources.
$ java -jar ./out/bdsl.jar --main=./bdsl-interpreter-cli/src/test/resources/test_bdsl_01.bdslThe file test_bdsl_01.bdsl located in
bdsl-interpreter-cli/src/test/resources/ demonstrates basic BDSL language and serves as a quick sanity check for your build.
Screenshot
To build a standalone command-line tool of the interpreter (called the CLI here):
# Linux, Mac
$ mvn clean package -DskipTests -Pbuild-cli
# or
$ ./mvnw clean package -DskipTests -Pbuild-cli
# Windows
$ ./mvnw.cmd clean package -DskipTests -Pbuild-cliThe resulting bdsl.jar will be available under the ./out/ directory.
To integrate the interpreter into your own Maven/Gradle project, declare the required dependencies described below.
By embedding the framework directly, you can fully control BDSL parsing and interpretation, allowing to customize execution logic, extend language behavior, and integrate the interpreter into other application code.
<dependencies>
<!-- Core: low-level building blocks of the interpreter for JAVA API usage-->
<dependency>
<groupId>org.bigraphs.dsl.interpreter</groupId>
<artifactId>bdsl-interpreter-core</artifactId>
<version>2.2.2</version>
</dependency>
<!-- CLI: command-line interface interpreter for standalone usage and interfacing -->
<dependency>
<groupId>org.bigraphs.dsl.interpreter</groupId>
<artifactId>bdsl-interpreter-cli</artifactId>
<version>2.2.2</version>
</dependency>
<!-- Exec: advanced BDSL statement execution strategy-->
<dependency>
<groupId>org.bigraphs.dsl.interpreter</groupId>
<artifactId>bdsl-execution-common</artifactId>
<version>2.2.2</version>
</dependency>
</dependencies>dependencies {
// Core: low-level building blocks of the interpreter for Java API usage
implementation "org.bigraphs.dsl.interpreter:bdsl-interpreter-core:2.2.2"
// CLI: command-line interface interpreter for standalone usage and interfacing
implementation "org.bigraphs.dsl.interpreter:bdsl-interpreter-cli:2.2.2"
// Exec: advanced BDSL statement execution strategy
implementation "org.bigraphs.dsl.interpreter:bdsl-execution-common:2.2.2"
}Practical usage examples can be found in the provided unit tests, which demonstrate typical parsing and interpretation workflows using the framework APIs:
- Core Module:
bdsl-interpreter-core/src/test/java/org/bigraphs/dsl/tests/interpreter - CLI Module:
bdsl-interpreter-cli/src/test/java/org/bigraphs/dsl/cli
The framework is split into several reusable modules:
-
bdsl-interpreter-parentParent module that manages shared configuration, dependencies, and build settings for all submodules. -
bdsl-interpreter-cliCommand-line tool that exposes the interpreter’s functionality for scripting and quick experimentation. -
bdsl-interpreter-coreCore components of the BDSL interpreter.
Defines the parsing framework using the visitor design pattern and extension methods.
Depends on the BDSL Grammar and evaluates individual language statements. -
bdsl-execution-commonProvides a common execution environment and reusable strategies for the interpreter, including shared execution logic and environment management.
For full build options and deployment instructions, see DEVELOPMENT.md.
For questions, bug reports, or contributions, please use the issue tracker of the project repository:
https://github.com/bigraph-toolkit-suite/bigraphs.bdsl-interpreter-parent/issues
Copyright 2020 Bigraph Toolkit Developers
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


