1 2 3 race conditions 4 race conditions [1] [3] ( 1 ) safetyliveliness ( 2 ) ( 3 ) 2.2 SPIN SPIN[2] AT&T Bell SPIN Promela Promela C LTL

Similar documents
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

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

& Vol.5 No (Oct. 2015) TV 1,2,a) , Augmented TV TV AR Augmented Reality 3DCG TV Estimation of TV Screen Position and Ro

ID 3) 9 4) 5) ID 2 ID 2 ID 2 Bluetooth ID 2 SRCid1 DSTid2 2 id1 id2 ID SRC DST SRC 2 2 ID 2 2 QR 6) 8) 6) QR QR QR QR

[2] , [3] 2. 2 [4] 2. 3 BABOK BABOK(Business Analysis Body of Knowledge) BABOK IIBA(International Institute of Business Analysis) BABOK 7

B HNS 7)8) HNS ( ( ) 7)8) (SOA) HNS HNS 4) HNS ( ) ( ) 1 TV power, channel, volume power true( ON) false( OFF) boolean channel volume int

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

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

Input image Initialize variables Loop for period of oscillation Update height map Make shade image Change property of image Output image Change time L

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

揃 Lag [hour] Lag [day] 35

Vol.54 No (July 2013) [9] [10] [11] [12], [13] 1 Fig. 1 Flowchart of the proposed system. c 2013 Information

IPSJ SIG Technical Report Vol.2011-EC-19 No /3/ ,.,., Peg-Scope Viewer,,.,,,,. Utilization of Watching Logs for Support of Multi-

1 Web [2] Web [3] [4] [5], [6] [7] [8] S.W. [9] 3. MeetingShelf Web MeetingShelf MeetingShelf (1) (2) (3) (4) (5) Web MeetingShelf

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

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

先端社会研究 ★5★号/4.山崎

JOURNAL OF THE JAPANESE ASSOCIATION FOR PETROLEUM TECHNOLOGY VOL. 66, NO. 6 (Nov., 2001) (Received August 10, 2001; accepted November 9, 2001) Alterna

m City Lights 1931 DIE 3 GROSCHEN-OPER G.W Blackmail 1929 DVD M M 1931Vampyr 1932

IPSJ SIG Technical Report Pitman-Yor 1 1 Pitman-Yor n-gram A proposal of the melody generation method using hierarchical pitman-yor language model Aki

A Study on Throw Simulation for Baseball Pitching Machine with Rollers and Its Optimization Shinobu SAKAI*5, Yuichiro KITAGAWA, Ryo KANAI and Juhachi

28 Horizontal angle correction using straight line detection in an equirectangular image

( ) [1] [4] ( ) 2. [5] [6] Piano Tutor[7] [1], [2], [8], [9] Radiobaton[10] Two Finger Piano[11] Coloring-in Piano[12] ism[13] MIDI MIDI 1 Fig. 1 Syst

[2] OCR [3], [4] [5] [6] [4], [7] [8], [9] 1 [10] Fig. 1 Current arrangement and size of ruby. 2 Fig. 2 Typography combined with printing

(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

1., 1 COOKPAD 2, Web.,,,,,,.,, [1]., 5.,, [2].,,.,.,, 5, [3].,,,.,, [4], 33,.,,.,,.. 2.,, 3.., 4., 5., ,. 1.,,., 2.,. 1,,

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.2010-GN-74 No /1/ , 3 Disaster Training Supporting System Based on Electronic Triage HIROAKI KOJIMA, 1 KU

6_27.dvi

Vol. 48 No. 4 Apr LAN TCP/IP LAN TCP/IP 1 PC TCP/IP 1 PC User-mode Linux 12 Development of a System to Visualize Computer Network Behavior for L

28 Docker Design and Implementation of Program Evaluation System Using Docker Virtualized Environment

EQUIVALENT TRANSFORMATION TECHNIQUE FOR ISLANDING DETECTION METHODS OF SYNCHRONOUS GENERATOR -REACTIVE POWER PERTURBATION METHODS USING AVR OR SVC- Ju


9_18.dvi

29 jjencode JavaScript

( )

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

駒田朋子.indd

2

2 ( ) i

17 Proposal of an Algorithm of Image Extraction and Research on Improvement of a Man-machine Interface of Food Intake Measuring System

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

05_藤田先生_責

149 (Newell [5]) Newell [5], [1], [1], [11] Li,Ryu, and Song [2], [11] Li,Ryu, and Song [2], [1] 1) 2) ( ) ( ) 3) T : 2 a : 3 a 1 :

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

soturon.dvi

. 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

1 DHT Fig. 1 Example of DHT 2 Successor Fig. 2 Example of Successor 2.1 Distributed Hash Table key key value O(1) DHT DHT 1 DHT 1 ID key ID IP value D

kut-paper-template.dvi

鹿大広報149号

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

II

_念3)医療2009_夏.indd

untitled

Kyushu Communication Studies 第2号

Study on Throw Accuracy for Baseball Pitching Machine with Roller (Study of Seam of Ball and Roller) Shinobu SAKAI*5, Juhachi ODA, Kengo KAWATA and Yu

DI DI

untitled

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

<95DB8C9288E397C389C88A E696E6462>

(3.6 ) (4.6 ) 2. [3], [6], [12] [7] [2], [5], [11] [14] [9] [8] [10] (1) Voodoo 3 : 3 Voodoo[1] 3 ( 3D ) (2) : Voodoo 3D (3) : 3D (Welc

第62巻 第1号 平成24年4月/石こうを用いた木材ペレット

Transcription:

1,a) 1,b) race conditions race conditions race conditions Error Localization Based on the Counterexamples Generated by Model-Checker Shi Chen 1,a) Toshiaki Aoki 1,b) Abstract: It is hard to find errors based on counterexamples which are generated by model checking tools. There are existing works to support to find the errors by analyzing the counterexamples. However, those works do not point them out exactly, but only give useful information to find the errors. In this paper, we focus on race conditions problems which are important in concurrent behavior and propose a method to exactly point the errors out. In addition, we have implemented tools to realize the method and confirmed the effectiveness of our approach from experiments using the tools. 1. 1 Japan Advanced Institute of Science and Technology a) chenshi@jaist.ac.jp b) toshiaki@jaist.ac.jp race conditions race conditions race conditions c 2012 Information Processing Society of Japan 1

1 2 3 race conditions 4 race conditions 5 6 7 2. 2.1 [1] [3] ( 1 ) safetyliveliness ( 2 ) ( 3 ) 2.2 SPIN SPIN[2] AT&T Bell SPIN Promela Promela C LTL Linear Temporal Logic 2.3 Groce invariant [5] Ball [6] Groce Pseudo-Boolean Solver [7] [8] 2.4 1 race conditions c 2012 Information Processing Society of Japan 2

assert ( ) Fig. 1 Fig. 2 1 Conceptual Dagram of Proposed Method 2 1 int x = 0; 2 3 processa(){ 4 if(x == 0){ 5 x = x + 1; 6 assert(x == 1); 7 } 8 } 9 10 processb(){ 11 if(x >= 0) 12 x = x + 2; 13 } 14 15 void main{ 16 run processa(); 17 run processb(); 18 } race conditions An Example of Race Conditions SPIN 3. race conditions 3.1 race conditions XXXXXX XXXXX XXXXXX race conditions[4] race conditions race conditions. race conditions 2 A B x x race conditions 4 11 12 5 6 A B A x race conditions 4 5 6 11 12 A x A x 3.2 race conditions 3.1 race conditions race conditions race conditions race conditions 1 op OP OP = {cond(gv), read(gv), write(gv), assert(lv gv), other(ɛ lv) lv LV, gv GV } LV, GV cond(gv) read(gv) write(gv) assert(lv gv) other(ɛ lv) 2 s i P OP SRC P OP SRC 3 race conditions s 1,..., s l,..., s m,..., s n s l = (p i, cond(gv) read(gv), src l ), s m = (p j, write(gv), src m ), s n = (..., assert(lv gv), src n ). i, j, l, m, n 1 l < m < n, i j. p i P src i SRC s l p i s m s n s n 3.1 race conditions s l = (processa, cond(x), if(x == 0)), s m = (processb, write(x), x = x + 2), s n = (processa, assert(x), assert(x == 1)) 4. race conditions 4.1 3.1 race conditions c 2012 Information Processing Society of Japan 3

race conditions race conditions race conditions race conditions 4.2 4.3 4.3.1 SPIN pan.c spin -a [Promela file] safetyliveliness -DSAFETY gcc -DSAFETY pan.c -o pan Buchi Automaton P1 P2 Pn Interleaving product S Fig. 3 3 Language intersection X φ φ A Solution To Output Witnesses = φ translation Buchi Automaton -e -mn -E pan -mn -e -E 4.3.2 SPIN SPIN 3 φ 3 P 1, P 2,..., P 3 S φ A X 4.3.3 trail SPIN trail SPIN trail spin -t[trail file] -p -g -w [Promela file] -t -p -g -w trail 4.4 race conditions race conditions c 2012 Information Processing Society of Japan 4

ID ID ID cond read write assert other Promela 4.5 race conditions race conditions cond read write assert 4.4 race conditions race conditions 4.5.1 race conditions write cond read read cond assert Algorithm 1 StepInfo{ String pid, String type, String step} TrailInfo{List<StepInfo> step list, String trailfilepath} InterruptInfo{StepInfo iruptstep, StepInfo assertstep, Integer cstepnum} List<TrailInfo> counterexample list List<InterruptInfo> interrupt list counterexample list = parsecounterexamples() for all TrailInfo ce in counterexample list do for all StepInfo step1 in ce.step list do if step1.type = COND or step1.type = READ then for all StepInfo step2 after step1 in ce.step list do if step2.pid!= step1.pid and step2.type = WRITE then interrupt list.put(interruptinfo(step1,getassertinfo(ce), getcontinuousstepnum(ce, step1)) break read cond write Algorithm 1 StepInfo TrailInfo InterruptInfo getassertinfo(ce) ce assert getcontinuousstepnum(ce, step1) ce step1 write read cond read cond 4.5.2 c 2012 Information Processing Society of Japan 5

Algorithm 2 ErrorInfo {InterruptInfo irupt, Integer wstepnum} List<TrailInfo> witness list List<ErrorInfo> error list witness list = parsewitnesses() for all InterruptInfo irupt in interrupt list do for all TrailInfo wt in witness list do if getassertinfo(wt)!= irupt.assertstep then continue continuousstepnum = getcontinuousstepnum(wt, irupt.iruptstep) if continuousstepnum > irupt.cstepnum then error list.put(errorinfo(irupt, continuousstepnum)) else if!error list.contains(irupt) then break else remove elements that contains irupt from error list Algorithm 2 ErrorInfo 4.5.3 race conditions race conditions race conditions 4.5.2 Algorithm 3 Map<InterruptInfo, ErrorInfo> irupt result Map<String, ErrorInfo> step result for all ErrorInfo err in error list do InterruptInfo irupt = err.irupt if!irupt result.contains(irupt) then irupt result.put(irupt, err) else if err.wstepnum < irupt result.get(irupt).wstepnum then irupt result.put(irupt, err) for all ErrorInfo err in irupt result do String itstep = err.irupt.iruptstep.step if!step result.contains(itstep) then step result.put(itstep, err) else if err.wstepnum >!step result.get(itstep).wstepnum then step result.put(itstep, err) SPIN ID ID ID race conditions Algorithm 3 irupt result step result 4.6 c 2012 Information Processing Society of Japan 6

assert ( ) SPIN trail Perl Fig. 4 4 Java Implement of Analysis Tool XXXXXX XXXXX XXXXXX race conditions 5. 4 5 6 6. 6.1 race conditions race conditions race conditions ( 1 ) race conditions ( 2 ) ( 3 ) 1 [9] Fig. 5 5 Execution of Counterexample/Witness Generator Tool 6 Fig. 6 Execution of Fault Analysis Tool 6.2 race conditions race conditions race conditions c 2012 Information Processing Society of Japan 7

Table 1 1 Result of Evaluation Experiments 2 4 9 1.5 1 0.3 3 3 7 1.2 1 0.2 3 10 8 2.3 2 0.4 3 4 1 1.6 1 0.2 3 12 20 1.8 2 0.5 10 767 768 35 1 6.2 2 1 26 1.8 2 0.7 3 2633 732 84.5 3 18.3 race coditions 7. 7.1 race conditions race conditions 7.2 race conditions race conditions [1] E. Clarke, O. Grumberg and D. Peled: Model Checking, MIT Press. (1999). [2] G. J. Holzmann: THE SPIN MODEL CHECKER, Addison-Wesley, 2nd edition, (2005). [3] E. Clarke and H. Veith: Counterexamples revisited: Principles, Algorithms, Applications, International Symposium on Verification in Honor of Zohar Manna, volume2772 of LNCS, (2003). [4] R. H. Netzer, and B. P. Miller: What are race conditions? some issues and formalizations, ACM Letters on Programming Languages and Systems, 1(1):74-88, (1992). [5] A. Groce and W. Visser: What went wrong: Explaining counterexamples, In SPIN Workshop on Model Checking of Software, pages 121-135. (2003). [6] T. Ball, M. Naik and S. K. Rajamani: From symptom to cause: localizing errors in counterexample traces, POPL 03, pages 97-105. (2003) [7] A. Groce, S. Chaki, D. Kroening and O. Strichman: Error explanation with distance metrics, International Journal on Software Tools for Technology, Vol. 8, No. 3, pages 229-247. (2006) [8], :, (2009) [9] :, JAIST (2012) c 2012 Information Processing Society of Japan 8