The Socket Communication Program Analysis System Based on SPIN
- Author
- YuLiQuan
- Advisor
- XiaoMeiHua
- School
- Nanchang University
- Major
- Computer Software and Theory
- Classification
- TP311.11 Programming method
- Degree
- Master's thesis
- Year
- 2012
- Downloads
- 56
- Citations
- 1
Abstract
Formal method is a means to verify the reliability and safety of concurrent systems. Model checking is used for formal verification of finite state concurrent (distributed) systems, and has been applied to a variety of software safety and reliability verification. Extracting the model from the concurrent software systems built with high-level language and using the model checking tool to verify the extracted model is a hot research topic in model checking technology. The reliability of socket communication program based on TCP/IP protocol is an important foundation of the Internet data transmission. This paper, with its focus on the reliability of socket communication program developed in C language, explores the technology of socket communication program analysis and verification based on model checking tool SPIN. The following are the main tasks and achievements:1. This paper is to analyze the correctness of the socket function call order in the socket communication program. That is to detect the potential run time problems (deadlocks, memory leaks, the boundary data loss and other run-time errors) result from abnormal socket function call sequence in the server and client socket program.2. With the focus on the correctness of the socket function call sequence, design a scheme for extracting model from the source code of the socket program; analyze the sequence structure of the socket program and propose the socket function call sequence extraction algorithm; define the Promela message data structures and channels; specify the Promela model of socket function; define mapping rules of socket function to Promela; propose target Promela model generation algorithm, and use linear temporal logic (LTL) to describe the model property.3. Use the sequence of atomic, partial order reduction, bit-state hashing strategy to improve the efficiency in verification and compress the state space and storage space in the process of verification.4. Design and implement the socket communication program analysis system. The system can detect run-time problems which result from the use of improper socket function call order. If there are loopholes in the system, it is able to graphically display the code execution path. The system has the abstract, generality, scalability, efficiency, practicality, and can be used as an effective aid to the design of socket communication program.
Table of contents
Summary 3-4
ABSTRACT 4-7
Chapter 1 Introduction 7-10
1.1 Background 7-8
1.2 thesis work 8-9
1.3 thesis organization 9-10
chapter SOCKET communication mechanism analysis 10-20
2.1 TCP / IP protocol 10-16
2.1.1 TCP / IP protocol hierarchy 10-11
2.1.2 socket communication system calls 11-12
2.1.3 socket API functions 12-16
2.2 SOCKET API formal analysis 16-20
2.2.1 define 16-17
2.2.2 socket communications software semantic rules 17-20
Chapter III model checking technology and the nature of the communication program SOCKET Statute 20-30
3.1 basic model checking The concept 20-22
3.1.1 basic terms 20-21
3.1.2 The basic principle 21-22
3.2 model checker SPIN 22-24
3.2.1 SPIN working mechanism 22-23
3.2.2 Promela language while 23-24
3.2.3 linear Temporal Logic (LTL) 24
3.3 model checking using examples 24-26
3.4 SOCKET communication program using LTL describe the nature 26-30
Chapter IV PROMELA extracted from SOCKET communications procedures to validate the model 30-42
4.1 model extraction process outlined 30-31
4.2 SOCKET function call sequence extraction algorithm described 31-33
4.2.1 parser algorithm 31-32
4.2.2 parser algorithm output sample 32-33
4.3 template definition 33 -40
4.3.1 message data structures and channel definitions 33-34
4.3.2 socket function Promela modeling 34-38
4.3.3 socket Promela language mapping function to 38-40
4.4 object model generator algorithm described 40-42
4.4.1 model generator algorithm 40 <br / > 4.4.2 target sample model 40-42
Chapter SOCKET communication program analysis system and optimization strategy 42-55
5.1 system Overview 42 - 46
overall framework 5.1.1 42-44
5.1.2 system Function 44-45
5.1.3 system Features 45-46
5.2 SOCKET program examples reliability analysis 46-52
5.2.1 deadlock Detection 46-52
5.3 system optimization strategy 52-55
5.3.1 atomic 52-53
5.3.2 partial order reduction 53
5.3.3 Bit-state hashing 53
5.3.4 verification efficiency 53-55
Chapter VI summary and Outlook 55-57
6.1 summarizes 55
6.2 future direction 55-57
Thanks 57-58
References published during 58-61
pursue a degree thesis 61
Related dissertations
- The Improvement and Application of the PPTL Model Checker
- The Automatic Analysis System for Network Authentication Protocols
- Model Checking Propositional Projection Temporal Logic with Infinite Model
- Security Protocol Analysis and Verification Based on Model Checker SPIN
- Model Checking Propositional Projection Temporal Logic Based on SPIN
- The Effective Analysis System of Network Security Protocol
- The Application and Implemenation of PPTL Model Checking Tool
- The Formal Modeling of Network Protocols and Discovery of Attacks Based on Model Checking
- Formal model checking based authentication protocol
- Formal Modeling and Verification Research of Automatic Train Protection System
- The Extension and Application of the Modeling,Simulation and Verification Tool
- Research of Ada Program Model Checking Based on Program Slicing
- Research on Formal Verification Methods of Model of Complicated Information System
- Lattice-valued Quantitative Verification of State Transition Systems
- Trusted Transmission of VoIP Traffic and Formal Verification
- Formal Verification of Hybrid Systems
- Research on the Formalization of Semantic Features and Behavior Composition for Real-Time Service Component
- Research on Formal Methods in Arithmetic Circuit Verification
- Paraconsistent Temporal Logic and Its Model Checking
- Stutter-invariant PPTL and Model Checking