Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange behaviour when Definition clashes with record field #326

Open
leuschel opened this issue Sep 14, 2023 · 1 comment
Open

Strange behaviour when Definition clashes with record field #326

leuschel opened this issue Sep 14, 2023 · 1 comment
Labels
prob_parsers Related to the B or LTL/CTL parsers of ProB

Comments

@leuschel
Copy link
Member

The behaviour of the parser here is not really consistent:

MACHINE DefNameAsRecordField
DEFINITIONS
  aa == 1;
  yy == 2
CONSTANTS myrec
PROPERTIES
 myrec = rec(xx:aa,yy:2) &  // <- Parse error
 myrec = rec(xx:aa,`yy`:2)  // <- Ok
ASSERTIONS
  yy = 2;   // <- Ok
  `yy` = 2  // <- Ok
END

Maybe we should allow yy as record field also without quotes? Or we should try and improve the error message.

@leuschel leuschel added the prob_parsers Related to the B or LTL/CTL parsers of ProB label Sep 14, 2023
@leuschel
Copy link
Member Author

leuschel commented Sep 27, 2024

This is slightly related to the issue solved here in prob_prolog:
bdbcb877 message when record field rewriten during definition expansion
2bfecaa6 detect illegal record field definition rewrites

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prob_parsers Related to the B or LTL/CTL parsers of ProB
Projects
None yet
Development

No branches or pull requests

1 participant