Using version 0.0.6 on top of eclipse 3.2.0, under Linux. I have
dynamic_filesystem.als in ~/.
--------------------------
module dynamic_filesystem
abstract sig FSObject {}
sig File, Dir extends FSObject {}
sig FileSystem {
objects: set FSObject,
root: Dir & objects,
contents: (Dir & objects) one-> (objects - root),
parent: (objects - root) ->one (Dir & objects)
}{
objects = root.*contents
parent = ~contents
}
pred example() {}
run example for exactly 1 FileSystem, exactly 4 FSObject
pred move (fs, fs': FileSystem, f: FSObject, d: Dir) {
(f + d) in fs.objects
fs'.contents = fs.contents - f.(fs.parent)->f + d->f
}
run move for 2 FileSystem, 4 FSObject
assert moveWorks {
all fs, fs': FileSystem, f: FSObject, d:Dir |
move (fs, fs', f, d) =>
(fs.root = fs'.root && fs.objects = fs'.objects)
}
check moveWorks for 5
----------------------------------
This is basically part of the example in the alloy tutorial.
When I open this file in eclipse, and then click on the outline arrows
to see the signatures, predicates, etc. The arrows disappear and
nothing shows up.
Is this a problem with the current version or a problem with my
installation?
Cheers,
Paulo Matos
Hello all
Using version 0.0.6 on top of eclipse 3.2.0, under Linux. I have
dynamic_filesystem.als in ~/.
--------------------------
module dynamic_filesystem
abstract sig FSObject {}
sig File, Dir extends FSObject {}
sig FileSystem {
objects: set FSObject,
root: Dir & objects,
contents: (Dir & objects) one-> (objects - root),
parent: (objects - root) ->one (Dir & objects)
}{
objects = root.*contents
parent = ~contents
}
pred example() {}
run example for exactly 1 FileSystem, exactly 4 FSObject
pred move (fs, fs': FileSystem, f: FSObject, d: Dir) {
(f + d) in fs.objects
fs'.contents = fs.contents - f.(fs.parent)->f + d->f
}
run move for 2 FileSystem, 4 FSObject
assert moveWorks {
all fs, fs': FileSystem, f: FSObject, d:Dir |
move (fs, fs', f, d) =>
( fs.root = fs'.root && fs.objects = fs'.objects)
On Apr 6, 2:02 pm, "Antoine Bourré" <antoinebou...@gmail.com> wrote:
> Hello,
> There is a syntax error in the module (line 30)
> Perhaps your problems view is not visible?
> to display it go to Windows>Show View>Problems
> or Windows>reset Perspective (when Alloy perspective is set)
> et you should see the error.
> Outline view doesn't works properly when syntax error are detected.
>
You're right. This is an alloy3 file. :(
Cheers,
Paulo Matos
> Cheers,
> Antoine bourré.
>
> 2007/4/6, Paulo Matos <pocma...@gmail.com>:
>
>
>
> > Hello all
>
> > Using version 0.0.6 on top of eclipse 3.2.0, under Linux. I have
> > dynamic_filesystem.als in ~/.
> > --------------------------
> > module dynamic_filesystem
>
> > abstract sig FSObject {}
>
> > sig File, Dir extends FSObject {}
>
> > sig FileSystem {
> > objects: set FSObject,
> > root: Dir & objects,
> > contents: (Dir & objects) one-> (objects - root),
> > parent: (objects - root) ->one (Dir & objects)
> > }{
> > objects = root.*contents
> > parent = ~contents
> > }
>
> > pred example() {}
>
> > run example for exactly 1 FileSystem, exactly 4 FSObject
>
> > pred move (fs, fs': FileSystem, f: FSObject, d: Dir) {
> > (f + d) in fs.objects
> > fs'.contents = fs.contents - f.(fs.parent)->f + d->f
> > }
>
> > run move for 2 FileSystem, 4 FSObject
>
> > assert moveWorks {
> > all fs, fs': FileSystem, f: FSObject, d:Dir |
> > move (fs, fs', f, d) =>
> > (fs.root = fs'.root && fs.objects = fs'.objects)