Verifying Robustness of Event-Driven Asynchronous Programs Against Concurrency

被引:6
作者
Bouajjani, Ahmed [1 ]
Emmi, Michael [2 ]
Enea, Constantin [1 ]
Ozkan, Burcu Kulahcioglu [3 ]
Tasiran, Serdar [3 ]
机构
[1] Univ Paris Diderot, Paris, France
[2] Nokia Bell Labs, Murray Hill, NJ USA
[3] Koc Univ, Istanbul, Turkey
来源
PROGRAMMING LANGUAGES AND SYSTEMS (ESOP 2017): 26TH EUROPEAN SYMPOSIUM ON PROGRAMMING | 2017年 / 10201卷
基金
欧洲研究理事会;
关键词
RACE DETECTION; ATOMICITY; DETERMINISM; CHECKING;
D O I
10.1007/978-3-662-54434-1_7
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We define a correctness criterion, called robustness against concurrency, for a class of event-driven asynchronous programs that are at the basis of modern UI frameworks in Android, iOS, and Javascript. A program is robust when all possible behaviors admitted by the program under arbitrary procedure and event interleavings are admitted even if asynchronous procedures (respectively, events) are assumed to execute serially, one after the other, accessing shared memory in isolation. We characterize robustness as a conjunction of two correctness criteria: event-serializability (i.e., events can be seen as atomic) and event-determinism (executions within each event are insensitive to the interleavings between concurrent tasks dynamically spawned by the event). Then, we provide efficient algorithms for checking these two criteria based on polynomial reductions to reachability problems in sequential programs. This result is surprising because it allows to avoid explicit handling of all concurrent executions in the analysis, which leads to an important gain in complexity. We demonstrate via case studies on Android apps that the typical mistakes programmers make are captured as robustness violations, and that violations can be detected efficiently using our approach.
引用
收藏
页码:170 / 200
页数:31
相关论文
共 29 条
[11]  
Farzan A, 2008, LECT NOTES COMPUT SC, V5123, P52
[12]  
Farzan A, 2009, LECT NOTES COMPUT SC, V5505, P155, DOI 10.1007/978-3-642-00768-2_14
[13]   Atomizer: A dynamic atomicity checker for multithreaded programs [J].
Flanagan, Cormac ;
Freund, Stephen N. .
SCIENCE OF COMPUTER PROGRAMMING, 2008, 71 (02) :89-109
[14]   Types for atomicity: Static checking and inference for Java']Java [J].
Flanagan, Cormac ;
Freund, Stephen N. ;
Lifshin, Marina ;
Qadeer, Shaz .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2008, 30 (04)
[15]   Velodrome: A Sound and Complete Dynamic Atomicity Checker for Multithreaded Programs [J].
Flanagan, Cormac ;
Freund, Stephen N. ;
Yi, Jaeheon .
PLDI'08: PROCEEDINGS OF THE 2008 SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN & IMPLEMENTATION, 2008, :293-+
[16]  
Hatcliff J, 2004, LECT NOTES COMPUT SC, V2937, P175
[17]  
Hsiao CH, 2014, ACM SIGPLAN NOTICES, V49, P326, DOI [10.1145/2666356.2594330, 10.1145/2594291.2594330]
[18]   Study and Refactoring of Android Asynchronous Programming [J].
Lin, Yu ;
Okur, Semih ;
Dig, Danny .
2015 30TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2015, :224-235
[19]   Retrofitting Concurrency for Android Applications through Refactoring [J].
Lin, Yu ;
Radoi, Cosmin ;
Dig, Danny .
22ND ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING (FSE 2014), 2014, :341-352
[20]  
Maiya P, 2014, ACM SIGPLAN NOTICES, V49, P316, DOI [10.1145/2666356.2594311, 10.1145/2594291.2594311]