================================================================================
Resolution function
================================================================================
assert new resolved ut;
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (resolution_function
            (simple_name))
          (type_mark
            (simple_name)))))))

================================================================================
Record resolution I
================================================================================
assert new (elem resolved) ut;
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (record_resolution
            (record_element_resolution
              element: (simple_name)
              (resolution_function
                (simple_name))))
          (type_mark
            (simple_name)))))))

================================================================================
Record resolution II
================================================================================
assert new (elem1 resolved, elem2 resolved) ut;
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (record_resolution
            (record_element_resolution
              element: (simple_name)
              (resolution_function
                (simple_name)))
            (record_element_resolution
              element: (simple_name)
              (resolution_function
                (simple_name))))
          (type_mark
            (simple_name)))))))

================================================================================
Parenthesized resolution - Resolution function
================================================================================
assert new (resolved) ut;
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (parenthesized_resolution
            (resolution_function
              (simple_name)))
          (type_mark
            (simple_name)))))))

================================================================================
Parenthesized record resolution
================================================================================
assert new ((elem resolved)) ut;
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (parenthesized_resolution
            (record_resolution
              (record_element_resolution
                element: (simple_name)
                (resolution_function
                  (simple_name)))))
          (type_mark
            (simple_name)))))))

================================================================================
Range constraint I
================================================================================
assert new range_t range l to h;
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (type_mark
            (simple_name))
          (range_constraint
            (ascending_range
              low: (simple_expression
                (simple_name))
              high: (simple_expression
                (simple_name)))))))))

================================================================================
Range constraint II
================================================================================
assert new range_t range st'range;
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (type_mark
            (simple_name))
          (range_constraint
            (attribute_name
              prefix: (simple_name)
              designator: (predefined_designator))))))))

================================================================================
Array constraint - Open
================================================================================
assert new arr_t (open);
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (type_mark
            (simple_name))
          (array_constraint
            (index_constraint
              (open))))))))

================================================================================
Array constraint - Discrete Range
================================================================================
assert new arr_t (h downto l);
assert new arr_t (l     to h);
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (type_mark
            (simple_name))
          (array_constraint
            (index_constraint
              (descending_range
                high: (simple_expression
                  (simple_name))
                low: (simple_expression
                  (simple_name)))))))))
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (type_mark
            (simple_name))
          (array_constraint
            (index_constraint
              (ascending_range
                low: (simple_expression
                  (simple_name))
                high: (simple_expression
                  (simple_name))))))))))

================================================================================
Record constraint - Array constraint I
================================================================================
assert new rec_t (elem1 (open));
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (type_mark
            (simple_name))
          (record_constraint
            (record_element_constraint
              element: (simple_name)
              (array_constraint
                (index_constraint
                  (open))))))))))

================================================================================
Record constraint - Array constraint II
================================================================================
assert new rec_t (elem1 (h downto l),
                  elem2 (l     to h));
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (type_mark
            (simple_name))
          (record_constraint
            (record_element_constraint
              element: (simple_name)
              (array_constraint
                (index_constraint
                  (descending_range
                    high: (simple_expression
                      (simple_name))
                    low: (simple_expression
                      (simple_name))))))
            (record_element_constraint
              element: (simple_name)
              (array_constraint
                (index_constraint
                  (ascending_range
                    low: (simple_expression
                      (simple_name))
                    high: (simple_expression
                      (simple_name))))))))))))

================================================================================
Record constraint - Record constraint
================================================================================
assert new rec_t (elem1 (elem2 (open)));
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (type_mark
            (simple_name))
          (record_constraint
            (record_element_constraint
              element: (simple_name)
              (record_constraint
                (record_element_constraint
                  element: (simple_name)
                  (array_constraint
                    (index_constraint
                      (open))))))))))))

================================================================================
Array element constraint - Array constraint
================================================================================
assert new arr_t (open)(open);
assert new arr_t (open)(open)(open);
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (type_mark
            (simple_name))
          (array_constraint
            (index_constraint
              (open))
            (array_element_constraint
              (index_constraint
                (open))))))))
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (type_mark
            (simple_name))
          (array_constraint
            (index_constraint
              (open))
            (array_element_constraint
              (index_constraint
                (open))
              (array_element_constraint
                (index_constraint
                  (open))))))))))

================================================================================
Array element constraint - Record constraint
================================================================================
assert new arr_t (open)(elem (open));
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (type_mark
            (simple_name))
          (array_constraint
            (index_constraint
              (open))
            (array_element_constraint
              (record_element_constraint
                element: (simple_name)
                (array_constraint
                  (index_constraint
                    (open)))))))))))

================================================================================
Record element constraint - Array constraint
================================================================================
assert new arr_t (elem (open));
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (type_mark
            (simple_name))
          (record_constraint
            (record_element_constraint
              element: (simple_name)
              (array_constraint
                (index_constraint
                  (open))))))))))

================================================================================
Record element constraint - Record constraint
================================================================================
assert new arr_t (elem (elem (open)));
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (type_mark
            (simple_name))
          (record_constraint
            (record_element_constraint
              element: (simple_name)
              (record_constraint
                (record_element_constraint
                  element: (simple_name)
                  (array_constraint
                    (index_constraint
                      (open))))))))))))

================================================================================
Array subtype indication
================================================================================
assert new resolved ut(h downto l);
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (resolution_function
            (simple_name))
          (type_mark
            (simple_name))
          (array_constraint
            (index_constraint
              (descending_range
                high: (simple_expression
                  (simple_name))
                low: (simple_expression
                  (simple_name))))))))))

================================================================================
Record subtype indication
================================================================================
assert new (elem1 resolved, elem2 resolved) ut (elem1 (h downto l),
                                                elem2 (l     to h));
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (record_resolution
            (record_element_resolution
              element: (simple_name)
              (resolution_function
                (simple_name)))
            (record_element_resolution
              element: (simple_name)
              (resolution_function
                (simple_name))))
          (type_mark
            (simple_name))
          (record_constraint
            (record_element_constraint
              element: (simple_name)
              (array_constraint
                (index_constraint
                  (descending_range
                    high: (simple_expression
                      (simple_name))
                    low: (simple_expression
                      (simple_name))))))
            (record_element_constraint
              element: (simple_name)
              (array_constraint
                (index_constraint
                  (ascending_range
                    low: (simple_expression
                      (simple_name))
                    high: (simple_expression
                      (simple_name))))))))))))

================================================================================
Array of records subtype indication
================================================================================
assert new ((elem1 resolved)) ut(h downto l)(elem1 (h downto 0));
--------------------------------------------------------------------------------

(design_file
  (assertion_statement
    (conditional_expression
      (allocator
        (subtype_indication
          (parenthesized_resolution
            (record_resolution
              (record_element_resolution
                element: (simple_name)
                (resolution_function
                  (simple_name)))))
          (type_mark
            (simple_name))
          (array_constraint
            (index_constraint
              (descending_range
                high: (simple_expression
                  (simple_name))
                low: (simple_expression
                  (simple_name))))
            (array_element_constraint
              (record_element_constraint
                element: (simple_name)
                (array_constraint
                  (index_constraint
                    (descending_range
                      high: (simple_expression
                        (simple_name))
                      low: (simple_expression
                        (integer_decimal)))))))))))))
