https://github.com/bigraph-toolkit-suite/bigraphs.bdsl-core-elements

BDSL is a DSL to specify and simulate bigraphs. This project contains the grammar and language server protocol. | Interpreter: https://github.com/bigraph-toolkit-suite/bigraphs.bdsl-interpreter-parent

https://github.com/bigraph-toolkit-suite/bigraphs.bdsl-core-elements

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 1 committers (100.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.1%) to scientific vocabulary

Keywords

bigraphs dsl xtext xtext-grammar
Last synced: 5 months ago · JSON representation

Repository

BDSL is a DSL to specify and simulate bigraphs. This project contains the grammar and language server protocol. | Interpreter: https://github.com/bigraph-toolkit-suite/bigraphs.bdsl-interpreter-parent

Basic Info
  • Host: GitHub
  • Owner: bigraph-toolkit-suite
  • Language: Java
  • Default Branch: main
  • Homepage: https://www.bigraphs.org/
  • Size: 127 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
bigraphs dsl xtext xtext-grammar
Created over 2 years ago · Last pushed 6 months ago
Metadata Files
Readme

README.md

Latest Version: 2.0.1

  • BDSL user guide: https://nbn-resolving.org/urn:nbn:de:bsz:14-qucosa2-752170

Bigraph DSL Grammar (Core)

This project contains the following major building blocks of BDSL, the Bigraphical Domain-specific Language:

  • Grammar, Parser, Validation, ...
  • Language Server Protocol for language support in any IDE
  • Unit tests

The grammar is implemented using Xtext and Xtend. Xtext is a language development framework, and Xtend is a language that compiles into idiomatic Java source code.

IDE support is provided for the following platforms to be more productive when experimenting with BDSL: - Eclipse, IntelliJ, Visual Code, ... by utilizing the Language Server Protocol

This framework provides the core elements, which may be used in other Java frameworks, libraries and applications. For instance, refer to BDSL Interpreter, where an interpreter for BDSL is implemented.

Version Compatibility

| BDSL Grammar Release | Bigraph Ecore Metamodel | Gradle Compatibility | Java Compatibility | |----------------------|-------------------------|----------------------|--------------------| | 2.0.1 | 2.0.1 | 7.6.2 | 17 |

Getting Started

Maven Configuration

Use the following dependency within a Maven-based project. Replace ${version} with the current version.

xml <!-- BDSL Grammar --> <dependency> <groupId>org.bigraphs.dsl</groupId> <artifactId>bdsl-grammar</artifactId> <version>${version}</version> <exclusions> <exclusion> <groupId>org.bigraphs.dsl</groupId> <artifactId>BigraphBaseModel</artifactId> </exclusion> <exclusion> <groupId>org.eclipse.xtext</groupId> <artifactId>xtext-dev-bom</artifactId> </exclusion> </exclusions> </dependency>

Development

Requirements - Java == 17 - Gradle == 7.6.2 - Check that the environment variable JAVA_HOME is pointing to the correct JDK - update-java-alternatives --list - export JAVA_HOME=...

Project Setup

First, clone this repository:

shell git clone --recursive https://github.com/bigraph-toolkit-suite/bigraphs.bdsl-core-elements

This project includes Ecore Bigraph Metamodel as git submodule. The main branch of the repository Ecore Bigraph Metamodel will also be pulled. This dependency includes the Ecore metamodels of bigraphs that are used by the Xtext-based BDSL grammar to represent bigraphical structures.

To update the submodule (i.e., the Bigraph Ecore Metamodel) later at any time to the latest tagged version, run the following command: ```shell git submodule update --recursive --remote

Force overwriting changes

git submodule update --recursive --remote --force ```

Working in Eclipse

This project is best worked with Eclipse Modeling Tools IDE. Import everything into a new Eclipse workspace:

  • org.bigraphs.dsl.parent
  • bigraphs.bigraph-ecore-metamodel (the cloned Git submodule according to the Project Setup instructions)

You may need to re-generate the model code of the bigraphs.bigraph-ecore-metamodel project as this process is not currently handled by the gradle script.

You may then be able to run the "MWE2 workflow" and to generate "Xtext artifacts" via the Eclipse IDE inside the org.bigraphs.dsl project, or call the appropriate gradle command as shown below in Building from Source.

Project Structure

  • gradle-based Project
  • Language infrastructure for Bigraph DSL (BDSL) based on Xtext is located under org.bigraphs.dsl
  • Language Server Protocol Implementation is located under org.bigraphs.dsl.ide
  • Test classes are located under ./org.bigraphs.dsl.tests/
    • Requires modules org.bigraphs.dsl and org.bigraphs.dsl.ide
  • (!) Note that the required CDO/EMF/Ecore dependencies are stored separately inside the ./etc/libs folder. The reason is that there is currently no easy way on how to resolve Eclipse dependencies from P2 repositories in gradle. To clarify: Updating the versions means replacing the files. These dependencies are shadowed in the bdsl-grammar JAR

Building from Source

This command builds everything:

```shell

Except tests

./gradlew clean build -x test

Specific module

./gradlew clean :org.bigraphs.dsl:build -x test

./gradlew clean :org.bigraphs.dsl.ide:build -x test

```

