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

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

Notation for Sequences When a and B are sequences,we write .e for the empty sequence. [a]for the single-element sequence containing a.(We will omit the brackets when a is not a sequence.) a.3 for the composition of a followed by B. aT for the reflection of a. ●#a for the length of a. a;for the ith component of a
Notation for Sequences

Some Laws for Sequences aE=Q e·Q三Q ct=e [a]i [a] 共e=0 #[a]=1 a =eV 3a,a'.a [a]a (a:3)Y=a-(3.y) (aB)i =Bi.ai #(a:3)=(#a)+(#3) a=eV3a',a.a=a'.[a]
Some Laws for Sequences

Singly-linked Lists list ai: nil is defined by induction on the length of the sequence a(i.e.,by structural induction on a): list cid empi=nil list (a-a)i.,j list aj
Singly-linked Lists

Singly-linked List Segments lseg a (i,j): is defined by lseg e(i,j)der empij lseg a-a (i,k)aj sega(j,k)
Singly-linked List Segments

Singly-linked List Segments Properties lseg a(i,j)分i一a,j Iseg aB(i,k)j.Iseg a (i,j)*Iseg B(j,k) lseg a-b(i,k)÷j.Iseg a(i,j)*j→b,k list a i台Iseg a(i,nil)
Singly-linked List Segments

Emptyness Conditions For lists,one can derive a law that shows clearly when a list represents the empty sequence: list a i→(i=nil台a=e). For list segments,however,the situation is more complex.One can derive Iseg a(i,j)→(i=nil→(a=e∧j=nil)) Iseg a(i,j)→(i≠j→a卡e). But these formulas do not say whether a is empty when i =j nil
Emptyness Conditions

Nontouching List Segments When lseg a1·an(io,in), we have 3i1,.in-1: (i0一a1,i1)*(i1一a2,i2)*·*(in-1一an,in): Thus io,...,i1are distinct,but in is not constrained,and may equal any of the io,...,i1.In this case,we say that the list segment is touching. nontouching list segments {cycic{Cueiapingtortidoenbyy touching
Nontouching List Segments

Nontouching List Segments We can define nontouching list segments inductively by: ntlseg c(i,j)der empij ntlseg a-a (i,k)ik jntlseg a (j,k)) or equivalently,we can define them in terms of lseg: ntlseg a(,j)er Iseg a,DAj一 The obvious advantage of knowing that a list segment is non- touching is that it is easy to test whether it is empty: ntlseg a(i,j)→(a=e台i=j)
Nontouching List Segments

Nontouching List Segments Fortunately,there are common situations where list segments must be nontouching: list ai=ntlseg a(i,nil) Iseg a(i,j)*list Bj=ntlseg a (i,j)*list Bj lseg a(i,j)*j→-→ntlseg a(i,j)*j→-
Nontouching List Segments Fortunately, there are common situations where list segments must be nontouching:
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)Separation Logic(2/3).ppt
- 《程序设计语言的形式语义》课程教学资源(文献资料)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
- 南京大学:《程序设计语言的形式语义》课程教学资源(课件讲稿)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
- 私立华联学院:《Python语言程序设计》课程教学资源(PPT课件)第2单元 Python基础知识.pptx