3.3 Static analysis by tools. Contents The objective of static analysisCompare static and dynamic testingBenefits of using static analysis Recall typical.

Slides:



Advertisements
Similar presentations
5.
Advertisements

CHƯƠNG III: NGÂN HÀNG VÀ CÁC NGHIỆP VỤ NGÂN HÀNG.
Cài đặt Moodle Cài đặt Moodle trên môi trường Windows Cục CNTT-Bộ GD&ĐT.
EXPRESSION LANGUAGE Msc : Lê Gia Minh. EL Language : Cơ Bản  Cho phép JSP developers truy cập các đối tượng Java thông qua tag. Được dùng hiển thị nội.
LOGO JOOMLA & PHP See How easy it is! Trung tâm đào tạo lập trình viên quốc tế Aprotrain -Aptech Làm web trong 10 phút Diễn giả : Đặng Tuấn Tú.
Hệ quản trị Cơ sở dữ liệu Giới thiệu Phạm Thọ Hoàn
Chào mừng quý thầy cô và các em TRƯỜNG THPT TRẦN VĂN KỶ TỔ LÝ – TIN - KTCN.
BÀI 3. ĐƯỜNG THẲNG VÀ MẶT PHẲNG SONG SONG SỞ GD&ĐT ĐIỆN BIÊN TRƯỜNG THCS-THPT TẢ SÌN THÀNG BÀI DỰ THI SOẠN GIẢNG E-LEARNING Chương II ĐƯỜNG THẲNG VÀ MẶT.
Trường THPT Long Châu Sa
Javascript Giáo viên: TS. Trương Diệu Linh Bộ môn Truyền thông & Mạng
Giáo viên: Nguyễn Ngọc Thúy Hằng Đơn vị: Trường THPT Lê Quý Đôn
Java I/O.
CHƯƠNG 5. CẤU TẠO ĐƯỜNG KIẾN TẠO. Nội dung chính KHÁI NIỆM CHUNG CÁC DẠNG CẤU TẠO ĐƯỜNG KIẾN TẠO CÁCH ĐO ĐẠC VÀ THU THẬP CÁC SỐ LIỆU CẤU TẠO ĐƯỜNG.
1 BÀI 6 BẤM CÁP VÀ CHIA SẺ DỮ LIỆU MẠNG. 2 Nội Dung  Bấm cáp xoắn đôi đúng chuẩn Phương pháp bấm cáp chuẩn A Phương pháp bấm cáp chuẩn B  Kết nối máy.
TỔNG QUAN VỀ NGÔN NGỮ LẬP TRÌNH C/C++
BÀI GIẢNG KHOA CÔNG NGHỆ ĐIỆN TỬ - ĐẠI HỌC CÔNG NGHIỆP TP. HCM NHẬP MÔN CÔNG TÁC KỸ SƯ NGÀNH ĐIỆN TỬ.
Kính Chào Cô và Các b ạ n thân m ế n !!!!!. HÌNH THỨC CHÍNH THỂ CỦA NHÀ NƯỚC CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM VÀ MỘT SỐ NƯỚC TRÊN THẾ GIỚI. Thuyết trình.
Internet & E-Commerce
Ngôn ngữ lập trình C/C++
SỬ DỤNG EXCEL ĐỂ TRÍCH KHẤU HAO TSCĐ
Đầu tiên chỉ là 1 giao thức đơn giản
Bảo mật - Mã hóa dữ liệu Nội dung trình bày :
BÀI 4 CÔNG NGHỆ THÔNG TIN VÀ CHUỖI CUNG ỨNG
Hướng dẫn viết đề cương nghiên cứu
LẬP TRÌNH HƯỚNG ĐỐI TƯỢNG C++
Kỹ Năng Ghi Nhận - Affirmation
Công nghệ phần mềm Các quy trình phần mềm.
Chương 8 KẾT NỐI VỚI SQL SERVER & ỨNG DỤNG TRÊN C#
Vấn đề ngôn ngữ lập trình
Chương 2 Mô hình hóa yêu cầu của bài toán sử dụng use case diagram
NETNAM NETWORK MANAGEMENT
OBJECT-ORIENTED ANALYSIS AND DESIGN WITH UML 2.0
Tuyển chọn nguồn nhân lực của
Ràng buộc toàn vẹn (Integrity Constraint)
TRƯỜNG ĐẠI HỌC KHOA HỌC TỰ NHIÊN KHOA VẬT LÝ
Hệ quản trị Cơ sở dữ liệu Giới thiệu
CÔNG NGHỆ THƯƠNG MẠI ĐIỆN TỬ
Ra quyết định kinh doanh
Policy Analysis Tools of the Trade NMDUC 2009.
PLAN
Cấu hình đơn giản cho Router
Bài giảng môn Tin ứng dụng
Ring ? Bus ? ? Mesh ? Start ?. Ring ? Bus ? ? Mesh ? Start ?
Môn: Lập trình Hướng đối tượng (Object Oriented Programming)
TÀI LIỆU GIẢNG DẠY IC3 GS4 SPARK
ỨNG DỤNG HIV INFO 3.0 QUẢN LÝ SỐ LIỆU NGƯỜI NHIỄM HIV/AIDS
GVHD: TS Lê Vũ Tuấn Hùng HV: Trịnh Thị Quỳnh Như
File Transfer Protocol (FTP) là cơ chế truyền tin dưới dạng tập tin (file). Thông qua giao thức TCP/IP FTP là dịch vụ đặc biệt vì nó dùng tới 2 port Port.
Chapter 05 BẢO MẬT TRONG HỆ THỐNG WLAN
NHÓM 2 XÃ HỘI TIN HỌC HOÁ Cơ sở của nền kinh tế tri thức
DOANH NGHIỆP – SINH VIÊN VỀ VẤN ĐỀ THỰC TẬP
CẤU TRÚC DỮ LIỆU VÀ GIẢI THUẬT
ÔN TẬP Chuyển các số sau từ hệ thập phân sang nhị phân, bát phân, thập lục phân: Chuyển các số sau từ hệ nhị phân.
ÔN TẬP Chuyển các số sau từ hệ thập phân sang nhị phân, bát phân, thập lục phân: Chuyển các số sau từ hệ nhị phân.
BÀI 29: LỌC DỮ LIỆU TỪ DANH SÁCH DỮ LIỆU
Chương 4 - CÁC MÔ ĐUN ĐiỀU KHIỂN TRONG HỆ THỐNG CƠ ĐiỆN TỬ
MÔ HÌNH NGHIÊN CỨU MARKETING
Tổng quan về Hệ điều hành
Lớp DH05LN GIÁO VIÊN PHỤ TRÁCH ThS. NGUYỄN QUỐC BÌNH
Environment, Health and Safety Policy
Thày thuốc nhân dân TsViên Văn Đoan
Please click through slides at your leisure
Chương 3. Lập trình trong SQL Server TRIGGER
AUDIO DROPBOX - TUTORIALS
2D Transformations Các phép biến đổi 2D
Trình bày: _________________
Module 2 – CSR & Corporate Strategy
Company LOGO CĂN BẢN VỀ MẠNG NGUYEN TAN THANH Xem lại bài học tại
Quản trị rủi ro Những vấn đề căn bản Nguyễn Hưng Quang 07/11/2015 NHẬT HOA IC&T.
TRƯỜNG ĐẠI HỌC NGOẠI THƯƠNG CƠ SỞ II TẠI TP. HỒ CHÍ MINH HỘI NGHỊ KHOA HỌC CƠ SỞ II “BÁO CÁO HOẠT ĐỘNG ĐI THỰC TẾ CỦA GIẢNG VIÊN CSII, NĂM HỌC ”
Presentation transcript:

