Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Enhancing Expressivity of Checked Corecursive Streams

  • Conference paper
  • First Online:
Functional and Logic Programming (FLOPS 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13215))

Included in the following conference series:

  • 448 Accesses

Abstract

We propose a novel approach to stream definition and manipulation. Our solution is based on two key ideas. Regular corecursion, which avoids non termination by detecting cyclic calls, is enhanced, by allowing in equations defining streams other operators besides the stream constructor. In this way, some non-regular streams are definable. Furthermore, execution includes a runtime check to ensure that the stream generated by a function call is well-defined, in the sense that access to an arbitrary index always succeeds. We extend the technique beyond the simple stream operators considered in previous work, notably by adding an interleaving combinator which has a non-trivial recursion scheme.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.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

Similar content being viewed by others

Notes

  1. 1.

    Here we use the syntax of our calculus, where, differently from Haskell, functions are uncurried, that is, take as arguments possibly empty tuples delimited by parentheses.

  2. 2.

    For simplicity, here indexing and numeric expressions coincide.

  3. 3.

    Indeed, it does not affect derivability, see Lemma 4 in the following.

  4. 4.

    Non-well-definedness can only be detected on closed results.

  5. 5.

    This holds for any valid derivation tree and not for this specific case.

References

  1. Ancona, D.: Regular corecursion in Prolog. Comput. Lang. Syst. Struct. 39(4), 142–162 (2013)

    Google Scholar 

  2. Ancona, D., Barbieri, P., Dagnino, F., Zucca, E.: Sound regular corecursion in coFJ. In: Hirschfeld, R., Pape, T. (eds.) ECOOP’20 - Object-Oriented Programming. LIPIcs, vol. 166, pp. 1:1–1:28. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2020)

    Google Scholar 

  3. Ancona, D., Barbieri, P., Zucca, E.: Enhanced regular corecursion for data streams. In: ICTCS’21 - Italian Conference on Theoretical Computer Science (2021)

    Google Scholar 

  4. Ancona, D., Barbieri, P., Zucca, E.: Enhancing expressivity of checked corecursive streams (extended version) (2022). https://arxiv.org/abs/2202.06868

  5. Ancona, D., Dagnino, F., Zucca, E.: Generalizing inference systems by coaxioms. In: Yang, H. (ed.) ESOP 2017. LNCS, vol. 10201, pp. 29–55. Springer, Heidelberg (2017). https://doi.org/10.1007/978-3-662-54434-1_2

    Chapter  MATH  Google Scholar 

  6. Ancona, D., Dovier, A.: A theoretical perspective of coinductive logic programming. Fund. Inform. 140(3–4), 221–246 (2015)

    MathSciNet  MATH  Google Scholar 

  7. Ancona, D., Zucca, E.: Corecursive featherweight Java. In: FTfJP’12 - Formal Techniques for Java-like Programs, pp. 3–10. ACM Press (2012)

    Google Scholar 

  8. Courcelle, B.: Fundamental properties of infinite trees. Theoret. Comput. Sci. 25, 95–169 (1983)

    Article  MathSciNet  Google Scholar 

  9. Czajka, L.: A new coinductive confluence proof for infinitary lambda calculus. Log. Methods Comput. Sci. 16(1) (2020)

    Google Scholar 

  10. Dagnino, F.: Flexible coinduction. Ph.D. thesis, DIBRIS, University of Genova (2021)

    Google Scholar 

  11. Dagnino, F., Ancona, D., Zucca, E.: Flexible coinductive logic programming. Theory Pract. Logic Program. 20(6), 818–833 (2020). Issue for ICLP 2020

    Article  MathSciNet  Google Scholar 

  12. Hinze, R.: Concrete stream calculus: an extended study. J. Funct. Program. 20(5–6), 463–535 (2010)

    Article  MathSciNet  Google Scholar 

  13. Jeannin, J.-B., Kozen, D.: Computing with capsules. J. Autom. Lang. Comb. 17(2–4), 185–204 (2012)

    MathSciNet  MATH  Google Scholar 

  14. Jeannin, J.-B., Kozen, D., Silva, A.: CoCaml: functional programming with regular coinductive types. Fund. Inform. 150, 347–377 (2017)

    MathSciNet  MATH  Google Scholar 

  15. Komendantskaya, E., Johann, P., Schmidt, M.: A productivity checker for logic programming. In: Hermenegildo, M.V., Lopez-Garcia, P. (eds.) LOPSTR 2016. LNCS, vol. 10184, pp. 168–186. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-63139-4_10

    Chapter  MATH  Google Scholar 

  16. Komendantskaya, E., Power, J., Schmidt, M.: Coalgebraic logic programming: from semantics to implementation. J. Log. Comput. 26(2), 745–783 (2016)

    Article  MathSciNet  Google Scholar 

  17. Rutten, J.J.M.M.: A coinductive calculus of streams. Math. Struct. Comput. Sci. 15(1), 93–147 (2005)

    Article  MathSciNet  Google Scholar 

  18. Simon, L.: Extending logic programming with coinduction. Ph.D. thesis, University of Texas at Dallas (2006)

    Google Scholar 

  19. Simon, L., Bansal, A., Mallya, A., Gupta, G.: Co-logic programming: extending logic programming with coinduction. In: Arge, L., Cachin, C., Jurdziński, T., Tarlecki, A. (eds.) ICALP 2007. LNCS, vol. 4596, pp. 472–483. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-73420-8_42

    Chapter  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Davide Ancona .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Ancona, D., Barbieri, P., Zucca, E. (2022). Enhancing Expressivity of Checked Corecursive Streams. In: Hanus, M., Igarashi, A. (eds) Functional and Logic Programming. FLOPS 2022. Lecture Notes in Computer Science, vol 13215. Springer, Cham. https://doi.org/10.1007/978-3-030-99461-7_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-99461-7_1

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-99460-0

  • Online ISBN: 978-3-030-99461-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics