Skip to content

Commit

Permalink
Adding support for the --assume-defined flag (#2568)
Browse files Browse the repository at this point in the history
* adding support for assume-defined flag

* Set Version: 1.0.675

* Set Version: 1.0.676

* correction

---------

Co-authored-by: devops <[email protected]>
  • Loading branch information
PetarMax and devops authored Aug 8, 2024
1 parent 4c5b500 commit 25be766
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kevm-pyk/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "kevm-pyk"
version = "1.0.675"
version = "1.0.676"
description = ""
authors = [
"Runtime Verification, Inc. <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion kevm-pyk/src/kevm_pyk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
if TYPE_CHECKING:
from typing import Final

VERSION: Final = '1.0.675'
VERSION: Final = '1.0.676'
1 change: 1 addition & 0 deletions kevm-pyk/src/kevm_pyk/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ def create_kcfg_explore() -> KCFGExplore:
direct_subproof_rules=options.direct_subproof_rules,
max_frontier_parallel=options.max_frontier_parallel,
force_sequential=options.force_sequential,
assume_defined=options.assume_defined,
)
end_time = time.time()
_LOGGER.info(f'Proof timing {proof_problem.id}: {end_time - start_time}s')
Expand Down
9 changes: 9 additions & 0 deletions kevm-pyk/src/kevm_pyk/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ class KProveOptions(Options):
fast_check_subsumption: bool
direct_subproof_rules: bool
maintenance_rate: int
assume_defined: bool

@staticmethod
def default() -> dict[str, Any]:
Expand All @@ -385,6 +386,7 @@ def default() -> dict[str, Any]:
'fast_check_subsumption': False,
'direct_subproof_rules': False,
'maintenance_rate': 1,
'assume_defined': False,
}


Expand Down Expand Up @@ -853,6 +855,13 @@ def kprove_args(self) -> ArgumentParser:
type=int,
help='The number of proof iterations performed between two writes to disk and status bar updates. Note that setting to >1 may result in work being discarded if proof is interrupted.',
)
args.add_argument(
'--assume-defined',
dest='assume_defined',
default=None,
action='store_true',
help='Use the implication check of the Booster (experimental).',
)
return args

@cached_property
Expand Down
4 changes: 3 additions & 1 deletion kevm-pyk/src/kevm_pyk/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def run_prover(
progress: Progress | None = None,
task_id: TaskID | None = None,
maintenance_rate: int = 1,
assume_defined: bool = False,
) -> bool:
prover: APRProver | ImpliesProver
try:
Expand All @@ -129,6 +130,7 @@ def create_prover() -> APRProver:
always_check_subsumption=always_check_subsumption,
fast_check_subsumption=fast_check_subsumption,
direct_subproof_rules=direct_subproof_rules,
assume_defined=assume_defined,
)

def update_status_bar(_proof: Proof) -> None:
Expand Down Expand Up @@ -156,7 +158,7 @@ def update_status_bar(_proof: Proof) -> None:
)

elif type(proof) is EqualityProof:
prover = ImpliesProver(proof, kcfg_explore=create_kcfg_explore())
prover = ImpliesProver(proof, kcfg_explore=create_kcfg_explore(), assume_defined=assume_defined)
prover.advance_proof(proof)
else:
raise ValueError(f'Do not know how to build prover for proof: {proof}')
Expand Down
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.675
1.0.676

0 comments on commit 25be766

Please sign in to comment.