Accord-Project / aec3po

AEC3PO: Architecture, Engineering, Construction Compliance Checking and Permitting Ontology
https://w3id.org/lbd/aec3po/
2 stars 1 forks source link

New Proposal for ACCORD Check Methods #61

Closed beachtom closed 1 year ago

beachtom commented 1 year ago

@EdliraK @AmnaKRDB

I am looking at ways to formalize the expression language in the ontology

My suggestion is thus:

Add the following properties to the ACCORDCheckMethod class hasTarget -> a string OR a link to a fno:Execution in case it is a function - I guess this actually could link to feature of interest - because what is here will either be the name of an object, the name of property or a function - should be functional property hasOperator -> a string - but ideally we should set a list of possible values (will give some below) - should be functional property hasValue -> a string/number/bool - should be functional property hasUnit -> a string or a link to a representation of a unit in a unit ontology - should be functional property nests -> another ACCORDCheckMethod

The operators are:

==
!=
>
<
>=
<=
exists
not exists
forall
Gonsco commented 1 year ago

I think we may need these properties and probably some more that completes the articulation of the definition of expressions in the BCRL grammar. I am carrying out an experiment with an example to try to identify these needs in a complex formula (in the BCRL repo).

Also, regarding the explicit definition of the values, can it be convenient to accompany them with the corresponding XSD data type? Having to infer it through the type of unit or measurement may involve a computational cost when processing the expression.

PS: Why ACCORDCheckMethod and not BCRLCheckMethod?

beachtom commented 1 year ago

@EdliraK do you have an ETA on this - in the next week or so it will block my progress

EdliraK commented 1 year ago

Amna is working on it. Will ask you few questions on Monday and will have it done max on Tuesday.

AmnaKRDB commented 1 year ago

@EdliraK do you have an ETA on this - in the next week or so it will block my progress

@beachtom cold yo please check the following https://github.com/Accord-Project/aec3po/blob/4366eadc716606a1aa808ded100f188cb1268697/src/check_method.ttl#L98C1-L133C1.

the nests property is not clear. Do you mean An ACCORDCheckMethod may have another nested ACCORDCheckMethod?

beachtom commented 1 year ago

Hi - this looks good.

Yes a nest be able to nest other ACCORDCheckMethods

AmnaKRDB commented 1 year ago

Yes a nest be able to nest other ACCORDCheckMethods

@beachtom please check this https://github.com/Accord-Project/aec3po/blob/87aea42110c36d47a5c5d1caecc454b710a19aba/src/check_method.ttl#L134C1-L139C47

beachtom commented 1 year ago

This looks fine - where can I find/ammend the list of operators?

AmnaKRDB commented 1 year ago

we used to have the list of operators in the core ontology (aec3po). Now, given the new modularisation, it seems to be removed. @maximelefrancois86 @EdliraK where do you propose to put the class ComparisonOperator/Operator? It can be related to different modules such as _feature_of_interest, check_method, statement, rasestatement, etc.

maximelefrancois86 commented 1 year ago

Provided their need is documented, I believe they would best be defined in some dedicated vocabulary file _check_methodcomparators or something

maximelefrancois86 commented 1 year ago

I still don't know what some of these comparators are intended to be used for. The easy ones are to compare some property value with another property value. What is expected as the left and right hand side of exists and not exists ? And forall ?

beachtom commented 1 year ago

so these link a property that may return a list of objects to another set of logical operations - i.e.

all doors in a room must be green.

doors forall (color==green)

AmnaKRDB commented 1 year ago

A vocabulary file _check_methodcomparators has been created containing the list of comparators; the method hasOperator has been renamedhasComparator and moved to it.
https://github.com/Accord-Project/aec3po/blob/main/src/vocabularies/check_method_comparators.ttl

Gonsco commented 1 year ago

I understand that these operators are exclusively for BCRL language expressions, right? (for example, I guess that we will not include the operators for the other rule languages or this could become a neverending story, right?) If so, I think this should be clearer, at least in the definition of the module names. I still think that we should provide all the semantics (with all the terms) necessary to define these expressions sin we are providing a Semantic Web solution/definition/approach. Is this issue being discussed?

beachtom commented 1 year ago

Quite relaxed about the name.

Yes it should make the entire content of the expression formally defined - but I need to experiment with this.

beachtom commented 1 year ago

@AmnaKRDB one last final change. Turns out I don't need the nests propery - can you remove it

AmnaKRDB commented 1 year ago

Hi @beachtom, it is removed.