Hoare logic is an important basis for formal verification of imperative programs. This chapter presents Hoare triples for the basic constructs of an imperative program, illustrating through examples how the correctness of the program is established in Hoare logic. Except loop invariants, it describes how verification conditions are generated automatically. This automated process is illustrated by a Prolog program. Some heuristics for generating good loop invariants are also presented.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Hoare Logic

  • Hantao Zhang,
  • Jian Zhang

摘要

Hoare logic is an important basis for formal verification of imperative programs. This chapter presents Hoare triples for the basic constructs of an imperative program, illustrating through examples how the correctness of the program is established in Hoare logic. Except loop invariants, it describes how verification conditions are generated automatically. This automated process is illustrated by a Prolog program. Some heuristics for generating good loop invariants are also presented.