Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Commit b3be6f8

Browse files
author
François Guyot
committed
Merge branch 'master' into kcfg-key
merge master
2 parents 63cdfcc + e0cb467 commit b3be6f8

File tree

21 files changed

+775
-491
lines changed

21 files changed

+775
-491
lines changed

deps/k_release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.6.133
1+
5.6.137

package/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.339
1+
0.1.344

pyproject.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "pyk"
7-
<<<<<<< HEAD
8-
version = "0.1.338"
9-
=======
10-
version = "0.1.339"
11-
>>>>>>> master
7+
version = "0.1.344"
128
description = ""
139
authors = [
1410
"Runtime Verification, Inc. <[email protected]>",

src/pyk/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
from typing import Final
77

88

9-
K_VERSION: Final = '5.6.133'
9+
K_VERSION: Final = '5.6.137'

src/pyk/kast/manip.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,9 @@ def sort_assoc_label(label: str, kast: KInner) -> KInner:
5151
return kast
5252

5353

54-
def sort_ac_collections(definition: KDefinition, kast: KInner) -> KInner:
55-
ac_hooks = {'MAP.concat', 'SET.concat', 'BAG.concat'}
56-
ac_collections = [
57-
prod.klabel.name
58-
for prod in definition.productions
59-
if prod.klabel is not None and 'hook' in prod.att and prod.att['hook'] in ac_hooks
60-
]
61-
54+
def sort_ac_collections(kast: KInner) -> KInner:
6255
def _sort_ac_collections(_kast: KInner) -> KInner:
63-
if type(_kast) is KApply and _kast.label.name in ac_collections:
56+
if type(_kast) is KApply and (_kast.label.name in {'_Set_', '_Map_'} or _kast.label.name.endswith('CellMap_')):
6457
return sort_assoc_label(_kast.label.name, _kast)
6558
return _kast
6659

src/pyk/kast/pretty.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def print(self, kast: KAst) -> str:
9090
if self._unalias:
9191
kast = undo_aliases(self.definition, kast)
9292
if self._sort_collections:
93-
kast = sort_ac_collections(self.definition, kast)
93+
kast = sort_ac_collections(kast)
9494
return self._print_kinner(kast)
9595
raise AssertionError(f'Error unparsing: {kast}')
9696

src/pyk/kcfg/explore.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,10 +378,10 @@ def extend(
378378
cut_point_rules: Iterable[str] = (),
379379
terminal_rules: Iterable[str] = (),
380380
) -> None:
381-
if not kcfg.is_frontier(node.id):
382-
raise ValueError(f'Cannot extend non-frontier node {self.id}: {node.id}')
383-
384-
kcfg.add_expanded(node.id)
381+
if not kcfg.is_leaf(node.id):
382+
raise ValueError(f'Cannot extend non-leaf node {self.id}: {node.id}')
383+
if kcfg.is_stuck(node.id):
384+
raise ValueError(f'Cannot extend stuck node {self.id}: {node.id}')
385385

386386
_LOGGER.info(f'Extending KCFG from node {self.id}: {shorten_hashes(node.id)}')
387387
depth, cterm, next_cterms, next_node_logs = self.cterm_execute(
@@ -399,6 +399,7 @@ def extend(
399399

400400
# Stuck
401401
elif len(next_cterms) == 0:
402+
kcfg.add_stuck(node.id)
402403
_LOGGER.info(f'Found stuck node {self.id}: {shorten_hashes(node.id)}')
403404

404405
# Cut Rule

0 commit comments

Comments
 (0)