add cli tests

This commit is contained in:
Leo Alt 2023-03-15 17:52:58 +01:00
parent aacbe72079
commit 6c58f31b4a
40 changed files with 582 additions and 0 deletions

View File

@ -0,0 +1 @@
--model-checker-engine all

View File

@ -0,0 +1 @@
Warning: SMTChecker: 1 unsupported language feature(s). Enable the model checker option "show unsupported" to see all of them.

View File

@ -0,0 +1,7 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
contract C {
function f() external pure {
assembly {}
}
}

View File

@ -0,0 +1 @@
--model-checker-engine bmc

View File

@ -0,0 +1 @@
Warning: SMTChecker: 1 unsupported language feature(s). Enable the model checker option "show unsupported" to see all of them.

View File

@ -0,0 +1,7 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
contract C {
function f() external pure {
assembly {}
}
}

View File

@ -0,0 +1 @@
--model-checker-engine chc

View File

@ -0,0 +1 @@
Warning: SMTChecker: 1 unsupported language feature(s). Enable the model checker option "show unsupported" to see all of them.

View File

@ -0,0 +1,7 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
contract C {
function f() external pure {
assembly {}
}
}

View File

@ -0,0 +1 @@
--model-checker-engine all --model-checker-show-unsupported

View File

@ -0,0 +1,5 @@
Warning: Inline assembly may cause SMTChecker to produce spurious warnings (false positives).
--> model_checker_show_unsupported_true_all_engines/input.sol:5:9:
|
5 | assembly {}
| ^^^^^^^^^^^

View File

@ -0,0 +1,7 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
contract C {
function f() external pure {
assembly {}
}
}

View File

@ -0,0 +1 @@
--model-checker-engine bmc --model-checker-show-unsupported

View File

@ -0,0 +1,5 @@
Warning: Inline assembly may cause SMTChecker to produce spurious warnings (false positives).
--> model_checker_show_unsupported_true_bmc/input.sol:5:9:
|
5 | assembly {}
| ^^^^^^^^^^^

View File

@ -0,0 +1,7 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
contract C {
function f() external pure {
assembly {}
}
}

View File

@ -0,0 +1 @@
--model-checker-engine chc --model-checker-show-unsupported

View File

@ -0,0 +1,5 @@
Warning: Inline assembly may cause SMTChecker to produce spurious warnings (false positives).
--> model_checker_show_unsupported_true_chc/input.sol:5:9:
|
5 | assembly {}
| ^^^^^^^^^^^

View File

@ -0,0 +1,7 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
contract C {
function f() external pure {
assembly {}
}
}

View File

@ -0,0 +1,21 @@
{
"language": "Solidity",
"sources":
{
"A":
{
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0;\n\ncontract test {
function f() external pure {
assembly {}
}
}"
}
},
"settings":
{
"modelChecker":
{
"engine": "all"
}
}
}

View File

@ -0,0 +1,22 @@
{
"errors":
[
{
"component": "general",
"errorCode": "5724",
"formattedMessage": "Warning: SMTChecker: 1 unsupported language feature(s). Enable the model checker option \"show unsupported\" to see all of them.
",
"message": "SMTChecker: 1 unsupported language feature(s). Enable the model checker option \"show unsupported\" to see all of them.",
"severity": "warning",
"type": "Warning"
}
],
"sources":
{
"A":
{
"id": 0
}
}
}

View File

@ -0,0 +1,21 @@
{
"language": "Solidity",
"sources":
{
"A":
{
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0;\n\ncontract test {
function f() external pure {
assembly {}
}
}"
}
},
"settings":
{
"modelChecker":
{
"engine": "bmc"
}
}
}

View File

@ -0,0 +1,22 @@
{
"errors":
[
{
"component": "general",
"errorCode": "5724",
"formattedMessage": "Warning: SMTChecker: 1 unsupported language feature(s). Enable the model checker option \"show unsupported\" to see all of them.
",
"message": "SMTChecker: 1 unsupported language feature(s). Enable the model checker option \"show unsupported\" to see all of them.",
"severity": "warning",
"type": "Warning"
}
],
"sources":
{
"A":
{
"id": 0
}
}
}

View File

@ -0,0 +1,21 @@
{
"language": "Solidity",
"sources":
{
"A":
{
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0;\n\ncontract test {
function f() external pure {
assembly {}
}
}"
}
},
"settings":
{
"modelChecker":
{
"engine": "chc"
}
}
}

View File

@ -0,0 +1,22 @@
{
"errors":
[
{
"component": "general",
"errorCode": "5724",
"formattedMessage": "Warning: SMTChecker: 1 unsupported language feature(s). Enable the model checker option \"show unsupported\" to see all of them.
",
"message": "SMTChecker: 1 unsupported language feature(s). Enable the model checker option \"show unsupported\" to see all of them.",
"severity": "warning",
"type": "Warning"
}
],
"sources":
{
"A":
{
"id": 0
}
}
}

View File

@ -0,0 +1,22 @@
{
"language": "Solidity",
"sources":
{
"A":
{
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0;\n\ncontract test {
function f() external pure {
assembly {}
}
}"
}
},
"settings":
{
"modelChecker":
{
"engine": "all",
"showUnsupported": false
}
}
}

View File

@ -0,0 +1,22 @@
{
"errors":
[
{
"component": "general",
"errorCode": "5724",
"formattedMessage": "Warning: SMTChecker: 1 unsupported language feature(s). Enable the model checker option \"show unsupported\" to see all of them.
",
"message": "SMTChecker: 1 unsupported language feature(s). Enable the model checker option \"show unsupported\" to see all of them.",
"severity": "warning",
"type": "Warning"
}
],
"sources":
{
"A":
{
"id": 0
}
}
}

View File

@ -0,0 +1,27 @@
{
"language": "Solidity",
"sources":
{
"A":
{
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0;\n\ncontract test {
struct S {
uint x;
}
S s;
function f(bool b) public {
s.x |= b ? 1 : 2;
assert(s.x > 0);
}
}"
}
},
"settings":
{
"modelChecker":
{
"engine": "all",
"showUnsupported": false
}
}
}

View File

@ -0,0 +1,32 @@
{
"errors":
[
{
"component": "general",
"errorCode": "5840",
"formattedMessage": "Warning: CHC: 1 verification condition(s) could not be proved. Enable the model checker option \"show unproved\" to see all of them. Consider choosing a specific contract to be verified in order to reduce the solving problems. Consider increasing the timeout per query.
",
"message": "CHC: 1 verification condition(s) could not be proved. Enable the model checker option \"show unproved\" to see all of them. Consider choosing a specific contract to be verified in order to reduce the solving problems. Consider increasing the timeout per query.",
"severity": "warning",
"type": "Warning"
},
{
"component": "general",
"errorCode": "2788",
"formattedMessage": "Warning: BMC: 1 verification condition(s) could not be proved. Enable the model checker option \"show unproved\" to see all of them. Consider choosing a specific contract to be verified in order to reduce the solving problems. Consider increasing the timeout per query.
",
"message": "BMC: 1 verification condition(s) could not be proved. Enable the model checker option \"show unproved\" to see all of them. Consider choosing a specific contract to be verified in order to reduce the solving problems. Consider increasing the timeout per query.",
"severity": "warning",
"type": "Warning"
}
],
"sources":
{
"A":
{
"id": 0
}
}
}

View File

@ -0,0 +1,22 @@
{
"language": "Solidity",
"sources":
{
"A":
{
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0;\n\ncontract test {
function f() external pure {
assembly {}
}
}"
}
},
"settings":
{
"modelChecker":
{
"engine": "bmc",
"showUnsupported": false
}
}
}

View File

@ -0,0 +1,22 @@
{
"errors":
[
{
"component": "general",
"errorCode": "5724",
"formattedMessage": "Warning: SMTChecker: 1 unsupported language feature(s). Enable the model checker option \"show unsupported\" to see all of them.
",
"message": "SMTChecker: 1 unsupported language feature(s). Enable the model checker option \"show unsupported\" to see all of them.",
"severity": "warning",
"type": "Warning"
}
],
"sources":
{
"A":
{
"id": 0
}
}
}

View File

