PowerPoint 프레젠테이션

Similar documents
example code are examined in this stage The low pressure pressurizer reactor trip module of the Plant Protection System was programmed as subject for

04-다시_고속철도61~80p

ppt.glzy8.com提供海量PPT模板免费下载!

Contents Contents 2 1 Abstract 3 2 Infer Checkers Eradicate Infer....

Page 2 of 6 Here are the rules for conjugating Whether (or not) and If when using a Descriptive Verb. The only difference here from Action Verbs is wh

CD-RW_Advanced.PDF

#Ȳ¿ë¼®

Page 2 of 5 아니다 means to not be, and is therefore the opposite of 이다. While English simply turns words like to be or to exist negative by adding not,

<B3EDB9AEC1FD5F3235C1FD2E687770>

슬라이드 1

강의10

Interstage5 SOAP서비스 설정 가이드

IKC43_06.hwp

Journal of Educational Innovation Research 2019, Vol. 29, No. 1, pp DOI: (LiD) - - * Way to

PowerPoint 프레젠테이션

본문01

PowerChute Personal Edition v3.1.0 에이전트 사용 설명서

- 2 -

DE1-SoC Board

0125_ 워크샵 발표자료_완성.key

전용]

SW¹é¼Ł-³¯°³Æ÷ÇÔÇ¥Áö2013

11¹Ú´ö±Ô

Microsoft PowerPoint - ch03ysk2012.ppt [호환 모드]

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다.

MAX+plus II Getting Started - 무작정따라하기

DBPIA-NURIMEDIA

PRO1_02E [읽기 전용]

Orcad Capture 9.x

삼교-1-4.hwp

03±èÀçÈÖ¾ÈÁ¤ÅÂ

Solaris Express Developer Edition

Output file

학습영역의 Taxonomy에 기초한 CD-ROM Title의 효과분석

<31325FB1E8B0E6BCBA2E687770>

Ver. T3_DWS.UTP-1.0 Unit Testing Plan for Digital Watch System Test Plan Test Design Specification Test Cases Specification Date Team Infor


슬라이드 1

Eclipse 와 Firefox 를이용한 Javascript 개발 발표자 : 문경대 11 년 10 월 26 일수요일


Domino Designer Portal Development tools Rational Application Developer WebSphere Portlet Factory Workplace Designer Workplace Forms Designer

2011´ëÇпø2µµ 24p_0628

Intro to Servlet, EJB, JSP, WS

03.Agile.key

하나님의 선한 손의 도우심 이세상에서 가장 큰 축복은 하나님이 나와 함께 하시는 것입니다. 그 이 유는 하나님이 모든 축복의 근원이시기 때문입니다. 에스라서에 보면 하나님의 선한 손의 도우심이 함께 했던 사람의 이야기 가 나와 있는데 에스라 7장은 거듭해서 그 비결을

Journal of Educational Innovation Research 2018, Vol. 28, No. 3, pp DOI: NCS : * A Study on

FMX M JPG 15MB 320x240 30fps, 160Kbps 11MB View operation,, seek seek Random Access Average Read Sequential Read 12 FMX () 2

13 Who am I? R&D, Product Development Manager / Smart Worker Visualization SW SW KAIST Software Engineering Computer Engineering 3

<32382DC3BBB0A2C0E5BED6C0DA2E687770>

Á¶´öÈñ_0304_final.hwp

PRO1_04E [읽기 전용]

Microsoft Word - KSR2014S042

Manufacturing6

소프트웨어개발방법론

장양수

I&IRC5 TG_08권

<30322D28C6AF29C0CCB1E2B4EB35362D312E687770>

지능정보연구제 16 권제 1 호 2010 년 3 월 (pp.71~92),.,.,., Support Vector Machines,,., KOSPI200.,. * 지능정보연구제 16 권제 1 호 2010 년 3 월

¹Ìµå¹Ì3Â÷Àμâ

02 C h a p t e r Java

歯M PDF

H3050(aap)

DBPIA-NURIMEDIA

Æ÷Àå½Ã¼³94š

2 동북아역사논총 50호 구권협정으로 해결됐다 는 일본 정부의 주장에 대해, 일본군 위안부 문제는 일 본 정부 군 등 국가권력이 관여한 반인도적 불법행위이므로 한일청구권협정 에 의해 해결된 것으로 볼 수 없다 는 공식 입장을 밝혔다. 또한 2011년 8월 헌 법재판소는

Journal of Educational Innovation Research 2016, Vol. 26, No. 1, pp.1-19 DOI: *,..,,,.,.,,,,.,,,,, ( )

APOGEE Insight_KR_Base_3P11

<B3EDB9AEC1FD5F3235C1FD2E687770>

사용시 기본적인 주의사항 경고 : 전기 기구를 사용할 때는 다음의 기본적인 주의 사항을 반드시 유의하여야 합니다..제품을 사용하기 전에 반드시 사용법을 정독하십시오. 2.물과 가까운 곳, 욕실이나 부엌 그리고 수영장 같은 곳에서 제품을 사용하지 마십시오. 3.이 제품은

<31332EBEC6C6AEB8B6C4C9C6C3C0BB20C8B0BFEBC7D120C6D0C5B0C1F6B5F0C0DAC0CE20BFACB1B82E687770>

06_ÀÌÀçÈÆ¿Ü0926

<313020C1A4BFECBAC034332E687770>

step 1-1

MPLAB C18 C

Microsoft PowerPoint - AC3.pptx

4번.hwp

300 구보학보 12집. 1),,.,,, TV,,.,,,,,,..,...,....,... (recall). 2) 1) 양웅, 김충현, 김태원, 광고표현 수사법에 따른 이해와 선호 효과: 브랜드 인지도와 의미고정의 영향을 중심으로, 광고학연구 18권 2호, 2007 여름

02이용배(239~253)ok

May 2014 BROWN Education Webzine vol.3 감사합니다. 그리고 고맙습니다. 목차 From Editor 당신에게 소중한 사람은 누구인가요? Guidance 우리 아이 좋은 점 칭찬하기 고맙다고 말해주세요 Homeschool [TIP] Famil

<32B1B3BDC32E687770>

12È«±â¼±¿Ü339~370

강의지침서 작성 양식

Hi-MO 애프터케어 시스템 편 5. 오비맥주 카스 카스 후레쉬 테이블 맥주는 천연식품이다 편 처음 스타일 그대로, 부탁 케어~ Hi-MO 애프터케어 시스템 지속적인 모발 관리로 끝까지 스타일이 유지되도록 독보적이다! 근데 그거 아세요? 맥주도 인공첨가물이

DBPIA-NURIMEDIA

공연영상

Microsoft PowerPoint - PL_03-04.pptx

<B1E2C8B9BEC828BFCFBCBAC1F7C0FC29322E687770>

2 / 26

15_3oracle

WIDIN - Toolholding Catalogue.pdf

1. Eclipse 2. JUnit 3. STATIC ANALYSIS 4. PMD 5. Eclipse TPTP 6. FIND BUGS INDEX 2

274 한국문화 73

서강대학원123호

12Á¶±ÔÈŁ

<303220C7D1C5C2B9AE2E687770>

민속지_이건욱T 최종

<C1DF3320BCF6BEF7B0E8C8B9BCAD2E687770>

Vol.257 C O N T E N T S M O N T H L Y P U B L I C F I N A N C E F O R U M

Stage 2 First Phonics

Dialog Box 실행파일을 Web에 포함시키는 방법

Transcription:

Introduction to Static Analysis Dependable Software Laboratory

Static Analysis Static analysis is the process of examining source code prior to compilation Without executing Static analysis can diagnose for: Quality aspects such as maintainability, reliability, understandability and complexity Testing issues Coding standard compliance issues Best programming practices and unsafe programming constructs and coding defects 2

Static Analysis Analyze the program without executing it Doesn t depend on having good test cases or even any test cases Generally, doesn t know what your software is supposed to do Looks for violations of reasonable programming Not a replacement for testing Very good at finding problems on untested paths But many defects can t be found with static analysis False alarm occurs Generally 30% 3

A position of the Static Analysis in Verification Verification Trade-off Dimensions 4

Static Analysis Static analysis can be divided 3 levels Level 1: syntax checking of the source code Rule checking, coding style checking Level 2: quality analysis with translated source code to CFG/DFG form Sematic analysis, complexity analysis Level 3: static analysis, analyzing critical errors which can be issued during execution Divided by zero, NULL pointer, Etc. 5

Level 1 Rule checking, coding style checking Syntax checking by IDE (e.g. eclipse, visual studio) is a kind of static analysis Several kinds of rules Simple rule checking E.g. Brace location, tab, Etc. Safe coding rule checking T. A., R.W. WITTY, SAFE PROGRAMMING, 1978 Safe specification and programming(coding) is the simplest way to improve software reliability Proposing several rules for safe software (safe programming) E.g. infinite loop checking with counter, protecting buffer overflow code It is useful for coding style checking when working as a team Readability Maintainability 6

Level 2 Kinds of complexity, coverage, depend metrics Using CFG (Control Flow Graph), DFD (Data Flow Graph), Etc. 7

Level 2 Source code information and dependency graph E.g. Cyclomatic Complexity 8

Cyclomatic Complexity Cyclomatic complexity is a software metric (measurement), used to indicate the complexity of a program. It is a quantitative measure of the number of linearly independent paths through a program's source code. It was developed by Thomas J. McCabe, Sr. in 1976. Cyclomatic complexity is computed using the control flow graph of the program: the nodes of the graph correspond to indivisible groups of commands of a program, and a directed edge connects two nodes if the second command might be executed immediately after the first command. Cyclomatic complexity may also be applied to individual functions, modules, methods or classes within a program. One testing strategy, called basis path testing by McCabe who first proposed it, is to test each linearly independent path through the program; in this case, the number of test cases will equal the cyclomatic complexity of the program. 9

Cyclomatic Complexity Lower is better. A McCabe complexity under 5 is good, from 5-10 is OK, and over 10 is too complex. A high flow complexity may be a symptom of a function which does too much or has low cohesion (does to many different things). But don't take these numbers too seriously -- you may have comprehensible control flow despite high numbers. For example, one large switch statement can be clear to understand, but can dramatically increase the count. 23 is too high 10

Level 3 Static analysis analyzing critical errors which can be issued during execution Without execution(compile) 11

Automated Static Analysis There are several tools for static analysis of source codes Commercial Powerful tool is too expensive Open source Several open source tools exist also 12

Tools 13

Tools 14

Tools 15

Eclipse Metrics Plugin Level 2 Install Help -> Install New Software -> Add -> input the location (http://metrics2.sourceforge.net/update/) 16

Eclipse Metrics Plugin 17

Eclipse Metrics Plugin 각 project -> properties -> Metrics -> enable 18

Eclipse Metrics Plugin Window -> Show View -> Metrics -> Metrics View 19

Eclipse Metrics Plugin 20

Eclipse Metrics Plugin Complexity, code line, 상속관계등 21

Eclipse Metrics Plugin Dependency Graph 22

PMD Level 1+Level 3 (part of) PMD is a source code analyzer. It finds common programming flaws like unused variables, empty catch blocks, unnecessary object creation, and so forth. It supports Java, JavaScript, Salesforce.com Apex and Visualforce, PLSQL, Apache Velocity, XML, XSL. Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code in Java, C, C++, C#, Groovy, PHP, Ruby, Fortran, JavaScript, PLSQL, Apache Velocity, Scala, Objective C, Matlab, Python, Go, Swift and Salesforce.com Apex and Visualforce. 23

PMD Install Install new software -> https://dl.bintray.com/pmd/pmd-eclipse-plugin/updates/ 24

PMD Violations Violations with code overview Priority filtering 25

PMD 이외에도 dataflow, CPD (Finding duplicated code) 가가능 26

PMD Method 별 data flow 27

PMD Report example User can select the form of the report 28

PMD Window -> Preference -> PMD -> Rule Configuration 사용할 rule set 설정 새로운 rule 추가가능 29

Checkstyle Level 1 Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. It automates the process of checking Java code to spare humans of this boring (but important) task. This makes it ideal for projects that want to enforce a coding standard. Checkstyle is highly configurable and can be made to support almost any coding standard. An example configuration files are supplied supporting the Sun Code Conventions, Google Java Style. 30

Checkstyle Install Install New Software -> http://eclipse-cs.sf.net/update/ Properties Activation Rule configuration 31

Checkstyle Rule configuration 기본적으로 google, sun의 coding style 제공 여러 style을선택가능 User define rule also available 32

Checkstyle Naming Convention example 33

Checkstyle Other rule example 34

Checkstyle Activate example Violation 부분을표시 35

FindBugs Level 3 It is an open source program which looks for bugs in Java code Operates on Java bytecode, rather than source code Source code also available 36

FindBugs Install Install new software -> http://findbugs.cs.umd.edu/eclipse project -> properties -> Findbugs -> enable 37

FindBugs Detector configuration Searching rule setting Enable/disable 38

FindBugs Example - InfiniteLoop 39

FindBugs Report setting Report 로생성할항목들설정등 40

FindBugs Execution Find Bugs click XML generation is possible 41

FindBugs Explorer 42

JDepend Level 2 Help -> Eclipse Marketplace -> jdepend 입력후검색 43

JDepend Source code 가있는폴더선택후 JDepend run 44

JDepend CC :: Concrete Class 인터페이스나추상클래스가아닌 Concrete Class 의수를나타냄 AC :: Abstract Class 추상클래스나인터페이스의수를나타내며확장성의척도가됨 Ca :: Afferent Couplings 현재패키지의클래스에의존하고있는패키지의수를나타내며책임의척도가됨 Ce :: Efferent Couplings 현재패키지의클래스들이의존하고있는패키지의수를나타내며독립성의척도가됨 A :: Abstractness ( A = AC/CC+AC ) 추상화정도를나타내며, 0 은구체적인패키지를, 1 은추상적인패키지를나타냄 I :: Instability ( I = Ce(Ce+Ca) ) 변화에대한안정성을나타내며 0 부터 1 사이의값을가짐, 0 은외부변화에도끄떡없는패키지이며 1 은작은변화에도쉽게흔들릴수있는패키지를나타냄 D :: Distance to Main Sequence Main Sequence 로부터의거리를나타내며, 0 은 Main Sequence 와완전가깝고 1 은완전먼상태임, Main Sequence 란이상적인패키지로완전추상적이면서안정적이거나완전구체적이면서불안정한패키지를나타냄 Cycle :: Package dependency cycles 패키지들상호간에의존성을가지고있을때발생함, 안좋은상황이기때문에경고아이콘으로보여짐 45

SonarQube 이것도한번사용해보세요 46

발표 Static Analysis 각자서로 team의 source code를대상으로 static analysis를수행, 결과발표 3개의도구선택 ( 복잡도 or 의존성분석도구 1개반드시포함 ) 설명한도구를포함해많은도구들중자유롭게선택 분석결과중 critical 한부분들에대한분석발표 1 4, 3 2 4, 1 3 1, 2 4 2, 3 5 8, 7 6 8, 5 7 5, 6 8 6, 7 47