Skip to content

Commit 574932f

Browse files
committed
bin/kevm, kevm-pyk/__main__: rename show-cfg => show
1 parent 3eb91a8 commit 574932f

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

bin/kevm

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ run_foundry_prove() {
294294
run_kevm_pyk foundry-prove "$@"
295295
}
296296

297-
run_foundry_show_cfg() {
298-
run_kevm_pyk foundry-show-cfg "$@"
297+
run_foundry_show() {
298+
run_kevm_pyk foundry-show "$@"
299299
}
300300

301301
run_foundry_list() {
@@ -318,7 +318,7 @@ if [[ "$run_command" == 'help' ]] || [[ "$run_command" == '--help' ]] ; then
318318
${KEVM} klab-view [--profile|--debug] <spec>
319319
${KEVM} solc-to-k [--profile|--debug] <sol-file> <contract-name> <solc-arg>*
320320
${KEVM} foundry-list # see dedicated help menu
321-
${KEVM} foundry-cfg # see dedicated help menu
321+
${KEVM} foundry-show # see dedicated help menu
322322
${KEVM} foundry-kompile # see dedicated help menu
323323
${KEVM} foundry-prove # see dedicated help menu
324324
@@ -399,7 +399,8 @@ kevm_host='127.0.0.1'
399399
[[ ! "${run_command}" == solc-to-k ]] || backend=haskell
400400
[[ ! "${run_command}" == foundry-kompile ]] || backend=foundry
401401
[[ ! "${run_command}" == foundry-prove ]] || backend=foundry
402-
[[ ! "${run_command}" == foundry-show-cfg ]] || backend=foundry
402+
[[ ! "${run_command}" == foundry-list ]] || backend=foundry
403+
[[ ! "${run_command}" == foundry-show ]] || backend=foundry
403404
[[ ! "${run_command}" == interpret ]] || unparse=false
404405
args=()
405406
while [[ $# -gt 0 ]]; do
@@ -444,7 +445,7 @@ if ${pyk}; then
444445
fi
445446

446447
# get the run file
447-
if [[ "${run_command}" != 'foundry-kompile' ]] && [[ "${run_command}" != 'foundry-prove' ]] && [[ "${run_command}" != 'foundry-show-cfg' ]] && [[ "${run_command}" != 'foundry-list' ]]; then
448+
if [[ "${run_command}" != 'foundry-kompile' ]] && [[ "${run_command}" != 'foundry-prove' ]] && [[ "${run_command}" != 'foundry-show' ]] && [[ "${run_command}" != 'foundry-list' ]]; then
448449
run_file="$1" ; shift
449450
if [[ "${run_file}" == '-' ]]; then
450451
tmp_input="$(mktemp)"
@@ -476,7 +477,7 @@ case "$run_command-$backend" in
476477
solc-to-k-* ) run_solc "$@" ;;
477478
foundry-kompile-* ) run_foundry_kompile "$@" ;;
478479
foundry-prove-* ) run_foundry_prove "$@" ;;
479-
foundry-show-cfg-* ) run_foundry_show_cfg "$@" ;;
480+
foundry-show-* ) run_foundry_show "$@" ;;
480481
foundry-list-* ) run_foundry_list "$@" ;;
481482
*) ${KEVM} help ; fatal "Unknown command on backend: $run_command $backend" ;;
482483
esac

kevm-pyk/src/kevm_pyk/__main__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def prove_it(id_and_cfg: Tuple[str, Tuple[KCFG, Path]]) -> bool:
460460
sys.exit(failed)
461461

462462

463-
def exec_foundry_show_cfg(
463+
def exec_foundry_show(
464464
profile: bool,
465465
foundry_out: Path,
466466
test: str,
@@ -784,33 +784,33 @@ def parse(s: str) -> List[T]:
784784
help='Do not simplify the initial and target states at startup.',
785785
)
786786

787-
foundry_show_cfg_args = command_parser.add_parser(
788-
'foundry-show-cfg',
787+
foundry_show_args = command_parser.add_parser(
788+
'foundry-show',
789789
help='Display a given Foundry CFG.',
790790
parents=[shared_args, k_args],
791791
)
792-
foundry_show_cfg_args.add_argument('foundry_out', type=dir_path, help='Path to Foundry output directory.')
793-
foundry_show_cfg_args.add_argument('test', type=str, help='Display the CFG for this test.')
794-
foundry_show_cfg_args.add_argument(
792+
foundry_show_args.add_argument('foundry_out', type=dir_path, help='Path to Foundry output directory.')
793+
foundry_show_args.add_argument('test', type=str, help='Display the CFG for this test.')
794+
foundry_show_args.add_argument(
795795
'--node',
796796
type=str,
797797
dest='nodes',
798798
default=[],
799799
action='append',
800800
help='List of nodes to display as well.',
801801
)
802-
foundry_show_cfg_args.add_argument(
802+
foundry_show_args.add_argument(
803803
'--node-delta',
804804
type=KIT.arg_pair_of(str, str),
805805
dest='node_deltas',
806806
default=[],
807807
action='append',
808808
help='List of nodes to display delta for.',
809809
)
810-
foundry_show_cfg_args.add_argument(
810+
foundry_show_args.add_argument(
811811
'--minimize', dest='minimize', default=True, action='store_true', help='Minimize output.'
812812
)
813-
foundry_show_cfg_args.add_argument(
813+
foundry_show_args.add_argument(
814814
'--no-minimize', dest='minimize', action='store_false', help='Do not minimize output.'
815815
)
816816

0 commit comments

Comments
 (0)