[kepler-dev] Re: [kepler-cvs] kepler/src/org/sdm/spa ArrayToSequence.java

xiaowen xin2 at llnl.gov
Tue Jul 6 11:28:33 PDT 2004


Hi Steve,

I think you're asking why I don't use 
ptolemy.domains.sdf.lib.ArrayToSequence, rather than writing my own, right?

The reason is that I couldn't get the types to resolve using the generic 
Ptolemy ArrayToSequence.

If you open up kepler/workflows/spa/PIW.xml, and replace 
org.sdm.spa.ArrayToSequence with 
ptolemy.domains.sdf.lib.ArrayToSequence, Ptolemy II refuses to run it, 
and the error message is:


ptolemy.actor.TypeConflictException: Type conflicts occurred in .PIW on 
the following inequalities:
   {ArrayElementType({unknown}), unknown) <= (ptolemy.actor.TypedIOPort 
{.PIW.Gene Sequence Processing.Blast.ArrayToSequence.output}, 
{AccessionNumber = string, End = int, GeneID = string, QueryStart = int, 
Start = int, index = int})


In the "Configure ports" dialog of that actor, I've set the input to type:

{{GeneID = string, Start = int, End = int, QueryStart = int, 
AccessionNumber = string, index = int}}

and output to type:

{GeneID = string, Start = int, End = int, QueryStart = int, 
AccessionNumber = string, index = int}


It seems that the problem is that 
ptolemy.domains.sdf.lib.ArrayToSequence doesn't work if you explicitly 
specify its input port type to an array of record tokens and set its 
output port type to record tokens.

I'm just noticing now that if I don't explicitly specify the type at 
all, it seems to run, but I'll have to test that further.


I'm attaching a workflow for ptII4.0 that shows the problem I mean.

Do you see what I might be doing wrong?


Thanks!
Xiaowen


Stephen Andrew Neuendorffer wrote:

> 
> Out of curiosity: Why do you think you need this?
> An array in Ptolemy always has elements of the same type.
> 
> At 12:10 PM 7/2/2004, Xiaowen Xin wrote:
> 
>> xin         04/07/02 12:10:18
>>
>>   Added:       src/org/sdm/spa ArrayToSequence.java
>>   Log:
>>   Actor to turn an ArrayToken into a sequence of elements.  Does not 
>> enforce any types.
> 
> 
> 
> 
> 
> _______________________________________________
> kepler-dev mailing list
> kepler-dev at ecoinformatics.org
> http://www.ecoinformatics.org/mailman/listinfo/kepler-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ArrayProblem.xml
Type: text/xml
Size: 3441 bytes
Desc: not available
URL: <http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20040706/7f5cde87/attachment.xml>


More information about the Kepler-dev mailing list