南京大学:《软件工程研究导引 Introduction to Software Engineering Research》课程教学资源(课件讲稿)06 Static Program Analysis

Static Program Analysis Jun Ma majun@nju.edu.cn
Static Program Analysis majun@nju.edu.cn Jun Ma

Static Prgram Analysis: Overview
Static Prgram Analysis: Overview

What is Static Analysis? A program that takes programs as input and produces useful results. Transformed code (assembly,instrumented code,...) Code or Binary Static Analyser Useful Results Potential bugs(bad practices,null pointers,...) Software artifacts(diagrams,architecture,...) ■Examples Compilers (and optimization passes) Static checkers (e.g.,-Wall,lint,...) Useful results for SE practices
What is Static Analysis? Code or Binary Static Analyser Useful Results Transformed code (assembly, instrumented code, ...) Potential bugs (bad practices, null pointers, ...) Software artifacts (diagrams, architecture, ...) Examples Compilers (and optimization passes) Static checkers (e.g., -Wall, lint, …) Useful results for SE practices A program that takes programs as input and produces useful results

Categories of Static Program Analysis Static Analysis Lexical Analysis Syntax Analysis Semantic Analysis
Categories of Static Program Analysis Static Analysis Lexical Analysis Syntax Analysis Semantic Analysis

Lexical Analysis Treating program as a sequence of Symbols/Tokens
Lexical Analysis Treating program as a sequence of Symbols/Tokens

Example:Empirical Study on Variable Naming What are the style,abbreviation,..of variable names? Are they correlated to bugs/code quality/...? You can study this by treating code as a tokenized text stream 1"(a+b)*2”=> 2【(SYM,('),(ID,'a'),(BIN0P,'+),(ID,'b'),(SYM,)'),(BIN0P,*'),(INT,'2)J We are interested in the IDs
Example: Empirical Study on Variable Naming Are they correlated to bugs/code quality/…? You can study this by treating code as a tokenized text stream We are interested in the IDs What are the style, abbreviation, … of variable names? 1 "(a + b) * 2" => 2 [ (SYM, '('), (ID, 'a'), (BIN_OP, '+'), (ID, 'b'), (SYM, ')'), (BIN_OP, '*'), (INT, '2') ]

Example:Differencing Files How to define"diffs"between two file versions?
Example: Differencing Files How to define "diffs" between two file versions?

The Edit Distance Approximation a b c a bb a ,21 a a C Delete Insert Unchanged Myers,E.W.An O(ND)difference algorithm and its variations.Algorithmica 1,251-266(1986). https:/doi.org/10.1007/BF01840446
The Edit Distance Approximation Myers, E.W. An difference algorithm and its variations. Algorithmica 1, 251–266 (1986). https://doi.org/10.1007/BF01840446 O(ND)

Is Edit Distance a Good Idea? Open Problem:How to produce even more developer-friendly diffs? Minimizing edit distance is a good hack Lacks semantic explanations to what are changed Not work for adding indention,renaming variables,.. You can work out a paper on this!
Is Edit Distance a Good Idea? Minimizing edit distance is a good hack Lacks semantic explanations to what are changed Not work for adding indention, renaming variables, … You can work out a paper on this! Open Problem: How to produce even more developer-friendly diffs?

