Skip to main content

Towards a Theory of Reach

  • Conference paper
  • First Online:
Trends in Functional Programming (TFP 2015)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9547))

Included in the following conference series:

Abstract

When testing a program, there are usually some parts that are rarely executed and hence more difficult to test. Finding inputs that guarantee that such parts are executed is an example of a reach problem, which in general seeks to ensure that targeted parts of a program are always executed. In previous work, Naylor and Runciman have developed a reachability solver for Haskell, based on the use of lazy narrowing from functional logic programming. Their work was focused on practical issues concerning implementation and performance. In this paper, we lay the groundwork for an underlying theory of such a system, by formally establishing the correctness of a simple reach solver.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Albert, E., Hanus, M., Frank, H., Oliver, J., Germán, V.: Operational semantics for declarative multi-paradigm languages. J. Symbolic Comput. 40(1), 795–829 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  2. Antoy, S., Echahed, R., Hanus, M.: A needed narrowing strategy. J. ACM 47(4), 776–822 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  3. Claessen, K., Hughes, J.: QuickCheck: a lightweight tool for random testing of haskell programs. In: Proceedings of the Fifth ACM SIGPLAN International Conference on Functional Programming (2000)

    Google Scholar 

  4. Fowler, J.: Towards a Theory of Reach - Agda Proof (2015). https://github.com/JonFowler/theoryofreach

  5. Gill, A., Runciman, C.: Haskell program coverage. In: Proceedings of the ACM SIGPLAN Workshop on Haskell (2007)

    Google Scholar 

  6. Hackett, J., Hutton, G.: Worker/Wrapper/Makes It/Faster. In: Proceedings of the 19th ACM SIGPLAN International Conference on Functional Programming (2014)

    Google Scholar 

  7. Hanus, M.: A unified computation model for functional and logic programming. In: Proceedings of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (1997)

    Google Scholar 

  8. Hinze, R.: A new approach to generic functional programming. In: Proceedings of the 27th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (2000)

    Google Scholar 

  9. Hughes, J.: QuickCheck: an automatic testing tool for Haskell (QuickCheck manual). http://www.cse.chalmers.se/~rjmh/QuickCheck/manual.html

  10. Lindblad, F.: Property directed generation of first-order test data. In: Proceedings of the Eighth Symposium on the Trends in Functional Programming (2007)

    Google Scholar 

  11. Moran, A., Sands, D.: Improvement in a lazy context: an operational theory for call-by-need. In: Proceedings of the 26th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (1999)

    Google Scholar 

  12. Naylor, M., Runciman, C.: Finding inputs that reach a target expression. In: Proceedings of the 7th IEEE International Working Conference on Source Code Analysis and Manipulation (2007)

    Google Scholar 

  13. Naylor, M.F.: Hardware-Assisted and Target-Directed Evaluation of Functional Programs. Ph.D. thesis, University of York (2008)

    Google Scholar 

  14. Norell, U.: Towards a Practical Programming Language Based on Dependent Type Theory. Ph.D. thesis, Goteborg University (2007)

    Google Scholar 

  15. Reich, J.S., Naylor, M., Runciman, C.: Advances in lazy SmallCheck. In: Hinze, R. (ed.) IFL 2012. LNCS, vol. 8241, pp. 53–70. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  16. Runciman, C., Naylor, M., Lindblad, F.: SmallCheck and lazy SmallCheck automatic exhaustive testing for small values. In: Proceedings of the First ACM SIGPLAN Symposium on Haskell (2008)

    Google Scholar 

Download references

Acknowledgements

We would like to thank members of the FP Lab in Nottingham and the anonymous referees for useful comments and suggestions regarding this work.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jonathan Fowler .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Fowler, J., Huttom, G. (2016). Towards a Theory of Reach. In: Serrano, M., Hage, J. (eds) Trends in Functional Programming. TFP 2015. Lecture Notes in Computer Science(), vol 9547. Springer, Cham. https://doi.org/10.1007/978-3-319-39110-6_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-39110-6_2

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-39109-0

  • Online ISBN: 978-3-319-39110-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics