The Length attribute of the SBOL element has problem with syntax clash.
If we use "Q LENGTH" command, we will get a syntax error, and "Q LENGTH $Q" replies it need "(" next to the command.
This means that "LENGTH" will be recognized as "LENGTH()" function, not "LENGTH" attribute of SBOL.
All PDMS attributes and commands/functions name are unique, but this is an exception.
This is only one command/attribute name clash I know.
To prevent this conflict, we can use "ATTRIBUTE" command with round brakets, like "Q (ATTRIB LENGTH)".
Try the following style to prevent the problem,
----------------------------------
var !a collect all sbol for ce
var !b eval (attrib length) for all from !a
----------------------------------