Skip to main content
Log in

Testing for refinement in Circus

  • Original Article
  • Published:
Acta Informatica Aims and scope Submit manuscript

Abstract

Circus combines constructs to define complex data operations and interactions; it integrates Z and CSP, and, distinctively, it is a language for refinement that can describe programs as well as specification and design models. The semantics is based on the unifying theories of programming (UTP). Most importantly, Circus is representative of a class of refinement-oriented languages that combines facilities to specify abstract data types in a model-based style and patterns of interaction. What we present here is the Circus testing theory; this work is relevant as a foundation for sound test-generation techniques for a plethora of state-rich reactive languages. To cater for data operations, we define symbolic tests and exhaustive test sets. They are the basis for test-generation techniques that can combine coverage criteria for data and transition models. The notion of correctness is Circus refinement, a UTP-based generalisation of failures-divergences refinement that considers data modelling. Proof of exhaustivity exploits the correspondence between the operational and denotational semantics.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Abrial, J.R.: B#: toward a synthesis between Z and B. In: Bert, D., Bowen, J.P., King, S., Waldén, M. (eds.) ZB, Lecture Notes in Computer Science, vol. 3582, pp. 168–177. Springer (1996)

  2. Bernot G., Gaudel M.C., Marre B.: Software testing based on formal specifications: a theory and a tool. Softw. Eng. J. 6(6), 387–405 (1991)

    Article  Google Scholar 

  3. Bogdanov K., Holcombe M.: Refinement in statechart testing: research articles. Softw. Test. Verif. Reliab. 14(3), 189–211 (2004)

    Article  Google Scholar 

  4. Bogdanov, K., Holcombe, M., Singh, H.: Automated test set generation for statecharts. In: FM-Trends 98: Proceedings of the International Workshop on Current Trends in Applied Formal Method, pp. 107–121. Springer (1999)

  5. Bougé L., Choquet N., Fribourg L., Gaudel M.C.: Test set generation from algebraic specifications using logic programming. J. Syst. Softw. 6(4), 343–360 (1986)

    Article  Google Scholar 

  6. Briand L.C., Labiche Y., Cui J.: Automated support for deriving test requirements from UML statecharts. J. Softw. Syst. Model. 4(4), 399–423 (2005)

    Article  Google Scholar 

  7. Brinksma, E.: A theory for the derivation of tests. In: Protocol Specification, Testing and Verification VIII, pp. 63–74. North-Holland (1988)

  8. Brucker A.D., Rittinger F., Wolff B.: Hol-z 2.0: A proof environment for z-specifications. J. Univ. Comput. Sci. 9(2), 152–172 (2003)

    Google Scholar 

  9. Buchs, D., Lucio, L., Chen, A.: Model checking techniques for test generation from business process models. In: 14th Ada-Europe International Conference on Reliable Software Technologies, Lecture Notes in Computer Science, pp. 59–74. Springer (2009)

  10. Butler M.J.: csp2B: A Practical Approach to Combining CSP and B. Formal Aspects Comput. 12(3), 182–198 (2000)

    Article  MATH  Google Scholar 

  11. Butterfield, A., Sherif, A., Woodcock, J.C.P.: Slotted Circus: A UTP-family of reactive theories. In: International Conference on Formal Enginneering, Lecture Notes in Computer Science, vol. 4591, pp. 75–97. Springer (2007)

  12. Carrington, D., Stocks, P.: A tale of two paradigms: Formal methods and software testing. In: Bowen, J.P., Hall, J.A. (eds.) Z User Workshop, Workshops in Computing, pp. 51–68. Springer (1994)

  13. Cavalcanti, A.L.C., Clayton, P., O’Halloran, C.: Control Law Diagrams in Circus. In: Fitzgerald, J., Hayes, I.J., Tarlecki, A. (eds.) FM 2005: Formal Methods, Lecture Notes in Computer Science, vol. 3582, pp. 253–268. Springer (2005)

  14. Cavalcanti, A.L.C., Gaudel, M.C.: Testing for Refinement in CSP. In: 9th International Conference on Formal Engineering Methods, Lecture Notes in Computer Science, vol. 4789, pp. 151–170. Springer (2007)

  15. Cavalcanti, A.L.C., Gaudel, M.C.: Testing for Refinement in Circus—Extended version. Tech. rep., University of York (2009). http://www-users.cs.york.ac.uk/~alcc/CG09.pdf

  16. Cavalcanti, A.L.C., Gaudel, M.C.: A note on traces refinement and the conf relation in the Unifying Theories of Programming. In: Butterfield, A. (ed.) Unifying Theories of Programming 2008, Lecture Notes in Computer Science, vol. 5713. Springer (2010)

  17. Cavalcanti A.L.C., Sampaio A.C.A., Woodcock J.C.P.: A Refinement Strategy for Circus. Formal Aspects Comput. 15(2–3), 146–181 (2003)

    Article  MATH  Google Scholar 

  18. Cavalcanti, A.L.C., Woodcock, J.C.P.: A Tutorial Introduction to CSP in Unifying Theories of Programming. In: Refinement Techniques in Software Engineering, Lecture Notes in Computer Science, vol. 3167, pp. 220–268. Springer (2006)

  19. Chow T.S.: Testing software design modeled by finite-state machines. IEEE Trans. Softw. Eng. SE-4(3), 178–187 (1978)

    Article  Google Scholar 

  20. Cristiá, M., Monetti, P.R.: Implementing and Applying the Stocks-Carrington Framework for Model-Based Testing. In: Breitman, K., Cavalcanti, A.L.C. (eds.) 11th International Conference on Formal Engineering Methods, Lecture Notes in Computer Science, vol. 5885, pp. 167–185. Springer (2009)

  21. Dick, J., Faivre, A.: Automating the generation and sequencing of test cases from model-based specifications. In: Formal Methods Europe, Lecture Notes in Computer Science, vol. 670, pp. 268–284. Springer (1993)

  22. Eertink, E.H.: Simulation techniques for the validation of LOTOS specifications. Ph.D. thesis, University of Twente (1994)

  23. Fischer, C.: How to Combine Z with a Process Algebra. In: Bowen, J., Fett, A., Hinchey, M. (eds.) ZUM’98: The Z Formal Specification Notation. Springer (1998)

  24. Fischer, C.: Combination and Implementation of Processes and Data: from CSP-OZ to Java. Ph.D. thesis, Fachbereich Informatik Universität Oldenburg (2000)

  25. Frantzen, L., Tretmans, J., Willemse, T.A.C.: A Symbolic Framework for Model-Based Testing. In: Havelund, K., Núñez, M., Rosu, G., Wolff, B. (eds.) Formal Approaches to Software Testing and Runtime Verification, no. 4262 in Lecture Notes in Computer Science, pp. 40–54. Springer (2006)

  26. Freitas, A.F., Cavalcanti, A.L.C.: Automatic Translation from Circus to Java. In: Misra, J., Nipkow, T., Sekerinski, E. (eds.) FM 2006: Formal Methods, Lecture Notes in Computer Science, vol. 4085, pp. 115–130. Springer (2006)

  27. Fujiwara, S., Bochmann, G.: Testing non-deterministic finite state machines with fault coverage. In: 4th International Workshop on Protocol Test Systems (1991)

  28. Galloway, A.J.: Integrated Formal Methods with Richer Methodological Profiles for the Development of Multi-perspective Systems. Ph.D. thesis, University of Teeside, School of Computing and Mathematics (1996)

  29. Gannon J., McMullin P., Hamlet R.: Data abstraction implementation, specification and testing. ACM Trans. Program. Lang. Syst. 3(3), 211–223 (1981)

    Article  Google Scholar 

  30. Gaudel, M.C.: Testing can be formal, too. In: International Joint Conference, Theory And Practice of Software Development, Lecture Notes in Computer Science, vol. 915, pp. 82–96. Springer (1995)

  31. Gaudel M.C., James P.J.: Testing algebraic data types and processes : a unifying theory. Formal Aspects Comput. 10(5–6), 436–451 (1998)

    Article  MATH  Google Scholar 

  32. Helke, S., Neustupny, T., Santen, T.: Automating Test Case Generation from Z Specifications with Isabelle. In: Bowen, J.P., Hinchey, M.G., Till, D. (eds.) International Conference of Z Users, Lecture Notes in Computer Science, vol. 1212, pp. 52–71. Springer (1997)

  33. Hennessy M.C.B.: Algebraic Theory of Processes. MIT Press, Cambridge (1988)

    MATH  Google Scholar 

  34. Hierons R., Sadeghipour S., Singh H.: Testing a system specified using statecharts and Z. Inf. Softw. Technol. 43(2), 137–149 (2001)

    Article  Google Scholar 

  35. Hierons R.M.: Testing from a Z Specification. Softw. Test. Verif. Reliab. 7, 19–33 (1997)

    Article  Google Scholar 

  36. Hierons R.M.: Comparing test sets and criteria in the presence of test hypotheses and fault domains. ACM Trans. Softw. Eng. Methodol. 11(4), 427–448 (2002)

    Article  Google Scholar 

  37. Hierons R.M., Kim T.H., Ural H.: On the testability of SDL specifications. Comput. Netw. 44(5), 681–700 (2004)

    Article  MATH  Google Scholar 

  38. Hoare C.A.R.: Communicating Sequential Processes. Prentice-Hall International, Englewood Cliffs (1985)

    MATH  Google Scholar 

  39. Hoare C.A.R., Jifeng H.: Unifying Theories of Programming. Prentice-Hall, Englewood Cliffs (1998)

    Google Scholar 

  40. Hoenick, J., Olderog, E.R.: Combining specification techniques for processes, data and time. In: Butler, M.J., Petre, L., Sere, K. (eds.) Integrated Formal Methods, Lecture Notes in Computer Science, vol. 2335, pp. 245–266 (2002)

  41. Kahsai, T., Roggenbach, M., Schlingloff, B.H.: Specification-based testing for refinement. In: SEFM ’07: 5th IEEE International Conference on Software Engineering and Formal Methods, pp. 237–246. IEEE Computer Society (2007)

  42. Lee, D., Yannakakis, M.: Principles and methods of testing finite state machines-A survey. In: Proceedings of the IEEE, vol. 84, pp. 1090–1126 (1996)

  43. Lestiennes, G., Gaudel, M.C.: Testing processes from formal specifications with inputs, outputs, and datatypes. In: IEEE International Symposium on Software Reliability Engineering, pp. 3–14 (2002)

  44. Lucio, L., Pedro, L., Buchs, D.: A Test Language for CO-OPN Specifications. In: 16th IEEE International Workshop on Rapid System Prototyping, pp. 195–201. IEEE Computer Society (2005)

  45. Mahony B., Dong J.S.: Timed communicating object Z. IEEE Trans. Softw. Eng. 26(2), 150–177 (2000)

    Article  Google Scholar 

  46. Martin, A.: Machine-Assisted Theorem-Proving for Software Engineering. Ph.D. thesis, Oxford Universiversity Computing Laboratory, Pembroke College, Oxford, UK (1995)

  47. Massink M., Latella D., Gnesi S.: On testing UML statecharts. J. Log. Algebraic Program. 69(1–2), 1–74 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  48. Morgan C.C.: Programming from Specifications. 2nd edn. Prentice-Hall, Englewood Cliffs (1994)

    MATH  Google Scholar 

  49. Nicola R.D., Hennessy M.C.B.: Testing equivalences for processes. Theor. Comput. Sci. 3(1–2), 83–133 (1984)

    Article  Google Scholar 

  50. Nogueira, S., Sampaio, A.C.A., Mota, A.C.: Guided test generation from csp models. In: Fitzgerald, J.S., Haxthausen, A.E., Yenigün, H. (eds.) 5th International Colloquium on Theoretical Aspects of Computing, Lecture Notes in Computer Science, vol. 5160, pp. 258–273. Springer (2008)

  51. Olderog E., Wehrheim H.: Specification and (property) inheritance in csp-oz. Sci. Comput. Program. 55(1–3), 227–257 (2005)

    Article  MATH  MathSciNet  Google Scholar 

  52. Oliveira, M.V.M.: Formal Derivation of State-Rich Reactive Programs Using Circus. Ph.D. thesis, University of York (2006)

  53. Oliveira M.V.M., Cavalcanti A.L.C., Woodcock J.C.P.: Formal development of industrial-scale systems. Innov. Syst. Softw. Eng. 1(2), 126–147 (2005)

    Google Scholar 

  54. Oliveira M.V.M., Cavalcanti A.L.C., Woodcock J.C.P.: A UTP semantics for Circus. Formal Aspects Comput. 21(1–2), 3–32 (2009)

    Article  MATH  Google Scholar 

  55. Peleska, J., Siegel, M.: Test automation of safety-critical reactive systems. In: Formal Methods Europe, Industrial Benefits and Advances in Formal Methods, Lecture Notes in Computer Science, vol. 1051 (1996)

  56. Peleska J., Siegel M.: Test automation of safety-critical reactive systems. S. Afr. Comput. J. 19, 53–77 (1997)

    Google Scholar 

  57. Péraire, C., Barbey, S., Buchs, D.: Test selection for object-oriented software based on formal specifications. In: Gries, W.P.d.R.D. (ed.) Programming Concepts and Methods, IFIP TC2/WG2.2,2.3 International Conference on Programming Concepts and Methods, IFIP Conference Proceedings, vol. 125, pp. 385–403. Chapman & Hall (1998)

  58. Roscoe A.W.: The Theory and Practice of Concurrency. Prentice-Hall Series in Computer Science. Prentice-Hall, Englewood Cliffs (1998)

    Google Scholar 

  59. Schneider S.: Concurrent and Real-time Systems: The CSP Approach. Wiley, New York (2000)

    Google Scholar 

  60. Schoot H.V.D., Ural H.: Data flow oriented test selection for LOTOS. Comput. Netw. ISDN Syst. 27(7), 1111–1136 (1993)

    Google Scholar 

  61. Sherif, A., Jifeng, H., Cavalcanti, A.L.C., Sampaio, A.C.A.: A framework for specification and validation of real-time systems using circus actions. In: Liu, Z., Araki, K. (eds.) International Colloquium on Theoretical Aspects of Computing, Lecture Notes in Computer Science, vol. 3407, pp. 478–493. Springer (2005)

  62. Smith G.: The Object-Z Specification Language. Kluwer, Dordrecht (1999)

    Google Scholar 

  63. Srivatanakul, T., Clark, J.A., Stepney, S., Polack, F.: Challenging formal specifications by mutation: a CSP security example. In: 10th Asia-Pacific Software Engineering Conference, pp. 340–350. IEEE Press (2003)

  64. Stoddart, B.: An Introduction to the Event Calculus. In: Bowen, J.P., Hinchey, M.G., Till, D. (eds.) International Conference of Z Users, Lecture Notes in Computer Science, vol. 1212, pp. 52–71. Springer (1997)

  65. Taguchi, K., Araki, K.: The State-based CCS Semantics for Concurrent Z Specification. In: Hinchey, M., Liu, S. (eds.) International Conference on Formal Engineering Methods, pp. 283–292. IEEE (1997)

  66. Tang, X., Woodcock, J.C.P.: Towards Mobile Processes in Unifying Theories. In: 2nd International Conference on Software Engineering and Formal Methods–SEFM 2004, pp. 44–53. IEEE Computer Society (2004)

  67. Tang, X., Woodcock, J.C.P.: Travelling Processes. In: Kozen, D., Shankland, C. (eds.) Mathematics of Program Construction—MPC 2004, Lecture Notes in Computer Science, vol. 3125, pp. 381–399. Springer (2004)

  68. Treharne, H., Schneider, S.: Using a process algebra to control B OPERATIONS. In: 1st International Conference on Integrated Formal Methods–IFM’99, pp. 437–457. Springer (1999)

  69. Tretmans, J.: Test Generation with Inputs, Outputs, and Quiescence. In: Tools and Algorithms for the Construction and Analysis of Systems, Lecture Notes in Computer Science, vol. 1055, pp. 127–146. Springer (1996)

  70. Tripathy P., Sarikaya B.: Test generation from LOTOS specifications. IEEE Trans. Comput. 40(4), 543–552 (1991)

    Article  Google Scholar 

  71. Woodcock, J.C.P., Cavalcanti, A.L.C., Freitas, L.: Operational Semantics for Model-Checking Circus. In: Fitzgerald, J., Hayes, I.J., Tarlecki, A. (eds.) FM 2005: Formal Methods, Lecture Notes in Computer Science, vol. 3582, pp. 237–252. Springer (2005)

  72. Woodcock, J.C.P., Cavalcanti, A.L.C., Gaudel, M.C., Freitas, L.J.S.: Operational Semantics for Circus. Formal Aspects Comput. (to appear)

  73. Woodcock J.C.P., Davies J.: Using Z—Specification, Refinement, and Proof. Prentice-Hall, Englewood Cliffs (1996)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ana Cavalcanti.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Cavalcanti, A., Gaudel, MC. Testing for refinement in Circus . Acta Informatica 48, 97–147 (2011). https://doi.org/10.1007/s00236-011-0133-z

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00236-011-0133-z

Keywords

Navigation