Conversation
…inherited association resolution
…gs were changed to English.
…eneration step scripts.
|
Hi @uvamarcelo1977, @pponzio thanks for the contribution. Semantic checking is something we've wanted in BESSER for a while, and the design is genuinely nice: the Alloy translation, the streaming progress over increasing scopes, and generating a consistent object diagram back into the editor. I also appreciated that the object-diagram conversion is AST-based and that the translation tests run without Java. I did a first pass focused on the structural side before we go into the detailed backend/frontend reviews. A few things we need to sort out first, and some of them involve other repos, so bear with me: Please rebase on current development. The diff currently deletes the On the OCL grammar. Removing One thing that's easy to miss: the editor evaluates OCL constraints through the B-OCL interpreter, which is a separate package ( On the alloy.jar. Could you remove the 19 MB jar out of the repo? It stays in the git history forever, and it never reaches users anyway our packaging only ships On Java in production. I saw JRE support was added to the Docker setup and then reverted. As the PR stands, the deployed editor image has no A few smaller things you can fold into the same pass:
Once the rebase and the grammar alignment with #585 are done, we'll do the full review on both sides. Thank you very much !! |
|
Hello @ArmenSl, First, we would like to thank you for your in-depth and insightful review. We are currently working on a new pull request based on your suggestions. Regarding OCL, we will roll back our changes and start again from the current development branch and follow your suggestions. Regarding Java and the alloy.jar, we are waiting for Renzo to come back from vacation to discuss with him what's the best way to add these tools. And of course we are rolling back the changes we involuntarily made to existing generators (sorry for that). Finally, we are doing a refactor to remove some duplicated code (and some old code that is not used anymore), and to improve the APIs of our classes (mostly to facilitate the generation of B-UML object diagrams using Alloy). This is the part that is taking longer, but we believe we will be sending a new pull request with all these improvements early next week. Best regards, |
|
Closing this one in favour of #614, which is the new version you opened with the changes from the review above. We'll continue the review there. Thanks again @pponzio @uvamarcelo1977! |
What
An implementation of SAT-based semantic checking for BUML class diagrams with OCL constraints, as well as automated generation of logically consistent object diagrams. The semantic check of class diagrams and OCL constraints is based on a characterization of these modeling elements into the Alloy formal notation, and the use of SAT solving (via Alloy Analyzer) for consistency checking. Alloy Analyzer is used to produce semantically compliant instances, which are translated back into BESSER as object diagrams.
We added documentation in the following files briefly explaining the new features:
Depends on: Merging the frontend’s pull request uvamarcelo1977/BESSER-Web-Modeling-Editor/erator-integration#183.
We updated the frontend submodule pointer accordingly.
Why
This is a new feature of BESSER. Semantic checking goes beyond just checking correct syntax of a model: it allows developers to check for logical consistency of model constraints, and thus to identify overlooked contradictions and inconsistencies in constraints. Moreover, this implementation is able to produce object diagrams that are not only syntactically consistent with a class diagram, but also semantically consistent with cardinality constraints and OCL constraints present in the model.
How
The implementation involves some minor fixes and additions to BESSER, as well as two major new functionalities:
The minor fixes and additions are, basically, syntactic support for OCL operators that were not supported in BESSER (e.g., IsKindOf, Includes, etc).
Testing
Further Unit tests were added/updated, specifically targeting the new functionality:
Manual checks were also performed on newly devised BESSER case studies, that incorporate complex OCL constraints:
Screenshots / Recordings
Follow-ups / Known limitations