Multiplexing of Partially Ordered Events

  • Colin Campbell
  • Margus Veanes
  • Jiale Huo
  • Alexandre Petrenko
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3502)


This paper introduces a method to correctly order events in model-based testing for concurrent systems, in particular multi-threaded programs, whose events are only partially ordered. For a sequential, centralized tester, we need to merge (local) traces of each component into a (global) trace of a system in such a way that the ordering constraints are observed. To this end, we instrument a multi-threaded program under test so that the order of lock events is visible. This additional information helps a so-called multiplexer to reconstruct a fully serial trace consistent with the partial order. We describe programs and the multiplexer as labeled transition systems and give pseudo-code of the algorithm implementing the latter. The implementation of the algorithm presented is used in an industrial context.


  1. 1.
    Spec Explorer, released (January 2005),
  2. 2.
  3. 3.
    Barnett, M., Leino, R., Schulte, W.: The Spec# programming system: An overview. In: Barthe, G., Burdy, L., Huisman, M., Lanet, J.-L., Muntean, T. (eds.) CASSIS 2004. LNCS, vol. 3362, pp. 49–69. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  4. 4.
    Blass, A., Gurevich, Y., Nachmanson, L., Veanes, M.: Play to test. Technical Report MSR-TR-2005-04, Microsoft Research, January 2005. Extended version of a paper submitted to CAV (2005)Google Scholar
  5. 5.
    Cacciari, L., Rafiq, O.: Controllability and observability in distributed testing. Inform. Software Technology 41, 767–780 (1999)CrossRefGoogle Scholar
  6. 6.
    de Alfaro, L.: Game models for open systems. In: Dershowitz, N. (ed.) Verification: Theory and Practice. LNCS, vol. 2772, pp. 269–289. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  7. 7.
    de Alfaro, L., Henzinger, T.: Interface automata. In: Proceedings of the 8th European Software Engineering Conference held jointly with 9th ACM SIGSOFT international symposium on Foundations of Software Engineering. ACM SIGSOFT Software Engineering Notes, vol. 26(5), pp. 109–120. ACM Press, New York (2001)Google Scholar
  8. 8.
    Grieskamp, W., Tillmann, N., Veanes, M.: Instrumenting scenarios in a model-driven development environment. Information and Software Technology 46(15), 1027–1036 (2004)CrossRefGoogle Scholar
  9. 9.
    Gurevich, Y., Rossman, B., Schulte, W.: Semantic essence of AsmL. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2003. LNCS, vol. 3188, pp. 240–259. Springer, Heidelberg (2004): Extended version to appear in special issue of Theoretical Computer Science, preliminary version available as Microsoft Research Technical Report MSR-TR-2004-27Google Scholar
  10. 10.
    Hallal, H., Alikacem, E., Tunney, P., Boroday, S., Petrenko, A.: Antipattern-based detection of defficiencies in java multithreaded software. In: Proceedings of the Fourth International Conference on Quality Software (QSIC2004), Braunschweig, Germany (September 2004)Google Scholar
  11. 11.
    Hallal, H., Boroday, S., Ulrich, A., Petrenko, A.: An automata-based approach to property testing in event traces. In: Hogrefe, D., Wiles, A. (eds.) TestCom 2003. LNCS, vol. 2644, pp. 180–196. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  12. 12.
    Huo, J., Negulescu, R., Petrenko, A.: A study of robustness and delay-insensitivity of discrete action systems. Technical Report CRIM-03/04-02, Centre de Recherche Informatique de Montréal, Montreal, Quebec, Canada (2003)Google Scholar
  13. 13.
    Huo, J., Petrenko, A.: On testing partially specified IOTS through lossless queues. In: Groz, R., Hierons, R.M. (eds.) TestCom 2004. LNCS, vol. 2978, pp. 76–94. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  14. 14.
    Jard, C.: How to observe interoperability at the service level of protocols. In: 7th IFIP WG6.1 International Workshop on Protocol Test Systems (IWPTS 1994), Tokyo, Japan (November 1994)Google Scholar
  15. 15.
    Lamport, L.: Time, clocks, and the orderings of events in a distributed system. Communications of the ACM 21(7), 558–565 (1978)CrossRefMATHGoogle Scholar
  16. 16.
    Tasiran, S., Qadeer, S.: Runtime refinement checking of concurrent data structures. In: Proceedings of the Fourth Workshop on Runtime Verification (RV 2004). Electronic Notes in Theoretical Computer Science, vol. 113, pp. 163–179 (January 2005)Google Scholar
  17. 17.
    Veanes, M., Campbell, C., Schulte, W., Kohli, P.: On-the-fly testing of reactive systems. Technical Report MSR-TR-2005-05, Microsoft Research (January 2005)Google Scholar

Copyright information

© IFIP International Federation for Information Processing 2005

Authors and Affiliations

  • Colin Campbell
    • 1
  • Margus Veanes
    • 1
  • Jiale Huo
    • 2
  • Alexandre Petrenko
    • 3
  1. 1.Microsoft ResearchRedmondUSA
  2. 2.McGill UniversityMontrealCanada
  3. 3.Centre de Recherche Informatique de MontrealCanada

Personalised recommendations