language string | syntax string | semantics-glossary string | mutated bool | semantics-type string | mutation-pattern string | num_rules int64 | task string | setup-name string | random-mode bool | question string | options list | option_rule_ids list | answer_index int64 | answer_rule_id int64 | sampling_mode string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When both operands of a `%` expression are values and the right operand value is not zero, then the remainder of the integer division of the left operand value by the right operand value is the result. | [
"Rule 0 := {\n rule <k> X:Id => ERROR </k>\n <state> Rho:Map </state>\n requires notBool (X in_keys(Rho))\n }",
"Rule 1 := {\n rule <k> I1 % I2 => I1 %Int I2 ... </k>\n requires I2 =/=Int 0\n }",
"Rule 2 := {\n rule <k> I1 % I2 => ERROR ... </k>\n requires I2 ==Int 0\n }",
"... | [
2,
8,
9,
6,
10
] | 1 | 8 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | If a variable has no associated value in the current program state, then attempting to evaluate it results in an error and the program execution stops immediately. | [
"Rule 0 := {\n rule <k> I1 - I2 => I1 -Int I2 ... </k>\n }",
"Rule 1 := {\n rule <k> X:Id => ERROR </k>\n <state> Rho:Map </state>\n requires notBool (X in_keys(Rho))\n }",
"Rule 2 := {\n rule <k> X:Id => I ...</k>\n <state>... X |-> I ...</state>\n }",
"Rule 3 := {\n r... | [
4,
2,
1,
8,
10
] | 1 | 2 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When the operand of a unary `!` expression is a boolean value, the result is obtained by negating that boolean value. | [
"Rule 0 := {\n rule <k> I1 > I2 => I1 >Int I2 ... </k>\n }",
"Rule 1 := {\n rule <k> ! B1 => notBool B1 ... </k>\n }",
"Rule 2 := {\n rule <k> I1 == I2 => I1 ==Int I2 ... </k>\n }",
"Rule 3 := {\n rule <k> I1 != I2 => I1 =/=Int I2 ... </k>\n }",
"Rule 4 := {\n rule <k> I1 <= I2 =>... | [
14,
18,
16,
17,
13
] | 1 | 18 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When both operands of an `==` expression are values, the result is obtained by comparing whether the left operand value is equal to the right operand value. | [
"Rule 0 := {\n rule <k> I1 > I2 => I1 >Int I2 ... </k>\n }",
"Rule 1 := {\n rule <k> I1 == I2 => I1 ==Int I2 ... </k>\n }",
"Rule 2 := {\n rule <k> I1 != I2 => I1 =/=Int I2 ... </k>\n }",
"Rule 3 := {\n rule <k> ! B1 => notBool B1 ... </k>\n }",
"Rule 4 := {\n rule <k> I1 <= I2 =>... | [
14,
16,
17,
18,
13
] | 1 | 16 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When both operands of a `>=` expression are values, the result is obtained by comparing whether the left operand value is greater than or equal to the right operand value. | [
"Rule 0 := {\n rule <k> I1 > I2 => I1 >Int I2 ... </k>\n }",
"Rule 1 := {\n rule <k> I1 >= I2 => I1 >=Int I2 ... </k>\n }",
"Rule 2 := {\n rule <k> I1 != I2 => I1 =/=Int I2 ... </k>\n }",
"Rule 3 := {\n rule <k> ! B1 => notBool B1 ... </k>\n }",
"Rule 4 := {\n rule <k> I1 <= I2 =>... | [
14,
15,
17,
18,
13
] | 1 | 15 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When both operands of a `%` expression are values and the right operand value is zero, then an error occurs and the program execution stops immediately. | [
"Rule 0 := {\n rule <k> X:Id => ERROR </k>\n <state> Rho:Map </state>\n requires notBool (X in_keys(Rho))\n }",
"Rule 1 := {\n rule <k> I1 % I2 => ERROR ... </k>\n requires I2 ==Int 0\n }",
"Rule 2 := {\n rule <k> I1 % I2 => I1 %Int I2 ... </k>\n requires I2 =/=Int 0\n }",
"... | [
2,
9,
8,
6,
10
] | 1 | 9 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When both operands of a `/` expression are values and the right operand value is zero, then an error occurs and the program execution stops immediately. | [
"Rule 0 := {\n rule <k> X:Id => ERROR </k>\n <state> Rho:Map </state>\n requires notBool (X in_keys(Rho))\n }",
"Rule 1 := {\n rule <k> I1 / I2 => ERROR ... </k>\n requires I2 ==Int 0\n }",
"Rule 2 := {\n rule <k> I1 / I2 => I1 /Int I2 ... </k>\n requires I2 =/=Int 0\n }",
"... | [
2,
7,
6,
8,
10
] | 1 | 7 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When a `break` statement is encountered and the statement following it is a `breakMarker`, then both the `break` and `breakMarker` are removed and execution continues with the statements following the loop. | [
"Rule 0 := {\n rule <k> break; ~> S:Stmt => break; ...</k>\n <whileStack> ListItem(_) REST:List </whileStack>\n }",
"Rule 1 := {\n rule <k> continue; => ERROR </k>\n <whileStack> .List </whileStack>\n }",
"Rule 2 := {\n rule <k> break; ~> breakMarker => . ... </k>\n }",
"Rule... | [
33,
31,
35,
34,
23
] | 2 | 35 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When both operands of a `/` expression are values and the right operand value is not zero, the result is obtained by integer division of the left operand value by the right operand value. | [
"Rule 0 := {\n rule <k> X:Id => ERROR </k>\n <state> Rho:Map </state>\n requires notBool (X in_keys(Rho))\n }",
"Rule 1 := {\n rule <k> I1 / I2 => I1 /Int I2 ... </k>\n requires I2 =/=Int 0\n }",
"Rule 2 := {\n rule <k> I1 / I2 => ERROR ... </k>\n requires I2 ==Int 0\n }",
"... | [
2,
6,
7,
8,
10
] | 1 | 6 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When a `continueMarker` is encountered, it is removed from the computation and execution continues. | [
"Rule 0 := {\n rule <k> if (false) _ else S ; => S ... </k>\n }",
"Rule 1 := {\n rule <k> breakMarker => . ... </k>\n }",
"Rule 2 := {\n rule <k> S:ContMark => . ... </k>\n }",
"Rule 3 := {\n rule <k> break; ~> S:Stmt => break; ...</k>\n <whileStack> ListItem(_) REST:List </while... | [
23,
27,
28,
33,
32
] | 2 | 28 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When both operands of a `+` expression are values, the result is obtained by adding those two values. | [
"Rule 0 := {\n rule <k> I1 % I2 => ERROR ... </k>\n requires I2 ==Int 0\n }",
"Rule 1 := {\n rule <k> I1 / I2 => ERROR ... </k>\n requires I2 ==Int 0\n }",
"Rule 2 := {\n rule <k> I1 + I2 => I1 +Int I2 ... </k>\n }",
"Rule 3 := {\n rule <k> + I1 => 0 +Int I1 ... </k>\n }",
"Rul... | [
9,
7,
3,
10,
2
] | 2 | 3 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | If a variable has no associated value in the current program state, then attempting to evaluate it results in an error and the program execution stops immediately. | [
"Rule 0 := {\n rule <k> I1 - I2 => I1 -Int I2 ... </k>\n }",
"Rule 1 := {\n rule <k> X:Id => ERROR </k>\n <state> Rho:Map </state>\n requires notBool (X in_keys(Rho))\n }",
"Rule 2 := {\n rule <k> X:Id => I ...</k>\n <state>... X |-> I ...</state>\n }",
"Rule 3 := {\n r... | [
4,
2,
1,
8,
10
] | 1 | 2 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When both operands of a `/` expression are values and the right operand value is not zero, the result is obtained by integer division of the left operand value by the right operand value. | [
"Rule 0 := {\n rule <k> X:Id => ERROR </k>\n <state> Rho:Map </state>\n requires notBool (X in_keys(Rho))\n }",
"Rule 1 := {\n rule <k> I1 / I2 => I1 /Int I2 ... </k>\n requires I2 =/=Int 0\n }",
"Rule 2 := {\n rule <k> I1 / I2 => ERROR ... </k>\n requires I2 ==Int 0\n }",
"... | [
2,
6,
7,
8,
10
] | 1 | 6 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When both operands of a `>` expression are values, the result is obtained by comparing whether the left operand value is greater than the right operand value. | [
"Rule 0 := {\n rule <k> I1 >= I2 => I1 >=Int I2 ... </k>\n }",
"Rule 1 := {\n rule <k> I1 > I2 => I1 >Int I2 ... </k>\n }",
"Rule 2 := {\n rule <k> I1 != I2 => I1 =/=Int I2 ... </k>\n }",
"Rule 3 := {\n rule <k> ! B1 => notBool B1 ... </k>\n }",
"Rule 4 := {\n rule <k> I1 <= I2 =>... | [
15,
14,
17,
18,
13
] | 1 | 14 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When both operands of a `>=` expression are values, the result is obtained by comparing whether the left operand value is greater than or equal to the right operand value. | [
"Rule 0 := {\n rule <k> I1 > I2 => I1 >Int I2 ... </k>\n }",
"Rule 1 := {\n rule <k> I1 >= I2 => I1 >=Int I2 ... </k>\n }",
"Rule 2 := {\n rule <k> I1 != I2 => I1 =/=Int I2 ... </k>\n }",
"Rule 3 := {\n rule <k> ! B1 => notBool B1 ... </k>\n }",
"Rule 4 := {\n rule <k> I1 <= I2 =>... | [
14,
15,
17,
18,
13
] | 1 | 15 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When a `break` statement is encountered and the statement following it is not a `breakMarker` and the `<whileStack>` stack is not empty, then the statement following it is dropped and the `break` remains the head of the computation. | [
"Rule 0 := {\n rule <k> break; => ERROR </k>\n <whileStack> .List </whileStack>\n }",
"Rule 1 := {\n rule <k> continue; => ERROR </k>\n <whileStack> .List </whileStack>\n }",
"Rule 2 := {\n rule <k> break; ~> S:Stmt => break; ...</k>\n <whileStack> ListItem(_) REST:List </... | [
34,
31,
33,
35,
23
] | 2 | 33 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | If a variable has no associated value in the current program state, then attempting to evaluate it results in an error and the program execution stops immediately. | [
"Rule 0 := {\n rule <k> I1 - I2 => I1 -Int I2 ... </k>\n }",
"Rule 1 := {\n rule <k> X:Id => ERROR </k>\n <state> Rho:Map </state>\n requires notBool (X in_keys(Rho))\n }",
"Rule 2 := {\n rule <k> X:Id => I ...</k>\n <state>... X |-> I ...</state>\n }",
"Rule 3 := {\n r... | [
4,
2,
1,
8,
10
] | 1 | 2 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | A declaration of the form `int x` introduces `x` into the program state and assigns it the value `0` before execution continues. | [
"Rule 0 := {\n rule <k> continue; ~> S:ContMark => . ...</k>\n }",
"Rule 1 := {\n rule <k> int X; => . ... </k>\n <state> Rho:Map (.Map => X|->0) </state>\n }",
"Rule 2 := {\n rule <k> X = I:Int; => . ...</k>\n <state>... X |-> (_ => I) ...</state>\n }",
"Rule 3 := {\n rul... | [
29,
36,
21,
1,
8
] | 1 | 36 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When both operands of a `<=` expression are values, the result is obtained by comparing whether the left operand value is less than or equal to the right operand value. | [
"Rule 0 := {\n rule <k> I1 >= I2 => I1 >=Int I2 ... </k>\n }",
"Rule 1 := {\n rule <k> I1 <= I2 => I1 <=Int I2 ... </k>\n }",
"Rule 2 := {\n rule <k> I1 != I2 => I1 =/=Int I2 ... </k>\n }",
"Rule 3 := {\n rule <k> ! B1 => notBool B1 ... </k>\n }",
"Rule 4 := {\n rule <k> I1 > I2 =... | [
15,
13,
17,
18,
14
] | 1 | 13 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When a `break` statement is encountered and the statement following it is a `breakMarker`, then both the `break` and `breakMarker` are removed and execution continues with the statements following the loop. | [
"Rule 0 := {\n rule <k> break; ~> S:Stmt => break; ...</k>\n <whileStack> ListItem(_) REST:List </whileStack>\n }",
"Rule 1 := {\n rule <k> continue; => ERROR </k>\n <whileStack> .List </whileStack>\n }",
"Rule 2 := {\n rule <k> break; ~> breakMarker => . ... </k>\n }",
"Rule... | [
33,
31,
35,
34,
23
] | 2 | 35 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When a `breakMarker` is encountered, it is removed from the computation and execution continues. | [
"Rule 0 := {\n rule <k> if (false) _ else S ; => S ... </k>\n }",
"Rule 1 := {\n rule <k> S:ContMark => . ... </k>\n }",
"Rule 2 := {\n rule <k> breakMarker => . ... </k>\n }",
"Rule 3 := {\n rule <k> break; ~> S:Stmt => break; ...</k>\n <whileStack> ListItem(_) REST:List </while... | [
23,
28,
27,
33,
32
] | 2 | 27 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When both operands of a `>=` expression are values, the result is obtained by comparing whether the left operand value is greater than or equal to the right operand value. | [
"Rule 0 := {\n rule <k> I1 > I2 => I1 >Int I2 ... </k>\n }",
"Rule 1 := {\n rule <k> I1 >= I2 => I1 >=Int I2 ... </k>\n }",
"Rule 2 := {\n rule <k> I1 != I2 => I1 =/=Int I2 ... </k>\n }",
"Rule 3 := {\n rule <k> ! B1 => notBool B1 ... </k>\n }",
"Rule 4 := {\n rule <k> I1 <= I2 =>... | [
14,
15,
17,
18,
13
] | 1 | 15 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When a `continue` statement is encountered and the statement following it is a `continueMarker`, then both the `continue` and `continueMarker` are removed and execution continues. | [
"Rule 0 := {\n rule <k> continue; ~> S:Stmt => continue; ...</k>\n <whileStack> ListItem(_) REST:List </whileStack>\n requires notBool isContmark(S)\n }",
"Rule 1 := {\n rule <k> if (false) _ else S ; => S ... </k>\n }",
"Rule 2 := {\n rule <k> continue; ~> S:ContMark => . ...</k>\n ... | [
30,
23,
29,
32,
31
] | 2 | 29 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When the operand of a unary `!` expression is a boolean value, the result is obtained by negating that boolean value. | [
"Rule 0 := {\n rule <k> I1 > I2 => I1 >Int I2 ... </k>\n }",
"Rule 1 := {\n rule <k> ! B1 => notBool B1 ... </k>\n }",
"Rule 2 := {\n rule <k> I1 == I2 => I1 ==Int I2 ... </k>\n }",
"Rule 3 := {\n rule <k> I1 != I2 => I1 =/=Int I2 ... </k>\n }",
"Rule 4 := {\n rule <k> I1 <= I2 =>... | [
14,
18,
16,
17,
13
] | 1 | 18 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | If a variable is associated with a value in the current program state, then evaluating it yields that value. | [
"Rule 0 := {\n rule <k> I1 - I2 => I1 -Int I2 ... </k>\n }",
"Rule 1 := {\n rule <k> X:Id => I ...</k>\n <state>... X |-> I ...</state>\n }",
"Rule 2 := {\n rule <k> X:Id => ERROR </k>\n <state> Rho:Map </state>\n requires notBool (X in_keys(Rho))\n }",
"Rule 3 := {\n r... | [
4,
1,
2,
8,
10
] | 1 | 1 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When the operand of a unary `-` expression is a value, the result is obtained by negating the value. | [
"Rule 0 := {\n rule <k> I1 % I2 => I1 %Int I2 ... </k>\n requires I2 =/=Int 0\n }",
"Rule 1 := {\n rule <k> I1 / I2 => I1 /Int I2 ... </k>\n requires I2 =/=Int 0\n }",
"Rule 2 := {\n rule <k> - I1 => 0 -Int I1 ... </k>\n }",
"Rule 3 := {\n rule <k> I1 % I2 => ERROR ... </k>\n req... | [
8,
6,
11,
9,
2
] | 2 | 11 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When a `continueMarker` is encountered, it is removed from the computation and execution continues. | [
"Rule 0 := {\n rule <k> if (false) _ else S ; => S ... </k>\n }",
"Rule 1 := {\n rule <k> breakMarker => . ... </k>\n }",
"Rule 2 := {\n rule <k> S:ContMark => . ... </k>\n }",
"Rule 3 := {\n rule <k> break; ~> S:Stmt => break; ...</k>\n <whileStack> ListItem(_) REST:List </while... | [
23,
27,
28,
33,
32
] | 2 | 28 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | If the predicate `q` in the `if(q) SL1 else SL2` statement is a boolean value and `q = true`, then the execution proceeds with the statements in the statement list `SL1` (if-block). | [
"Rule 0 := {\n rule <k> if (false) _ else S ; => S ... </k>\n }",
"Rule 1 := {\n rule <k> continue; ~> breakMarker => continue; ...</k>\n }",
"Rule 2 := {\n rule <k> if (true) S else _ ; => S ... </k>\n }",
"Rule 3 := {\n rule <k> while1 (B) S => if (B) {S continueMarker (while1 (B) S)}... | [
23,
32,
22,
25,
33
] | 2 | 22 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When the operand of a unary `!` expression is a boolean value, the result is obtained by negating that boolean value. | [
"Rule 0 := {\n rule <k> I1 > I2 => I1 >Int I2 ... </k>\n }",
"Rule 1 := {\n rule <k> ! B1 => notBool B1 ... </k>\n }",
"Rule 2 := {\n rule <k> I1 == I2 => I1 ==Int I2 ... </k>\n }",
"Rule 3 := {\n rule <k> I1 != I2 => I1 =/=Int I2 ... </k>\n }",
"Rule 4 := {\n rule <k> I1 <= I2 =>... | [
14,
18,
16,
17,
13
] | 1 | 18 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When the operand of a unary `+` expression is a value, the result is obtained by adding zero to that value. | [
"Rule 0 := {\n rule <k> I1 % I2 => I1 %Int I2 ... </k>\n requires I2 =/=Int 0\n }",
"Rule 1 := {\n rule <k> I1 / I2 => I1 /Int I2 ... </k>\n requires I2 =/=Int 0\n }",
"Rule 2 := {\n rule <k> + I1 => 0 +Int I1 ... </k>\n }",
"Rule 3 := {\n rule <k> I1 % I2 => ERROR ... </k>\n req... | [
8,
6,
10,
9,
2
] | 2 | 10 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When both operands of a `>` expression are values, the result is obtained by comparing whether the left operand value is greater than the right operand value. | [
"Rule 0 := {\n rule <k> I1 >= I2 => I1 >=Int I2 ... </k>\n }",
"Rule 1 := {\n rule <k> I1 > I2 => I1 >Int I2 ... </k>\n }",
"Rule 2 := {\n rule <k> I1 != I2 => I1 =/=Int I2 ... </k>\n }",
"Rule 3 := {\n rule <k> ! B1 => notBool B1 ... </k>\n }",
"Rule 4 := {\n rule <k> I1 <= I2 =>... | [
15,
14,
17,
18,
13
] | 1 | 14 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | If the predicate `q` in the `if(q) SL1 else SL2` statement is a boolean value and `q = true`, then the execution proceeds with the statements in the statement list `SL1` (if-block). | [
"Rule 0 := {\n rule <k> if (false) _ else S ; => S ... </k>\n }",
"Rule 1 := {\n rule <k> continue; ~> breakMarker => continue; ...</k>\n }",
"Rule 2 := {\n rule <k> if (true) S else _ ; => S ... </k>\n }",
"Rule 3 := {\n rule <k> while1 (B) S => if (B) {S continueMarker (while1 (B) S)}... | [
23,
32,
22,
25,
33
] | 2 | 22 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When both operands of a `/` expression are values and the right operand value is zero, then an error occurs and the program execution stops immediately. | [
"Rule 0 := {\n rule <k> X:Id => ERROR </k>\n <state> Rho:Map </state>\n requires notBool (X in_keys(Rho))\n }",
"Rule 1 := {\n rule <k> I1 / I2 => ERROR ... </k>\n requires I2 ==Int 0\n }",
"Rule 2 := {\n rule <k> I1 / I2 => I1 /Int I2 ... </k>\n requires I2 =/=Int 0\n }",
"... | [
2,
7,
6,
8,
10
] | 1 | 7 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When both operands of a `/` expression are values and the right operand value is not zero, the result is obtained by integer division of the left operand value by the right operand value. | [
"Rule 0 := {\n rule <k> X:Id => ERROR </k>\n <state> Rho:Map </state>\n requires notBool (X in_keys(Rho))\n }",
"Rule 1 := {\n rule <k> I1 / I2 => I1 /Int I2 ... </k>\n requires I2 =/=Int 0\n }",
"Rule 2 := {\n rule <k> I1 / I2 => ERROR ... </k>\n requires I2 ==Int 0\n }",
"... | [
2,
6,
7,
8,
10
] | 1 | 6 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | If the predicate `q` in the `while1(q) S` statement is a boolean value, then the statement is transformed into an `if-else` statement that checks the predicate and either executes the body of `while1(q) S` statement followed by a continue marker and re-evaluates the `while1(q) S` statement, or exits through the `else` ... | [
"Rule 0 := {\n rule <k> if (false) _ else S ; => S ... </k>\n }",
"Rule 1 := {\n rule <k> S:ContMark => . ... </k>\n }",
"Rule 2 := {\n rule <k> while1 (B) S => if (B) {S continueMarker (while1 (B) S)} else {}; ...</k>\n <whileStack> ListItem(X:Int) S1:List</whileStack>\n }",
"Rule ... | [
23,
28,
25,
33,
32
] | 2 | 25 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When both operands of a `/` expression are values and the right operand value is zero, then an error occurs and the program execution stops immediately. | [
"Rule 0 := {\n rule <k> X:Id => ERROR </k>\n <state> Rho:Map </state>\n requires notBool (X in_keys(Rho))\n }",
"Rule 1 := {\n rule <k> I1 / I2 => ERROR ... </k>\n requires I2 ==Int 0\n }",
"Rule 2 := {\n rule <k> I1 / I2 => I1 /Int I2 ... </k>\n requires I2 =/=Int 0\n }",
"... | [
2,
7,
6,
8,
10
] | 1 | 7 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | If the predicate `q` in the `if(q) SL1 else SL2` statement is a boolean value and `q = false`, then the execution proceeds with the statements in the statement list `SL2` (else-block). | [
"Rule 0 := {\n rule <k> if (true) S else _ ; => S ... </k>\n }",
"Rule 1 := {\n rule <k> continue; ~> breakMarker => continue; ...</k>\n }",
"Rule 2 := {\n rule <k> if (false) _ else S ; => S ... </k>\n }",
"Rule 3 := {\n rule <k> while1 (B) S => if (B) {S continueMarker (while1 (B) S)}... | [
22,
32,
23,
25,
33
] | 2 | 23 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | If the predicate `q` in the `if(q) SL1 else SL2` statement is a boolean value and `q = false`, then the execution proceeds with the statements in the statement list `SL2` (else-block). | [
"Rule 0 := {\n rule <k> if (true) S else _ ; => S ... </k>\n }",
"Rule 1 := {\n rule <k> continue; ~> breakMarker => continue; ...</k>\n }",
"Rule 2 := {\n rule <k> if (false) _ else S ; => S ... </k>\n }",
"Rule 3 := {\n rule <k> while1 (B) S => if (B) {S continueMarker (while1 (B) S)}... | [
22,
32,
23,
25,
33
] | 2 | 23 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When both operands of a `!=` expression are values, the result is obtained by comparing whether the left operand value is not equal to the right operand value. | [
"Rule 0 := {\n rule <k> I1 > I2 => I1 >Int I2 ... </k>\n }",
"Rule 1 := {\n rule <k> I1 != I2 => I1 =/=Int I2 ... </k>\n }",
"Rule 2 := {\n rule <k> I1 == I2 => I1 ==Int I2 ... </k>\n }",
"Rule 3 := {\n rule <k> ! B1 => notBool B1 ... </k>\n }",
"Rule 4 := {\n rule <k> I1 <= I2 =>... | [
14,
17,
16,
18,
13
] | 1 | 17 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When both operands of a `+` expression are values, the result is obtained by adding those two values. | [
"Rule 0 := {\n rule <k> I1 % I2 => ERROR ... </k>\n requires I2 ==Int 0\n }",
"Rule 1 := {\n rule <k> I1 / I2 => ERROR ... </k>\n requires I2 ==Int 0\n }",
"Rule 2 := {\n rule <k> I1 + I2 => I1 +Int I2 ... </k>\n }",
"Rule 3 := {\n rule <k> + I1 => 0 +Int I1 ... </k>\n }",
"Rul... | [
9,
7,
3,
10,
2
] | 2 | 3 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When a `continue` statement is encountered and the statement following it is not a `continueMarker` and the `<whileStack>` stack is not empty, then the statement following it is dropped and the `continue` remains the head of the computation. | [
"Rule 0 := {\n rule <k> continue; ~> S:ContMark => . ...</k>\n }",
"Rule 1 := {\n rule <k> if (false) _ else S ; => S ... </k>\n }",
"Rule 2 := {\n rule <k> continue; ~> S:Stmt => continue; ...</k>\n <whileStack> ListItem(_) REST:List </whileStack>\n requires notBool isContmark(S)\n ... | [
29,
23,
30,
32,
31
] | 2 | 30 | near_miss |
C* | module IMP_K-SYNTAX
imports INT
imports BOOL
imports LIST
imports MAP
imports ID
imports STRING
imports K-LOCATIONS
syntax AExp ::= Int | Id
| "+" AExp [strict]
| "-" AExp [strict]
> left:
AExp "/... |
module IMP_K-AUXILIARY
imports IMP_K-SYNTAX
syntax KResult ::= Int | Bool
syntax KItem ::= "breakMarker"
syntax KItem ::= "ERROR"
syntax Bool ::= isContmark(Stmt) [function]
rule isContmark(S:ContMark) => true
rule isContmark(_) => false [owise]
syntax KItem ::= push(Int)
synta... | false | K | Standard | 5 | nl2rule | uk | false | When a `break` statement is encountered and the statement following it is a `breakMarker`, then both the `break` and `breakMarker` are removed and execution continues with the statements following the loop. | [
"Rule 0 := {\n rule <k> break; ~> S:Stmt => break; ...</k>\n <whileStack> ListItem(_) REST:List </whileStack>\n }",
"Rule 1 := {\n rule <k> continue; => ERROR </k>\n <whileStack> .List </whileStack>\n }",
"Rule 2 := {\n rule <k> break; ~> breakMarker => . ... </k>\n }",
"Rule... | [
33,
31,
35,
34,
23
] | 2 | 35 | near_miss |
The 43rd International Conference on Machine Learning (ICML 2026), Seoul, South Korea
LLMs Lean on Priors, Not Programming Language
Semantics
by Aditya Thimmaiah1, Jiyang Zhang1, Jayanth Srinivasa2, Junyi Jessy Li1, Milos Gligoric1
1The University of Texas at Austin 2Cisco Research
TLDR: Frontier LLMs execute programs with up to 90–100% accuracy when symbols retain their usual meanings (e.g., + means addition). Under counterfactual semantic shifts (e.g., redefining + to mean subtraction) accuracy collapses by 40–70 percentage points. Despite handing the complete formal rules, the models keep answering as if the rules were never changed. LLMs don't faithfully interpret the semantics they are given—they retrieve what symbols usually mean from pretraining.
Abstract
Recent work asks whether large language models (LLMs) condition their reasoning on explicit rules rather than statistical regularities from pre-training. Program execution provides a canonical instance: formal semantics define behavior through symbolic transition rules that can be systematically altered under distribution shift. We investigate whether LLMs can condition their reasoning on formal semantics through program execution and introduce PLSEMANTICSBENCH, pairing featherweight C programs with two semantic systems—small-step operational semantics and K semantics—and probing four capabilities: composing rules for final states, selecting rules when state is unmutated, sustaining such conditioning over long traces, and following supplied rules under novel semantics. To decouple semantic reasoning from syntactic familiarity, we redefine familiar operators to induce symbol-meaning conflict and introduce novel symbols defined only through the supplied rules, and stress-test models on Human-Written, LLM-Translated, and Fuzzer-Generated splits with increasing structural complexity. Across 11 frontier LLMs, strong final-state accuracy under standard semantics (up to 90%) drops sharply—by as much as 40–60% points—under semantic mutations and increasing structural complexity. Only a handful of models achieve non-zero long-horizon conditioning accuracy, and even the best systems reach just 35%. Together, these results suggest that contemporary LLMs often rely on pretrained lexical associations rather than systematically conditioning on supplied formal rules.
About
PLSemanticsBench is the first counterfactual programming language (PL) semantics dataset for evaluating rule-conditioned reasoning in LLMs.
It contains the semantics formalization of C*, a featherweight C programming language, in two approaches: small-step
operational semantics and the K-framework semantics. Execution of C* programs under counterfactual and standard semantics is then used as a
lens for evaluating rule-conditioned reasoning in LLMs via three tasks:
| Task | Description |
|---|---|
| ✨ PredState | Predict the final program state |
| ✨ PredRule | Predict the ordered sequence of semantic rules needed to evaluate a program |
| ✨ PredTrace | Predict the step-by-step execution of a program |
It also includes the auxiliary tasks below, to rule out formal notation understanding as an influencing factor:
| Task | Description |
|---|---|
| ✨ NL2Rule | Select the correct formal semantic rule (out of 5) given its natural language description |
| ✨ Rule2NL | Select the correct natural language description (out of 5) given the formal semantic rule |
Installation
System Requirements
- Conda package management system
- Python 3.11 or higher
- OpenAI API key (for running experiments with OpenAI models)
Step-by-Step Installation
- Create and activate the conda environment:
conda env create -f env.yaml
conda activate plsemanticsbench
- Set up your OpenAI API key (only for OpenAI models):
export OPENAI_API_KEY='your-api-key-here'
Quick Start
We provide a bash script quick that:
- Sets up the
plsemanticsbenchconda environment. - Pulls the
DeepSeek-R1 1.5Bmodel. - Evaluates the
DeepSeek-R1 1.5Bmodel on thePredStatetask withno-semanticsandchain-of-thoughtprompting on theHuman-Writtendataset. - Prints the
accuracyandmalformed-countto screen. - Creates
metrics-predstate-deepseek-r1:1.5b.jsonthat contains the evaluation result.
bash quick
Detailed Usage
Basic Example
Here's a minimal example to get started:
from plsemanticsbench import GPTRunner
from plsemanticsbench import ExperimentArgs, LLMEvaluator
from plsemanticsbench import (
PROMPT_STRATEGY,
Task,
Formalization,
Semantics_Type,
Language,
PLDataset
)
# Model name
model_name = "o3-mini"
# Experiment args: Run the PredState task on the C* language with
# standard semantics formalized using SOS and with direct prompting
exp_args = ExperimentArgs(
dataset=PLDataset.Human_Written,
task=Task.PredState,
language=Language.CSTAR,
formalization=Formalization.SOS,
semantics_type=Semantics_Type.Standard,
model_name=model_name,
prompt_strategy=PROMPT_STRATEGY.DA,
num_datapoints_to_run=2, # Run just 2 datapoints (omit to run entire dataset)
)
# Run inference using the OpenAI API
gpt_runner = GPTRunner(args=exp_args)
# Generation (generate LLM prediction on the predstate task)
predictions = gpt_runner.do_experiment() # path to dump results can be provided
# Evaluation (evaluate LLM prediction against ground-truth)
llm_eval = LLMEvaluator(task=exp_args.task, semantics_type=exp_args.semantics_type)
evaluation_result = llm_eval.evaluate_from_list(results=predictions, model_name=model_name)
print(evaluation_result)
Expected Output
{
'accuracy': 1,
'malformed-count': 0,
}
Extending Providers
You must implement BaseRunner(_query method) to evaluate your models. We provide two example implementations for OpenAI models (GPTRunner) and Ollama models (OllamaRunner).
Dataset
Access
You can load the dataset using the datasets library. Here is an example:
from datasets import load_dataset
# Load PredState task with standard semantics under K formalization for the LLM Translated dataset
predstate_K_standard_llm_translated = load_dataset("EngineeringSoftware/PLSemanticsBench", name="predstate")["K_Standard_LLM_Translated"]
# Load PredRule task with nonstandard semantics under S formalization for the Human Written dataset
predrule_S_nonstandard_human_written = load_dataset("EngineeringSoftware/PLSemanticsBench", name="predrule")["S_NonStandard_Human_Written"]
# Load nl2rule task with standard semantics under S formalization
nl2rule_S_standard = load_dataset("EngineeringSoftware/PLSemanticsBench", name="nl2rule")["S_Standard_NumRule5"]
Splits
| Task | Split | Description |
|---|---|---|
| ✨ PredState (Final State Prediction) |
predstate/K_Standard_{dataset-name} | Standard semantics with K formalization |
| predstate/K_NonStandard_{dataset-name} | Nonstandard semantics with K formalization | |
| predstate/S_Standard_{dataset-name} | Standard semantics with S formalization | |
| predstate/S_NonStandard_{dataset-name} | Nonstandard semantics with S formalization | |
| ✨ PredRule (Semantic Rule Prediction) |
predrule/K_Standard_Human_Written | Standard semantics with K formalization |
| predrule/K_NonStandard_Human_Written | Nonstandard semantics with K formalization | |
| predrule/S_Standard_Human_Written | Standard semantics with S formalization | |
| predrule/S_NonStandard_Human_Written | Nonstandard semantics with S formalization | |
| ✨ PredTrace (Execution Trace Prediction) |
predtrace/K_Standard_Human_Written | Standard semantics with K formalization |
| predtrace/K_NonStandard_Human_Written | Nonstandard semantics with K formalization | |
| predtrace/S_Standard_Human_Written | Standard semantics with S formalization | |
| predtrace/S_NonStandard_Human_Written | Nonstandard semantics with S formalization | |
| Auxiliary Tasks (formal notation understanding) | ||
| ✨ NL2Rule (Natural language description to semantic rule) |
nl2rule/K_Standard_NumRule5 | Standard semantics with K formalization |
| nl2rule/K_NonStandard_NumRule5 | Nonstandard semantics with K formalization | |
| nl2rule/S_Standard_NumRule5 | Standard semantics with S formalization | |
| nl2rule/S_NonStandard_NumRule5 | Nonstandard semantics with S formalization | |
| ✨ Rule2NL (Semantic rule to natural language description) |
rule2nl/K_Standard_NumDescription5 | Standard semantics with K formalization |
| rule2nl/K_NonStandard_NumDescription5 | Nonstandard semantics with K formalization | |
| rule2nl/S_Standard_NumDescription5 | Standard semantics with S formalization | |
| rule2nl/S_NonStandard_NumDescription5 | Nonstandard semantics with S formalization | |
Example Data Point
An example of a data point from the predstate/None-human-written split:
{
"program": "int ans; ans = 1; ...",
"syntax": "<program> :: ...",
"semantics": "ℤ := Set of integers ...",
"mutated-program": "int ans; ans = 1; ...",
"mutation-pattern": "KeyWordSwap",
"exec-trace": [
{
"linenumber": 1,
"rule": ["Rule 38", "Rule 39"],
"state": {"ans": 1}
}
],
"ground-truth": "<answer>...</answer>"
}
Citation
@inproceedings{ThimmaiahETAL25PLSemanticsBench,
title = {LLMs Lean on Priors, Not Programming Language Semantics},
author = {Aditya Thimmaiah, Jiyang Zhang, Jayanth Srinivasa, Junyi Jessy Li, Milos Gligoric},
year = {2026},
booktitle = {ICML},
}
License
This project is licensed under the CC BY 4.0 License.
- Downloads last month
- 209