@@ -387,11 +387,11 @@ def to_hex(kast: KInner) -> KInner:
387
387
388
388
@staticmethod
389
389
def halt () -> KApply :
390
- return KApply ('#halt_EVM_KItem ' )
390
+ return KApply ('halt ' )
391
391
392
392
@staticmethod
393
393
def sharp_execute () -> KApply :
394
- return KApply ('#execute_EVM_KItem ' )
394
+ return KApply ('execute ' )
395
395
396
396
@staticmethod
397
397
def jumpi () -> KApply :
@@ -411,7 +411,7 @@ def jump_applied(pc: KInner) -> KApply:
411
411
412
412
@staticmethod
413
413
def pc_applied (op : KInner ) -> KApply :
414
- return KApply ('#pc[_]_EVM_InternalOp_OpCode ' , [op ])
414
+ return KApply ('pc ' , [op ])
415
415
416
416
@staticmethod
417
417
def pow128 () -> KApply :
@@ -423,35 +423,35 @@ def pow256() -> KApply:
423
423
424
424
@staticmethod
425
425
def range_uint (width : int , i : KInner ) -> KApply :
426
- return KApply ('# rangeUInt(_,_)_WORD_Bool_Int_Int ' , [intToken (width ), i ])
426
+ return KApply ('rangeUInt' , [intToken (width ), i ])
427
427
428
428
@staticmethod
429
429
def range_sint (width : int , i : KInner ) -> KApply :
430
- return KApply ('# rangeSInt(_,_)_WORD_Bool_Int_Int ' , [intToken (width ), i ])
430
+ return KApply ('rangeSInt' , [intToken (width ), i ])
431
431
432
432
@staticmethod
433
433
def range_address (i : KInner ) -> KApply :
434
- return KApply ('# rangeAddress(_)_WORD_Bool_Int ' , [i ])
434
+ return KApply ('rangeAddress' , [i ])
435
435
436
436
@staticmethod
437
437
def range_bool (i : KInner ) -> KApply :
438
- return KApply ('# rangeBool(_)_WORD_Bool_Int ' , [i ])
438
+ return KApply ('rangeBool' , [i ])
439
439
440
440
@staticmethod
441
441
def range_bytes (width : KInner , ba : KInner ) -> KApply :
442
- return KApply ('# rangeBytes(_,_)_WORD_Bool_Int_Int ' , [width , ba ])
442
+ return KApply ('rangeBytes' , [width , ba ])
443
443
444
444
@staticmethod
445
445
def range_nonce (i : KInner ) -> KApply :
446
- return KApply ('# rangeNonce(_)_WORD_Bool_Int ' , [i ])
446
+ return KApply ('rangeNonce' , [i ])
447
447
448
448
@staticmethod
449
449
def range_blocknum (ba : KInner ) -> KApply :
450
- return KApply ('# rangeBlockNum(_)_WORD_Bool_Int ' , [ba ])
450
+ return KApply ('rangeBlockNum' , [ba ])
451
451
452
452
@staticmethod
453
453
def bool_2_word (cond : KInner ) -> KApply :
454
- return KApply ('bool2Word(_)_EVM-TYPES_Int_Bool ' , [cond ])
454
+ return KApply ('bool2Word' , [cond ])
455
455
456
456
@staticmethod
457
457
def size_bytes (ba : KInner ) -> KApply :
@@ -463,7 +463,7 @@ def inf_gas(g: KInner) -> KApply:
463
463
464
464
@staticmethod
465
465
def compute_valid_jumpdests (p : KInner ) -> KApply :
466
- return KApply ('# computeValidJumpDests(_)_EVM_Set_Bytes ' , [p ])
466
+ return KApply ('computeValidJumpDests' , [p ])
467
467
468
468
@staticmethod
469
469
def bin_runtime (c : KInner ) -> KApply :
@@ -475,13 +475,11 @@ def init_bytecode(c: KInner) -> KApply:
475
475
476
476
@staticmethod
477
477
def is_precompiled_account (i : KInner , s : KInner ) -> KApply :
478
- return KApply ('# isPrecompiledAccount(_,_)_EVM_Bool_Int_Schedule ' , [i , s ])
478
+ return KApply ('isPrecompiledAccount' , [i , s ])
479
479
480
480
@staticmethod
481
481
def hashed_location (compiler : str , base : KInner , offset : KInner , member_offset : int = 0 ) -> KApply :
482
- location = KApply (
483
- '#hashedLocation(_,_,_)_HASHED-LOCATIONS_Int_String_Int_IntList' , [stringToken (compiler ), base , offset ]
484
- )
482
+ location = KApply ('hashLoc' , [stringToken (compiler ), base , offset ])
485
483
if member_offset > 0 :
486
484
location = KApply ('_+Int_' , [location , intToken (member_offset )])
487
485
return location
@@ -492,23 +490,23 @@ def loc(accessor: KInner) -> KApply:
492
490
493
491
@staticmethod
494
492
def lookup (map : KInner , key : KInner ) -> KApply :
495
- return KApply ('# lookup(_,_)_EVM-TYPES_Int_Map_Int ' , [map , key ])
493
+ return KApply ('lookup' , [map , key ])
496
494
497
495
@staticmethod
498
496
def abi_calldata (name : str , args : list [KInner ]) -> KApply :
499
- return KApply ('# abiCallData(_,_)_EVM-ABI_Bytes_String_TypedArgs ' , [stringToken (name ), KEVM .typed_args (args )])
497
+ return KApply ('abiCallData' , [stringToken (name ), KEVM .typed_args (args )])
500
498
501
499
@staticmethod
502
500
def abi_selector (name : str ) -> KApply :
503
501
return KApply ('abi_selector' , [stringToken (name )])
504
502
505
503
@staticmethod
506
504
def abi_address (a : KInner ) -> KApply :
507
- return KApply ('#address(_)_EVM-ABI_TypedArg_Int ' , [a ])
505
+ return KApply ('abi_type_address ' , [a ])
508
506
509
507
@staticmethod
510
508
def abi_bool (b : KInner ) -> KApply :
511
- return KApply ('#bool(_)_EVM-ABI_TypedArg_Int ' , [b ])
509
+ return KApply ('abi_type_bool ' , [b ])
512
510
513
511
@staticmethod
514
512
def abi_type (type : str , value : KInner ) -> KApply :
@@ -524,7 +522,7 @@ def abi_array(elem_type: KInner, length: KInner, elems: list[KInner]) -> KApply:
524
522
525
523
@staticmethod
526
524
def as_word (b : KInner ) -> KApply :
527
- return KApply ('# asWord(_)_EVM-TYPES_Int_Bytes ' , [b ])
525
+ return KApply ('asWord' , [b ])
528
526
529
527
@staticmethod
530
528
def empty_typedargs () -> KApply :
@@ -560,15 +558,15 @@ def wordstack_len(wordstack: KInner) -> int:
560
558
561
559
@staticmethod
562
560
def parse_bytestack (s : KInner ) -> KApply :
563
- return KApply ('# parseByteStack(_)_SERIALIZATION_Bytes_String ' , [s ])
561
+ return KApply ('parseByteStack' , [s ])
564
562
565
563
@staticmethod
566
564
def bytes_empty () -> KApply :
567
565
return KApply ('.Bytes_BYTES-HOOKED_Bytes' )
568
566
569
567
@staticmethod
570
568
def buf (width : KInner , v : KInner ) -> KApply :
571
- return KApply ('# buf(_,_)_BUF-SYNTAX_Bytes_Int_Int ' , [width , v ])
569
+ return KApply ('buf' , [width , v ])
572
570
573
571
@staticmethod
574
572
def intlist (ints : list [KInner ]) -> KApply :
@@ -675,7 +673,7 @@ def compute_jumpdests(sections: list[KInner]) -> KInner:
675
673
offset = 0
676
674
jumpdests = []
677
675
for s in sections :
678
- if type (s ) is KApply and s .label == KLabel ('# buf(_,_)_BUF-SYNTAX_Bytes_Int_Int ' ):
676
+ if type (s ) is KApply and s .label == KLabel ('buf' ):
679
677
width_token = s .args [0 ]
680
678
assert type (width_token ) is KToken
681
679
offset += int (width_token .token )
0 commit comments