commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francesco Spegni <>
Subject Re: [scxml] question on datamodel
Date Mon, 03 Dec 2012 19:13:12 GMT
On 03/12/2012 16:02, Jacob Beard wrote:
> Hi Francesco,
Hi Jacob,

thanks for your solution that I've read with interest. First of all, 
your solution has a minor issue I'm concerned about:

- in Statecharts, AFAIK, the notion of timeout implies that something 
must be executed after a known amount of time; in the semantics I've in 
mind, borrowed from Timed Automata, a transition is enabled/disabled in 
certain time-windows. This means that nothing *happens* but something 
*can happen* (non deterministically) when the condition is true ... but 
this may be a minor issue, because it happened that our work stemmed 
from Timed Automata

A major concern we have is that right now we have in mind more complex 
expressions. For instance, at the moment we consider two kinds of 
conditions on transitions:
- time conditions that enable/disable a transition;
- a conjunctive boolean formula, that refers to a finite set of 
propositions in description logic;
- a combination of the above two.

This apparently heterogeneous language is aimed at describing 
parametrized FSMs (i.e. FSM with an undefined number of running 
"instances") to reason on timed and RESTful services. Due to the fact 
that the research project is a work-in-progress, the "shape" of those 
expressions are not yet definitive and may change, so we'd figure 
leveraging the flexibility of SCXML (in particular its datamodel) would 
give us a more "stable" ground to work on, possibly re-using the base 
Apache Commons libraries and Eclipse editor, and maybe extend it.


> The example you describe looks like the special "timeout" event described
> by Harel in his original papers on Statechart semantics:
> If so, this event can be implemented in SCXML as a transformation, as in
> the following example:
> In this example, on entering state "a", the event "$timeout_1" is scheduled
> to be sent after 1 second. If the state is exited before that time, the
> scheduled event will be cancelled via the <cancel> action. If the machine
> stays in state "a", and after 1 second the event is sent, then the
> transition in state "a" with event "$transition_1" will be selected, and
> the machine will leave state "a" and enter state "b".
> This transformation can be implemented easily in a language like XSLT.
> Therefore, SCXML should be able to handle your example out of the box. Does
> your application have other, more complex requirements for transition
> conditions?
> Jake
> On Mon, Dec 3, 2012 at 9:30 AM, Francesco Spegni <
>> wrote:
>> The first problem we are trying to solve is: how to extend the definition
>> of Transition to accept custom XML nodes to be interpreted as complex
>> conditions? E.g. we would like to express something as:
>> <scxml xmlns="**07/scxml<>
>> "
>>         version="1.0"
>>         initialstate="a"
>>         datamodel="xmlns:cc="someurl" >
>>      <state id="a">
>>          <transition target="b" cond="cc:eval(//condition)" >
>>              <cc:condition>
>>                  <time exp="clock > 1 sec" />
>>              </cc:condition>
>>          </transition>
>>      </state>
>>      <state id="b" final="true">
>>      </state>
>> </scxml>

Francesco Spegni

"Ama le nuvole, le macchine, i libri, ma prima di tutto ama l'uomo" -
Nazim Hikmet
skype: francesco.spegni

View raw message