https://github.com/beenotung/ocl-parser
https://github.com/beenotung/ocl-parser
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/beenotung/ocl-parser
- Owner: beenotung
- Created: 2018-04-04T03:03:47.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-04T03:04:26.000Z (over 7 years ago)
- Last Synced: 2025-01-01T05:42:15.636Z (9 months ago)
- Language: TypeScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
reference: https://st.inf.tu-dresden.de/files/general/OCLByExampleLecture.pdf
== Invariant
context
inv []:== Pre-Condition
context :: ()
pre [:== Post-Condition
context :: ()
post [:with `result` and `@pre`
`^` specify the communication has taken place
Example:
```
context Subject::hasChanged()
post: observer^update(2,4)
```== OCL Expression
. Boolean expressions
. Standard library of primitive types and operations
i) Basic Types
1. Boolean
2. Integer
3. Real
4. String
ii) Collection Types
1. Collection
2. Set
3. Ordered Set
4. Bag
5. Sequence
. User Defined Types (OCLType)
i) Class Type (Model Type)
1. Attributes (start)
2. Operations (duration())
3. Class attributes (Date::today)
4. Class Operations
5. Association ends (,,navigation expression'')
ii) Enum Type (Gender, Gender::male)