BDD vs. Constraint Based Model Checking- An Experimental .ppt
《BDD vs. Constraint Based Model Checking- An Experimental .ppt》由会员分享,可在线阅读,更多相关《BDD vs. Constraint Based Model Checking- An Experimental .ppt(48页珍藏版)》请在麦多课文档分享上搜索。
1、BDD vs. Constraint Based Model Checking: An Experimental Evaluation for Asynchronous Concurrent Systems,Tevfik Bultan Department of Computer Science University of California, Santa Barbara bultancs.ucsb.edu http:/www.cs.ucsb.edu/bultan/,Outline,Concurrency problems Symbolic model checking Functional
2、ity required for symbolic model checking BDD representation Constraint representation Experimental results Related work Conclusions,Program: Bakery Data Variables: a, b: positive integer Control Variables: pc1, pc2: T, W, C Initial Condition: a=b=0 & pc1=T1 & pc2=T2 Events: eT1: pc1=T & pc1=W & a=b+
3、1 eW1: pc1=W & (ab | b=0) & pc1=C eC1: pc1=C & pc1=T & a=0eT2: pc2=T & pc2=W & b=a+1 eW2: pc2=W & (ba | a=0) & pc2=C eC2: pc2=C & pc2=T & b=0BAKERY: AG(!(pc1=c & pc2=C),Program: Barber Data Variables: cinchair,cleave,bavail,bbusy,bdone: positive integer Control Variables: pc1,pc2,pc3: 1,2 Initial Co
4、ndition: cinchair=cleave=bavail=bbusy=bdone=0 & pc1=pc2=pc3=1 Events: eHairCut1: pc1=1 & pc1=2 & cinchairbavail & cinchair=cinchair+1 eHairCut2: pc1=2 & pc1=1 & cleavebdone & cleave=cleave+1 eNext1: pc2=1 & pc2=2 & bavail=bavail+1 eNext2: pc2=2 & pc2=1 & bbusycinchair & bbusy=bbusy+1 eFinish1: pc3=1
5、 & pc3=2 & bdonebbusy & bdone=bdone+1 eFinish2: pc3=2 & pc3=1 & bdone=cleave,BARBER: AG(cinchair =cleave & bavail=bbusy=bdone& cinchair=cleave & bavail=bbusy=bdone)BARBER-2: AG(cinchair=bavail & bbusy=cinchair)BARBER-3: AG(cleave=bdone),Program:Readers-Writers Data Variables: nr, nw: positive intege
6、r Initial Condition: nr=nw=0 Events: eReaderEnter: nw=0 & nr=nr+1 eReaderExit: nr0 & nr=nr-1eWriterEnter: nr=0 & nw= 0 & nw=nw+1 eWriterExit: nw0 & nw=nw-1READERS-WRITERS: AG(nr=0 | nw=0) & nw=1),Program: Bounded-Buffer Parameterized Constant: size: positive integer Data Variables: available, produc
7、ed, consumed: positive integer Initial Condition: produced=consumed=0& available = size Events: eProduce: 0available & produced=produced+1& available=available-1 eConsume: availablesize & consumed=consumed+1& available=available+1,BOUNDED-BUFFER: AG(produced-consumed=size-available& 0=available=size
8、)BOUNDED-BUFFER-1: AG(produced-consumed=size-available)BOUNDED-BUFFER-2: AG(0=available=size)BOUNDED-BUFFER-3: AG(0=produced-consumed=size),Program: Circular-Queue Parameterized Constant: size: positive integer Data Variables: occupied,head,tail,produced, consumed : positive integer Initial Conditio
9、n:occupied=head=tail=produced=consumed=0 Events: eProduce: occupied0 & occupied=occupied-1& consumed=consumed+1 & (head=size & head=0| headsize & head=head+1),CIRCULAR-QUEUE: AG(0=produced-consumed=size& produced-consumed=occupied)CIRCULAR-QUEUE-1: AG(0=produced-consumed=size)CIRCULAR-QUEUE-2: AG(pr
10、oduced-consumed=occupied),Model Checking,Given a program and a temporal property p:Either show that all the initial states satisfy the temporal property p set of initial states truth set of pOr find an initial state which does not satisfy the property p a state set of initial states truth set of p,T
11、emporal Properties Fixpoints,EF p p (EX p) EX (EX p) ,1,3,2,Temporal Properties Fixpoints,Note that AG p EF( p )Other temporal operators can also be represented as fixpoints AF p , EG p , p AU q , p EU q,Tools Required for Model Checking,Basic set operations intersection, union, set difference to ha
12、ndle Equivalence Checking to check if the fixpoint is reached Relational image computation for precondition operation EX,Functionality of a Symbolic Representation,Symbolic And(Symbolic,Symbolic) Symbolic Or(Symbolic,Symbolic) Symbolic Not(Symbolic) Boolean Equivalent(Symbolic,Symbolic) Symbolic EX(
13、Symbolic),BDDs,Efficient representation for boolean functions Disjunction, conjunction complexity: at most quadratic Negation complexity: constant Equivalence checking complexity: constant or linear Image computation complexity: can be exponential,BDD encoding for Integer Variables,Systems with boun
14、ded integer variables can be represented using BDDs Use a binary encoding represent integer x as x0x1x2. xk where x0, x1, x2, . , xk are binary variablesYou have to be careful about the variable ordering!,Integers in SMV,SMV represents integers using a binary encodingIn the BDD variable ordering cur
15、rent and next state bits of an integer variable are interleaved good for x = xBits of different variables are not interleaved What happens when we have x = y ?,x2 x2 x1 x1x0x0 y2 y2 y1 y1 y0 y0,We have to remember every x bit until this point for x = y,William Chans Ordering,Using a preprocessor con
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- BDDVSCONSTRAINTBASEDMODELCHECKINGANEXPERIMENTALPPT

链接地址:http://www.mydoc123.com/p-378878.html