[kepler-dev] When to disable backwards type inference

Christopher Brooks cxh at eecs.berkeley.edu
Mon Jul 16 10:00:02 PDT 2012


Marten,
The Ptolemy II nightly build is working once again.

[All: see http://sisyphus/hudson/job/ptII/]

There are a number of test case failures that have to do with the switch 
to backward type inference.

I'm cc'ing the devel mailing lists because the details about this change 
will be of interest.

[All: The way we disable backward type inference is to right click on 
the canvas in the top level, select Configure and then click on 
"disableBackwardTypeInference"

I see the following categories of test case failures:

1) Failures that involve the Test actor.  These failures typically have 
channels with different types connected to a Test actor.  If backward 
type inference is enabled, then the types tend to end up as String, 
which is not what we want for these tests.  I'm fine with disabling 
backward type inference for these test cases.

2) Code Generation tests.  These tests typically want to have the most 
specific type information possible. Models that use jni actors like 
ptolemy/actor/lib/jni/demo/Scale/Scale.xml probably want to have 
backward type inference disabled. I believe the code generator disables 
backward type inference.  This could result in differences between code 
generation and non-code generation.  Other than that, there are no 
problems with these tests.

3) Miscellaneous demos and tests that have type conversion issues. See 
domains/csp/demo/ResourcePool/ResourcePool.xml and other failures in the 
ExportModelJUnitTest category.  I'd be grateful if you could look at 
each one of these and decide if it is a bug that backward type inference 
fails.  When I've been disabling backward type inference, I've been 
trying to add an annotation to the model that says something like 
"Backward type inference has been disable for this model.  To enable it, 
right click on the background, select configure and uncheck 
disableBackwardTypeInference".

4) Models that take a long time with backward type inference.  For 
example, ptolemy/actor/ptalon/demo/EightChannelFFT/EightChannelFFT.xml 
usually takes 87ms to run.  With backward type inference enabled, it 
took something like 160,000 ms.  I checked disableBackwardTypeInference 
for this model and checked it in, but I would be grateful if you had 
time to look and see what the problem is.

Thanks again for the backward type inference work, it is a real boon for 
the JSON and Record work.  The above issues are issues that I expect to 
see when we make big changes.

_Christopher

-- 
Christopher Brooks, PMP                       University of California
CHESS Executive Director                      US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774
ph: 510.643.9841                                (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670



More information about the Kepler-dev mailing list