南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)Separation Logic(2/3)

Separation Logic (II) Acknowledgment:slides taken from Reynolds'mini-course CS 818A3
Separation Logic (II) Acknowledgment: slides taken from Reynolds’ mini-course CS 818A3

Specifications Partial correctness: ip}eta} Total correctness: [p]c[a] Note the spec now requires c does not abort
Specifications Partial correctness: Total correctness: Note the spec now requires c does not abort

Examples {emp}×:=cons(1,2){x-1,2} {x一1,2}y=[]{x一1,2∧y=1} {x→1,2Λy=1}[x+1]:=3{x-1,3∧y=1} {x→1,3∧y=1}dispose×{×+1-3∧y=1} {X→-*y一-} if y =x+1 then skip else if x=y+1 then x:=y else (dispose x;dispose y;x:=cons(1,2)) {x一-,-}
Examples

The Frame Rule (O'Hearn)(FR) p}crar p r}ciq r}, where no variable occurring free in r is modified by c
The Frame Rule (O’Hearn) (FR)

Why the Frame Rule is Sound We define: If,starting in the state s,h,no execution of a com- mand c aborts,then c is safe at s,h. If,starting in the state s,h,every execution of c termi- nates without aborting,then c must terminate normally at s,h. Then our programming language satisfies: Safety Monotonicity If hh and c is safe at s,h-h, then c is safe at s,h.If h c h and c must terminate normally at s,h-h,then c must terminate normally at s,h
Why the Frame Rule is Sound

Why the Frame Rule is Sound The Frame Property If h Ch,cis safe at s,h-h,and some execution of c starting at s,h terminates normally in the state s',h', s,h-五.C—s,h2i c safe s',h' then hh'and some execution of c starting at s,h-h, terminates normally in the state s',h'-h
Why the Frame Rule is Sound

Why the Frame Rule is Sound s,h-i.c-s,h2一n csafe s,h' s,h-hi.s,h2.h C s,h-.-.-s/.h
Why the Frame Rule is Sound

Inference Rules for Mutation The local form(MUL): {e--}[e]:=e'{e-e}. The global form(MUG): {(e--)*r}[e]:=e'{(e-e)*r}. The backward-reasoning form(MUBR): {(e一-)*(e一e)-*p)}[e]:=e'{p}. One rule implies another
Inference Rules for Mutation One rule implies another

The local form(MUL): {e→-}[e]:=e'{e→ye The global form (MUG): {(e一-)*r}[e]=e'{(ee)*r}. One can derive(MUG)from(MUL)by using the frame rule: {(e→-)*r} {e→-} [e]:=e r {e-e) {(e→e)*r}

The local form (MUL): {e→-}[e]:=e'{e→e'} The global form(MUG): {(e--)*r}[e]:=e'{(e-e)*r}. To go in the opposite direction it is only necessary to take r to be emp: {e→-} {(e--)*emp} [e]:=e {(e一e)*emp} {e-e'}
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《程序设计语言的形式语义》课程教学资源(文献资料)An Introduction to Separation Logic(Preliminary Draft).pdf
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)09_Shared-Variable Concurrency.pdf
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)Separation Logic(1/3).ppt
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)07_Axiomatic Semantics and Hoare Logic.pdf
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)06_Denotational Semantics.pdf
- 《程序设计语言的形式语义》课程教学资源(文献资料)Lecture Notes on the Lambda Calculus.pdf
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)05_Operational Semantics.pdf
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)04_Lambda Calculus.pptx
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)03_Math.pdf
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)02_CoqOverview.pptx
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)01_Introduction(主讲:冯新宇)Formal Semantics of Programming Languages.ppt
- 私立华联学院:《html5》课程教学资源(课件讲稿)第9章 CSS3高级应用.pdf
- 私立华联学院:《html5》课程教学资源(课件讲稿)第8章 多媒体技术.pdf
- 私立华联学院:《html5》课程教学资源(课件讲稿)第7章 表单的应用.pdf
- 私立华联学院:《html5》课程教学资源(课件讲稿)第6章 浮动与定位.pdf
- 私立华联学院:《html5》课程教学资源(课件讲稿)第5章 CSS盒子模型.pdf
- 私立华联学院:《html5》课程教学资源(课件讲稿)第4章 CSS3选择器.pdf
- 私立华联学院:《html5》课程教学资源(课件讲稿)第3章 CSS3入门.pdf
- 私立华联学院:《html5》课程教学资源(课件讲稿)第2章 HTML5 页面元素及属性.pdf
- 私立华联学院:《html5》课程教学资源(课件讲稿)第1章 初识HTML5.pdf
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)Separation Logic(3/3).ppt
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)10_Simply-Typed Lambda Calculus.pptx
- 私立华联学院:《C语言程序设计》课程教学资源(教案讲义)教学大纲.pdf
- 私立华联学院:《C语言程序设计》课程教学资源(教案讲义)应用案例.pdf
- 私立华联学院:《C语言程序设计》课程教学资源(教案讲义)课程标准(适用专业:物联网应用技术).pdf
- 私立华联学院:《C语言程序设计》课程电子教案(PPT课件)第一章 初识C语言(负责人:周鹏梅).ppt
- 私立华联学院:《C语言程序设计》课程电子教案(PPT课件)第三章 结构化程序设计.ppt
- 私立华联学院:《C语言程序设计》课程电子教案(PPT课件)第二章 数据类型与运算符.ppt
- 私立华联学院:《C语言程序设计》课程电子教案(PPT课件)第七章 结构体和共同体.ppt
- 私立华联学院:《C语言程序设计》课程电子教案(PPT课件)第五章 函数.ppt
- 私立华联学院:《C语言程序设计》课程电子教案(PPT课件)第八章 文件.ppt
- 私立华联学院:《C语言程序设计》课程电子教案(PPT课件)第六章 指针.ppt
- 私立华联学院:《C语言程序设计》课程电子教案(PPT课件)第四章 数组.ppt
- 私立华联学院:《Python语言程序设计》课程教学资源(教案讲义)课程标准(适用专业:软件技术).pdf
- 私立华联学院:《Python语言程序设计》课程教学资源(教案讲义)课程教学设计(负责人:尹菡).pdf
- 《Python语言程序设计》课程教学资源(拓展资源)Python练习实例(Python 100例).pdf
- 《Python语言程序设计》课程教学资源(拓展资源)零基础Python上手编程(2020版).pdf
- 私立华联学院:《Python语言程序设计》课程教学资源(实习实验)Python编程基础实验指导手册.pdf
- 《Python语言程序设计》课程教学资源(教案讲义)Python学习参考教材(共十一单元).pdf
- 私立华联学院:《Python语言程序设计》课程教学资源(PPT课件)第1单元 初识Python的世界(负责人:尹菡).pptx