有很多工作的目标是判断两个程序的关系/等价性,就像Hoare Logic是程序性质(overapprox)判断算法的元理论/逻辑系统一样,Relational HL 可以看作是证明两程序关系的判断算法的元理论。关系可以是等价性,也可以是诸如差分鲁棒性(两个相同程序,但假设输入有微弱的差异,证明输出也只有微弱的差异)等性质。 Hoare Logic的基...
While doing so, one must identify an invariant for every loop in the program.This chapter also discusses the important problem of adaptation of specifications, since it has major implications on the design of practical verification systems based on Hoare logic....
In this snippet of Julia code, let's first make sure the post condition is true, given the random numbers. 0 =(4-4)* 5 = 0 * 5 = 0. This is true. Next, let's examine the invariant, which happens to be the same as the precondition. After two iterations o...