首页 > 其他分享 >Hoare Logic Notes

Hoare Logic Notes

时间:2022-09-05 21:36:42浏览次数:53  
标签:wedge frac Notes mathsf vdash Logic Hoare Rightarrow

The Hoare assignment axiom

\[\vdash \{P[E/V]\} V:=E \{P\} \]

The Floyd assignment axiom

\[\vdash \{P\} V:=E \{\exist v.\ (V=E[v/V]) \wedge P[v/V]\} \]

Precondition strengthening

\[\frac{\vdash P \Rightarrow P',\vdash\{P'\}C\{Q\}}{\vdash\{P\}C\{Q\}} \]

Postcondition weakening

\[\frac{\vdash\{P\}C\{Q'\},\vdash Q' \Rightarrow Q}{\vdash\{P\}C\{Q\}} \]

Specification conjunction

\[\frac{\vdash\{P_1\}C\{Q_1\},\vdash\{P_2\}C\{Q_2\}}{\vdash\{P_1 \wedge P_2\}C\{Q_1 \wedge Q_2\}} \]

Specification disjunction

\[\frac{\vdash\{P_1\}C\{Q_1\},\vdash\{P_2\}C\{Q_2\}}{\vdash\{P_1 \vee P_2\}C\{Q_1 \vee Q_2\}} \]

The sequencing rule

\[\frac{\vdash\{P\}C_1\{Q\},\vdash\{Q\}C_2\{R\}}{\vdash\{P\}C_1;C_2\{R\}} \]

The derived sequencing rule

\[\frac{\vdash\{P_1\}C_1\{Q_1\},\vdash\{P_2\}C_2\{Q_2\},...,\vdash\{P_n\}C_n\{Q_n\},\vdash P \Rightarrow P_1,\vdash Q_1 \Rightarrow P_2,\vdash Q_2 \Rightarrow P_3,...,\vdash Q_n \Rightarrow Q}{\vdash\{P\}C_1;...;C_n\{Q\}} \]

The conditional rule

\[\frac{\vdash\{P \wedge S\}C_1\{Q\},\vdash\{P \wedge \neg S\}C_2\{Q\}}{\vdash\{P\}\ \mathsf{IF}\ S\ \mathsf{THEN}\ C_1\ \mathsf{ELSE}\ C_2 \{Q\}} \]

标签:wedge,frac,Notes,mathsf,vdash,Logic,Hoare,Rightarrow
From: https://www.cnblogs.com/ErkkiErkko/p/16659659.html

相关文章

  • CentOS安装部署Weblogic12.1.3
    开始以为和旧版安装一样,使用控制台的方式,下载bin文件,然后一步步在console执行下来就行了。万万没想到,从12C版本后,bin文件不提供了,改成全系统通用的jar文件(generic.jar)。......
  • 基于python的数学建模---logicstic回归
    樱花数据集的Logistic回归   绘制散点图importmatplotlib.pyplotaspltimportnumpyasnpfromsklearn.datasetsimportload_irisiris=load_iris()#获......
  • weblogic11g打补丁,应用出现乱码
    解决办法:1、找到域下的这个路径:autodeploy\manager\WEB-INF里的web.xml文件,先备份好,再添加以下语句:  <context-param><param-name>weblogic.httpd.inputCharset./*......
  • GoodNotes 5 for Mac(笔记软件)中文版
    GoodNotes5formac是一款Mac手写记事应用。您可以在Mac上创建、导入和编辑文稿,支持导入PDF和图像,以在GoodNotes中添加注释,通过拖放操作将文稿从Mac添加到现有......