Skip to content

Commit

Permalink
kevm-pyk/__main__, Makefile: rename kevm {kompile => kompile-spec} fo…
Browse files Browse the repository at this point in the history
…r more accurate usage
  • Loading branch information
ehildenb committed Nov 6, 2023
1 parent 47145cf commit 0c10f5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ tests/specs/%.prove: tests/specs/% tests/specs/$$(firstword $$(subst /, ,$$*))/$
--definition tests/specs/$(firstword $(subst /, ,$*))/$(KPROVE_FILE)/$(TEST_SYMBOLIC_BACKEND)

tests/specs/%/timestamp: tests/specs/$$(firstword $$(subst /, ,$$*))/$$(KPROVE_FILE).$$(KPROVE_EXT)
$(POETRY_RUN) kevm-pyk kompile \
$(POETRY_RUN) kevm-pyk kompile-spec \
$< \
--target $(word 3, $(subst /, , $*)) \
--output-definition tests/specs/$(firstword $(subst /, ,$*))/$(KPROVE_FILE)/$(word 3, $(subst /, , $*)) \
Expand Down
12 changes: 4 additions & 8 deletions kevm-pyk/src/kevm_pyk/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from .cli import KEVMCLIArgs, node_id_like
from .gst_to_kore import SORT_ETHEREUM_SIMULATION, gst_to_kore, kore_pgm_to_kore
from .kevm import KEVM, KEVMSemantics, kevm_node_printer
from .kompile import run_kompile
from .kompile import KompileTarget, run_kompile
from .utils import (
claim_dependency_dict,
ensure_ksequence_on_k_cell,
Expand All @@ -53,8 +53,6 @@
from pyk.proof.proof import Proof
from pyk.utils import BugReport

from .kompile import KompileTarget

T = TypeVar('T')

_LOGGER: Final = logging.getLogger(__name__)
Expand Down Expand Up @@ -89,12 +87,11 @@ def exec_version(**kwargs: Any) -> None:
print(f'KEVM Version: {VERSION}')


def exec_kompile(
def exec_kompile_spec(
output_dir: Path | None,
main_file: Path,
emit_json: bool,
includes: list[str],
target: KompileTarget,
main_module: str | None,
syntax_module: str | None,
read_only: bool = False,
Expand Down Expand Up @@ -123,7 +120,7 @@ def exec_kompile(
optimization = 0

run_kompile(
target,
KompileTarget.HASKELL,
output_dir=output_dir,
main_file=main_file,
main_module=main_module,
Expand Down Expand Up @@ -671,13 +668,12 @@ def parse(s: str) -> list[T]:
command_parser.add_parser('version', help='Print KEVM version and exit.', parents=[kevm_cli_args.logging_args])

kevm_kompile_args = command_parser.add_parser(
'kompile',
'kompile-spec',
help='Kompile KEVM specification.',
parents=[
kevm_cli_args.logging_args,
kevm_cli_args.k_args,
kevm_cli_args.kompile_args,
kevm_cli_args.target_args,
],
)
kevm_kompile_args.add_argument('main_file', type=file_path, help='Path to file with main module.')
Expand Down

0 comments on commit 0c10f5d

Please sign in to comment.