~yrke/opaal/timedart-vars

« back to all changes in this revision

Viewing changes to tests/master-election-simple.xml

  • Committer: Mads Chr. Olesen
  • Date: 2010-06-21 13:12:50 UTC
  • Revision ID: launchpad@shiyee.dk-20100621131250-8b2w9kz6vqh4quc2
Pyuppaal Simplify: Expand system declarations into templates, expand select transitions.
Add support for arrays.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE nta PUBLIC '-//Uppaal Team//DTD Flat System 1.1//EN' 'http://www.it.uu.se/research/group/darts/uppaal/flat-1_1.dtd'><nta><declaration>const int N = 7;
 
2
 
 
3
 
 
4
typedef int[0, N - 1 ] id_t;
 
5
 
 
6
// sent[x][y] == true =&gt; there is a message y for node x
 
7
bool msg[N][N];</declaration><template><name x="5" y="5">Node</name><parameter>id_t myid</parameter><location id="id0" x="-160" y="-32"><name x="-152" y="-16">master</name><committed/></location><location id="id1" x="-160" y="-112"></location><init ref="id1"/><transition><source ref="id1"/><target ref="id1"/><label kind="assignment" x="-568" y="-200">msg[ (myid+1)%N ][N-myid-1] = true</label><nail x="-288" y="-200"/><nail x="-288" y="-128"/><nail x="-288" y="-112"/></transition><transition><source ref="id1"/><target ref="id0"/><label kind="guard" x="-152" y="-80">msg[myid][N-myid-1] == true</label></transition><transition><source ref="id1"/><target ref="id1"/><label kind="select" x="-32" y="-184">rid : id_t</label><label kind="guard" x="-32" y="-168">msg[myid][rid] == true &amp;&amp; rid &gt; N-myid-1</label><label kind="assignment" x="-32" y="-152">msg[ (myid+1)%N ][ rid ] = true</label><nail x="-40" y="-200"/><nail x="-40" y="-184"/><nail x="-40" y="-112"/><nail x="-104" y="-112"/></transition></template><system>/*
 
8
n0 = Node(0);
 
9
n1 = Node(1);
 
10
n2 = Node(2);
 
11
n3 = Node(3);
 
12
n4 = Node(4);
 
13
 
 
14
 
 
15
system n0, n1, n2, n3, n4;
 
16
*/
 
17
 
 
18
system Node;</system></nta>
 
 
b'\\ No newline at end of file'