Formal Verification Specification Generator
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Formal Verification Specification Generator is a security-focused tool that creates formal verification specification templates from Solidity contract source code. It parses the contract to extract state variables, function signatures, and control flow patterns, then generates a structured specification file suitable for formal verification tools. The specification includes contract overview, state variable declarations, invariant definitions, function pre- and post-conditions, and additional security properties. Users can provide custom invariants to include in the specification. The output follows a standardized format that can be used with verification tools like Certora, SMTChecker, or custom formal verification pipelines. This enables developers to quickly create formal verification specifications without manually writing boilerplate property files.
HOW TO USE
Paste your Solidity source code into the input area. Enter a contract name (optional) and any custom invariants you want to include (one per line). Click "Generate specification" to process the code. The tool will display a summary including the number of state variables, functions, and invariants detected, along with a complete specification file. The specification includes default invariants (e.g., non-negative balances, total supply consistency), function specifications for common patterns (transfer, mint, burn, approve, ownership transfers), and any user-provided invariants. Use the copy button or download button to save the specification for use with formal verification tools.
TECHNICAL NOTE: SOURCE CODE PARSING AND SPEC GENERATION
The tool performs static analysis on the Solidity source code using regex-based parsing to extract contract structure. It identifies state variable declarations, function signatures, and control flow patterns. Based on the detected functions, it generates appropriate pre- and post-conditions: transfer functions get balance transfer properties, mint functions get supply increase properties, burn functions get supply decrease properties, approve functions get allowance properties, and ownership functions get ownership transfer properties. The tool includes a set of default invariants common to token contracts and combines them with user-provided invariants. The output is formatted as a human-readable specification file with clear sections for overview, invariants, function specifications, and additional properties.
WHAT IT CANNOT SEE
The tool cannot guarantee that generated specifications are complete or correct for the specific contract logic. It cannot automatically verify contract security; the specifications are templates that require manual review and refinement. It cannot detect all edge cases or vulnerabilities in the contract code. The tool is limited by the accuracy of source code analysis; complex patterns may be misidentified. It cannot generate formal proofs, only specification templates. It cannot handle complex contract interactions with external contracts or cross-contract invariants. It cannot verify contracts with non-standard patterns that deviate from common ERC patterns. The tool is limited by the expressiveness of the specification language; some properties may not be expressible in the output format.
PLEASE NOTE
This tool is designed exclusively for Solidity source code used on EVM-compatible chains. It does not support other smart contract languages like Vyper or Rust. The generated specifications are templates and should be reviewed and validated by security experts before use. The tool does not execute formal verification; it only generates specification files. Always verify that the generated specification matches the intended contract behavior. The tool provides no warranty that the generated specification will result in successful verification; users are responsible for validating all properties and assumptions.