3.3 Static analysis by tools

Contents The objective of static analysisCompare static and dynamic testingBenefits of using static analysis Recall typical defects that can be found using static analysis Main features of static analysis Some Terms

 Compiler  Complexity  Control flow  Data flow  Static analysis

Some Terms  Compiler: Trình biên dịch, còn gọi là phần mềm biên dịch, compiler, là một chương trình máy tính làm công việc dịch một chuỗi các câu lệnh được viết bằng một ngôn ngữ lập trình (gọi là ngôn ngữ nguồn hay mã nguồn), thành một chương trình tương đương nhưng ở dưới dạng một ngôn ngữ máy tính mới (gọi là ngôn ngữ đích) và thường là ngôn ngữ ở cấp thấp hơn, như ngôn ngữ máy. Chương trình mới được dịch này gọi mã đối tượng.chương trình máy tínhngôn ngữ lập trìnhmã nguồnngôn ngữ máy tínhmã đối tượng

Some Terms  Complexity: mức độ mà một thành phần hoặc hệ thống có thiết kế và / hoặc cấu trúc bên trong gây khó hiểu, khó bảo trì hoặc khó kiểm lại.  Control flow: một chuỗi các sự kiện (các đường dẫn) trong quá trình thực thi một thành phần hoặc hệ thống.  Data flow: một sự đại diện trừu tượng cho những thay đổi trạng thái liên tiêp và có thể xảy ra của các đối tượng dữ liệu, nơi mà trạng thái của một đối tượng dữ liệu là bất kì: sự sáng tạo, sự sử dụng, hoặc phá hủy nào.  Static analysis: công việc phân tích các sản phẩm phần mềm, ví dụ các yêu cầu hoặc mã lệnh, được tiến hành mà không cần thực thi những sản phẩm phần mềm này.

