[kepler-dev] FSMDirector and wire issues

Edward A. Lee eal at eecs.berkeley.edu
Mon Nov 12 18:13:28 PST 2007


The following extreme inefficiency with DE models that include
an FSMDirector (e.g. with a ModalModel) was reported some time ago by
Ian Brown.  I've modified DE so that recomputing function dependencies
is no longer necessary, so I've removed it.  This should dramatically
improve performance of DE models using FSM.

The only other domain affected by this (I think) is SR.
In SR, function dependencies are an optimization, not an absolute
requirement, so this change should not affect correctness of execution.
A more complete fix, however, would modify ModalModel so that it
constructs a conservative approximation of the dependency information 
by merging dependency information of all state refinements.

Edward


------ original dialog:

>2) The FSMDirector changes the workspace version on a transition. I have a
>DEDirector with a FSM modal model in it. In this model is another
>DEDirector. Events come in at about every 50 milliseconds and for each
>event we have on average 2 state transitions. Due to the workspace
>increment (see line 579 in FSMDirector.java) when DEDirector.fireAt() is
>next called (which is called by FSMDirector.postfire()) the entire DAG is
>rebuilt by DEDirector.getDepthOfActor().
>This obviously decimates the performance (there is more than an order of
>magnitude difference than when the state transition is not taken) and I
>don't think it should be necessary. Can someone who knows the code please
>comment - I am happy to investigate the change but would like to understand
>the background reasoning for the current implementation first.

Yes, this is completely bogus... There is a FIXME there,
which unfortunately will be a fair amount of work to fix...
I'll take this on, however, since being able to use FSM in DE
is very important (particularly for our own PTIDES work).

Edward


------------ 
Edward A. Lee
Chair of EECS and Robert S. Pepper Distinguished Professor
231 Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
phone: 510-642-0253, fax: 510-642-2845
eal at eecs.Berkeley.EDU, http://www.eecs.berkeley.edu/Faculty/Homepages/lee.html  



More information about the Kepler-dev mailing list