Skip to content
This repository has been archived by the owner on Jul 2, 2022. It is now read-only.

Ran into an issue with the last example in the "Using the Toolbox" section #48

Closed
axelson opened this issue Jan 7, 2018 · 2 comments
Closed

Comments

@axelson
Copy link

axelson commented Jan 7, 2018

Hi! Me again.

On the final step of the "Using the Toolbox" section you are instructed to add the following string to the "Evaluate Constant Expression" section of the "Model Checking Results" tab:

CHOOSE x \in {1, 2, 3} : x*x = 4

However, upon doing so I get the following error:

Multiply-defined symbol 'x': this definition or declaration conflicts with the one at line 11, col 11 to line 11, col 11 of module integers.

tla-plus-screenshot-evaluate-constant-expression-error

Changing to code to use the y variable results in the correct response of 2.

CHOOSE y \in {1, 2, 3} : y*y = 4

It appears that the definition of x in "Evaluate Constant Expression" conflicts with the value of x in the PLUSCAL algorithm. And the tutorial could be fixed by either instructing the user to remove the code from their algorithm or change the new definition to use the variable y instead of x.

@hwayne
Copy link
Owner

hwayne commented Jan 7, 2018

Having them try y instead of x seems less onerous, so I'll go with that. Thank you!

hwayne added a commit that referenced this issue Jan 7, 2018
@hwayne hwayne closed this as completed Jan 7, 2018
@axelson
Copy link
Author

axelson commented Jan 8, 2018

Great, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants