You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.
Yes, this topic is open for discussion. Please add you opinion to this issue!
This question already came up for mvdXML 1.1, but we then decided to keep the string-based solution because of compatibility reasons and to add a grammar to support rule-parsing. I am not sure how far we can go with this solution. So, please comment on this issue and describe your prefered solution (maybe as an implementer or an mvdXML developer).
This approach would be extensible and correspond directly to virtual machines (e.g. Java runtime, .NET runtime) executing op codes, where the "operator" corresponds to a specific op code and stack behavior (i.e. types of values pushed or popped from stack). The "operand" would depend on the particular operation.
List of operators (could be expanded later):
and -- pops two values, pushes true if either is true
or
xor
equals -- pops two values, pushes true if equal
notequals
greaterthan
lessthan
greaterthanorequal
lessthanorequal
loadfield -- pushes a value by reference (identifies a particular EntityRule by ID)
loadlen -- pushes length of array/collection
loadstring -- pushes a string constant
loadinteger -- pushes an integer constant
loadnull -- pushes NULL onto the stack
isinst -- checks if object is an instance of type
This structure is now used internally with IfcDoc, where it makes it easy to compile this into executable functions and transform it into different representations (e.g. EXPRESS, C#, Excel formula notation).
We could keep the existing string-based solution which could be used as backup/informational for easily viewing and retaining compatibility.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
use something else than strings for rules
The text was updated successfully, but these errors were encountered: