Question

Working with the latest Alloy analyzer currently available at the website (4.2 Build date: 2012-09-25) I realized that, when I put code between two /**/ like this /**/ <some code> /**/, the code <some code> seems to be ignored by the analyzer (although the editor seems to parse the code correctly).

For example, in the following code snippet the declaration of the fact is ignored by the analyzer:

/**/
fact traces {
    init [first]
    all d: Dinner - last | 
        let d' = next [d] | 
            some p,p': Philosopher, f: Fork | 
                pickLeftFork [d,d',p,p',f]
}
/**/

As soon as I put a space between /**/, that is, /* */, the code behaves as expected.

Was it helpful?

Solution

Java-style doc comments have been recently added to Alloy, so in your example above, the /** token at the beginning starts a doc comment, and the **/ token at the very end closes is, so everything in between is parsed as a comment.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top