1. Trang chủ
  2. » Tất cả

39ac647a558f8e1cda285565d06e70220c19

19 0 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Cấu trúc

  • Slide 1

  • Slide 2

  • Slide 3

  • Slide 4

  • Slide 5

  • Slide 6

  • Slide 7

  • Slide 8

  • Slide 9

  • Slide 10

  • Slide 11

  • Slide 12

  • Slide 13

  • Slide 14

  • Slide 15

  • Slide 16

  • Slide 17

  • Slide 18

  • Slide 19

Nội dung

Mostly-Automated Verification of Low-Level Programs in Computational Separation Logic Adam Chlipala Harvard University PLDI 2011 Human Effort Interactive theorem-proving in higher-order logic The Classical verification with SMT solvers Logical Expressiveness Coq library Interactive theorem-proving in higher-order logic Decidable Theories Complex trigger mechanism for quantifier instantiation Equality + Uninterpreted Functions Classical + verification with Linear SMT solvers Arithmetic + Arrays + Complex program annotation scheme needed to produce tractable proof obligations Solution: Computational specifications use standard programming features to avoid quantifiers in almost all specifications Complex trigger mechanism for quantifier instantiation The Coq library Solution: Higher-Order Separation Logic is expressive enough to allow direct use of the most natural specs Classical verification with SMT solvers Complex program annotation scheme needed to produce tractable proof obligations A Thread Scheduler, Abstractly Thread #1 Thread #2 Private memory Thread #3 Private memory Private memory Shared Memory A Thread Scheduler, Concretely Thread #1 saved PC saved SP next Shared Data Structure Stack #2 Stack #1 Thread #2 saved PC saved SP next Thread #3 saved PC saved SP next Stack #3 Shared Data Structure What does correctness mean? “∀ sets of threads with specifications, written in terms of local and shared heap areas, the scheduling library satisfies all of the specs.” Quantify over specifications Example: spec for yield() function Definition yieldS := st ~> Ex fr, Ex ginv, Ex invs, Ex root, susp ginv (fun sp => sep ([]  * ![fr])%Sep) st#Rret Quantify over /\ codesOk ginv invs lists of specifications /\ ![ !{mallocHeap 0} * st#Rsp ==> root * !{threads invs root} * ![ginv] * ![fr] ] st Higher-Order Logic + Proofs usually considered too hard to automate Separation Logic Proofs usually considered too hard to automate = Higher-Order Separation Logic ????? ProgramIndependent Lemmas About Data Structures Source Code of Program to Verify Annotations: Invariants Annotations: Requests to Use Lemmas The Coq library SMT solver Quantifier-Free Proof Obligations That Don't Mention Program Syntax or States Other heuristic provers for simpler theories Computational Separation Logic Step Define data structure invariants as recursive functions (* Abstraction predicate for finite sets represented  * with unsorted linked lists *) Fixpoint llistOk (s : set) (ls : list nat)     (a : nat) : sprop :=   match ls with     | nil => []     | x :: ls' => Ex a', []        * a ==> x * (a+1) ==> a'Limited form    * !{llistOk (del s x) ls' a'} of existential   end quantification Computational Separation Logic Step Prove simplification lemmas Theorem llist_empty_fwd : forall s ls a,   a = 0   ­> llistOk s ls a ===> []   destruct ls; sepLemma Qed Implication in separation logic Theorem llist_nonempty_fwd : forall a s ls,   a  0   ­> llistOk s ls a ===> Ex x, Ex ls', Ex a', [

Ngày đăng: 14/04/2022, 21:40

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN