Parsing error with tuple in set comprehension

Skip to first unread message

Sep 26, 2017, 1:25:06 PM9/26/17
to ProB Users
Hello everyone,

I'm having a parsing error when trying to run a small B example wrote by my professor. The following
set comprehension fails to parse on my Linux system:

  & lambda_closure = closure1({ (q1,q2) | (q1,lambda,q2) : delta}) \/ id(Q)

Identifier expected
 ### File: /mnt/documents/Download/determination.mch
 ### Line: 13, Column: 32

Column 32 being the opening parenthesis in {(q1,q2) | (q1,lambda,q2) : delta}

The example worked fine on his macos computer, iirc.
I tried to run it using ProB 1.6.1, 1.7.0 and the nightly, without success.

Is this working as expected, or is this a bug? When I remove the parenthesis around (q1,q2),
the example parse and run correctly.

Here's my system:

Debugging mode: On :19
ProB Command Line Interface
  VERSION 1.7.0-final (e6c0bb3b0c68c2728b8d797c3e9eb8d140c50ab6)
  Mon Jul 10 15:09:21 2017 +0200
  Prolog: SICStus 4.3.3 (x86_64-linux-glibc2.17): Tue Jun  7 01:18:05 PDT 2016
  Application Path: /home/mgoyette/opt/ProB
  Java Runtime: /usr/bin/java
  Java Version: openjdk full version "1.8.0_144-b01"
  Java Parser: 2017-07-06 10:34:07.523
% ProB Finished

Thanks for your time,
Maxime G.

Michael Leuschel

Sep 27, 2017, 2:02:29 AM9/27/17
to, ProB Users
Hello Maxime,

thanks for your message.
The new behaviour is indeed working as expected: Atelier-B does not allow parentheses at that part of the set comprehension.
It reports "Unexpected expression with parenthesis”.
Within Event-B / Rodin this notation is allowed (and ProB accepts it), but not within classical B.
We decided to conform to Atelier-B’s syntax and now throw a parse error.
The solution is not to use parentheses, as you found out.

Kind regards,
Michael Leuschel

You received this message because you are subscribed to the Google Groups "ProB Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
To view this discussion on the web visit
For more options, visit

Sep 27, 2017, 10:59:06 AM9/27/17
to ProB Users
Hello Michael,

Thank you for the clarification.
My professor is probably using an old version of ProB then. I will share with him this thread, so he can update his examples.

Thank you (and everyone working on ProB) for your awesome work,
Maxime G.
Reply all
Reply to author
0 new messages