Skip to content

IDS conformance: status against buildingSMART's implementer test cases, and what is left #831

Open

Description

@helenkwok

Summary

I ran all of buildingSMART's IDS implementer test cases (Documentation/ImplementersDocumentation/TestCases, 307 cases that aren't invalid-) through IDSSpecifications on main (8479a7c), and again with the open IDS PRs applied together. This issue is the overview, so the individual issues stay focused. Happy to share the runner (a vitest file) if it would help as a regression suite.

A case agrees when its expected result (pass- / fail-) matches: a fail- case must have at least one applicable item failing, a pass- case none.

Folder Cases main: agree main: throw with the PRs: agree with the PRs: throw
entity 27 20 2 23 0
property 76 51 19 67 0
attribute 45 35 0 35 0
restriction 23 18 0 19 0
ids 11 9 0 9 0
classification 27 17 0 17 0
partof 33 17 0 17 0
material 29 24 0 24 0
tolerance 36 22 0 22 0
total 307 213 21 233 0

"With the PRs" is engine_components #814, #816, #818, #820, #822, #824 and #828 merged together, plus ThatOpen/engine_fragment#324 for the importer. No case that agrees on main stops agreeing.

One caveat: 60 of the agreeing pass- cases agree only because nothing was applicable, including every classification and partof pass- case. So the agreement figure flatters those folders.

Already filed

What is left (74 cases with the PRs applied)

Cause Cases Notes
PartOf facet not implemented 16 #830
Numeric comparison tolerance 14 Reals must be compared with the tolerance in ImplementersDocumentation/tolerance.md (ϵ = 1.0e-6); values are compared exactly. All tolerance disagreements.
Applicability on classes the importer doesn't keep as items 11 IfcSurfaceStyleRefraction, IfcSurfaceStyleRendering, IfcTask, IfcTaskTime, IfcPerson, IfcClassification, IfcPresentationLayerWithStyle, IfcRelConnectsPathElements. 31 cases select nothing for this reason; 11 of them are fail- cases that read as passes. Mostly the attribute and restriction folders.
Classification facet not implemented 10 #830
Unit conversion 6 IDS values are in its nominated standard units; files in millimetres are compared without conversion.
Material facet 5 optional and prohibited cardinality, a constituent set without data, inheritance from the type
IFC2X3 type mapping 4 e.g. an IfcAirTerminal in an IFC2X3 file, which is an IfcFlowTerminal with a type
Specification cardinality 2 minOccurs / maxOccurs on a specification aren't read on load, and export always writes minOccurs="1" maxOccurs="unbounded". A required specification with nothing applicable, and a prohibited one whose applicability matches, should fail.
Material property sets 2 IfcMaterialProperties / IfcExtendedMaterialProperties (the importer's includeMaterialProperties is off by default)
Attribute details 2 an optional attribute that is empty must fail; GlobalId is compared as a string
Several patterns in one restriction 1 two xs:pattern values mean either may match; the importer reads .value from the array and gets undefined
Predefined property sets 1 e.g. IfcDoorLiningProperties

I can file any of these separately, and implement the ones you'd like help with; the tolerance, unit conversion, specification cardinality and multi-pattern items look self-contained.

Activity

  1. havs-mc commented on Nov 6, 2026

    @havs-mc

    We have local fixes for two items on this list and would be glad to open PRs unless you're already on them: (1) IDS values kept as text and compared by the model value's type (reals within the tolerance from tolerance.md, booleans case-insensitive; also stops "01" from being parsed as 1), and (2) the material facet testing every applicable element instead of the first and inheriting the type's material. We also have a performance change that shares one getItemsData fetch between a specification's requirements (on a 15 MB model one specification went from ~100 s to ~8 s). Would you like us to go ahead?

  2. helenkwok commented on Nov 7, 2026

    @helenkwok
    ContributorAuthor

    Thank you @havs-mc, yes please, both are welcome: they are the 14 numeric-tolerance cases and the 5 material-facet cases in the table above, and I am not working on either.

    For the tolerance change, the cases to check against are the tolerance folder of the buildingSMART implementer test cases (Documentation/ImplementersDocumentation/TestCases), where all 36 are expected to agree, and tolerance.md for the rule itself. Keeping values as text and comparing them by the model value's type also covers the "01" case.

    For the material facet, two things to know before you start. #822 (open) changes evalRequirement to take a cardinality argument for the property facet, so a material change that touches optional or prohibited cardinality will likely meet it. The material cases that remain are: optional and prohibited cardinality, a constituent set without data, and inheritance from the type.

    The getItemsData sharing change reads like a separate PR, and the measurement on a 15 MB model is a good reason to send it on its own.

    The maintainers decide what lands, so a quick word from them on scope first may save you a round. Of the rest of the table, I plan to look at unit conversion, specification minOccurs / maxOccurs and several patterns in one restriction; tell me if you are already on any of those.

  3. havs-mc commented on Nov 7, 2026

    @havs-mc

    Thanks, that's very helpful. I've run the implementer test cases against both branches:

    • Values as text + tolerance: tolerance 36/36 (22 on main). The cases put values exactly on v ± (|v|·ε + ε) and expect them to pass, so the bounds are inclusive with a tiny margin for double rounding. Booleans follow xs:boolean (true/1, false/0) rather than being case-insensitive as I wrote above, since upper case is an invalid- case.
    • Material: 26/29 (24 on main). Fixed: inheritance from the type, and the constituent set without data. To make that one fail without breaking the others, the value is now matched against every name the material facet allows (set, layer, profile and constituent names and categories). Before, those pass- cases agreed only because no check was recorded. I've left optional and prohibited cardinality for after fix(ids): apply optional and prohibited cardinality to the property facet as a whole #822.
    • Across all 307 non-invalid- cases, neither branch makes a case stop agreeing.

    I'm not on unit conversion, specification cardinality or multiple patterns, so no overlap there. I'll open the three PRs (values/tolerance, material, and the getItemsData sharing on its own) unless a maintainer would like the scope split differently. @agviegas, does that work for you?

  4. helenkwok commented on Nov 8, 2026

    @helenkwok
    ContributorAuthor

    Thank you @havs-mc, and for running both branches against the cases.

    You are right about booleans, and my wording was wrong: I wrote case-insensitive, but IDS follows xs:boolean (true / 1, false / 0) and the upper-case variant is an invalid- case, so please keep what your branch does.

    The split into three PRs sounds good to me. #822 is rebased on current main and mergeable, if you want to build the material cardinality on it.

  5. havs-mc commented on Nov 19, 2026

    @havs-mc

    A note on overlap: I missed #856 when I opened #864 and #865, sorry. #856 already covers what those two do (IDS values kept as text with numeric tolerance, and material inheritance), and it also covers the material cardinality cases #865 leaves for after #822.

    Please merge whichever version you prefer. If #856 is the way forward, I'm happy to close #864 and #865, or to cut them down to anything #856 doesn't cover.

    #866 (one getItemsData fetch per specification run, and not following a type back to its other instances in the property facet) isn't covered by #856, so it stands on its own either way. It does conflict textually with #856 in Specification.ts and the attribute, entity and property facets; I'll rebase it onto whichever lands first.

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