Skip to content

special handling for ^<att> #50

@garfieldnate

Description

@garfieldnate

This production will never validate against any datamap:

sp {foo
   (state <s> ^name <name>)
-->
   (<s> ^<name> name)
}

The problem is the creation of the dynamically-named attribute ^<name> in the RHS. DM validation would have to be made more advanced to do any real checking here:

  • enumerate the possible values for
  • iterate over those values and check each against the DM

This could get very expensive for dynamic attributes that have deep sub-structures that possibly contain more dynamic attributes.

For now, I would like to just update the DM feedback for this case:

could not match constraint (<s>,<name>,name) in production

This is the same exact message that's used for any other validation error. This error should be more of a warning saying that V-S is not able to validate the attribute, rather than an error that the attribute is invalid.

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