static analysis ????  Static analysis is an examination of requirements, design and code that differs from more traditional dynamic testing in a number of important ways: Static analysis is performed on requirements, design or code without actually executing the software artifact being examined. Static analysis is ideally performed before the types of formal review discussed in Section 3.2. Static analysis is unrelated to dynamic properties of the requirements, design and code, such as test coverage.

The objective of static analysis The objective of static analysis is to find defects in software source code and software models

Compare static and dynamic testing Static testing Kiểm tra một thành phần hoặc hệ thống ở mức độ kĩ thuật hoặc thực ( Static analysis, also called static code analysis, is a method of computer program debugging that is done by examining the code without executing the program ) Dynamic testing Thử nghiệm bao gồm thực hiện phần mềm của một thành phần hay một hệ thống. Text

Benefits of using static analysis Early detection of defects prior to test execution. Early warning about suspicious aspects of the code or design, by the calculation of metrics, such as a high complexity measure. Identification of defects not easily found by dynamic testing. Detecting dependencies and inconsistencies in software models, such as links. Improved maintainability of code and design. Prevention of defects, if lessons are learned in development.

Typical defects discovered by static analysis tools include: TEXT Referencing a variable with an undefined value Inconsistent interface between modules and components Variables that are never used Syntax violations of code and software models Unreachable (dead) code Programming standards violations Security vulnerabilities

B C A Coding standards Code metrics Code structure Add Your Text Three main features Main features of static analysis

Coding standards The most well known of all features. Usually a coding standard consists of a set of programming rules, naming conventions and layout specifica-tions. The main advantage of this is th at it saves a lot of effort. An extra reason for adopting this approach is that if you take a well-known coding standard there will probably be checking tools available that supp ort this standard. It can even be put the other way around: purchase a static code analyzer and declare (a selection of) the rules in it as your coding standard. Without such tools, the enforcement of a coding standard in an organization is likely to fail. There are three main causes for this: the number of rules in a coding standard is usually so large that nobody can reme mber them all; some context-sensitive rules that demand reviews of several fi les are very hard to check by human beings; and if people spend time checking coding standards in reviews, that will distract them from other defects they mi ght otherwise find, making the review process less effective