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

Commit c0b8af8

Browse files
committed
Lint and typecheck
1 parent 4081969 commit c0b8af8

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/pyk/kcfg/explore.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
)
2121
from ..kast.outer import KRule
2222
from ..konvert import krule_to_kore
23-
from ..kore.rpc import AbortedResult, JsonRpcError, SatResult, StopReason, UnknownResult, UnsatResult
23+
from ..kore.rpc import AbortedResult, SatResult, StopReason, UnknownResult, UnsatResult
2424
from ..kore.syntax import Import, Module
2525
from ..prelude import k
2626
from ..prelude.k import GENERATED_TOP_CELL
@@ -129,7 +129,7 @@ def kast_simplify(self, kast: KInner) -> tuple[KInner | None, KInner, tuple[LogE
129129
unknown_predicate = None
130130
if unknown_predicate_kore is not None:
131131
unknown_predicate = self.kprint.kore_to_kast(unknown_predicate_kore)
132-
_LOGGER.warning(f"Could not decide predicate:" + self.kprint.pretty_print(unknown_predicate))
132+
_LOGGER.warning('Could not decide predicate:' + self.kprint.pretty_print(unknown_predicate))
133133
kast_simplified = self.kprint.kore_to_kast(kore_simplified)
134134
return unknown_predicate, kast_simplified, logs
135135

@@ -282,7 +282,7 @@ def cterm_assume_defined(self, cterm: CTerm) -> CTerm:
282282
unknown_predicate, kore_simplified, _logs = self._kore_client.simplify(kore)
283283
if unknown_predicate is not None:
284284
_LOGGER.warning(
285-
f"Could not decide predicate:" + self.kprint.pretty_print(self.kprint.kore_to_kast(unknown_predicate))
285+
'Could not decide predicate:' + self.kprint.pretty_print(self.kprint.kore_to_kast(unknown_predicate))
286286
)
287287
kast_simplified = self.kprint.kore_to_kast(kore_simplified)
288288
_LOGGER.debug(f'Definedness condition computed: {kast_simplified}')
@@ -300,7 +300,7 @@ def simplify(self, cfg: KCFG, logs: dict[int, tuple[LogEntry, ...]]) -> None:
300300
logs[node.id] = next_node_logs
301301
if unknown_predicate is not None:
302302
_LOGGER.warning(
303-
f"Could not decide predicate while simplifiyng node {node.id}:"
303+
f'Could not decide predicate while simplifiyng node {node.id}:'
304304
+ self.kprint.pretty_print(unknown_predicate)
305305
)
306306

@@ -489,7 +489,7 @@ def log(message: str, *, warning: bool = False) -> None:
489489
kcfg.add_stuck(node.id)
490490
log(f'stuck node: {node.id}')
491491

492-
case Undecided(cterm, _unknown_predicate, depth):
492+
case Undecided(cterm, _, depth):
493493
next_node = kcfg.create_node(cterm)
494494
kcfg.add_undecided(next_node.id)
495495
kcfg.create_edge(node.id, next_node.id, depth)

src/pyk/kore/rpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ def simplify(
865865
except KoreClientError as err:
866866
try:
867867
unknown_predicate = kore_term(err.data, Pattern) # type: ignore
868-
return unknown_predicate, pattern, tuple()
868+
return unknown_predicate, pattern, ()
869869
except ValueError:
870870
raise err
871871
logs = tuple(LogEntry.from_dict(l) for l in result['logs']) if 'logs' in result else ()

src/tests/unit/kore/test_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def kore_client(mock: Mock, mock_class: Mock) -> Iterator[KoreClient]: # noqa:
118118
},
119119
AbortedResult(
120120
state=State(term=int_dv(1), substitution=int_dv(2), predicate=int_dv(3)),
121+
next_states=(),
121122
depth=4,
122123
unknown_predicate=int_dv(5),
123124
logs=(),

0 commit comments

Comments
 (0)