Is anyone aware of a project that provides simplified declaration of constraint checking?

For example:

  structures:
    struct a { strz b, strz c, int d, str[d] e }
  
  constraints:
    len(b) > len(c)
    d > 6
    d <= 10
    e ~ /^ABC\d+/