Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to check the validity of a model in a programmatic manner such as Validation > Validate Model does?

Tags:

uml

papyrus

ocl

Is there a way to check the validity of a model in a programmatic manner such as Validation > Validate Model does?

like image 565
KMex Avatar asked Jan 25 '26 09:01

KMex


2 Answers

If you mean a model is valid, iff your self-defined well-formedness rules (WFR) are valid then you can use OCL. Define your constraints in OCL and use something like Dresden OCL to validate those WFRs.

You can use Dresden OCL either on its own integrated into your Eclipse with its views or you use the API of Dresden OCL in your program to verify the validity programmatically.

like image 50
lschuetze Avatar answered Jan 28 '26 22:01

lschuetze


Speaking about the model validation, you must consider two aspects - model syntax and semantic.

Syntax validation is a trivial thing, partially available in some tools. UML has a precisely defined syntax and it can be easily checked automatically.

If the model represents the subject correctly is another problem and can be eventually validated via model execution. There are very few tools that provide very partial implementation of such execution.

In summary - model validation is comparable with source code validation - syntactic part is easy, while semantic is hard to prove.

like image 43
Aleks Avatar answered Jan 28 '26 23:01

Aleks



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!