I am new to OCL, I am using papyrus on eclipse luna 4.4.2
I have a class diagram named CLIENT with the constraint {all attributes are out of scope} a second class named Customer with the constraint {all attributes are mandatory} and another class call Address having an attribute provenance with the constraint {provenance shall be mandatory}
How should I write the OCL constraint that suit the formal language?
will also like to know how to verify the correctness of the syntax?
相关问题
- SQL - How do I delete two entities referencing eac
- SCIPY - building constraints without listing each
- How to solve this arithmetic expression puzzle in
- How to specify “one at a time” in UML?
- Delete all records that have no foreign key constr
相关文章
- iOS - proportional spacing with autolayout
- Dart, constraints on Generics?
- Fluent NHibernate primary key constraint naming co
- R function to calculate nearest neighbor distance
- UITableView when changing constraint which effects
- SQL constraint to check whether value doesn't
- CGAL - custom 2D point and intersection behavior i
- SQL Server add a column constraint to limit data t
In case of an collection it checks for non-emptiness and otherwise for an attribute it checks for non-null.
context Address inv: self.provenance->notEmpty()
For the other classes you have to do this for every attribute. If you want to do this for every attribute with one invariant you have to formulate them on the metamodel.