Skip to content

Commit

Permalink
Rename kontrol module and command to kontrolx (#2078)
Browse files Browse the repository at this point in the history
* Rename `kontrol` module and command to `kontrolx`

In order to avoid name collision with the downstream project in the
interim period both projects distribute the module.

* Set Version: 1.0.295

* Set Version: 1.0.296

---------

Co-authored-by: devops <[email protected]>
Co-authored-by: rv-jenkins <[email protected]>
  • Loading branch information
3 people authored Sep 19, 2023
1 parent f431756 commit 051c16c
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 19 deletions.
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
makeWrapper ${final.kevm-pyk}/bin/kevm $out/bin/kevm --prefix PATH : ${
prev.lib.makeBinPath [ prev.which k ]
} --set NIX_LIBS "${nixLibs prev}" --set KEVM_DIST_DIR $out
makeWrapper ${final.kevm-pyk}/bin/kontrol $out/bin/kontrol --prefix PATH : ${
makeWrapper ${final.kevm-pyk}/bin/kontrolx $out/bin/kontrolx --prefix PATH : ${
prev.lib.makeBinPath [
(solc.mkDefault final final.solc_0_8_13)
final.foundry-bin
Expand Down Expand Up @@ -148,7 +148,7 @@
projectDir = ./kevm-pyk;

postPatch = ''
substituteInPlace ./src/kontrol/foundry.py \
substituteInPlace ./src/kontrolx/foundry.py \
--replace "'forge', 'build'," "'forge', 'build', '--no-auto-detect',"
'';

Expand Down
6 changes: 3 additions & 3 deletions kevm-pyk/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "kevm-pyk"
version = "1.0.295"
version = "1.0.296"
description = ""
authors = [
"Runtime Verification, Inc. <[email protected]>",
]
packages = [
{ include = "kevm_pyk", from = "src/" },
{ include = "kontrol", from = "src/" },
{ include = "kontrolx", from = "src/" },
]

[tool.poetry.dependencies]
Expand Down Expand Up @@ -43,7 +43,7 @@ kevm = "kevm_pyk.__main__:main"
kevm-pyk = "kevm_pyk.__main__:main"
kevm-dist = "kevm_pyk.dist:main"
gst-to-kore = "kevm_pyk.gst_to_kore:main"
kontrol = "kontrol.__main__:main"
kontrolx = "kontrolx.__main__:main"

[tool.isort]
profile = "black"
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 @@ -6,4 +6,4 @@
from typing import Final


VERSION: Final = '1.0.295'
VERSION: Final = '1.0.296'
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def parse(s: str) -> list[T]:
return parse

kevm_cli_args = KEVMCLIArgs()
parser = ArgumentParser(prog='kontrol')
parser = ArgumentParser(prog='kontrolx')

command_parser = parser.add_subparsers(dest='command', required=True)

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion kevm-pyk/src/tests/integration/test_foundry_prove.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pyk.proof import APRProof
from pyk.utils import run_process, single

from kontrol.foundry import (
from kontrolx.foundry import (
Foundry,
foundry_kompile,
foundry_merge_nodes,
Expand Down
2 changes: 1 addition & 1 deletion kevm-pyk/src/tests/integration/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from pyk.utils import check_dir_path

from kevm_pyk.dist import DistTarget
from kontrol.solc_to_k import solc_to_k
from kontrolx.solc_to_k import solc_to_k

if TYPE_CHECKING:
from typing import Final
Expand Down
2 changes: 1 addition & 1 deletion kevm-pyk/src/tests/profiling/test_foundry_prove.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from pyk.utils import run_process

from kontrol.foundry import foundry_kompile, foundry_prove
from kontrolx.foundry import foundry_kompile, foundry_prove

from .utils import TEST_DATA_DIR

Expand Down
6 changes: 3 additions & 3 deletions kevm-pyk/src/tests/unit/test_foundry_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

from pyk.proof.proof import Proof

from kontrol.foundry import foundry_list
from kontrol.solc_to_k import Contract
from kontrolx.foundry import foundry_list
from kontrolx.solc_to_k import Contract

from .utils import TEST_DATA_DIR

Expand Down Expand Up @@ -53,7 +53,7 @@ def get_optional_proof(self, test_id: str) -> Proof | None:


def test_foundry_list(mocker: MockerFixture, update_expected_output: bool) -> None:
foundry_mock = mocker.patch('kontrol.foundry.Foundry')
foundry_mock = mocker.patch('kontrolx.foundry.Foundry')
foundry_mock.return_value = FoundryMock()

with LIST_EXPECTED.open() as f:
Expand Down
4 changes: 1 addition & 3 deletions kevm-pyk/src/tests/unit/test_solc_to_k.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from pyk.kast.inner import KToken, KVariable

from kevm_pyk.kevm import KEVM
from kontrol.solc_to_k import _range_predicate
from kontrolx.solc_to_k import Contract, _range_predicate

from .utils import TEST_DATA_DIR

Expand Down Expand Up @@ -39,8 +39,6 @@ def test_range_predicate(test_id: str, term: KInner, type: str, expected: KInner
assert ret == expected


from kontrol.solc_to_k import Contract

ESCAPE_DATA: list[tuple[str, str, str, str]] = [
('has_underscore', 'S2K', 'My_contract', 'S2KMyZUndcontract'),
('no_change', '', 'mycontract', 'mycontract'),
Expand Down
2 changes: 1 addition & 1 deletion package/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
kevm (1.0.295) unstable; urgency=medium
kevm (1.0.296) unstable; urgency=medium

* Initial Release.

Expand Down
2 changes: 1 addition & 1 deletion package/test-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if ! ${APPLE_SILICON:-false}; then
fi


kontrol solc-to-k tests/specs/examples/ERC20.sol ERC20 --target haskell --main-module ERC20-VERIFICATION > tests/specs/examples/erc20-bin-runtime.k
kontrolx solc-to-k tests/specs/examples/ERC20.sol ERC20 --target haskell --main-module ERC20-VERIFICATION > tests/specs/examples/erc20-bin-runtime.k
kevm kompile tests/specs/examples/erc20-spec.md \
--target haskell \
--output-definition tests/specs/examples/erc20-spec/haskell \
Expand Down
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.295
1.0.296

0 comments on commit 051c16c

Please sign in to comment.