{"id":21761743,"url":"https://github.com/bigraph-toolkit-suite/bigraphs.bdsl-core-elements","last_synced_at":"2025-03-21T04:40:32.120Z","repository":{"id":204878370,"uuid":"712617839","full_name":"bigraph-toolkit-suite/bigraphs.bdsl-core-elements","owner":"bigraph-toolkit-suite","description":"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","archived":false,"fork":false,"pushed_at":"2024-12-12T11:48:32.000Z","size":133263,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T01:18:58.582Z","etag":null,"topics":["bigraphs","dsl","xtext","xtext-grammar"],"latest_commit_sha":null,"homepage":"https://www.bigraphs.org/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bigraph-toolkit-suite.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-10-31T20:40:52.000Z","updated_at":"2025-01-24T08:06:18.000Z","dependencies_parsed_at":"2024-01-01T08:13:47.240Z","dependency_job_id":"85c5e03c-e2fa-4c6c-a5f2-c56b209cf7b5","html_url":"https://github.com/bigraph-toolkit-suite/bigraphs.bdsl-core-elements","commit_stats":{"total_commits":96,"total_committers":1,"mean_commits":96.0,"dds":0.0,"last_synced_commit":"0aeb99f8d6469b8afa7c50e86d15a8a1d1649836"},"previous_names":["bigraph-toolkit-suite/bigraphs.bdsl-core-elements"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigraph-toolkit-suite%2Fbigraphs.bdsl-core-elements","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigraph-toolkit-suite%2Fbigraphs.bdsl-core-elements/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigraph-toolkit-suite%2Fbigraphs.bdsl-core-elements/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigraph-toolkit-suite%2Fbigraphs.bdsl-core-elements/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bigraph-toolkit-suite","download_url":"https://codeload.github.com/bigraph-toolkit-suite/bigraphs.bdsl-core-elements/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244739947,"owners_count":20501990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bigraphs","dsl","xtext","xtext-grammar"],"created_at":"2024-11-26T12:09:37.462Z","updated_at":"2025-03-21T04:40:32.101Z","avatar_url":"https://github.com/bigraph-toolkit-suite.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"./etc/bigraph-dsl-logo.png\" style=\"zoom:90%;\" /\u003e\n\n# Bigraph DSL Grammar: Core Elements (CE)\n\n|                                  | Release | Development    |\n|----------------------------------|---------|----------------|\n| **BDSL Core Elements (Grammar)** | 2.0.1   | 3.0.0-SNAPSHOT |\n| Bigraph Ecore Metamodel          | 2.0.1   | 2.0.1          |\n| Gradle Compatability             | 7.6.2   | 7.6.2          |\n\n \n\nThis projects contains the following major building blocks of **BDSL**, the Bigraphical Domain-specific Language:\n- Grammar, Parser, Validation, ...\n- Language Server Protocol for language support in any IDE\n- Unit tests\n\nThe grammar is implemented using [Xtext](https://github.com/eclipse/xtext) and [Xtend](https://eclipse.dev/Xtext/xtend/).\nXtext is a language development framework, and Xtend is a language that compiles into idiomatic Java source code.\n\nIDE support is provided for the following platforms to be more productive when experimenting with BDSL:\n- Eclipse, IntelliJ, Visual Code, ... by utilizing the *Language Server Protocol*\n\nThis framework provides the core elements, which may be used in other Java frameworks, libraries and applications.\nFor instance, refer to [https://git-st.inf.tu-dresden.de/bigraphs/bigraph-algebraic-interpreter](https://git-st.inf.tu-dresden.de/bigraphs/bigraph-algebraic-interpreter), where an interpreter for BDSL is implemented.\n\n\n## Getting Started\n\n### Maven Configuration\n\nUse the following dependency within a Maven-based project.\nReplace `${version}` with the current version.\n\n```xml\n\u003c!-- BDSL Grammar --\u003e          \n\u003cdependency\u003e\n\t\u003cgroupId\u003eorg.bigraphs.dsl\u003c/groupId\u003e\n    \u003cartifactId\u003ebdsl-grammar\u003c/artifactId\u003e\n    \u003cversion\u003e${version}\u003c/version\u003e\n    \u003cexclusions\u003e\n    \t\u003cexclusion\u003e\n        \t\u003cgroupId\u003eorg.bigraphs.dsl\u003c/groupId\u003e\n            \u003cartifactId\u003eBigraphBaseModel\u003c/artifactId\u003e\n        \u003c/exclusion\u003e\n        \u003cexclusion\u003e\n        \t\u003cgroupId\u003eorg.eclipse.xtext\u003c/groupId\u003e\n        \t\u003cartifactId\u003extext-dev-bom\u003c/artifactId\u003e\n        \u003c/exclusion\u003e\n    \u003c/exclusions\u003e\n\u003c/dependency\u003e\n```\n\n### SNAPSHOT Releases\n\nFor SNAPSHOT releases also add the following repository to you project's `pom.xml`:\n\n```xml\n\u003c!-- Additional Repository for SNAPSHOT Releases --\u003e\n\u003crepositories\u003e\n\t\u003crepository\u003e\n        \u003csnapshots\u003e\n        \t\u003cenabled\u003etrue\u003c/enabled\u003e\n        \u003c/snapshots\u003e\n        \u003cid\u003eossrh\u003c/id\u003e\n    \t\u003curl\u003ehttps://s01.oss.sonatype.org/content/repositories/snapshots\u003c/url\u003e\n\t\u003c/repository\u003e\n\u003c/repositories\u003e  \n```\n\n## Development\n\n**Requirements**\n- Java \u003e= 17\n- Gradle \u003e= 7.4.2\n- Check that the environment variable `JAVA_HOME` is pointing to the correct JDK\n  - `update-java-alternatives --list`\n  - `export JAVA_HOME=...`\n\n### Project Setup\n\nFirst, clone this repository:\n\n```shell\ngit clone --recursive https://github.com/bigraph-toolkit-suite/bigraphs.bdsl-core-elements\n```\n\nThis project includes [Ecore Bigraph Metamodel](https://github.com/bigraph-toolkit-suite/bigraphs.bigraph-ecore-metamodel) as git submodule.\nThe main branch of the repository [Ecore Bigraph Metamodel](https://github.com/bigraph-toolkit-suite/bigraphs.bigraph-ecore-metamodel) will also be pulled.\nThis dependency includes the Ecore metamodels of bigraphs that is used by the Xtext-based BDSL grammar to represent\nbigraphical structures.\n\nTo update the submodule (i.e., the Bigraph Ecore Metamodel) later at any time to the latest tagged version, run the following command:\n```shell\ngit submodule update --recursive --remote\n# Force overwriting changes\ngit submodule update --recursive --remote --force\n```\n\n### Building from Source\n\nThis command builds everything:\n\n```shell\n# Except tests\n./gradlew clean build -x test\n# Specific module\n# ./gradlew clean :org.bigraphs.dsl:build -x test\n# ./gradlew clean :org.bigraphs.dsl.ide:build -x test\n```\n\nThe builds can be found in:\n- ./org.bigraphs.dsl/build/libs\n- ./org.bigraphs.dsl.ide/build/libs\n\n#### Generate Xtext Language Artifacts\n\nYou can just generate the code from the Xtext grammar by issuing the next command:\n\n```bash\n./gradlew clean generateXtextLanguage \n# Specific module\n# ./gradlew clean :org.bigraphs.dsl:generateXtext\n# ./gradlew clean :org.bigraphs.dsl:generateXtextLanguage\n```\n\n#### Generate Language Server Protocol\n\n```bash\n./gradlew shadowJar\n# Specific module\n./gradlew clean :org.bigraphs.dsl.ide:shadowJar\n```\n\nThe build depends on shadowJar task.\n\n\u003e **Note:** The language server protocol `*.jar` is located under `org.bigraphs.dsl.ide/build/libs/`.\n\n#### Run Tests\n\nThe following commands show how to run various kinds of tests:\n\n```shell\n# Run all test cases\n./gradlew :org.bigraphs.dsl.tests:test -PwithTests\n# All tests within a package\n./gradlew test --tests org.bigraphs.dsl.tests.ide.validation* -PwithTests\n# All tests within a class\n./gradlew test --tests *BdslAffectionUnitTest -PwithTests\n# Only a specific test method\n./gradlew test --tests *testSignatureMatchOnAssignment_01 -PwithTests\n```\n\nTest report is written to `org.bigraphs.dsl.tests/build/reports/tests/test/index.html`.\n\n#### Install Grammar to Local Maven Repository\n\nIf 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/`).\nThen it can be conveniently used by other Java projects.\n\nRun the following command:\n```shell\n./gradlew publishToMavenLocal\n./gradlew :org.bigraphs.dsl:publishToMavenLocal\n./gradlew :org.bigraphs.dsl.ide:publishToMavenLocal\n```\n\nThis publishes only the `bdsl-grammar` module containing the BDSL.\n\n### Deployment\n\n- see [The Central Repository Documentation](https://central.sonatype.org/publish/publish-guide/#deployment)\n- see [gradle-nexus / publish-plugin](https://github.com/gradle-nexus/publish-plugin/) \n\n**Arguments**\n\nEvery of the following gradle commands accept some arguments:\n- The arguments `sonatypeUsername` and `sonatypePassword` are the JIRA account details from [https://issues.sonatype.org/](https://issues.sonatype.org/)\n- `signing.keyId`, `signing.password` and `signing.secretKeyRingFile` must also be configured in `gradle.properties` within the user's home directory.\n  - secret key ring file usually at `~/.gnupg/secring.gpg`\n  - Otherwise, generate it: `gpg --export-secret-keys \u003e ~/.gnupg/secring.gpg`\n  - For the passphrase, use the one when the keys were generated (cf. also ~/.m2/settings.xml)\n- Arguments can be passed in several ways: https://docs.gradle.org/current/userguide/build_environment.html\n\nThe Gradle GPG signing plugin is used to sign the components for the deployment.\nIt relies on the gpg command being installed:\n```shell\nsudo apt install gnupg2\n```\nand the GPG credentials being available e.g. from `gradle.properties` within the user's home directory.\nMore information can be found [here](https://central.sonatype.org/publish/requirements/gpg/).\n\n\n#### SNAPSHOT Deployment\n\nExecute the following goal to deploy the `bdsl-grammar` module to the Central Repository:\n```shell\ngradle publishToSonatype -PsonatypeUsername=username -PsonatypePassword=password\n```\n\n- The `version` element in `build.gradle` of the parent project must contain the classifier `SNAPSHOT`.\n\n#### Release Deployment\n\nExecute the following command to manually release the artifacts placed in the closed staging repository in Nexus UI.\nThe staging repository might be dropped (if needed) or manually released from the Nexus UI.\n\n```shell\ngradle publishToSonatype closeSonatypeStagingRepository\ngradle :org.bigraphs.dsl:publishToSonatype closeSonatypeStagingRepository\n```\n\nCall the following to publish all publications to Sonatype's OSSRH Nexus and subsequently close and release the corresponding staging repository:\n```shell\ngradle publishToSonatype closeAndReleaseSonatypeStagingRepository\n```\n\n\u003e **Note:** This is not recommended!\n\n## Working in Eclipse\n\nThis project is best worked with Eclipse. Import everything into a new Eclipse workspace:\n\n- `org.bigraphs.dsl.parent`\n- `bigraphs.bigraph-ecore-metamodel` (the cloned Git submodule is also contained after following the [Project Setup](#Development) instructions)\n\nYou 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.\n\nYou 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 above.\n\n### Project Structure\n\n- gradle-based Project\n- Language infrastructure for Bigraph DSL (BDSL) based on Xtext is located under `org.bigraphs.dsl` \n- Language Server Protocol Implementation is located under `org.bigraphs.dsl.ide`\n- Test classes are located under `./org.bigraphs.dsl.tests/`\n  - Requires modules `org.bigraphs.dsl` and `org.bigraphs.dsl.ide`\n- **(!)** 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\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigraph-toolkit-suite%2Fbigraphs.bdsl-core-elements","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbigraph-toolkit-suite%2Fbigraphs.bdsl-core-elements","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigraph-toolkit-suite%2Fbigraphs.bdsl-core-elements/lists"}