Syntax of transitions
"Clive D.W. Feather" <clive@demon.net> Mon, 08 January 2007 16:29 UTC
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1H3xMv-0002h1-3D; Mon, 08 Jan 2007 11:29:05 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1H3xMt-0002e0-Tv for cosmogol@ietf.org; Mon, 08 Jan 2007 11:29:03 -0500
Received: from anchor-internal-1.mail.demon.net ([195.173.56.100]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1H3xMr-0003LD-GE for cosmogol@ietf.org; Mon, 08 Jan 2007 11:29:03 -0500
Received: from finch-staff-1.server.demon.net (finch-staff-1.server.demon.net [193.195.224.1]) by anchor-internal-1.mail.demon.net with ESMTP� id l08GT0IP001729; Mon, 8 Jan 2007 16:29:00 GMT
Received: from clive by finch-staff-1.server.demon.net with local (Exim 3.36 #1) id 1H3xMq-000HuY-00 for cosmogol@ietf.org; Mon, 08 Jan 2007 16:29:00 +0000
Date: Mon, 08 Jan 2007 16:29:00 +0000
From: "Clive D.W. Feather" <clive@demon.net>
To: IETF Cosmogol list <cosmogol@ietf.org>
Message-ID: <20070108162900.GA66689@finch-staff-1.thus.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
User-Agent: Mutt/1.5.3i
X-Spam-Score: 0.0 (/)
X-Scan-Signature: fb6060cb60c0cea16e3f7219e40a0a81
Subject: Syntax of transitions
X-BeenThere: cosmogol@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: DIscussion on state machine specification in IETF protocols <cosmogol.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/cosmogol>, <mailto:cosmogol-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/cosmogol>
List-Post: <mailto:cosmogol@ietf.org>
List-Help: <mailto:cosmogol-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/cosmogol>, <mailto:cosmogol-request@ietf.org?subject=subscribe>
Errors-To: cosmogol-bounces@ietf.org
The grammar suggests four different syntaxes for transitions: (1) state1, state2 : message1, message2 -> state3 : action1 (2) message1, message2 : state1, state2 -> state3 : action1 (3) (state1, state2 : message1, message2) -> state3 : action1 (4) message1 : state1 -> state3 : action1; state2 -> state4 : action2; and this also suggests a fifth: (5) state1 : message1 -> state3 : action1; message2 -> state4 : action2; Firstly, if you want to allow states and messages in either order, I suggest that you should have different delimiters. For example: state + message + suggests "adding this message" message @ state @ suggests "when at this state" Secondly, is there any reason to forbid multiple actions? It won't make sense for all uses, but it will for some. Thirdly, you can then use parentheses to provide grouping, rather than syntax (4), which is rather hard to parse (the scope of message1 ends at the next transition with a colon before the arrow). Something like this: message1 @ (state1 -> state3 : action1; state2 -> state4 : action2;); state1 + (message1 -> state3 : action1; message2 -> state4 : action2;); These two being equivalent to: message1 @ state1 -> state3 : action1; message1 @ state2 -> state4 : action2; and state1 + message1 -> state3 : action1; state1 + message2 -> state4 : action2; (Note: the semicolon before the ")" simplifies the grammar, but it would be easy enough to make it optional.) Common trailing actions could be put outside the parentheses: message1 @ (state1 -> state3 : action1; state2 -> state4;) : action2; would be equivalent to: message1 @ state1 -> state3 : action1, action2; message1 @ state2 -> state4 : action2; So the overall grammar for this would be: transition = m-transition / s-transition m-transition = message-list "@" body-with-s s-transition = state-list "+" body-with-m body-with-s = simple-body-with-s / grouped-body-with-s body-with-m = simple-body-with-m / grouped-body-with-m grouped-body-with-s = "(" 1*(simple-body-with-s ";") ")" [":" action-list] grouped-body-with-m = "(" 1*(simple-body-with-m ";") ")" [":" action-list] simple-body-with-s = state-list "->" state [":" action-list] simple-body-with-m = message-list "->" state [":" action-list] (This grammar needs to have comments and white space added to bring it into line with the base grammar.) If people like this, I'm happy to write wording to fit it into the document. -- Clive D.W. Feather | Work: <clive@demon.net> | Tel: +44 20 8495 6138 Internet Expert | Home: <clive@davros.org> | Fax: +44 870 051 9937 Demon Internet | WWW: http://www.davros.org | Mobile: +44 7973 377646 THUS plc | | _______________________________________________ Cosmogol mailing list Cosmogol@ietf.org https://www1.ietf.org/mailman/listinfo/cosmogol
- Syntax of transitions Clive D.W. Feather
- Re: Syntax of transitions Stephane Bortzmeyer
- Re: Syntax of transitions Frank Ellermann
- Re: Syntax of transitions Clive D.W. Feather
- Re: Syntax of transitions Frank Ellermann
- Re: Syntax of transitions Clive D.W. Feather
- Re: Syntax of transitions Frank Ellermann