Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下两个 OCL 语句对于某些函数上下文是否等效?
post: if a > 0 then b < c
post: b < c implies a > 0
不。
在 OCL 中,构造是if... then... else...endif所以您的第一个示例只能“等同于”不同的语法错误。
if
then
else
endif
逻辑操作可以使用if构造重写,但需要非常小心以确保具有空或无效输入的可能性不会if使必须为 2 值的条件项崩溃Boolean。
Boolean