Method 'satisfiesOne' not found for ... [message #876970] |
Fri, 25 May 2012 16:00 |
|
I was starting to work on some validations and from the error message it seems either I am doing something wrong, or satisfiesAll is buggy . This is the code, the metamodel is Papyrus SysML.
context SysML!sysml::portandflows::FlowPort
{
// The base port must be typed
constraint IsTyped
{
check : self.base_Port.type.isDefined()
message : "FlowPort" + self.base_Port.name + " is not typed"
}
constraint IsTypedWithHiLeS
{
guard : self.satisfies("IsTyped") and
self.satisfiesOne("IsBooleanOrLogic", "IsTerminalOrNode")
check : true
}
// Logic and Boolean are not generalizations
@lazy
constraint IsBooleanOrLogic
{
guard : self.satisfies("IsTyped")
check : self.type.name = "Logic"
or self.type.name = "Boolean"
}
@lazy
constraint HasGeneralization
{
guard : self.satisfies("IsTyped")
check : self.base_Port.type.generalization.isDefined()
message : "FlowPort" + self.base_Port.name + " type is not a generalization "
+ "of another type (All HiLeS library types are generalizations)."
}
@lazy
constraint IsTerminalOrNode
{
guard : self.satisfies("HasGeneralization")
check : self.base_Port.type.generalization.general.name = "Terminal" or
self.base_Port.type.generalization.general.name = "Node"
message : "Flow Port " + self.base_Port.name + " NOT"
}
}
Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03560 seconds