Syntax Analysis on AST
Syntax Analysis on AST
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 南京大学:《软件工程研究导引 Introduction to Software Engineering Research》课程教学资源(课件讲稿)04 Conduct Rigorous and Scientific Research.pdf
- 《中国科学》:可成长软件理论方法和实现技术——从范型到跨越.pdf
- 计算机科学与技术(参考文献)Synthesizing Object State Transformers for Dynamic Software Updates.pdf
- 南京大学:《编译原理 Principles and Techniques of Compilers》课程教学电子教案(课件讲稿,2023)第三章 词法分析.pdf
- 南京大学:《编译原理 Principles and Techniques of Compilers》课程教学电子教案(课件讲稿,2023)第一章 引论(许畅).pdf
- 计算机科学与技术(参考文献)Pores-Preserving Face Cleaning Based on Improved Empirical Mode Decomposition.pdf
- 计算机科学与技术(参考文献)PG_2012_Photo_Optimization.pdf
- 计算机科学与技术(参考文献)Object Tracking Using Learned Feature Manifolds.pdf
- 计算机科学与技术(参考文献)Mesh-Guided Optimized Retexturing for Image and Video.pdf
- 计算机科学与技术(参考文献)Multi-view Video Summarization.pdf
- 计算机科学与技术(参考文献)Learning-Based 3D Face Detection Using Geometric Context.pdf
- 计算机科学与技术(参考文献)Image and Video Retexturing.pdf
- 计算机科学与技术(参考文献)Image Completion based on Views of Large Displacement.pdf
- 计算机科学与技术(参考文献)Fuzzy Quantization Based Bit Transform for Low Bit-Resolution Motion Estimation.pdf
- 计算机科学与技术(参考文献)Ensemble of trusted firmware services based on TPM.pdf
- 计算机科学与技术(参考文献)Efficient View Manipulation for Cuboid-Structured Images.pdf
- 计算机科学与技术(参考文献)A Robust and Fast Non-local Algorithm for Image Denoising.pdf
- 计算机科学与技术(参考文献)A Novel Constrained Texture Mapping Method Based on Harmonic Map.pdf
- 计算机科学与技术教学资源(参考文献)Properties and Computations of Matrix Pseudospectra.pdf
- 计算机科学与技术教学资源(参考文献)A Convergent Restarted GMRES Method For Large Linear Systems.pdf
- 南京大学:《软件工程研究导引 Introduction to Software Engineering Research》课程教学资源(课件讲稿)07 Tracing, Profiling, and Dynamic Program Analysis.pdf
- 南京大学:《软件工程研究导引 Introduction to Software Engineering Research》课程教学资源(课件讲稿)09 The TEX Typesetting System.pdf
- 计算机科学与技术(参考文献)An Opportunistic Resource Sharing and Topology-Aware Mapping Framework for Virtual Networks.pdf
- 计算机科学与技术(参考文献)P3 - Joint Optimization of Charger Placement and Power Allocation for Wireless Power Transfer.pdf
- 计算机科学与技术(参考文献)Virtual Network Embedding with Opportunistic Resource Sharing.pdf
- 计算机科学与技术(参考文献)Burstiness-Aware Resource Reservation for Server Consolidation in Computing Clouds.pdf
- 计算机科学与技术(参考文献)MobiCache - Cellular traffic offloading leveraging cooperative caching in mobile social networks.pdf
- 计算机科学与技术(参考文献)Efficient Data Center Flow Scheduling Without Starvation Using Expansion Ratio.pdf
- 计算机科学与技术(参考文献)Optimizing Itinerary Selection and Charging Association for Mobile Chargers.pdf
- 计算机科学与技术(参考文献)Wireless Charger Placement and Power Allocation for Maximizing Charging Quality.pdf
- 计算机科学与技术(参考文献)Opportunistic Energy-Efficient Contact Probing in Delay-Tolerant Applications.pdf
- 计算机科学与技术(参考文献)Femto-Matching - Efficient Traffic Offloading in Heterogeneous Cellular Networks.pdf
- 计算机科学与技术(参考文献)WiTrace - Centimeter-Level Passive Gesture Tracking Using OFDM signals.pdf
- 计算机科学与技术(参考文献)Femto-Matching:Efficient Traffic Offloading in Heterogeneous Cellular Networks.pdf
- 计算机科学与技术(参考文献)Understanding and Modeling of WiFi Signal Based Human Activity Recognition.pdf
- 计算机科学与技术(参考文献)Understanding and Modeling of WiFi Signal Based Human Activity Recognition.pdf
- 计算机科学与技术(参考文献)Keystroke Recognition Using WiFi Signals.pdf
- 计算机科学与技术(参考文献)Depth Aware Finger Tapping on Virtual Display.pdf
- 计算机科学与技术(参考文献)Device-Free Gesture Tracking Using Acoustic Signals.pdf
- 计算机科学与技术(参考文献)Device-Free Gesture Tracking Using Acoustic Signals.pdf