开发者

Can UML with OCL be used for formal specifications?

开发者 https://www.devze.com 2022-12-30 03:40 出处:网络
I am asking because UML is used for informal specifications and has some ambiguities in its semantics. However OCL can be used to specify pre/post conditions and invariants and other constraints quite

I am asking because UML is used for informal specifications and has some ambiguities in its semantics. However OCL can be used to specify pre/post conditions and invariants and other constraints quite efficiently I think.

I encountered the Z notation and algebraic specifications recently. My question, is combination of UML and OCL sufficient for formal s开发者_开发技巧pecifications?


Yes, for most of the systems you can build.

I mean, UML and OCL are only semi-formal languages (their syntax is well-defined but their semantics is only partially formalized, many aspects are just described in natural language in the standard document specifications). Therefore, if you are building a critical system and you need to prove the correctness of the system then UML/OCL may fall short but for many other kinds of systems, the kind of formality that UML/OCL can provide is good enough

0

精彩评论

暂无评论...
验证码 换一张
取 消