Re: Prolog Datamodel for SCXML

I am certainly interested, and I do have some comments on your approach. I'm on vacation this week, but can hopefully send you my comments in the coming weeks.

Best regards,
Torbjörn

Skickat från min iPad

9 jul 2013 kl. 16:50 skrev "Stefan Radomski" <radomski@tk.informatik.tu-darmstadt.de>:

> Hi there,
> 
> as we have hinted at earlier, we implemented a Prolog datamodel for SCXML.. We have already been accepted to publish at this year's SIGDial [1][2] and would like the SCXML community to have a look at it. Ultimately, we can envision to standardize this as an optional SCXML datamodel, given enough interest.
> 
> There are a few areas, where the concepts of SCXML do not map naturally to the language features of Prolog and different approaches to do so nevertheless. If there is indeed some interest to get this standardized, I would start by outlining the boldest design decisions and we would welcome a discussion/critique of the approach we described in [2]. 
> 
> We attached a simple SCXML document with our Prolog datamodel from the SIGDial paper that will run to completion to give a better idea of the approach.
> 
> Best regards
> Stefan Radomski
> 
> [1] http://www.sigdial.org/workshops/conference14/
> [2] http://atlas.tk.informatik.tu-darmstadt.de/Publications/2013/TUD-CS-2013-0190.pdf
> 
> -----
> 
> <scxml datamodel="prolog">
>  <datamodel>
>    <!-- data is evaluated in non-query mode as verbatim prolog -->
>    <data id="">
>      mother(martha, jim).
>      mother(martha, john).
>    </data>
>    <!-- id attribute is taken as name of predicate with dot seperated facts -->
>    <data id="father">
>      bob, jim.
>      bob, john.
>    </data>
>    <!-- JSON data is parsed by SWI JSON parser -->
>    <data id="household">
>      {
>        name: "The Bobsons",
>        members: ['bob', 'martha', 'jim', 'john']
>      }
>    </data>
>    <!-- XML data is parsed by SWI SRGS parser -->
>    <data id="childs">
>      <child name="jim" father="bob" />
>      <child name="john" father="bob" />
>    </data>
>  </datamodel>
>  <state id="s1">
>    <onentry>
>      <!-- assign is always evaluated in query mode -->
>      <assign location="">
>        retract(father(bob, jim)).
>        assert(father(steve, jim)).
>        assert(father(bob, jack)).
>      </assign>
>      <log label="index" expr="listing." />
>      <!-- foreach will iterate solutions of a query -->
>      <foreach array="father(bob, X)" item="child" index="index">
>        <!-- Single free variable bound to an atomic term can be evaluated as a string -->
>        <log label="index" expr="index(X)" />
>        <log label="child" expr="child(X)" />
>      </foreach>
>    </onentry>
>    <!-- any query can be used at "if" and "cond"; true if there is at least one solution -->
>    <transition target="s2" cond="mother(martha, X), father(bob, X)"/>
>  </state>
>  <state id="s2">
>    <onentry>
>      <!-- system variables are facts; send ourself an event -->
>      <send type="basichttp" targetexpr="ioprocessors(basichttp(location(X)))" event="foo">
>        <content>
>          <p>Snippet of XML</p>
>        </content>
>      </send>
>    </onentry>
>    <!-- current event is a fact -->
>    <transition target="end" event="foo" cond="member(element('p',_,_), X), event(data(X))" />
>  </state>
>  <state id="end" final="true" />
> </scxml>
> 

Received on Friday, 12 July 2013 06:47:17 UTC