OCL 2.5 RTF Avatar
  1. OMG Issue

OCL25 — Missing specification of equality operators for PrimitiveTypes

  • Key: OCL25-227
  • Status: open  
  • Source: N/A ( Robert Hairgrove)
  • Summary:

    In section 11.5 "Operations and Well-formedness Rules" for the five standard PrimitiveTypes Boolean, Integer, Real, String, and UnlimitedNatural, we have specifications for logical comparison operators <, >, <=, >= but no specification for the equality operator.

    It seems to me that if these operators must be explicitly implemented by tools, they must also implement a method for equality which should be specified. In C++, this is of course necessary. The operation String::equalsIgnoreCase(), for example, depends on it directly:

    "Queries whether s and self are equivalent under case-insensitive collation.
    post: result = (self.toUpperCase() = s.toUpperCase())"

  • Reported: OCL 2.4 — Sat, 29 Jun 2024 13:57 GMT
  • Updated: Mon, 1 Jul 2024 15:50 GMT