DMN 1.4 RTF Avatar
  1. OMG Issue

DMN14 — instance of grammar does not support range , or context, or function

  • Key: DMN14-143
  • Status: closed  
  • Source: Montera Pty Ltd ( Greg McCreath)
  • Summary:

    The instance of grammar does not include the range type, so it is not possible to do `[1..10] instance of range<Any>`. Nor does it support either identifying something as simply a context, or simply as a function.

    Please add range<type> to the grammar.

    The grammar does support identifying something as simply a context. The list type can be accommodated by <Any>, such as `foo instance of list<Any>`, but the grammar for context currently requires at least one name and type, so simply checking that something is a context is not supported. That is, `foo instance of context<>` is not possible.

    Please change the context grammar from `'context' '<' name ':' type

    { ',' name ':' type }

    '>' to `'context' '<[' name ':' type

    { ',' name ':' type }

    ']>'` implying that `context<>` means a context with no entries and thus, all contexts conform to it. Though, a more preferable alternative is described below.

    Also, the grammar does not support identifying something as a function, only as a function of a given type - there is no equivalent to `foo instance of function<Any> -> Any`. The statement `foo instance of function<> -> Any` is testing for a function type with no params. This is different to testing purely for a function type.

    A grammar to support the above is simply to support the name of each of the types with no `<>` stuff afterwards. Such that `foo instance of list`, `foo instance of context`, `foo instance of function`, `foo instance of range` are all valid. This would be my preference.

  • Reported: DMN 1.3 — Sun, 21 Feb 2021 01:03 GMT
  • Disposition: Resolved — DMN 1.4
  • Disposition Summary:

    Add range to instance of

    The changes are baselined on DMN 1.3 dtc-19-12-06.pdf.

  • Updated: Thu, 31 Mar 2022 19:30 GMT