Skip to main content

Towards a Constraint Solver for Proving Confluence with Invariant and Equivalence of Realistic CHR Programs

  • Conference paper
  • First Online:

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

Abstract

Confluence of a nondeterministic program ensures a functional input-output relation, freeing the programmer from considering the actual scheduling strategy, and allowing optimized and perhaps parallel implementations. The more general property of confluence modulo equivalence ensures that equivalent inputs are related to equivalent outputs, that need not be identical. Confluence under invariants is also considered. Constraint Handling Rules (CHR) is an important example of a rewrite based logic programming language, and we aim at a mechanizable method for proving confluence modulo equivalence of terminating CHR programs. While earlier approaches to confluence for CHR programs concern an idealized logic subset, we refer to a semantics compatible with standard Prolog-based implementations. We specify a meta-level constraint language in which invariants and equivalences can be expressed and manipulated as is needed for confluence proofs, thus extending our previous theoretical results towards a practical implementation.

This work is supported by The Danish Council for Independent Research, Natural Sciences, grant no. DFF 4181-00442.

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

Buying options

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 EPUB and 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

Learn about institutional subscriptions

Notes

  1. 1.

    A similar property has been studied by [8] in term rewriting under the name of “local termination”.

  2. 2.

    We may introduce more types in the following whenever we need them.

References

  1. Abdennadher, S.: Operational semantics and confluence of constraint propagation rules. In: Smolka, G. (ed.) CP 1997. LNCS, vol. 1330, pp. 252–266. Springer, Heidelberg (1997). https://doi.org/10.1007/BFb0017444

    Chapter  Google Scholar 

  2. Abdennadher, S., Frühwirth, T., Meuss, H.: On confluence of Constraint Handling Rules. In: Freuder, E.C. (ed.) CP 1996. LNCS, vol. 1118, pp. 1–15. Springer, Heidelberg (1996). https://doi.org/10.1007/3-540-61551-2_62

    Chapter  Google Scholar 

  3. Abdennadher, S., Frühwirth, T.W., Meuss, H.: Confluence and semantics of constraint simplification rules. Constraints 4(2), 133–165 (1999)

    Article  MathSciNet  Google Scholar 

  4. Christiansen, H., Kirkeby, M.H.: Confluence modulo equivalence in constraint handling rules. In: Proietti, M., Seki, H. (eds.) LOPSTR 2014. LNCS, vol. 8981, pp. 41–58. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-17822-6_3

    Chapter  Google Scholar 

  5. Christiansen, H., Kirkeby, M.H.: On proving confluence modulo equivalence for constraint handling rules. Formal Aspects Comput. 29(1), 57–95 (2017)

    Article  MathSciNet  Google Scholar 

  6. Christiansen, H., Kirkeby, M.H.: Confluence of CHR revisited: invariants and modulo equivalence. In: LOPSTR 2018, vol. 11408. LNCS, pp. 83–99. Springer, Heidelberg (2019)

    Google Scholar 

  7. Duck, G.J., Stuckey, P.J., Sulzmann, M.: Observable confluence for constraint handling rules. In: Dahl, V., Niemelä, I. (eds.) ICLP 2007. LNCS, vol. 4670, pp. 224–239. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-74610-2_16

    Chapter  Google Scholar 

  8. Endrullis, J., de Vrijer, R.C., Waldmann, J.: Local termination: theory and practice. Logical Methods Comput. Sci. 6(3), 1–37 (2010)

    Article  MathSciNet  Google Scholar 

  9. Frühwirth, T.W.: User-defined constraint handling. In: ICLP, pp. 837–838. MIT Press (1993)

    Google Scholar 

  10. Frühwirth, T.W.: Theory and practice of constraint handling rules. J. Logic Program. 37(1–3), 95–138 (1998)

    Article  MathSciNet  Google Scholar 

  11. Frühwirth, T.: Proving termination of constraint solver programs. In: Apt, K.R., Monfroy, E., Kakas, A.C., Rossi, F. (eds.) WC 1999. LNCS (LNAI), vol. 1865, pp. 298–317. Springer, Heidelberg (2000). https://doi.org/10.1007/3-540-44654-0_15

    Chapter  Google Scholar 

  12. Frühwirth, T.W.: Constraint Handling Rules. Cambridge University Press, Cambridge (2009)

    Book  Google Scholar 

  13. Gall, D., Frühwirth, T.: Confluence modulo equivalence with invariants in constraint handling rules. In: Gallagher, J.P., Sulzmann, M. (eds.) FLOPS 2018. LNCS, vol. 10818, pp. 116–131. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-90686-7_8

    Chapter  Google Scholar 

  14. Holzbaur, C., Frühwirth, T.W.: A PROLOG constraint handling rules compiler and runtime system. Appl. Artif. Intell. 14(4), 369–388 (2000)

    Article  Google Scholar 

  15. Huet, G.P.: Confluent reductions: abstract properties and applications to term rewriting systems. J. ACM 27(4), 797–821 (1980)

    Article  MathSciNet  Google Scholar 

  16. Langbein, J., Raiser, F., Frühwirth, T.W.: A state equivalence and confluence checker for CHRs. In: Proceedings International Workshop on Constraint Handling Rules, Report CW 588, pp. 1–8. Katholieke Universiteit Leuven, Belgium (2010)

    Google Scholar 

  17. Newman, M.: On theories with a combinatorial definition of “equivalence”. Ann. Math. 43(2), 223–243 (1942)

    Article  MathSciNet  Google Scholar 

  18. Pilozzi, P., De Schreye, D.: Automating termination proofs for CHR. In: Hill, P.M., Warren, D.S. (eds.) ICLP 2009. LNCS, vol. 5649, pp. 504–508. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-02846-5_43

    Chapter  Google Scholar 

  19. Pilozzi, P., De Schreye, D.: Improved termination analysis of CHR using self-sustainability analysis. In: Vidal, G. (ed.) LOPSTR 2011. LNCS, vol. 7225, pp. 189–204. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-32211-2_13

    Chapter  Google Scholar 

  20. Schrijvers, T., Demoen, B.: The K.U. Leuven CHR system: implementation and application. In: Workshop on Constraint Handling Rules: Selected Contributions, pp. 1–5. Ulmer Informatik-Berichte, Nr. 2004–01 (2004)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Henning Christiansen or Maja H. Kirkeby .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Christiansen, H., Kirkeby, M.H. (2019). Towards a Constraint Solver for Proving Confluence with Invariant and Equivalence of Realistic CHR Programs. In: Silva, J. (eds) Functional and Constraint Logic Programming. WFLP 2018. Lecture Notes in Computer Science(), vol 11285. Springer, Cham. https://doi.org/10.1007/978-3-030-16202-3_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-16202-3_7

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-16201-6

  • Online ISBN: 978-3-030-16202-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics