Skip to content

A quick experiment shows the following error from the schema scanner: #468

Closed

Description

@TRThurman

@TRThurman A quick experiment shows the following error from the schema scanner:

mim_lf.exp:34148:
  --ERROR PE056: Query expression source must be an aggregate.

That's this block:

ENTITY styled_item
  SUBTYPE OF (representation_item);
  styles : SET [0 : ?] OF presentation_style_assignment;
  item   : styled_item_target;
WHERE
  WR1: (SIZEOF(styles) = 0) AND
       ('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF.STYLED_TESSELLATED_ITEM_WITH_COLOURS' IN TYPEOF(SELF)) OR
       (SIZEOF(styles) = 1) OR
       (SIZEOF(styles) > 1) AND
       (SIZEOF(QUERY(pres_style
                     <* styles
                     | NOT ('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF.PRESENTATION_STYLE_BY_CONTEXT' IN
                            TYPEOF(pres_style)))) =
        0);
  WR2: NOT ('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF.STYLED_ITEM' IN TYPEOF(item));
  WR3: ('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF.MAPPED_ITEM' IN TYPEOF(item)) OR
       ('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF.GEOMETRIC_REPRESENTATION_ITEM' IN TYPEOF(item)) OR
       (('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF.SET_REPRESENTATION_ITEM' IN TYPEOF(item)) AND
        (SIZEOF(QUERY(it
                      <* item
                      | NOT (('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF.MAPPED_ITEM' IN TYPEOF(it)) OR
                             ('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF.GEOMETRIC_REPRESENTATION_ITEM' IN
                              TYPEOF(it))))) =
         0));
END_ENTITY;

The short answer is no, stepcode apparently can't handle it at the moment. I'm not quite sure what it would take to support it - it could be fairly non-trivial, judging by a quick round with Copilot.

Originally posted by @starseeker in #466 (comment)

Activity

  1. changed the title [-]@TRThurman A quick experiment shows the following error from the schema scanner:[/-] [+]A quick experiment shows the following error from the schema scanner:[/+] on Feb 6, 2026
  2. TRThurman commented on Feb 6, 2026

    @TRThurman
    MemberAuthor

    @starseeker, Claude reviewed the approach taken by sourceforge lisp project Express Engine for the xref option (build cross-reference data set from a p21 file).
    Then reviewed the C++ code in express compiler in this repo.
    Results are attached.
    No guarantees. As usual, the LLM results are 'plausible'.

    xref-aggregate-types-report.md
    proposal-fix-PE056-aggregate-type-resolution.md

  3. starseeker commented on Feb 9, 2026

    @starseeker
    Member

    @TRThurman I went a couple rounds with it - results so far are in the treat branch at https://github.com/starseeker/stepcode/tree/treat

    The system I was working with seems to think that block from the ap242 exp isn't properly standards compliant, so in addition to the aggregate type resolution piece from Claude we ended up with both adding TREAT support and an extension that can handle the existing ISO ap242 file as-is. The treat branch can at least process the new file, although whether it's actually generating C++ that can do what is needed for that particular bit of logic is more than I can say as yet.

  4. TRThurman commented on Feb 9, 2026

    @TRThurman
    MemberAuthor

    @starseeker That structure should never have been allowed into the standard but it has been vetted by the EXPRESS language experts who allowed it. So we are stuck with it.

  5. linked a pull request that will close this issueSupport new version of AP242 STEP schema #470on Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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