parse_c
Reads C source text or file to extract per-function contracts (requires/ensures) from ESBMC, CBMC, or ACSL annotations, enabling contract checking and composition.
Instructions
Read the contracts written in a C file (text or a file path), one per function: the clauses of ESBMC (__ESBMC_requires, __ESBMC_ensures in the body), of CBMC (__CPROVER_requires, __CPROVER_ensures after the signature), or of ACSL (/*@ requires ...; ensures ...; */). The inputs are the parameters, the outputs FUNCTION_out (the return value) and the pointers written (*p is p). A function with no clause has a contract with no terms: check_c checks it for overflow, division by zero, and the like.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "parse_c"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| text | No |