|
| 1 | +import locale |
1 | 2 | from datetime import datetime |
2 | 3 | import json |
3 | 4 | from os.path import join, normpath, pathsep |
@@ -223,19 +224,20 @@ def is_state_count_info_correct(model, distinct_states, total_states, state_dept |
223 | 224 | # State depth not yet deterministic due to TLC bug: https://github.com/tlaplus/tlaplus/issues/883 |
224 | 225 | return none_or_equal(expected_distinct_states, distinct_states) and none_or_equal(expected_total_states, total_states) #and none_or_equal(expected_state_depth, state_depth) |
225 | 226 |
|
226 | | -state_count_regex = re.compile(r'(?P<total_states>\d+) states generated, (?P<distinct_states>\d+) distinct states found, 0 states left on queue.') |
227 | | -state_depth_regex = re.compile(r'The depth of the complete state graph search is (?P<state_depth>\d+).') |
| 227 | +state_count_regex = re.compile(r'(?P<total_states>[\d,]+) states generated, (?P<distinct_states>[\d,]+) distinct states found, 0 states left on queue.') |
| 228 | +state_depth_regex = re.compile(r'The depth of the complete state graph search is (?P<state_depth>[\d,]+).') |
228 | 229 |
|
229 | 230 | def extract_state_count_info(tlc_output): |
230 | 231 | """ |
231 | 232 | Parse & extract state count info from TLC output. |
232 | 233 | """ |
| 234 | + locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') |
233 | 235 | state_count_findings = state_count_regex.search(tlc_output) |
234 | 236 | state_depth_findings = state_depth_regex.search(tlc_output) |
235 | 237 | if state_count_findings is None or state_depth_findings is None: |
236 | 238 | return None |
237 | | - distinct_states = int(state_count_findings.group('distinct_states')) |
238 | | - total_states = int(state_count_findings.group('total_states')) |
239 | | - state_depth = int(state_depth_findings.group('state_depth')) |
| 239 | + distinct_states = locale.atoi(state_count_findings.group('distinct_states')) |
| 240 | + total_states = locale.atoi(state_count_findings.group('total_states')) |
| 241 | + state_depth = locale.atoi(state_depth_findings.group('state_depth')) |
240 | 242 | return (distinct_states, total_states, state_depth) |
241 | 243 |
|
0 commit comments