Skip to content

IDS import (staging) and a false-absence fix in the IFC adapter - #13

Closed
GeneralPawz wants to merge 3 commits into
mainfrom
feat/ids-import
Closed

GeneralPawz wants to merge 3 commits into
mainfrom
feat/ids-import

Conversation

@GeneralPawz

@GeneralPawz GeneralPawz commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Two commits:

fix(ifc): do not prove absence over quantity and predefined sets

ifc-properties::exact_property reads IfcPropertySet members only. The adapter turned its "absent" into complete absence evidence, so a rule requiring quantity Foo in IfcElementQuantity Foo_Bar reported a wall as missing it. The adapter now builds a per-session index of the definitions upstream skips (quantity sets, predefined property sets) and their member names. It refuses an absence that one of them could hold as incomplete. The index is model-wide, so it can only turn an absence into not evaluated. Tests: crates/sources/semantic/ifc/tests/unread_definitions.rs (IFC4 and IFC2X3); all four failed before the fix.

feat(staging): axioval-ids

Translates IDS 1.0 (via the openbim-ids reader, openbimrs/ids#5, taken from its feat/ids-reader branch) into a DefinitionPackage + RuleSetPackage. A facet becomes a rule only when an existing capability decides it exactly as IDS does. Anything else is a Gap with a part and a reason. An untranslatable applicability facet skips the whole specification.

  • Unit + end-to-end tests: 12, including runs through the real IFC adapter.
  • Corpus harness (IDS_TEST_CASES=… cargo test -- --ignored corpus): 0 contradictions over the 334 buildingSMART cases.
  • The corpus is CC BY-ND 4.0, so it is not vendored.
  • Mutation-checked: 6 load-bearing rules.

Coverage on the 12 buildingSMART example files

38 specifications: 0 complete, 24 skipped, 3 rules. Ranked gaps:

Gap Facets Unblocked by
dataType on property facets 123 Carrying ExactProperty.value_type into IR evidence (upstream already exposes it)
attribute facets 34 An attribute capability
IFC4X3_ADD2 33 Upstream
existence (minOccurs ≥ 1) 22 A report outcome that is not about one object
restrictions (pattern/bounds) 11 A value-constraint capability
predefinedType / material / partOf / classification requirement 24 Capabilities; classification and partOf services already exist

Also found, not changed here

37 of 334 corpus models are refused by import_ifc_session. Their files contain no IfcObject, e.g. only IfcTaskTime, or only IFCPROJECT, which in IFC4 is an IfcContext rather than an IfcObject. The refusal says "snapshot source is not present in the project", which is misleading. Whether a source may be empty, and whether IfcContext should be an object, are contract decisions.

GeneralPawz and others added 3 commits September 26, 2026 12:23
ifc-properties resolves IfcPropertySet members only and skips every other
IfcPropertySetDefinition, but the property service turned its "absent"
into complete absence evidence. A rule requiring quantity `Foo` in
IfcElementQuantity `Foo_Bar` reported a wall as missing it.

A per-session index now records the names of skipped definitions and of
their members (quantities, nested quantities, predefined-set attributes).
An absence one of them could hold is refused as incomplete. The index is
model-wide, so it only ever turns an absence into not evaluated.

Found by running translated buildingSMART IDS test cases through the
adapter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MNzJbWbSLjhFXQKs3LhUm
axioval-ids reads IDS 1.0 through the openbim-ids reader and writes a
definition package and a ruleset. A facet becomes a rule only when an
existing capability decides it as IDS does; everything else is a Gap
naming the part and the reason. An untranslatable applicability facet
leaves its specification without rules, since dropping it would widen the
checked population; untranslatable requirements are dropped one by one.

Today that is entity applicability (literal or enumeration, subclasses
excluded) with value-less, untyped property presence. On the buildingSMART
examples 0 of 38 specifications translate completely; the ranked gaps are
dataType checks, attribute facets, IFC4X3 and existence.

The corpus harness runs the translation through the IFC adapter against
the 334 buildingSMART cases: no translated rule fails a pass case, and
every unflagged fail case is explained by a gap. A probe without dataType
checks found the quantity-absence defect fixed in the previous commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MNzJbWbSLjhFXQKs3LhUm
@GeneralPawz

Copy link
Copy Markdown
Contributor Author

Superseded by #14: the same commits rebased onto main after the BCF graduation (this branch conflicted, and I don't force-push). The stale feat/ids-import branch can be deleted.

@GeneralPawz
GeneralPawz deleted the feat/ids-import branch September 26, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant