Skip to content

Instantly share code, notes, and snippets.

@abelhegedus
Created May 24, 2012 15:33
Show Gist options
  • Save abelhegedus/2782254 to your computer and use it in GitHub Desktop.
Save abelhegedus/2782254 to your computer and use it in GitHub Desktop.
Small examples for EMF-IncQuery part 3
pattern AtLeastThreeAttributes(Cls : EClass) = {
M == count find ClassAttributes(Cls,Attr);
check((M as Integer) > 2);
}
pattern AttributeNotSet(Cls: MyClass) = {
MyClass(Cls);
neg find AttributeSetForMyClass(Cls);
}
pattern AttributeSetForMyClass(Cls: MyClass) = {
MyClass.someAttr(Cls,Attr);
}
pattern NumberOfAttributes(Cls : EClass, M) = {
M == count find ClassAttributes(Cls,Attr);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment