Commit 5f154b6e authored by Rakshit Mittal's avatar Rakshit Mittal
Browse files

corrected the pattern for modal property value search

parent 7c666d2c
......@@ -68,28 +68,36 @@ pattern findProperty(propinst : PropertyAssociationInstance)
InstanceObject.ownedPropertyAssociation(_,propinst);
}
pattern findModalProperty(modpropinst : ModalPropertyValue)
// Find modal property attached to an object that has declared declarative element
pattern findModalProperty(propinst: PropertyAssociationInstance, modpropinst : ModalPropertyValue)
{
PropertyAssociationInstance.ownedValue(_,modpropinst);
PropertyAssociationInstance.ownedValue(propinst,modpropinst);
PropertyAssociationInstance.propertyAssociation(propinst,_);
}
// Find property value attached to a property instance
pattern findPropertyValue(propinst : PropertyAssociationInstance, modpropinst : ModalPropertyValue, propvalinst : PropertyValue)
{
PropertyAssociationInstance.ownedValue(propinst,modpropinst);
{
find findModalProperty(propinst, modpropinst);
ModalPropertyValue.ownedValue(modpropinst,propvalinst);
} or {
PropertyAssociationInstance.ownedValue(propinst,modpropinst);
find findModalProperty(propinst, modpropinst);
ModalPropertyValue.ownedValue(modpropinst,recvalinst);
RecordValue.ownedFieldValue.ownedValue(recvalinst,propvalinst);
} or {
PropertyAssociationInstance.ownedValue(propinst,modpropinst);
find findModalProperty(propinst, modpropinst);
ModalPropertyValue.ownedValue(modpropinst,listvalinst);
ListValue.ownedListElement(listvalinst,propvalinst);
neg RecordValue(propvalinst);
} or {
PropertyAssociationInstance.ownedValue(propinst,modpropinst);
find findModalProperty(propinst, modpropinst);
ModalPropertyValue.ownedValue(modpropinst,listvalinst);
ListValue.ownedListElement(listvalinst,listrecvalinst);
RecordValue.ownedFieldValue.ownedValue(listrecvalinst,propvalinst);
}
pattern findNullValueProperty(propassoc: PropertyAssociation)
{
neg PropertyAssociation.ownedValue(propassoc,_);
neg InstanceObject.ownedPropertyAssociation(_,propassoc);
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment