ABSTRACT
As asynchronous programming becomes more mainstream, program analyses capable of automatically uncovering programming errors are increasingly in demand. Since asynchronous program analysis is computationally costly, current approaches sacrifice completeness and focus on limited sets of asynchronous task schedules that are likely to expose programming errors. These approaches are based on parameterized task schedulers, each of which admits schedules which are variations of a default deterministic schedule. By increasing the parameter value, a larger variety of schedules is explored, at a higher cost. The efficacy of these approaches depends largely on the default deterministic scheduler on which varying schedules are fashioned.
We find that the limited exploration of asynchronous program behaviors can be made more efficient by designing parameterized schedulers which better match the inherent ordering of program events, e.g., arising from waiting for an asynchronous task to complete. We follow a reduction-based "sequentialization" approach to analyzing asynchronous programs, which leverages existing (sequential) program analysis tools by encoding asynchronous program executions, according to a particular scheduler, as the executions of a sequential program. Analysis based on our new scheduler comes at no greater computational cost, and provides strictly greater behavioral coverage than analysis based on existing parameterized schedulers; we validate these claims both conceptually, with complexity and behavioral-inclusion arguments, and empirically, by discovering actual reported bugs faster with smaller parameter values.
- Emmi, M., Qadeer, S., Rakamaric, Z.: Delay-bounded scheduling. In: POPL ’11: Proc. 38th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, ACM (2011) 411–422 Google ScholarDigital Library
- Lal, A., Reps, T.W.: Reducing concurrent analysis under a context bound to sequential analysis. Formal Methods in System Design 35(1) (2009) 73–97 Google ScholarDigital Library
- Lal, A., Qadeer, S., Lahiri, S.K.: A solver for reachability modulo theories. In: CAV ’12. Volume 7358 of LNCS. 427–443 Google ScholarDigital Library
- Bouajjani, A., Emmi, M., Parlato, G.: On sequentializing concurrent programs. In: SAS ’11: Proc. 18th International Symposium on Static Analysis. Volume 6887 of LNCS., Springer (2011) 129–145 Google ScholarDigital Library
- Qadeer, S., Rehof, J.: Context-bounded model checking of concurrent software. In: TACAS ’05: Proc. 11th International Conference on Tools and Algorithms for the Construction and Analysis of Systems. Volume 3440 of LNCS., Springer (2005) 93–107 Google ScholarDigital Library
- Barnett, M., Leino, K.R.M., Moskal, M., Schulte, W.: Boogie: An intermediate verification language http:// research.microsoft.com/en-us/projects/boogie/.Google Scholar
- Qadeer, S., Wu, D.: KISS: Keep it simple and sequential. In: PLDI ’04: Proc. ACM SIGPLAN Conference on Programming Language Design and Implementation, ACM (2004) 14–24 Google ScholarDigital Library
- La Torre, S., Madhusudan, P., Parlato, G.: Model-checking parameterized concurrent programs using linear interfaces. In: CAV ’10: Proc. 22nd International Conference on Computer Aided Verification. Volume 6174 of LNCS., Springer (2010) 629–644 Google ScholarDigital Library
- Sen, K., Viswanathan, M.: Model checking multithreaded programs with asynchronous atomic methods. In: CAV ’06: Proc. 18th International Conference on Computer Aided Verification. Volume 4144 of LNCS., Springer (2006) 300–314 Google ScholarDigital Library
- Kidd, N., Jagannathan, S., Vitek, J.: One stack to run them all: Reducing concurrent analysis to sequential analysis under priority scheduling. In: SPIN ’10: Proc. 17th International Workshop on Model Checking Software. Volume 6349 of LNCS., Springer (2010) 245–261 Google ScholarDigital Library
- Garg, P., Madhusudan, P.: Compositionality entails sequentializability. In: TACAS ’11: Proc. 17th International Conference on Tools and Algorithms for the Construction and Analysis of Systems. Volume 6605 of LNCS., Springer (2011) 26–40 Google ScholarDigital Library
- Bouajjani, A., Emmi, M.: Bounded phase analysis of message-passing programs. In: TACAS ’12: Proc. 18th International Conference on Tools and Algorithms for the Construction and Analysis of Systems. LNCS, Springer (2012) Google ScholarDigital Library
- Atig, M.F., Bouajjani, A., Emmi, M., Lal, A.: Detecting fair non-termination in multithreaded programs. In: CAV ’12: Proc. 24th International Conference on Computer Aided Verification. LNCS, Springer (2012) Google ScholarDigital Library
- Emmi, M., Lal, A.: Finding non-terminating executions in distributed asynchronous programs. In: SAS ’12: Proc. 19th International Static Analysis Symposium. LNCS, Springer (2012) Google ScholarDigital Library
- Emmi, M., Lal, A., Qadeer, S.: Asynchronous programs with prioritized task-buffers. In: SIGSOFT FSE ’12: Proc. 20th ACM SIGSOFT Symposium on the Foundations of Software Engineering, ACM (2012) 48 Google ScholarDigital Library
- Musuvathi, M., Qadeer, S.: Iterative context bounding for systematic testing of multithreaded programs. In: PLDI ’07: Proc. ACM SIGPLAN 2007 Conference on Programming Language Design and Implementation, ACM (2007) 446–455 Google ScholarDigital Library
Index Terms
- Exploiting synchronization in the analysis of shared-memory asynchronous programs
Recommendations
Static deadlock detection for asynchronous C# programs
PLDI '17Asynchronous programming is a standard approach for designing responsive applications. Modern languages such as C# provide async/await primitives for the disciplined use of asynchrony. In spite of this, programs can deadlock because of incorrect use of ...
Natural proofs for asynchronous programs using almost-synchronous reductions
OOPSLA '14: Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & ApplicationsWe consider the problem of provably verifying that an asynchronous message-passing system satisfies its local assertions. We present a novel reduction scheme for asynchronous event-driven programs that finds almost-synchronous invariants - invariants ...
Static deadlock detection for asynchronous C# programs
PLDI 2017: Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and ImplementationAsynchronous programming is a standard approach for designing responsive applications. Modern languages such as C# provide async/await primitives for the disciplined use of asynchrony. In spite of this, programs can deadlock because of incorrect use of ...
Comments