-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interpretation of PROHIBITED for property requirement 🗳️ #206
Comments
Another option:
This has the 'advantage' that you remain able to specify:
but also
I admit the utility of this is limited, just wanted to have the option on the table. Conceptually I think it's better than implicitly ignoring a field. I think an |
What was the reason for making datatype mandatory? I agree that ignoring a statement for PROHIBITED is not a good idea, but adding a reserved keyword ANY would lead to more complexity. Unless there is a good reason for making datatype mandatory, I would be in favour to make the datatype parameter optional. In general I would recommend to provide a formal logic for interpretation of the property facet parameters and the min/maxOccurs. My understanding, which however is not really documented, is: REQUIRED = MUST EXISTS (there should be minOccurs properties where all parameters must evaluate to true) Regarding check of Datatype and Value: Another question: check of Pset and Property names and Value are case sensitive, right? |
If I recall the discussion correctly it was something along the lines of: we know this might be a struggle for some, but in the long term is going to help greatly increase information quality. What is the use of asking to deliver a property if you don't specify its range?
If I recall the discussion correctly they are case sensitive to facilitate downstream applications not having to do case normalization. Ultimately this is also a question for the IFC spec. We have functions like [0], but I find the EXPRESS lang really vague on string equality (and doesn't even mention things like unicode normalization - at least my version). |
Makes sense for user defined properties, but for all IFC Psets/Properties I do not see a need to double check the datatype. Anyhow, we need an agreement for PROHIBITED and both solutions (ANY and optional datatype) are semantically the same. |
That's indeed the question. Previously the idea has been that an IDS implementation should be as light weight as possible. E.g no inheritance, because it needs schema knowledge. You could make the same argument about properties from the spec: make the IDS as self-contained as possible to make it easy to evaluate. Also there is the possibility that you include multiple schemas, but that the schemas have revised definitions for the same property. |
I don't like the idea of adding a datatype I would argue that in the audit tool and in documentation, we enforce the need for datatype when the facet is not prohibited. This would be a schema/documentation/tool change, but we are already changing the schema to be more specific about the capitalization, see #199. |
It seems that we do not trust IFC implementations if we argue that the datatype attribute must be mandatory to ensure data quality. If that is the argument, wouldn't we have to check the property type as well (IfcPropertySingleValue, IfcPropertyBoundedValue etc.)? I am not saying we should do, as it would conflict with making IDS as light weight as possible. |
Long conversation in the call today lead to the following proposal for implementation agreement: We are adding back the OPTIONAL value for the requirement enumeration. The evaluation logic becomes more complex, our implementation will have to become a conditional process depending on the scenarios as follows: REQUIRED
PROHIBITED
OPTIONAL
🗳️ This will have to be evaluated this week by all parties and it is up for vote on the meeting of the 21st of Novermber. 🛠️ We still have to evaluate if the optional cardinality makes sense for other facets. Please consider and make your case. |
Just ahead of your call a couple of questions: 1. Valid/invalid use cases
Why do we say the use case is not valid? While no doubt it's generally easy to restate a requirement in the positive form, why would we limit the expressiveness especially where the user's requirement may be expressed negatively - i.e. any requirement that is SHALL NOT / MUST NOT. Enums are a good example of where it's trickier to negate. (i.e. "I don't want IFCELECTRICAPPLIANCEs that have a PSet_AssetMaintenance.AssetFrailty property of HIGH" - where otherwise I would need to account for all the other Enum options in the positive case.) It sounds like we're proposing authors re-write the requirement as a Prohibited Applicability statement (with presumably no requirement)? Suddenly if I wanted to invert the logic it's not a matter of a switch? 2. UX in IDS authoring tools Presumably we want IDS authors to fall into the 'pit of success', and not create specs that are invalid or supported inconsistently by validators. Would we then need to think about the UX and usability of any authoring tool? If Required/Optional/Prohibited is visually represented in an interface as some kind of tri-state switch/toggle/selection, now it may need to account for which of the property facet values are populated? This table shows valid/invalid permutations:
But we also need to account for the sequencing of data entry may create 'invalid' facets. Eg. Consider this set of steps authoring a Property requirement:
This feels unnecessarily complicated for a user (not to mention to implement)? And the alternative is an error/warning from the audit tool. For me I would just relax PROHIBITED 2 & 3, perhaps throw a warning at audit, and leave it to the validators to implement. Ultimately it's just Boolean logic that we're artificially constraining... 3. Are we being overly-prescriptive about what is a required facet field ... especially on Properties where there's 4+ fields We seem to be coming to the conclusion that DATATYPE and VALUE are optional - in as much as they can be left empty - which makes sense for cases where it's not relevant, or the user doesn't currently know/care. Do we also need to consider PSET being optional? "All doors must have a FireRating (...and I don't care which Pset)". I raised this in #189, but I think it would have a bearing on prohibited facets too. While BSDD and data dictionaries could help here I'm conscious by putting too many barriers on authoring requirements we're making it difficult to express requirements, or encouraging workarounds. As I understood the principles, we aimed to make it simple to author IDS and to leave the complexity with the implementors. |
My thoughts on the validity of optionality on the other facet types ✅ = valid Entities
Optional Entity requirements have no meaning? An Applicable Element is a IFCDOOR or it is not. Attribute
[1a] The Attribute should be populated Optional: The IFC Schema is fixed. Optionality makes no sense? Properties
[2] based on current proposal. My feeling is these should be ✅. e.g. The DATATYPE must not be IFCTEXT, The VALUE must not be HIGH. Classification
Optional = If the applicable element has classifications at least one should match the value/system Material
Optional = If the applicable element has materials at least one should match the value PartOf
Optional = If the element has a matching relationship the target should match the Entity |
The problem with PROHIBITED and PSET/PNAME/DATATYPE/VALUE is, that you most likely do not want to negate the datatype. The discussion was conducted under the aspect of meaningfulness and user expectations. We may need to discuss the option PSET/PNAME/VALUE, but that was the reason to exclude that option. |
In the meeting we discussed the expectation of a user to invert requirements. Let's say you define a property with its datatype and a list of allowed values. What is the expectation of the user when changing from REQUIRED to PROHIBITED? |
I get what you're saying now. DataType is slightly different to the other fields - even in then way we model it in the schema. It's not a full constraint in the way that the other components are - it's just a literal value. I'm thinking it's part of the VALUE in concept (like a hypothetical Unit might be e.g. on a IfcPropertySingleValue). If there's no Value there's no Datatype. So our mental model of the clause should probably be PSET/PNAME/VALUE/DATATYPE (with VALUE and DATATYPE switched). With DataType being subordinate to the Value rather than a distinct concept, negation perhaps makes more sense. (Note the Value can still be optional)
My assumption here is that dataType's value is optional and can be blank. I can see we may want some kind of warning to the user, as negations are always a source of confusion. But feels a mistake to be saying this is not supported. |
With regards to the exclusion of prohibited configurations, we evaluated the following PROHIBITED scenario
We assumed that we needed DATATYPE for parsing the value (e.g. measures), and it must match even in prohibited facets. The following cases emerged:
CONCLUSION: To avoid the possible sources of confusion listed above for version 1.0 we decided to keep the constraints previously proposed. |
As a clarification to the valid configurations for property facet we also state that VALUE without datatype is not valid, and we are now evaluating the behaviour of the possible clash of
The clash could be avoided with our own implementation of |
|
Not sure I understand why we'd require a DATATYPE - even when VALUEs are required. In the majority of the use cases I see the user won't know or care if a (property's text) value is IFCTEXT or IFCLABEL. They just want to check the value is valid. I get there's a engineering view that data types are important, but it's asking a lot for a client to decide if they want their Thermal u-values in IfcThermalTransmittanceMeasure or IfcReal - when both are fundamentally REAL under the covers. And forcing them to make that call is often going to raise, what will be for them, some false negatives. If the main justification for this decision is this statement:
... then I'd challenge that. Surely implementors don't need to know the type of an IfcValue before they can read it to validate? I keep coming back to this point:
Slightly concerned we're making it more difficult than need be to author IDS requirements - in the goal of delivering perfect IFC. There's a whole set of users where 'good enough' is a big improvement over what they currently get. |
Made the datatype optional in the schema presented on 2024-02-02 |
Problem:
PROHIBITED seems to be interpreted as negation, but is missleading from an engineering point of view due to the mandatory datatype settings.
Current interpretation of PROHIBITED:
NOT EXISTS (Pset=="My_Pset" AND Property=="My_Property" AND IfcMeasure=="IFCLABEL")
My expectation as engineer would however be more like this: (if I would like to exclude a property I do not care about the datatype)
NOT EXISTS (Pset=="My_Pset" AND Property=="My_Property")
Proposed solution:
(for OPTIONAL: IF Pset AND Property THEN Datatype AND Value)
P.S.:
REQUIRED (minOccurs=1) is clear, although I would expect maxOccurs=1 instead of unbounded because the required property should be present once, but not more than once, and asking for a number of properties with a pattern does not make sense to me.
The text was updated successfully, but these errors were encountered: