Skip to content

bigraph-toolkit-suite/bigraphs.bdsl-interpreter-parent

Repository files navigation

logo of bdsl interpreter

Latest Version: 2.2.1


BDSL Interpreter Framework

The BDSL Interpreter Framework provides an extensible framework for basic BDSL language engineering (e.g., interpreting custom BDSL scripts). The framework is organized as a multi-module Maven project. Each module in this project focuses on a specific set of features to enable the development of BDSL-based applications.

Below is an overview of the project and its modules:

Project Modules:

  • bdsl-interpreter-parent: Acts as the parent module for the entire project, managing shared configurations, dependencies, and build settings for all submodules.
  • bdsl-interpreter-cli: Implements a command-line tool for interacting with the functionality of the BDSL Interpreter Framework.
  • bdsl-interpreter-core: Contains the core components of the BDSL interpreter. This module defines the parsing framework (visitor design pattern, extension methods) required for general BDSL language interpretation. It depends on the BDSL Grammar and evaluates the individual language statements.
  • bdsl-execution-common: Provides the common execution environment and reusable strategies for the BDSL interpreter. This module encapsulates shared execution logic, environment management, and strategy definitions.

Version Compatibility

BDSL Interpreter Release BDSL Core Elements (Grammar) Bigraph Framework
2.2.1 (current) 2.0.1 2.2.0
2.2.0 2.0.1 2.2.0
2.0.1 2.0.1 2.0.1

Screenshot of the Standalone Tool

screenshot-of-bdsl-interpreter

Command: java -jar bdsl.jar --main=./test_bdsl_01.bdsl
Source: test_bdsl_01.bdsl

Getting Started

Standalone Tool

Related Module: bdsl-interpreter-cli

Refer here for installation.

The functionality of the BDSL Interpreter Framework is made available directly under the terminal.

Usage:

$ java -jar bdsl.jar --version
$ java -jar bdsl.jar --main=./program.bdsl <other-options...>
$ java -jar bdsl.jar --help

Framework Usage

Maven Configuration

<dependencies>
    <!-- Core: Low-level building blocks of the interpreter -->
    <dependency>
        <groupId>org.bigraphs.dsl.interpreter</groupId>
        <artifactId>bdsl-interpreter-core</artifactId>
        <version>VERSION</version>
    </dependency>
    <!-- CLI: the high-level building block to access command-line interface parser -->
    <dependency>
        <groupId>org.bigraphs.dsl.interpreter</groupId>
        <artifactId>bdsl-interpreter-cli</artifactId>
        <version>VERSION</version>
    </dependency>
    <!-- Exec: Advanced BDSL Statement Executions -->
    <dependency>
        <groupId>org.bigraphs.dsl.interpreter</groupId>
        <version>VERSION</version>
        <artifactId>bdsl-execution-common</artifactId>
    </dependency>
</dependencies>

Development

Requirements:

  • Java >= 17
  • Maven >= 3.8.3

To build the project and all its individual components:

Building

$ mvn clean package -DskipTests

To build the standalone BDSL interpreter tool:

$ mvn clean package -DskipTests -Pbuild-cli

After executing the command above, the tool is available under ./out/ from the root directory of this project.

Dependencies

This project uses Bigraph Framework to perform all elementary underlying bigraph model operations. The grammar, parser and other DSL-related things come from BDSL Grammar.

This BDSL interpreter project uses both dependencies to implement the fundamental interpretation logic and the command-line tool of the interpreter.

Refer to the README.md of the respective submodules for more details on how to use the whole BDSL interpreter Framework.

Deployment

To deploy the BDSL Interpreter Framework to the Central Repository:

$ mvn clean deploy -DskipTests -P release,central

Settings

The Sonatype account details (username + password) for the deployment must be provided to the Maven Sonatype Plugin as used in the project's pom.xml file.

The Maven GPG plugin is used to sign the components for the deployment. It relies on the gpg command being installed:

sudo apt install gnupg2

and the GPG credentials being available e.g. from settings.xml.

More details can be found link:https://central.sonatype.org/publish/requirements/gpg/[here].

License

Bigraph Interpreter is Open Source software released under the Apache 2.0 license.

Copyright 2020-present 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

 https://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.