Skip to content

Type choice semantics for targets and controllers #2

@anweiss

Description

@anweiss

For some control operators, there are implied semantics on targets and controllers. For example, with .cat, both the target and controller MUST be strings. However, in the event that the target and/or controller are parenthesized types with multiple type choices between strings or bareword identifiers that resolve to type choices between strings, it isn't clear whether a validation implementation should attempt to concatenate each of the type choices, or if type choices should be disallowed altogether when used with control operators.

So for example, should:

a = ( "foo" / "foo " ) .cat b
b = "bar" / "baz"

be valid against any of the JSON strings"foobar", "foobaz", "foo bar" and "foo baz"? Or should this use of a type choice with a control operator be disallowed altogether due to potential overcomplexity on the part of the CDDL author?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions