CX-Checker CX-Checker (1)XPath (2)DOM (3) 3 XPath CX-Checker. MISRA-C 62%(79/127) SQMlint 76%(13/17) XPath CX-Checker 3. CX-Checker 4., MISRA-C CX- Ch

Similar documents
QAC SQMlint CX-Checker [4]C XML XML CX-model [5] XML XML XML CX-model XPath CX-Checker (1) XPath (2) DOM (3) 3 XPath CX-Checker MISRA-C 80.3% 102/127

XML Tool to Check the Consistency both Software Documents Using XML and Source Programs 1 Summary. Generally, a software consists of source programs a

,,,,., C Java,,.,,.,., ,,.,, i

2 3 Pockets Pockest Java [6] API (Backtracking) 2 [7] [8] [3] i == Pockets 2.1 C3PV web [9] Pockets [10]Pockets 1 3 C

1: JX-model XML File Package Import Class Intf Ctor Method SInit Field Param Local ExtdOpt ImplOpt ThrwOpt Members QName Type Stmt Label Expr ident li

. IDE JIVE[1][] Eclipse Java ( 1) Java Platform Debugger Architecture [5] 3. Eclipse GUI JIVE 3.1 Eclipse ( ) 1 JIVE Java [3] IDE c 016 Information Pr

Condition DAQ condition condition 2 3 XML key value

Vol. 48 No. 3 Mar PM PM PMBOK PM PM PM PM PM A Proposal and Its Demonstration of Developing System for Project Managers through University-Indus

新版明解C言語 実践編

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

ohp02.dvi

解きながら学ぶC言語

< A796BD8AD991E58A77976C2D8CBE8CEA C B B835E2E706466>

258 5) GPS 1 GPS 6) GPS DP 7) 8) 10) GPS GPS ) GPS Global Positioning System

新・明解Java入門

fiš„v8.dvi

r02.dvi

1_26.dvi

6 2. AUTOSAR 2.1 AUTOSAR AUTOSAR ECU OSEK/VDX 3) OSEK/VDX OS AUTOSAR AUTOSAR ECU AUTOSAR 1 AUTOSAR BSW (Basic Software) (Runtime Environment) Applicat

IPSJ SIG Technical Report Vol.2010-SLDM-144 No.50 Vol.2010-EMB-16 No.50 Vol.2010-MBL-53 No.50 Vol.2010-UBI-25 No /3/27 Twitter IME Twitte

untitled

untitled

paper.pdf

1: A/B/C/D Fig. 1 Modeling Based on Difference in Agitation Method artisoc[7] A D 2017 Information Processing

2) TA Hercules CAA 5 [6], [7] CAA BOSS [8] 2. C II C. ( 1 ) C. ( 2 ). ( 3 ) 100. ( 4 ) () HTML NFS Hercules ( )

2006 [3] Scratch Squeak PEN [4] PenFlowchart 2 3 PenFlowchart 4 PenFlowchart PEN xdncl PEN [5] PEN xdncl DNCL 1 1 [6] 1 PEN Fig. 1 The PEN

知能と情報, Vol.30, No.5, pp

Fig. 3 3 Types considered when detecting pattern violations 9)12) 8)9) 2 5 methodx close C Java C Java 3 Java 1 JDT Core 7) ) S P S

untitled

The 15th Game Programming Workshop 2010 Magic Bitboard Magic Bitboard Bitboard Magic Bitboard Bitboard Magic Bitboard Magic Bitboard Magic Bitbo

/* do-while */ #include <stdio.h> #include <math.h> int main(void) double val1, val2, arith_mean, geo_mean; printf( \n ); do printf( ); scanf( %lf, &v

PowerPoint Presentation

fiš„v3.dvi

Vol.55 No (Jan. 2014) saccess 6 saccess 7 saccess 2. [3] p.33 * B (A) (B) (C) (D) (E) (F) *1 [3], [4] Web PDF a m

tuat1.dvi

e-learning station 1) 2) 1) 3) 2) 2) 1) 4) e-learning Station 16 e-learning e-learning key words: e-learning LMS CMS A Trial and Prospect of Kumamoto

: : : TSTank 2

Minimum C Minimum C Minimum C BNF T okenseq W hite Any D

IPSJ SIG Technical Report Vol.2015-CLE-16 No /5/23 RESTful Web API Web 1,2,3,4,a) 1,3,2,4 5,6 6 Wannous Muhammad 7,1,8 4,2,1 3,2,1 Maxima Web JS

Java updated

A B 1: Ex. MPICH-G2 C.f. NXProxy [Tanaka] 2:

IPSJ SIG Technical Report Vol.2017-ARC-225 No.12 Vol.2017-SLDM-179 No.12 Vol.2017-EMB-44 No /3/9 1 1 RTOS DefensiveZone DefensiveZone MPU RTOS

slide5.pptx

Java演習(4) -- 変数と型 --

1 1 CodeDrummer CodeMusician CodeDrummer Fig. 1 Overview of proposal system c

1 Fig. 1 Extraction of motion,.,,, 4,,, 3., 1, 2. 2.,. CHLAC,. 2.1,. (256 ).,., CHLAC. CHLAC, HLAC. 2.3 (HLAC ) r,.,. HLAC. N. 2 HLAC Fig. 2

3D UbiCode (Ubiquitous+Code) RFID ResBe (Remote entertainment space Behavior evaluation) 2 UbiCode Fig. 2 UbiCode 2. UbiCode 2. 1 UbiCode UbiCode 2. 2


untitled

untitled

1 OpenCL OpenCL 1 OpenCL GPU ( ) 1 OpenCL Compute Units Elements OpenCL OpenCL SPMD (Single-Program, Multiple-Data) SPMD OpenCL work-item work-group N

Vol. 23 No. 4 Oct Kitchen of the Future 1 Kitchen of the Future 1 1 Kitchen of the Future LCD [7], [8] (Kitchen of the Future ) WWW [7], [3

名大_医学部保健学科年報第8巻/巻頭

A B C B C ICT ICT ITC ICT

Exam : 1z1-809-JPN Title : Java SE 8 Programmer II Vendor : Oracle Version : DEMO Get Latest & Valid 1z1-809-JPN Exam's Question and Answers 1 from Ac

SEJulyMs更新V7

13 RoboCup The Interface System for Learning By Observation Applied to RoboCup Agents Ruck Thawonmas

DEIM Forum 2009 E

A Feasibility Study of Direct-Mapping-Type Parallel Processing Method to Solve Linear Equations in Load Flow Calculations Hiroaki Inayoshi, Non-member

DPA,, ShareLog 3) 4) 2.2 Strino Strino STRain-based user Interface with tacticle of elastic Natural ObjectsStrino 1 Strino ) PC Log-Log (2007 6)

IPSJ SIG Technical Report Vol.2013-CE-119 No /3/15 enpoly enpoly enpoly 1) 2) 2 C Java Bertrand Meyer [1] 1 1 if person greeting()

スポーツ教育学研究(2016. Vol.36, No2 pp.15-30)


ALG ppt

Q [4] 2. [3] [5] ϵ- Q Q CO CO [4] Q Q [1] i = X ln n i + C (1) n i i n n i i i n i = n X i i C exploration exploitation [4] Q Q Q ϵ 1 ϵ 3. [3] [5] [4]

18 C ( ) hello world.c 1 #include <stdio.h> 2 3 main() 4 { 5 printf("hello World\n"); 6 } [ ] [ ] #include <stdio.h> % cc hello_world.c %./a.o

2reN-A14.dvi

オブジェクト脳のつくり方

IPSJ SIG Technical Report Vol.2009-DPS-141 No.20 Vol.2009-GN-73 No.20 Vol.2009-EIP-46 No /11/27 1. MIERUKEN 1 2 MIERUKEN MIERUKEN MIERUKEN: Spe

haskell.gby

Copyright c 2008 Zhenjiang Hu, All Right Reserved.

大学通信VOL196

untitled

百人一首かるた選手の競技時の脳の情報処理に関する研究

B 20 Web

Q&A集

26.6月号inddホームページ用.indd

(a) (b) 1 JavaScript Web Web Web CGI Web Web JavaScript Web mixi facebook SNS Web URL ID Web 1 JavaScript Web 1(a) 1(b) JavaScript & Web Web Web Webji

I ASCII ( ) NUL 16 DLE SP P p 1 SOH 17 DC1! 1 A Q a q STX 2 18 DC2 " 2 B R b

Java学習教材

The copyright of this material is retained by the Information Processing Society of Japan (IPSJ). The material has been made available on the website

indd




1 7.35% 74.0% linefeed point c 200 Information Processing Society of Japan

untitled

アルゴリズムとデータ構造1

1st-session key

IPSJ SIG Technical Report Vol.2013-GN-86 No.35 Vol.2013-CDS-6 No /1/17 1,a) 2,b) (1) (2) (3) Development of Mobile Multilingual Medical

IPSJ SIG Technical Report Vol.2012-CG-148 No /8/29 3DCG 1,a) On rigid body animation taking into account the 3D computer graphics came

XJTAG

Vol. 29, No. 2, (2008) FDR Introduction of FDR and Comparisons of Multiple Testing Procedures that Control It Shin-ichi Matsuda Department of


2 R K/S K/S K/S K/S K/S K/S K/SR R K/S K/S K/S K S R K/S K/S K/S K/S K/S K/S

やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF

w.....I.v48.\1-4.eps

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU

Vol. 42 No. SIG 8(TOD 10) July HTML 100 Development of Authoring and Delivery System for Synchronized Contents and Experiment on High Spe


Transcription:

CX-Checker: C 1 1 2 3 4 5 1 CX-Checker CX-Checker XPath DOM 3 CX-Checker MISRA-C CX-Checker: A Customizable Coding Checker for C TOSHINORI OSUKA, 1 TAKASHI KOBAYASHI, 1 JUNICHI MASE, 2 NORITOSHI ATSUMI, 3 SHINICHIROU YAMAMOTO, 4 NOBUYASU SUZUMURA 5 and KIYOSHI AGUSA 1 This paper proposes a customizable coding checker CX-Checker which aims at improvement of maintainability and reusability of software. CX-Checker supports three type rule description such as XPath base, DOM base and wrapper API base. We introduce the details of CX-Checker and show its effectiveness with feasibility evaluations by adapting MISRA-C and the rules of an embedded software company. 1. 1 Graduate School of Information Science, Nagoya University 2 AISIN COMCRUISE Co., Ltd. 3 Faculty of Information Sciences and Engineering, Nanzan University 4 Faculty of Information Science and Technology, Aichi Prefectural University 5 AISIN SEIKI CO,. Ltd 1) GNU 2) MISRA-C 3) QAC 4) SQMlint 5)

CX-Checker CX-Checker (1)XPath (2)DOM (3) 3 XPath CX-Checker. MISRA-C 62%(79/127) SQMlint 76%(13/17) XPath CX-Checker 3. CX-Checker 4., MISRA-C CX- Checker, 2. 2.1 K&R 6) GNU Coding Standard 1 MISRA-C 3) MISRA MISRA-C 127 17 MISRA-C 2.2 2.2.1 SQMlint SQMlint 5) MISRA-C MISRA-C 2.2.2 QAC QAC 4) Phaedrus Systems 1300 MISRA-C C 2.2.3 RainCode Checker RainCode Checker 7) Ada C/C++ COBOL RainCode Engine RainCode scripting language ALGOL

2.2.4 CheckStyle CheckStyle 8) Java Visitor Java 2.3 RainCode Checker CheckStyle 3. CX-Checker 2. Checker CX-Checker CX-Checker 3.1 CX-Checker 1 CX-Checker CASE Sapid 9) CX-model 10) CX-model C XML 3.2. CX-Checker CX-model XML 3.3. CX-Checker CUI Eclipse 2 Eclipse 2.c/.h File sdb4 SDB 1 CUI spdmkcxmodel Rule XPath CX- CXmodel (XML) Eclipse Plug-in Interface CX-Checker Rule Module 違反検出 CX-Checker Java XML 10,000 Eclipse SDK, Sapid, Saxon 11) 3.2 CX-model CX-Checker CX-model C CX-model XML XML 1 main() { 2 int a = 0; 3 } 1 <File id="s8388608"> 2 <Function id="s33554432"> 3 <ident defid="s33554432">main</ident> 4 <op>(</op> 5 <op>)</op> 6 <op>{</op> 7 <nl line="1" offset="7"> 8 </nl> 9 <sp> </sp> 10 <Local id="s33554433"> 11 <Type> 12 <kw sort="type">int</kw> 13 </Type> 14 <sp> </sp> 15 <ident defid="s33554433">a</ident> 16 <sp> </sp> 17 <op>=</op> 18 <sp> </sp> 19 <literal defid="s75497472">0</literal> 20 </Local> 21 <op>;</op> 22 <nl line="2" offset="22"> 23 </nl> 24 <op>}</op> 25 </Function> 26 <nl line="3" offset="24"> 27 </nl> 28 </File> CX-model C C

2 Eclipse File Function Local ident XPath starts-with string-length CX- Checker XPath CX-model XPath CX-model 30 ( 13 ) ID ID XML XML Function id defid Expr 3.3 CX-Checker 3 XPath DOM(Document Object Model) XPath DOM 3.3.1 XPath XPath XPath XML Path language XML XPath 1 //sp[contains(text()," ")] XPath //sp sp XPath CX-model sp [...] contains ( ) XPath 3.3.2 DOM XPath XPath XML XPath CX-model DOM CX-Checker DOM Java 1 public class AnRule implements CheckerClass { 2 public List<Result> check(ifile file, CheckRule rule) { 3 List<Result> results = new ArrayList<Result>(); 4 Document doc = file.getdom(); 5... 6 return results; 7 } 8 } 1 /File/Function/Local/ident DOM CheckerClass

check IFile IFile DOM CheckRule check Result Result () XPath 3.3.3 DOM CX-model Function ident CX-model CX-Checker Java IFile DOM CFileElement CFileElement CElement CElement CFunctionElement 1 CFileElement cfile = new CFileElement(file.getDOM()); 2 for (CFunctionElement function : cfile.getfunctions()) { 3 System.out.println(function.getName()); 4 } CFileElement CFunctionElement getname CX-model 3.3.4 CX-Checker 3 2 ( 1 ) XPath XPath CXmodel ( 2 ) 1 XPath 2 PathGraph XPath XPath CX-model CX-model XPath 3 3 XPath prerequisite XPath prerequisite XPath XPath XPath XPath CX-model PathGraph CX-model CX-Checker MISRA-C 30 MISRA-C 30 1 int foo; 2 if (bar == 0) { 3 foo = 1; 4 } else { 5 bar = 1; 6 } 7 return foo; /* NG */ 1 foo if else 7

CX-Checker 4 1 2 2 3 3 4 3 5 4 6 5 6 XPath QAC SQMlint CX-Checker 6 XPath XPath 1 MISRA-C 4 QAC SQMlint CX-Checker 118 86 79(45) 9 41 48 127 127 127 (%) 93 68 62 CX-Checker if for while do-while switch 0 1 PathGraph 1 PathGraph graph = new PathGraph(function); 2 List<List<GraphNode<Element>>> paths = graph.topathlist(); CFunctionElement PathGraph PathGraph PathGraph PathGraph 4. CX-Checker MISRA-C AT( ) CX-Checker 4.1 MISRA-C MISRA-C 127 1 4.1.1 XPath XPath 45 CX-model XPath 2 45 XPath XPath 49%(22/45) 5 2 XPath 5 22 5-15 10 15-30 6 30-60 2 5 45 XPath following-sibling precedingsibling 4.2 AT 17 MISRA-C MISRA-C 41

76 54 XPath QAC SQMlint 4.3 CX-Checker MISRA-C MISRA-C 6 7 CX-Checker XPath 45 49% 5 XPath 3 unsigned C CX-Checker #define A B B B CX-Checker SQMlint CX-Checker CX-Checker XPath Visitor Visitor XPath 5. CX-Checker CX-Checker XPath DOM 3 MISRA-C CX-Checker 3 XPath CX-Checker CX- Checker C XPath C 5.1 CX-Checker

CX-model Sapid CX-model XML XML XML CX-Checker include 1 CX-Checker CX-model CX-model ident CX-model T T typedef unsigned char T unsigned char CX-model SQMlint CX- Checker define C CX-model I IX-model IX-model CXmodel Define macropattern macrobody macro- Call 4 CX-model IX-model IT OJL(On the Job Learing). (19700023 20300009) 1) Pete Goodliffe. Code Craft., 2007. 2) GNU Coding Standard. http://www.gnu.org/prep/standards/. 3) MISRA C. MISRA C-., 2004. 4) QAC. http://www.toyo.co.jp/ss/qac/. 5) - MISRA C SQMlint. http://japan.renesas.com/. 6) BrianW. Kernighan and DennisM. Ritchie. C programming language 2nd ed. Prentice Hall, 1988. 7) RainCode Checker. http://www.raincode. com/checker.html. 8) Checkstyle. http://checkstyle.sourceforge.net/. 9),,. CASE sapid., Vol.39, No.6, pp. 1990 1998, 6 1998. 10),,. XML., 2005-SE-149, pp.57 64, 2005. 11) Saxon. http://saxon.sourceforge.net/.