Comments (6)
I'd agree it's confusing to have these inconsistencies. Especially when not backed up by some reference test cases. As we're seeing it just creates ambiguity for authors and implementors. I've not been party to the design meetings but I think the changes came out of PR #240 quite recently.
In particular Facet-configuration is new and looks like work in progress and not necessarily consistent with the test cases. I'm coincidentally in a meeting with @CBenghi this afternoon so will get his view
from ids.
I think the test is fine. pass-name_restrictions_will_match_any_result_2_3.ids is essentially saying "All IfcWalls require either the Name or Description attribute to have a value".
The IDS Restrictions docs suggest enumeration restrictions should be read as an 'OR' / OneOf / AnyOf restriction. Not an 'AND' / AllOf.
But you raise an interesting question. If the Attribute Name has a restriction that satisfies multiple Attributes, and the Value is also specified/constrained on the requirement, do all the attributes have to satisfy that value requirement? The text seems to indicate All should. But there's no test I can find to assert this.
e.g. given this IFC
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,$,'Foo','Bar',$,$,$,$);
Should this IDS pass or fail?
<specification name="For all Walls, Name OR Description value must be Bar" ifcVersion="IFC2X3 IFC4">
<applicability maxOccurs="unbounded">
<entity>
<name>
<simpleValue>IFCWALL</simpleValue>
</name>
</entity>
</applicability>
<requirements>
<attribute>
<name>
<xs:restriction base="xs:string">
<xs:enumeration value="Name" />
<xs:enumeration value="Description" />
</xs:restriction>
</name>
<value>
<simpleValue>Bar</simpleValue>
</value>
</attribute>
</requirements>
</specification>
In our implementation this would pass, but I can see some could interpret differently. But if you wanted to test 'For all Walls, Name AND Description value must be Bar' you could specify two Attribute facets
from ids.
What happened when change Name restriction from enumeration to Regex "Name|Description"?
I suppose nothing - formalize the same in other words. Just change restriction kind to extract target attribute(s) from object.
from ids.
Simple value or restriction - for me its just a way to go from IFC file to target property (attribute, classification and etc.)
IFC -> extract entity -> extract attribute -> check attribute. OR logic should be inside 'extract attribute' but in test it moved outside.
from ids.
Don't Restrictions just express different types of 'predicate' in a filter/where clause? i.e. in pseudocode:
simpleValue : Where X Equals(value)
pattern restriction : Where X Matches(regexPattern)
enum restriction : Where X in (enumValues)
bounds restriction : Where X between (minValue and maxValue)
length restriction : Where Length(X) between (minValue and maxValue)
They just codify part of a requirement in more sophisticated ways than a simple equality test.
But I think we're getting away from the original issue. Probably worth restating what you think the problem is? It sounds like facet-configurations.md may need some clarifications/edits?
from ids.
From facet-configuration:
Attribute
NAME: The Attribute should be populated (i.e. not null)
NAME/VALUE: all matching attributes must match the value constraints (excludes null)
- Test fine - i think that NAME text should be changed to "The any of matched attributes ...."
- I try your requirement from comment in blenderbim - it failed. And i agree with that: "All matching attributes" -> we match 2 attributes -> one failed -> fail
My question:
Why logic is different? NAME - Any of matched. NAME/VALUE - All matching
No obvious logic operators - users need to remember hidden logic for some facets (classification - at least one, material - at least one, pset - all (also no info in parameters, just in tests). But different logic inside one facet what depends on parameters... Looks monstrous and hard to remember.
from ids.
Related Issues (20)
- Default branch settings HOT 1
- Data type of IfcLengthMeasure "Real" or "Double"? HOT 1
- List of datatypes with Enum types used by attributes HOT 6
- List of datatypes without IfcCompoundPlaneAngleMeasure HOT 2
- IfcLogical representation in XML base HOT 1
- IMPROVEMENT: functionality to point towards bSDD (data dictionaries) HOT 4
- IDS BIM
- Restriction of values: Enumeration limited to string-based datatype or do we allow for real, integer and measurements HOT 4
- Predefined type evaluation
- userdefuned HOT 6
- Test case naming consistency HOT 2
- 2 testcases have .html file instead of .ifc HOT 2
- Tolerance documentation 1.0.0 HOT 7
- Wrong file name in the entity directory of test cases HOT 1
- Tolerance test issues in 1.0 HOT 5
- Are complex restrictions applicable to all facet parameters? HOT 2
- Test case for indirect containment is incorrect
- Relation between enumerations in Applicability and Requirements HOT 2
- Broken links on dev Readme HOT 1
- Add textual definitions to each IDS element HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ids.