If your list is bound at compile-time, you can simply use it as the attribute value in CQL, for example:
{[], se_lt_x :: [a-['ELSTON_M', 'LILLEY_N']]}
This does not require the list to be ground, merely bound. For example, this is not precluded:
foo(V1, V2):- {[], se_lt_x :: [a-[V1, V2]]}.
If, however, your list is not bound at compile-time, you must wrap the variable in list/1:
Bar = [a,b,c], {[], se_lt_x :: [bar-list(Bar)]}
If you write
foo(V1):- {[], se_lt_x :: [a-V1]}.
and at runtime call foo([value1])
, you will get a type
error.
Remember: If the list of IN values is empty then no restriction is generated i.e.
{[], se_lt_x :: [a-[], b-B} is the exactly the same as {[], se_lt_x :: [b-B}