Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quellcode-Bibliothek Examples.thy   Sprache: Isabelle

 

(*  Title:       X86 instruction semantics and basic block symbolic execution
    Authors:     Freek Verbeek, Abhijith Bharadwaj, Joshua Bockenek, Ian Roessle, Timmy Weerwag, Binoy Ravindran
    Year:        2020
    Maintainer:  Freek Verbeek (freek@vt.edu)
*)


sectionSmall examples" Exps

theory Examples
  imports SymbolicExecution
begin

context unknowns
begin
  
  text ‹
  A simple hand-crafted example showing some basic instructions.
\<close>


schematic_goal example1:
  assu
      and[simp]: "  0x1 = SUB (Reg ''rsp'') (<>Each
 and[simp]: "fetch 0x2 = MOV (QWORD PTR [22 + ''rsp'']2) (Imm 42) 3"
 and[simp]: "fetch 0x3 = MOV (QWORD PTR [30 + ''rsp'']2) (Imm 43) 4"
 and[simp]: "fetch 0x4 = ADD (Reg ''rsp'') (Imm 30) 5"
 and[simp]: "fetch 0x5 = POP (Reg ''rbp'') 6"
 and[simp]: "fetch 0x6 = RET 1"
 shows "run 0x6 fetch (σ with [setRip 0x0]) ?σ'"
 apply se_step+
 apply (subst eq_def,simp)
 done

  example1




  ‹Demonstrates little-endian memory and register-aliasing›

 ‹
 begin{verbatim}
 RAX + 0 1 2 3 4 5 6 7
 | FF | EE | DD | CC | BB | AA | 00 | 00 |
 
 EDI := 0xCCDDEEFF
 EBX := 0xAABB
 RCX := 0xAABBCCDDAABB
 end{verbatim}
 
›

  example2:
 assumes[simp]: "fetch 0x0 = MOV (QWORD PTR [''rax'']1) (Imm 0xAABBCCDDEEFF) 1"
 and[simp]: "fetch 0x1 = MOV (Reg ''edi'') (DWORD PTR [''rax'']1) 2"
 and[simp]: "fetch 0x2 = MOV (Reg ''ebx'') (DWORD PTR [4 + ''rax'']2) 3"
 and[simp]: "fetch 0x3 = MOV (Reg ''rcx'') (QWORD PTR [''rax'']1) 4"
 and[simp]: "fetch 0x4 = MOV (Reg ''cx'') (WORD PTR [4 + ''rax'']2) 5"
 shows "run 0x4 fetch (σ with [setRip 0x0]) ?σ'"
 apply se_step+
 apply (subst eq_def,simp)
 done

  example2

  ‹
 This example show how assumptions over regions are generated.
 Since no relation over rax and rbx is known in the initial state, they will be assumed to be
 separate by default.
 
›
  example3:
 assumes[simp]: "fetch 0x0 = MOV (QWORD PTR [''rax'']1) (Imm 0xAABBCCDDEEFF) 1"
 and[simp]: "fetch 0x1 = MOV (QWORD PTR [''rbx'']1) (Imm 0x112233445566) 2"
 and[simp]: "fetch 0x2 = MOV (Reg ''rcx'') (DWORD PTR [2 + ''rax'']2) 3"
 and[simp]: "fetch 0x3 = MOV (Reg ''cx'') (WORD PTR [4 + ''rbx'']2) 4"
 and[simp]: "fetch 0x4 = MOV (Reg ''cl'') (BYTE PTR [''rax'']1) 5"
 shows "assumptions ?A ==> run 0x4 fetch (σ with [setRip 0x0]) ?σ'"
 apply se_step+
 apply (subst eq_def,simp)
 done

  example3

 







 

Messung
CHZG
849710093

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.46Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1104846
#Domains=499270