ImageVerifierCode 换一换
格式:PPT , 页数:68 ,大小:1.33MB ,
资源ID:377953      下载积分:2000 积分
快捷下载
登录下载
邮箱/手机:
温馨提示:
如需开发票,请勿充值!快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝扫码支付 微信扫码支付   
注意:如需开发票,请勿充值!
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【http://www.mydoc123.com/d-377953.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(Abstraction in Model Checking.ppt)为本站会员(unhappyhay135)主动上传,麦多课文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文库(发送邮件至master@mydoc123.com或直接QQ联系客服),我们立即给予删除!

Abstraction in Model Checking.ppt

1、Abstraction in Model Checking,Nishant Sinha,Model Checking,Given a: Finite transition system M A temporal property p The model checking problem: Does M satisfy p?,Model Checking (safety),I,Too many states to handle !,= bad state,MUST ABSTRACT!,Abstraction,Eliminate details irrelevant to the property

2、Obtain simple finite models sufficient to verify the property E.g., Infinite state ! Finite state approximationDisadvantage Loss of Precision: False positives/negatives,Data Abstraction,Abstraction Function h : S ! S,S,S,Data Abstraction Example,Abstraction proceeds component-wise, where variables a

3、re components,x:int, -3, -1, 1, 3, , -2, 0, 2, 4, ,1, 2, 3, , -3, -2, -1,0,y:int,Data Abstraction Example,Partition concrete variables into visible(V) and invisible(I) variables.,The abstract model consists of V variables. I variables are existentially quantified out.,The abstraction function maps e

4、ach state to its projection over V.,Data Abstraction Example,0 0,0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1,h,x1 x2 x3 x4,x1 x2,Group concrete states with identical visible part to a single abstract state.,Data Type Abstraction,int x = 0; if (x = 0)x = x + 1;,Abstract Data domain,Code,How do we Abstract Behavi

5、ors?,Abstract domain A Abstract concrete values to those in AThen compute transitions in the abstract domain Over-approximations: Add extra behaviors Under-approximations: Remove actual behaviors,Formalism: Kripke Structures,M = (S,s0,!,L) on AP S: Set of States s0: Initial State !: Transition Relat

6、ion L: S ! 2AP, Labeling on States,p,p,!p,p,q,Simulations on Kripke Structures,M = (S, s0, !, L) M = (S, s0, !, L) Definition: R S S is a simulation relation between M and M iffM simulates M (M M) iff (s0, t0)2 R,Intuitively, every transition in M can be matched by some transition in M,(s,s) R impli

7、es L(s) = L(s) for all t s.t. s t , exists t s.t. s t and (t,t) R.,Guarantees from Abstraction,Strong Preservation: M P iff M PWeak Preservation: M P ) M PSimulation preserves ACTL* propertiesIf M M then M AG p ) M AG p,Overview,Formalizing Abstraction/Refinement Homomorphic Abstractions Abstract In

8、terpretation Theory Guarantees from Abstractions Safe Automated Abstraction Refinement - CEGARApplications Hardware e.g., Hom. Abstraction Software e.g., Predicate Abstraction,Building an Abstraction,Computing Abstract DomainComputing Abstract Transitions,Homomorphisms,Clarke et. al.- 94, 00Concrete

9、 States S, Abstract states SAbstraction function (Homomorphism) h: S ! S Induces a partition on S equal to size of S,Existential/Universal Abstractions,Existential Make a transition from an abstract state if at least one corresponding concrete state has the transition. Abstract model M simulates con

10、crete model MUniversal Make a transition from an abstract state if all the corresponding concrete states have the transition.,Existential Abstraction (Over-approximation),I,I,S,S,Universal Abstraction (Under-Approximation),I,I,S,S,Guarantees from Exist. Abstraction,Preservation Theorem M M ,M : coun

11、terexample may be spurious,Converse does not hold M M ,Let be a ACTL* propertyM existentially abstracts M, so M M,M,M,Guarantees from Univ. Abstraction,Preservation Theorem M 2 M 2 ,Converse does not hold M M ,Let be a existential-quantified property (i.e., expressed in ECTL*) and M simulates M,Why

12、spurious counterexample?,Refinement,Problem: Deadend and Bad States are in the same abstract state. Solution: Refine abstraction function. The sets of Deadend and Bad states should be separated into different abstract states.,Refinement,h,Refinement : h,Abstract Interpretation,Cousot et. al. 77 Fram

13、ework for approximating fixpoint computations Galois Connections Concrete: S, Abstract: S Abstract S. F(S) = S as S. F(S) = S Homomorphisms are a particular case Widening/Narrowing,Galois Connections,S concrete, S abstract S must be a complete lattice : 2S S - abstraction function : S 2S - concretiz

14、ation function Properties of and : (A) A, for A in S (X) X, for X S The above properties mean that and are Galois-connected,S,S,Abs. Interpretation: Example,int - even, odd, T (even) = ,-2,0,2,4 (odd) = ,-3,-1,1,3 (T) = intPredicate abstraction is an instance,Computing Abstract Transition Relation,E

15、xistential AbstractionR Dams97: (t, t1) R iff s (t) and s1 (t1) s.t. (s, s1) RThis ensures that M simulates M Preservation Theorem appliesSimilarly, Universal Abstraction R89,S,S,R,R,Other kinds of Abstraction,Cone of InfluenceSlicing,Automated Abstraction/Refinement,Good abstractions are hard to ob

16、tain Automate both Abstraction and Refinement processesCounterexample-Guided AR (CEGAR) Build an abstract model M Model check property P, M P? If M P, then M P by Preservation Theorem Otherwise, check if Counterexample (CE) is spurious Refine abstract state space using CE analysis results Repeat,Cou

17、nterexample-Guided Abstraction-Refinement (CEGAR),Check Counterexample,Obtain Refinement Cue,Model Check,Build New Abstract Model,M,M,No Bug,Pass,Fail,Bug,Real CE,Spurious CE,Use of Abstractions in Hardware and Software Verification,Applications,Hardware Verification: Thousands of Latches Abstract u

18、sing homomorphisms SAT-based methods (Clarke et. al.)Software Verification: Integer variables, Undecidability Predicate Abstraction SLAM MAGIC, BLASTAll these approaches are automated (CEGAR),Verifying Hardware: Abstraction,A number of approaches Localization (Kurshan et. Al.) SAT-based (02) We cons

19、ider a homomorphism-based approach inside CEGAR framework,Counterexample-Guided Abstraction-Refinement (CEGAR),Check Counterexample,Obtain Refinement Cue,Model Check,Build New Abstract Model,M,M,No Bug,Pass,Fail,Bug,Real CE,Spurious CE,Abstraction Function,Partition variables into visible(V) and inv

20、isible(I) variables.,The abstract model consists of V variables. I variables are made inputs (existentially quantified).,The abstraction function maps each state to its projection over V.,Abstraction Function Example,0 0,0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1,h,x1 x2 x3 x4,x1 x2,Group concrete states with

21、identical visible part to a single abstract state.,Abstract Model Computation,I,I,Existential Abstraction:,Obtaining Exist. Abstraction Symbolically,Concrete Model : (S, I, R, L) Abstract Model: (S,I,R,L) h: S ! SS = s j 9s 2 S. h(s)=sI = s j 9s 2 S. I(s) h(s)=sR = (s1,s2) j 9 s1,s2. R(s1,s2) h(s1)=

22、s1 h(s2)=s2,Checking the Counterexample,Model check the abstract model Yes or a Counterexample CE Counterexample : (c1, ,cm) Each ci is an assignment to V.Simulate the counterexample on the concrete model.,Checking the Counterexample,Concrete traces corresponding to the counterexample:,(Initial Stat

23、e),(Unrolled Transition Relation),(Restriction of V to Counterexample),Refine if CE is spurious,Spurious counterexample?,Refinement,h,h,h,h,Refinement (h): Make Invisible variables Visible,h,h,Refinement methods,(R. Kurshan, 80s),Localization,Simulate counterexample on concrete model with SAT If the

24、 instance is unsatisfiable, analyze conflict Make visible one of the variables in the clauses that lead to the conflict,(Chauhan, Clarke, Kukula, Sapra, Veith, Wang, FMCAD 2002),Abstraction/refinement with conflict analysis,Refinement methods,Refinement as Separation,Refinement as Separation,Deadend

25、 States,Bad States,Refinement as Separation,0 1 0 1,0 1 0,d1,b1,b2,I,V,Refinement : Find subset U of I that separates between all pairs of deadend and bad states. Make them visible.Keep U small !,v1 v2 v3 v4 v5 v6 v7,Refinement as Separation,d1,b1,b2,I,V,Refinement : Find subset U of I that separate

26、s between all pairs of deadend and bad states. Make them visible.Keep U small !,v1 v2 v3 v4 v5 v6 v7,Refinement as Separation,The state separation problem Input: Sets D, B Output: Minimal U subset of I s.t.: d D, b B, u U. d(u) b(u),The refinement h is obtained by adding U to V.,Two separation metho

27、ds,ILP-based separation Minimal separating set. Computationally expensive.Decision Tree Learning based separation. Not optimal. Polynomial.,More Details ,SAT-based Abstraction Refinement Using ILP and Machine Learning, Edmund Clarke, Anubhav Gupta, James Kukula, Ofer Strichman. CAV02Automated Abstra

28、ction Refinement for Model Checking Large State Spaces Using SAT Based Conflict Analysis, Pankaj Chauhan, Edmund M. Clarke, James H. Kukula, Samir Sapra, Helmut Veith, Dong Wang. FMCAD02,Software: Predicate Abstraction,Graf, Saidi 97 Abstraction using Galois Connections Predicates define abstract st

29、ates Existential abstraction using theorem provers Example P = p1, p2: p1 x5, p2 y4 States: (p1,p2), (!p1,p2) ,Defining an Abstract Domain,Predicates on Variables E.g., p1 x3 Do not abstract program location variablesWeakest Preconditions (WP) WP(x=y+1, p1) (y+13) (y2) WP (Y, x=e) = Y e/xPredicate D

30、iscovery using WP,x = y+1,x3,y2,CEGAR,Build Model Using initial set of predicates P Model Check Generate reachable states explicitly/symbolically Obtain CE Check if CE is spurious SAT-based Refinement Cue Find new predicates to add to P,Example,Q: Is Error Reachable ?,Example ( ) 1: do lock();old =

31、new; 2: if (*) 3: unlock();new +; 4: while ( new != old); 5: unlock ();return; ,lock() sets LOCK=1 unlock() sets LOCK=0,Example ( ) 1: do lock();old = new; 2: if (*) 3: unlock();new +; 4: while ( new != old); 5: unlock ();return; ,Example:CFG,lock(); old = new,Example:CFG,Q: Is Error Reachable ?,Exa

32、mple ( ) 1: do lock();old = new; 2: if (*) 3: unlock();new +; 4: while ( new != old); 5: unlock ();return; ,Step 1: Generate and Model Check Abstract space,Set of predicates: LOCK=0, LOCK=1,1,LOCK=0,lock(); old = new,unlock(),unlock() new+,new=old,4,LOCK=0,Q: When can:,Step 2: Analyze Counterexample

33、,Err,LOCK=0,Fwd Reachable (Deadend) States at node n = Rn,Formulate as satisfiability problem for a logic,Step 2: Analyze Counterexample,lock(); old = new,new=old,unlock(),LOCK=0,LOCK=0 new = old,Formulate as satisfiability problem for a logic,unlock(); new+,Step 2: Analyze Counterexample,LOCK=0,LOC

34、K=0,LOCK=0 new = old,LOCK=0 new+1 = new,LOCK=1 new+1 = old,LOCK=1 new +1 = old,Track the predicate:new = old,Step 3: Resume Search,new!=old,1,Set of predicates: LOCK=0, LOCK=1, new = old,4,LOCK=0 : new = old,Step 3: Resume Search,2,LOCK=1 new = old,3,LOCK=1 new = old,4,LOCK=0 : new = old,?,5,1,LOCK=

35、0 : new = old,5,ERROR Unreachable,Set of predicates: LOCK=0, LOCK=1, new = old,CEGAR for Software Verification,(C programs) SLAM 00 Abstract C programs to Boolean programs (C2BP) Symbolic Model Checker (Bebop), CE-analysis (Newton)(C programs) BLAST On-the-fly Predicate Abstraction Lazy Abstraction

36、Proof-based CE analysis(C programs) MAGIC Handles concurrent message-passing programs Two-level CEGAR(Java programs) ESC/Java, Bandera, ,Using SAT in Predicate Abstraction,Build Abstraction: All-SAT for computing abstract transitionsModel Check: BDD-basedChecking CE: BMC-like simulation of CERefinem

37、ent: Uses proof of infeasibility of CE from SAT solver,Conclusion,Formal basis for Abstraction/Refinement Homomorphic Abstractions Abstract Interpretation Safe AbstractionsApplications Hardware e.g., Hom. Existential Abstraction Software e.g., Predicate Abstraction,Acknowledgements,We thank the following sources for the slides: Model Checking Group, CMU BLAST group, Berkeley Bandera group, KSU,

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1