Skip to content

Commit 3338b42

Browse files
committed
include/infinite-gas, tests/infinite-gas-spec: another disequality lemma for Cgascap
1 parent b752209 commit 3338b42

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

include/kframework/infinite-gas.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ module INFINITE-GAS-COMMON
134134
rule Cmem(_, N) <Int #gas(G) => true requires N <Int #gas(G) [simplification]
135135
136136
rule 0 <=Int Cgascap(_, _, _, _) => true [simplification]
137+
rule G <=Int Cgascap(_, GCAP, #gas(_), _) => true requires G <=Int GCAP [simplification]
137138
rule Cgascap(_, GCAP, _, _) <Int G => true requires 0 <=Int GCAP andBool GCAP <Int G [simplification]
138139
rule Cgascap(_, #gas(_), #gas(_), _) <Int _ => false [simplification]
139140

tests/specs/functional/infinite-gas-spec.k

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,6 @@ module INFINITE-GAS-SPEC
128128
claim <k> runLemma(Cgascap(ISTANBUL, #gas(_), #gas(_), 700) <Int 3) => doneLemma(false) ... </k>
129129
claim <k> runLemma(0 <=Int Cgascap(ISTANBUL, #gas(VGAS +Int -5413), #gas(VGAS +Int -5413), 700)) => doneLemma(true) ... </k>
130130

131+
claim [Cgascap-comparison]: <k> runLemma(3000 <=Int Cgascap(ISTANBUL, #gas(VGAS +Int -491), #gas(VGAS +Int -491), Cextra(ISTANBUL, true, 0, _))) => doneLemma(true) ... </k>
132+
131133
endmodule

0 commit comments

Comments
 (0)