[kepler-users] Type resolving problem

Tomasz Żok tzok at man.poznan.pl
Tue May 17 07:05:33 PDT 2011


Hi Christopher,

Christopher Brooks <cxh at eecs.berkeley.edu> (Mon, 16 May 2011 18:02:43
-0700):
>I finally got around to fixing the problem that you pointed out with
>the two argument concatenate function in the expression language
>returning array(general)
>
> ...
>
>I backed out my first fix and then added concatenateReturnType() to
>UtilityFunctions which seems to do the trick.

First of all, thank you for remembering about the issue. I have synced
ptolemy to HEAD revision and looked at the solution you provided. For
two argument concatenation it is a nice solution you did there.


>I added a similar function and test for the single argument
>concatenate function.  However, if I have
>
>Const {{"a", "b"},{"c"}} -> Expression concatentate(in)
>
>The the output of the Expression is correctly set to {"a", "b", "c"}
>However, the type is arrayType(string), not arrayType(string,3).
>This is because the input to the Expression is
>arrayType(arrayType(string,2)), and I don't have access to
>the length of the individual elements.

That's true, it's a problematic situation here and I see no simple
workaround which lies in expression language only.

I think one could prepare a composite actor having ArrayToSequence and
other entities inside that would do the job. However at the same time I
think this would be an overkill. 

Of course it would be nice to have a one argument concatenation, it's
just the composite actor solution too complicated for this task. In
most cases I believe the two argument concatenation will suffice.
Thanks for the addition!

Regards,
Tomek

-- 
Tomasz Zok
Poznan Supercomputing and Networking Center
ul. Noskowskiego 10, 61-704 Poznan, POLAND
http://www.man.poznan.pl



More information about the Kepler-users mailing list