Skip to main content

Contracts and Specifications for Functional Logic Programming

  • Conference paper
Practical Aspects of Declarative Languages (PADL 2012)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7149))

Included in the following conference series:

Abstract

The expressive power of functional logic languages supports high-level specifications as well as efficient implementations of problems in the same language. If specifications are executable, they can be used both as initial prototypical implementations and as contracts for checking the reliable execution of implementations intended to satisfy the specification. In this paper, we propose a practical framework to support this general approach to coding. We discuss the notions of specifications and contracts for functional logic programming and present a tool that supports the development of declarative programs based on these notions.

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 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Antoy, S., Echahed, R., Hanus, M.: A needed narrowing strategy. Journal of the ACM 47(4), 776–822 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  2. Antoy, S., Hanus, M.: Set functions for functional logic programming. In: Proceedings of the 11th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming (PPDP 2009), pp. 73–82. ACM Press (2009)

    Google Scholar 

  3. Antoy, S., Hanus, M.: Functional logic programming. Communications of the ACM 53(4), 74–85 (2010)

    Article  Google Scholar 

  4. Antoy, S., Hanus, M.: A transformation tool for functional logic program development. In: Proc. of the 24th Workshop on (Constraint) Logic Programming (WLP 2010), pp. 23–33. German University of Cairo (2010)

    Google Scholar 

  5. Bauer, F.L., Broy, M., Gnatz, R., Hesse, W., Krieg-Brückner, B., Partsch, H., Pepper, P., Wössner, H.: Towards a wide spectrum language to support program specification and program development. ACM SIGPLAN Notices 13(12), 15–24 (1978)

    Article  MATH  Google Scholar 

  6. Braßel, B., Hanus, M., Huch, F.: Encapsulating non-determinism in functional logic computations. Journal of Functional and Logic Programming (July 2004)

    Google Scholar 

  7. Chitil, O., McNeill, D., Runciman, C.: Lazy Assertions. In: Trinder, P., Michaelson, G.J., Peña, R. (eds.) IFL 2003. LNCS, vol. 3145, pp. 1–19. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  8. Christiansen, J., Fischer, S.: EasyCheck — Test Data for Free. In: Garrigue, J., Hermenegildo, M.V. (eds.) FLOPS 2008. LNCS, vol. 4989, pp. 322–336. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  9. Degen, M., Thiemann, P., Wehr, S.: True lies: Lazy contracts for lazy languages (faithfulness is better than laziness). In: 4. Arbeitstagung Programmiersprachen (ATPS 2009), LNI. vol. 154, pages 370, 2946–2259. Springer (2009)

    Google Scholar 

  10. Dimoulas, C., Pucella, R., Felleisen, M.: Future contracts. In: Proceedings of the 11th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming (PPDP 2009), pp. 195–206. ACM Press (2009)

    Google Scholar 

  11. Echahed, R., Janodet, J.-C.: On constructor-based graph rewriting systems. Research report imag 985-i, IMAG-LSR, CNRS, Grenoble (1997)

    Google Scholar 

  12. Echahed, R., Janodet, J.-C.: Admissible graph rewriting and narrowing. In: Proc. Joint International Conference and Symposium on Logic Programming (JICSLP 1998), pp. 325–340 (1998)

    Google Scholar 

  13. Fischer, S., Kuchen, H.: Systematic generation of glass-box test cases for functional logic programs. In: Proceedings of the 9th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming (PPDP 2007), pp. 75–89. ACM Press (2007)

    Google Scholar 

  14. González-Moreno, J.C., Hortalá-González, M.T., López-Fraguas, F.J., Rodríguez-Artalejo, M.: An approach to declarative programming based on a rewriting logic. Journal of Logic Programming 40, 47–87 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  15. Hanus, M.: Multi-paradigm Declarative Languages. In: Dahl, V., Niemelä, I. (eds.) ICLP 2007. LNCS, vol. 4670, pp. 45–75. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  16. Hanus, M.: Lazy and Enforceable Assertions for Functional Logic Programs. In: Mariño, J. (ed.) WFLP 2010. LNCS, vol. 6559, pp. 84–100. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  17. Hanus, M. (ed.): Curry: An integrated functional logic language, vers. 0.8.2 (2006), http://www.curry-language.org

  18. Hussmann, H.: Nondeterministic algebraic specifications and nonconfluent term rewriting. Journal of Logic Programming 12, 237–255 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  19. López-Fraguas, F.J., Rodríguez-Hortalá, J., Sánchez-Hernández, J.: A simple rewrite notion for call-time choice semantics. In: Proceedings of the 9th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming (PPDP 2007), pp. 197–208. ACM Press (2007)

    Google Scholar 

  20. Mera, E., Lopez-García, P., Hermenegildo, M.: Integrating Software Testing and Run-Time Checking in an Assertion Verification Framework. In: Hill, P.M., Warren, D.S. (eds.) ICLP 2009. LNCS, vol. 5649, pp. 281–295. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  21. Meyer, B.: Object-oriented Software Construction, 2nd edn. Prentice Hall (1997)

    Google Scholar 

  22. Okasaki, C.: Purely Functional Data Structures. Cambridge University Press (1998)

    Google Scholar 

  23. Peyton Jones, S. (ed.): Haskell 98 Language and Libraries—The Revised Report. Cambridge University Press (2003)

    Google Scholar 

  24. Puebla, G., Bueno, F., Hermenegildo, M.: An Assertion Language for Constraint Logic Programs. In: Deransart, P., Małuszyński, J. (eds.) DiSCiPl 1999. LNCS, vol. 1870, pp. 23–62. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  25. Xu, D.N.: Extended static checking for Haskell. In: Proc. of the 36th ACM SIGPLAN Workshop on Haskell (Haskell 2006), pp. 48–59 (2006)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Antoy, S., Hanus, M. (2012). Contracts and Specifications for Functional Logic Programming. In: Russo, C., Zhou, NF. (eds) Practical Aspects of Declarative Languages. PADL 2012. Lecture Notes in Computer Science, vol 7149. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-27694-1_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-27694-1_4

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-27693-4

  • Online ISBN: 978-3-642-27694-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics