The Frama-C tool, for which Elazar offers a demo video in the comments, gives you the specification language, ACSL , for writing function contracts and various analyzers to verify that the C function satisfies its contract and security conditions, such as no runtime errors.
An extended tutorial, ACSL, by example , shows examples of actual C-algorithms that are indicated and verified, and separates functions from effective ones without side effects (without side effects they are considered easier and come first in the textbook). This document is also interesting in that it was not written by the developers of the tools that it describes, so it provides a more recent and more didactic look at these methods.
Pascal cuoq
source share