The builds can be found in: - ./org.bigraphs.dsl/build/libs - ./org.bigraphs.dsl.ide/build/libs

Generate Xtext Language Artifacts

You can just generate the code from the Xtext grammar by issuing the next command:

```bash ./gradlew clean generateXtextLanguage

Specific module

./gradlew clean :org.bigraphs.dsl:generateXtext

./gradlew clean :org.bigraphs.dsl:generateXtextLanguage

```

Generate Language Server Protocol

```bash ./gradlew shadowJar

Specific module

./gradlew clean :org.bigraphs.dsl.ide:shadowJar ```

The build depends on shadowJar task.

Note: The language server protocol *.jar is located under org.bigraphs.dsl.ide/build/libs/.

Run Tests

The following commands show how to run various kinds of tests:

```shell

Run all test cases

./gradlew :org.bigraphs.dsl.tests:test -PwithTests

All tests within a package

./gradlew test --tests org.bigraphs.dsl.tests.ide.validation* -PwithTests

All tests within a class

./gradlew test --tests *BdslAffectionUnitTest -PwithTests

Only a specific test method

./gradlew test --tests *testSignatureMatchOnAssignment_01 -PwithTests ```

Test report is written to org.bigraphs.dsl.tests/build/reports/tests/test/index.html.

Install Grammar to Local Maven Repository

If you want to use the BDSL grammar artifact in your Java projects for testing and development purposes, you can install the compiled JARs into your local Maven repository (usually located at ~/.m2/). Then it can be conveniently used by other Java projects.

Run the following command: shell ./gradlew publishToMavenLocal ./gradlew :org.bigraphs.dsl:publishToMavenLocal ./gradlew :org.bigraphs.dsl.ide:publishToMavenLocal

This publishes only the bdsl-grammar module containing the BDSL.

License

BDSL Grammar is Open Source software released under the Apache 2.0 license.

Owner

  • Name: Bigraph Toolkit Suite
  • Login: bigraph-toolkit-suite
  • Kind: organization

BTS refers to a software product family for the research and development of bigraphical reactive systems.

GitHub Events

Total
  • Push event: 9
  • Create event: 1
Last Year
  • Push event: 9
  • Create event: 1

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 96
  • Total Committers: 1
  • Avg Commits per committer: 96.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 9
  • Committers: 1
  • Avg Commits per committer: 9.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Dominik Grzelak d****k@t****e 96
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

build.gradle maven
  • jakarta.inject:jakarta.inject-api 2.0.1 api
  • org.eclipse.emf:org.eclipse.emf.codegen ${versions.emfCodegen} api
  • org.eclipse.emf:org.eclipse.emf.codegen.ecore ${versions.emfEcoreCodeGen} api
  • org.eclipse.emf:org.eclipse.emf.common ${versions.emfCommon} api
  • org.eclipse.emf:org.eclipse.emf.ecore ${versions.emfEcore} api
  • org.eclipse.emf:org.eclipse.emf.ecore.xmi ${versions.emfEcoreXmi} api
  • org.eclipse.xtend:org.eclipse.xtend.lib 2.30.0 api
org.bigraphs.dsl/build.gradle maven
  • commons-io:commons-io ${versions.commonsio} api
  • jakarta.inject:jakarta.inject-api 2.0.1 api
  • net.bytebuddy:byte-buddy-agent 1.11.2 api
  • org.apache.commons:commons-lang3 ${versions.commonslang3} api
  • org.bigraphs.model:bigraph-ecore-model 1.6.1-SNAPSHOT api
  • org.eclipse.xtext:org.eclipse.xtext ${versions.xtext} api
  • org.eclipse.xtext:org.eclipse.xtext.xbase ${versions.xtext} api
  • org.eclipse.xtext:org.eclipse.xtext.xtext.generator ${versions.xtext} api
  • org.hyperic:sigar 4.2.0 compile
  • org.bigraphs.dsl:bigraphs.bigraph-ecore-metamodel * runtimeOnly
org.bigraphs.dsl.ide/build.gradle maven
  • org.eclipse.lsp4j:org.eclipse.lsp4j ${versions.lsp4j} api
  • org.eclipse.xtext:org.eclipse.xtext.ide ${versions.xtext} api
  • org.eclipse.xtext:org.eclipse.xtext.xbase.ide ${versions.xtext} api
  • org.eclipse.xtext:org.eclipse.xtext.testing ${versions.xtext} testImplementation
org.bigraphs.dsl.tests/build.gradle maven
  • junit:junit 4.13.2 testImplementation
  • org.eclipse.xtext:org.eclipse.xtext.testing ${versions.xtext} testImplementation
  • org.eclipse.xtext:org.eclipse.xtext.xbase.testing ${versions.xtext} testImplementation
  • org.junit.jupiter:junit-jupiter-api * testImplementation
  • org.opentest4j:opentest4j 1.3.0 testImplementation
  • org.junit.jupiter:junit-jupiter-engine * testRuntimeOnly
  • org.junit.platform:junit-platform-launcher * testRuntimeOnly