Before I get into large unwieldy example
models/transformations/metamodels, is there anything immediately wrong
with my pattern?
PATTERN notEntitySelect(select)
FORALL SelectType select
WHERE select.selectList = listType
AND ( ( NOT ( (EntityType listType) OR (SelectType listType)) )
OR notEntitySelect(listType)
)
;
To explain, a SelectType has a list of other types, which may be
SelectTypes, EntityTypes, or other types. I want to distinguish
between SelectTypes that transitively contain only Entity Types, from
those that contain some of the other types.
Any help is useful.
Jim.
PATTERN notEntitySelect(select)
FORALL SelectType select
WHERE select.selectList = listType
AND (SpecializedType listType
OR EnumerationType listType
OR (SelectType listType AND notEntitySelect(listType))
)
;
(where SpecializedType, EnumerationType, SelectType and EntityType are
all the types that can appear in selectList).
I still don't understand why my old one didn't work.
Jim.
Specifically, it will match any SelectType which has at least one
EntityType in it, which includes SelectTypes which have a mix of
EntityTypes and other types. So I went looking for a list type which
would make it not an entity type instead :)
Jim.
> --
> You received this message because you are subscribed to the Google Groups "Tefkat" group.
> To post to this group, send an email to tef...@googlegroups.com.
> To unsubscribe from this group, send email to tefkat+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/tefkat?hl=en-GB.
>
>
PATTERN notEntitySelect(select)
FORALL SelectType select
WHERE select.selectList = listType
AND (
(NOT EntityType listType)
OR notEntitySelect(listType)
)
;
[And, yes, if you're trying to match a set of objects {X | forall Y
p(X,Y) }, then you need to transform this
into {X | not exists Y not p(X, Y)) since Tefkat does not provide
explicit quantifiers.]
michael