@ -0,0 +1,22 @@
{
"language": "Solidity",
"sources":
{
"A":
{
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0;\n\ncontract test {
function f() external pure {
assembly {}
}
}"
}
},
"settings":
{
"modelChecker":
{
"engine": "chc",
"showUnsupported": false
}
}
}

View File

@ -0,0 +1,22 @@
{
"errors":
[
{
"component": "general",
"errorCode": "5724",
"formattedMessage": "Warning: SMTChecker: 1 unsupported language feature(s). Enable the model checker option \"show unsupported\" to see all of them.
",
"message": "SMTChecker: 1 unsupported language feature(s). Enable the model checker option \"show unsupported\" to see all of them.",
"severity": "warning",
"type": "Warning"
}
],
"sources":
{
"A":
{
"id": 0
}
}
}

View File

@ -0,0 +1,22 @@
{
"language": "Solidity",
"sources":
{
"A":
{
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0;\n\ncontract test {
function f() external pure {
assembly {}
}
}"
}
},
"settings":
{
"modelChecker":
{
"engine": "all",
"showUnsupported": true
}
}
}

View File

@ -0,0 +1,32 @@
{
"errors":
[
{
"component": "general",
"errorCode": "7737",
"formattedMessage": "Warning: Inline assembly may cause SMTChecker to produce spurious warnings (false positives).
--> A:6:7:
|
6 | \t\t\t\t\t\tassembly {}
| \t\t\t\t\t\t^^^^^^^^^^^
",
"message": "Inline assembly may cause SMTChecker to produce spurious warnings (false positives).",
"severity": "warning",
"sourceLocation":
{
"end": 127,
"file": "A",
"start": 116
},
"type": "Warning"
}
],
"sources":
{
"A":
{
"id": 0
}
}
}

View File

@ -0,0 +1,22 @@
{
"language": "Solidity",
"sources":
{
"A":
{
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0;\n\ncontract test {
function f() external pure {
assembly {}
}
}"
}
},
"settings":
{
"modelChecker":
{
"engine": "bmc",
"showUnsupported": true
}
}
}

View File

@ -0,0 +1,32 @@
{
"errors":
[
{
"component": "general",
"errorCode": "7737",
"formattedMessage": "Warning: Inline assembly may cause SMTChecker to produce spurious warnings (false positives).
--> A:6:7:
|
6 | \t\t\t\t\t\tassembly {}
| \t\t\t\t\t\t^^^^^^^^^^^
",
"message": "Inline assembly may cause SMTChecker to produce spurious warnings (false positives).",
"severity": "warning",
"sourceLocation":
{
"end": 127,
"file": "A",
"start": 116
},
"type": "Warning"
}
],
"sources":
{
"A":
{
"id": 0
}
}
}

View File

@ -0,0 +1,22 @@
{
"language": "Solidity",
"sources":
{
"A":
{
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0;\n\ncontract test {
function f() external pure {
assembly {}
}
}"
}
},
"settings":
{
"modelChecker":
{
"engine": "chc",
"showUnsupported": true
}
}
}

View File

@ -0,0 +1,32 @@
{
"errors":
[
{
"component": "general",
"errorCode": "7737",
"formattedMessage": "Warning: Inline assembly may cause SMTChecker to produce spurious warnings (false positives).
--> A:6:7:
|
6 | \t\t\t\t\t\tassembly {}
| \t\t\t\t\t\t^^^^^^^^^^^
",
"message": "Inline assembly may cause SMTChecker to produce spurious warnings (false positives).",
"severity": "warning",
"sourceLocation":
{
"end": 127,
"file": "A",
"start": 116
},
"type": "Warning"
}
],
"sources":
{
"A":
{
"id": 0
}
}
}

View File

@ -0,0 +1,22 @@
{
"language": "Solidity",
"sources":
{
"A":
{
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0;\n\ncontract test {
function f() external pure {
assembly {}
}
}"
}
},
"settings":
{
"modelChecker":
{
"engine": "all",
"showUnsupported": "aaa"
}
}
}

View File

@ -0,0 +1,12 @@
{
"errors":
[
{
"component": "general",
"formattedMessage": "settings.modelChecker.showUnsupported must be a Boolean value.",
"message": "settings.modelChecker.showUnsupported must be a Boolean value.",
"severity": "error",
"type": "JSONError"
}
]
}