IDS import: dataType and value checks; IFC value types; quantity-absence fix - #16
Merged
Merged
Conversation
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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MNzJbWbSLjhFXQKs3LhUm
`Property::data_type` carries the value's type as the source declares it. The IFC session reports it from `ExactProperty::value_type`, upper case whatever case the file used. Unreported stays `None` and serializes as before. `axioval:capability.property-data-type` requires a non-empty property whose declared type equals `data_type`. Another type is a finding; a type the source does not report is not evaluated, never taken to match. It is what an IDS property facet with a dataType and no value needs. BREAKING CHANGE: `Property` has a new public field, so struct literals must set it. Claude-Session: https://claude.ai/code/session_019MNzJbWbSLjhFXQKs3LhUm
A required, value-less property facet with a dataType now becomes a property-data-type rule. A dataType on an optional facet stays a gap: it binds only when the property is present, which no capability checks. On the buildingSMART examples the translation now writes 11 rules instead of 3. Most dataType facets also require a value, so value comparison is now the largest gap (75 facets). The corpus harness still finds no contradiction with dataType checks live, so the relaxed probe that dropped them is removed. Claude-Session: https://claude.ai/code/session_019MNzJbWbSLjhFXQKs3LhUm
`axioval:capability.property-value` checks a resolved value against lexical constraints cast to its kind: `values`, XML Schema `patterns` (whole-value, translated exactly or refused), numeric bounds and lengths, optionally a declared `data_type`, and an `optional` mode in which absent and null properties pass. Decimals are equal within the IDS tolerance, boundaries included as the buildingSMART cases require, plus a few ulps for decimal boundaries that are not binary doubles. Bounds compare exactly. A literal or constraint that does not fit the value is not evaluated, never a pass or a violation; quantities wait for units. The IFC session now carries every value whose defined type's base maps without loss (STRING, INTEGER, NUMBER, BOOLEAN; IfcReal), so IfcDate, IfcDuration, IfcTimeStamp and IfcCountMeasure resolve with their declared type instead of being refused. Unit-bearing real measures stay refused. Claude-Session: https://claude.ai/code/session_019MNzJbWbSLjhFXQKs3LhUm
A property facet with a value becomes a property-value rule: a simple value is a one-element `values`, and a restriction's enumeration, patterns, bounds and lengths map to their parameters. An optional facet sets `optional`, which also covers an optional dataType. totalDigits, fractionDigits and empty restrictions are gaps. The corpus exposed a silent pass: a specification over IFCWALLTYPE translated completely, but an IFC session makes objects only of IfcObject occurrences, so its rules selected nothing. Applicability classes are now checked against each listed release's schema (ifc-schema); a class that is not an IfcObject there, such as a type object or IFC4's IfcProject, or that the release does not define, is a gap that skips the specification. Corpus: 0 contradictions, 30 fail cases caught (was 6). Examples: 28 rules (was 11); remaining gaps are attributes, existence, IFC4X3 and names given as restrictions. Claude-Session: https://claude.ai/code/session_019MNzJbWbSLjhFXQKs3LhUm
GeneralPawz
force-pushed
the
feat/ids-data-type
branch
from
September 26, 2026 14:30
598d9d1 to
9ed670e
Compare
GeneralPawz
marked this pull request as ready for review
September 26, 2026 14:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #14. Carries the IDS work rebased onto
main, plus these commits:Engine
Property::data_type(breaking: new public field): the value's type as the source declares it. The IFC session fills it, upper case.axioval:capability.property-data-type: a required, non-empty property with that declared type.axioval:capability.property-value:values, XML Schemapatterns, numeric bounds and lengths, all written as lexical strings and cast to the resolved value's kind.optionallets absent and null properties pass.IfcDate,IfcDuration,IfcTimeStamp,IfcCountMeasure, …) with its type. Unit-bearing real measures stay refused (ifc-properties: exact effective-unit resolution (current unit API gives wrong SI scales) openbimrs/ifc#53).Translator (
staging/ids)dataTypeand/or values becomeproperty-data-type/property-valuerules. Optional facets useoptional.IFCWALLTYPEsilently passed, because sessions only containIfcObjectoccurrences. Such classes are now gaps.Evidence
property-data-type: 4/4 caught.property-valueand patterns: 8/8 caught../scripts/check.shpasses, including on a local rebase onto currentmain.Coverage on the 12 buildingSMART examples
Merge note
maingained a CLI commit after this branch was cut. The only conflict isCHANGELOG.md, where both sides add entries under Unreleased/Added; keep both.