>>> "SIGOURE" == SIGOURE Benoit <sigoure.benoit(a)lrde.epita.fr> writes:
> Index: tests/pctl/man_examples.pctl
> --- tests/pctl/man_examples.pctl (revision 0)
> +++ tests/pctl/man_examples.pctl (revision 0)
Isn't this the kind of situation where you are expected to use their
parsing test suite tool?
>>> "SIGOURE" == SIGOURE Benoit <sigoure.benoit(a)lrde.epita.fr> writes:
> Index: src/lib/pctl/pp/pctl-label.meta
> --- src/lib/pctl/pp/pctl-label.meta (revision 0)
> +++ src/lib/pctl/pp/pctl-label.meta (revision 0)
> @@ -0,0 +1 @@
> +Meta([Syntax("Stratego-Box")])
ISTR that you ought to specify the start symbol to avoid bad
surprises. Sure, there may be only one in your case, but let's play
it safe. See Thomas who knows what to do.
>>> "SIGOURE" == SIGOURE Benoit <sigoure.benoit(a)lrde.epita.fr> writes:
> https://svn.lrde.epita.fr/svn/xrm/trunk
> Index: ChangeLog
> from SIGOURE Benoit <sigoure.benoit(a)lrde.epita.fr>
> Fix overlapping detection.
> The code is getting a bit hard to follow [and maintain] probably
> because it's handling many cases ... but could we make this a lot
> more generic? :|
I fail to understand why there are many cases...
>>> "SIGOURE" == SIGOURE Benoit <sigoure.benoit(a)lrde.epita.fr> writes:
> https://svn.lrde.epita.fr/svn/xrm/trunk
> Index: ChangeLog
> from SIGOURE Benoit <sigoure.benoit(a)lrde.epita.fr>
> Detect overlapping declarations of arrays.
> Consider the following case:
> x[1][1] : [0..2] init 2;
> x[1][1,2] : [0..3] init 3;
> Here, we're declaring the array `x' in two parts. As we can see, the
> second part overlaps with the first. Moreover the, overlapping part
> has a different definition in both declarations. This is now caught
> and reported as an error.
Nice too.
Benoît, ça :
for i from 0 to 1200 step 100 do
P=? [ true U (t <= i & (sensor[0][0]= 4 | sensor[0][1]= 4 | sensor[0][2]= 4
| sensor[0][3]= 4 | sensor[0][4]= 4 | sensor[0][5]= 4 | sensor[0][6]= 4 |
sensor[0][7]= 4 | sensor[0][8]= 4 | sensor[0][9]= 4 | sensor[9][0] = 4 |
sensor[9][1] = 4 | sensor[9][2] = 4 | sensor[9][3] = 4 | sensor[9][4] = 4 |
sensor[9][5] = 4 | sensor[9][6] = 4 | sensor[9][7] = 4 | sensor[9][8] = 4 |
sensor[9][9] = 4 | sensor[1][0] = 4 | sensor[2][0] = 4 | sensor[3][0] = 4 |
sensor[4][0] = 4 | sensor[5][0] = 4 | sensor[6][0] = 4 | sensor[7][0] = 4 |
sensor[8][0] = 4 | sensor[1][9] = 4 | sensor[2][9] = 4 | sensor[3][9] = 4 |
sensor[4][9] = 4 | sensor[5][9] = 4 | sensor[6][9] = 4 | sensor[7][9] = 4 |
sensor[8][9] = 4)) ]
end
c'est pas bon du tout. Il faut que tu me trouve un moyen de sucrer
cette horreur.
Est-ce que tu crois que tu saurais compiler ça par exemple :
formula north_receives =
for x = 0 .. X - 1 do
if sensor[x][0] = BROADCAST then return true end if
else
return false
(oui, le else est sur la boucle).
On peut-être faut-il faire une récursion ?
formula north_receives = line_receives (0, 0);
formula line_receives (int x, int y) =
x = X ? false : sensor[x][y] | line_receives (x + 1, y);
?
Je ne suis pas sur de vouloir écrire
formula north_receives = sensor[0..X-1][0] = BROADCAST;
C'est assez trompeur : ça semble vouloir que tous doivent être à BROADCAST.