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

Model checking status page has only one entry in the States column #229

Open
xosmig opened this issue Jul 6, 2021 · 9 comments
Open

Model checking status page has only one entry in the States column #229

xosmig opened this issue Jul 6, 2021 · 9 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@xosmig
Copy link

xosmig commented Jul 6, 2021

Hi!

I tried to model-check a simple specification using the TLA+ extension.
On the model checking status page, the "Coverage" column is periodically updated as expected.
However, the "States" column always contains just one entry, although the model checker has been running for several minutes.
Please see the screenshot below.

image

Here is the corresponding .out file:

MC_n4_t1_f1_InitByz1.out.txt

For comparison, here is a screenshot of the statistics page from the TLA+ toolbox:

image

I would expect the extension output to also contain multiple entries in the "States" column.
Could you please help me to identify whether I am doing something wrong or if it is a bug in the plugin?

Thanks in advance.

@xosmig
Copy link
Author

xosmig commented Jul 8, 2021

This may be related to these weird question marks in the TLC output. I guess it is some encoding-related problem.
I probably should file a bug to TLC.

image

@lemmy
Copy link
Member

lemmy commented Jul 8, 2021

@xosmig What is your locale?

@xosmig
Copy link
Author

xosmig commented Jul 8, 2021

I have Russian locale. The question marks are non-breakable spaces (ascii 160).

It seems that, when the system language is set to Russian, windows uses the non-breakable space as the default separator for groups of digits.

However, changing the separator or even disabling digit grouping altogether in windows settings doesn't seem to affect the output of TLC. I guess TLC doesn't use the system's settings and just uses non-breakable spaces for all locales.

@xosmig
Copy link
Author

xosmig commented Jul 8, 2021

It seems that the reason why VS-code doesn't display these spaces correctly is that TLC outputs the text encoded in Windows-1252, but VS-code tries to interpret it in UTF-8. This may also explain why the tla+ extension is unable to parse the output.

@xosmig
Copy link
Author

xosmig commented Jul 9, 2021

Changing the output encoding of TLC to UTF-8 (adding "-Dfile.encoding=UTF-8" to the jvm parameters) fixes the way output is displayed in VS-code, but doesn't fix the problem with the TLC Status page.

@alygin
Copy link
Contributor

alygin commented Jul 11, 2021

@lemmy, I think the best way to fix it is to change how TLC formats numbers in its output (to not format them at all). Since the only way to analyze model checking results is to parse TLC output, it would be nice to have this output independent of the user locale to make parsers more reliable. Is it possible?

@lemmy
Copy link
Member

lemmy commented Jul 11, 2021

I suppose we could remove the formatting when TLC runs with the -tool flag. However, it would be inconsistent to still format dates according to the locale. At any rate, somebody would have to provide a pull request for TLC.

@alygin alygin added the bug Something isn't working label Jul 11, 2021
@alygin alygin added this to the v1.6.0 milestone Jul 11, 2021
@alygin alygin self-assigned this Jul 11, 2021
@alygin
Copy link
Contributor

alygin commented Jul 11, 2021

The fix is available in the v1.6.0-alpha.2 pre-release.

@xosmig
Copy link
Author

xosmig commented Jul 11, 2021

Thanks!
This fixes the problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants