Abstract
The monadic shallow linear (MSL) class is a decidable fragment of first-order Horn clauses that was discovered and rediscovered around the turn of the century, with applications in static analysis and verification. We propose a new class of higher-order Horn constraints which extend MSL to higher-order logic and develop a resolution-based decision procedure. Higher-order MSL Horn constraints can quite naturally capture the complex patterns of call and return that are possible in higher-order programs, which make them well suited to higher-order program verification. In fact, we show that the higher-order MSL satisfiability problem and the HORS model checking problem are interreducible, so that higher-order MSL can be seen as a constraint-based approach to higher-order model checking. Finally, we describe an implementation of our decision procedure and its application to verified socket programming.
- Alexander Aiken. 1999. Introduction to set constraint-based program analysis. Science of Computer Programming, 35, 2 (1999), 79–111. issn:0167-6423 https://doi.org/10.1016/S0167-6423(99)00007-6
Google Scholar
Digital Library
- Leo Bachmair, Harald Ganzinger, and Uwe Waldmann. 1993. Set Constraints are the Monadic Class. In Eighth Annual IEEE Symposium on Logic in Computer Science. IEEE, Montreal, Canada. 75–83. https://doi.org/10.1109/LICS.1993.287598
Google Scholar
Cross Ref
- Christopher Broadbent and Naoki Kobayashi. 2013. Saturation-based model checking of higher-order recursion schemes. In Computer Science Logic 2013 (CSL 2013). https://doi.org/10.4230/LIPIcs.CSL.2013.129
Google Scholar
Cross Ref
- Florian Bruse, Martin Lange, and Étienne Lozes. 2021. The Complexity of Model-Checking Tail-Recursive Higher-Order Fixpoint Logic. Fundam. Informaticae, 178, 1-2 (2021), 1–30. https://doi.org/10.3233/FI-2021-1996
Google Scholar
Digital Library
- Toby Cathcart Burn, C.-H. Luke Ong, and Steven J. Ramsay. 2017. Higher-Order Constrained Horn Clauses for Verification. Proc. ACM Program. Lang., 2, POPL (2017), Article 11, Dec, 28 pages. https://doi.org/10.1145/3158099
Google Scholar
Digital Library
- Toby Cathcart Burn, C.-H. Luke Ong, Steven J. Ramsay, and Dominik Wagner. 2021. Initial Limit Datalog: a New Extensible Class of Decidable Constrained Horn Clauses. In 2021 36th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS). 1–13. https://doi.org/10.1109/LICS52264.2021.9470527
Google Scholar
Digital Library
- Angelos Charalambidis, Christos Nomikos, and Panos Rondogiannis. 2019. The Expressive Power of Higher-Order Datalog. Theory and Practice of Logic Programming, 19, 5-6 (2019), 925–940. https://doi.org/10.1017/S1471068419000279
Google Scholar
Cross Ref
- Pierre Clairambault, Charles Grellois, and Andrzej S. Murawski. 2018. Linearity in Higher-Order Recursion Schemes. Proc. ACM Program. Lang., 2, POPL (2018), Article 39, Dec, 29 pages. https://doi.org/10.1145/3158127
Google Scholar
Digital Library
- Byron Cook, Alexey Gotsman, Andreas Podelski, Andrey Rybalchenko, and Moshe Y Vardi. 2007. Proving that programs eventually do something good. ACM SIGPLAN Notices, 42, 1 (2007), 265–276. https://doi.org/10.1145/1190216.1190257
Google Scholar
Digital Library
- František Farka. 2020. Proof-Relevant Resolution: the Foundations of Constructive Proof Automation. Ph. D. Dissertation. Heriot-Watt University, UK.
Google Scholar
- Thom Frühwirth, Moshe Vardi, and Eyal Yardeni. 1997. Logic Programs as Types for Logic Programs. Proceedings – Symposium on Logic in Computer Science, 12, https://doi.org/10.1109/LICS.1991.151654
Google Scholar
Cross Ref
- Peng Fu and Ekaterina Komendantskaya. 2015. A Type-Theoretic Approach to Resolution. In Logic-Based Program Synthesis and Transformation, Moreno Falaschi (Ed.). Springer International Publishing, Cham. 91–106. isbn:978-3-319-27436-2 https://doi.org/10.1007/978-3-319-27436-2_6
Google Scholar
Digital Library
- Peng Fu and Ekaterina Komendantskaya. 2017. Operational Semantics of Resolution and Productivity in Horn Clause Logic. Form. Asp. Comput., 29, 3 (2017), may, 453–474. issn:0934-5043 https://doi.org/10.1007/s00165-016-0403-1
Google Scholar
Digital Library
- Peng Fu, Ekaterina Komendantskaya, Tom Schrijvers, and Andrew Pond. 2016. Proof Relevant Corecursive Resolution. In Functional and Logic Programming, Oleg Kiselyov and Andy King (Eds.). Springer International Publishing, Cham. 126–143. isbn:978-3-319-29604-3 https://doi.org/10.1007/978-3-319-29604-3_9
Google Scholar
Cross Ref
- Jean Goubault-Larrecq. 2002. Higher-Order Positive Set Constraints. In Computer Science Logic, Julian Bradfield (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 473–489. isbn:978-3-540-45793-0 https://doi.org/10.1007/3-540-45793-3_32
Google Scholar
Cross Ref
- Jean Goubault-Larrecq. 2005. Deciding H1 by resolution. Inform. Process. Lett., 95, 3 (2005), 401–408. issn:0020-0190 https://doi.org/10.1016/j.ipl.2005.04.007
Google Scholar
Cross Ref
- Sergey Grebenshchikov, Nuno P. Lopes, Corneliu Popeea, and Andrey Rybalchenko. 2012. Synthesizing Software Verifiers from Proof Rules. In Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’12). Association for Computing Machinery, New York, NY, USA. 405–416. isbn:9781450312059 https://doi.org/10.1145/2254064.2254112
Google Scholar
Digital Library
- Matthew Hague, Andrzej S. Murawski, C.-H. Luke Ong, and Olivier Serre. 2008. Collapsible Pushdown Automata and Recursion Schemes. In Logic in Computer Science, LICS’08. IEEE Computer Society, 452–461.
Google Scholar
- Haskell.org. 2013. Iteratee I/O: The problem with lazy IO. https://wiki.haskell.org/Iteratee_I/O#The_problem_with_lazy_I.2FO
Google Scholar
- Youkichi Hosoi, Naoki Kobayashi, and Takeshi Tsukada. 2019. A type-based HFL model checking algorithm. In Asian Symposium on Programming Languages and Systems. 136–155. https://doi.org/10.1007/978-3-030-34175-6_8
Google Scholar
Cross Ref
- William Howard. 1980. The formulae-as-types notion of construction. In To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, J. Seldin and R. J. Hindley (Eds.). Academic Press.
Google Scholar
- Ranjit Jhala, Rupak Majumdar, and Andrey Rybalchenko. 2011. HMC: Verifying Functional Programs Using Abstract Interpreters. In Computer Aided Verification, Ganesh Gopalakrishnan and Shaz Qadeer (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 470–485. isbn:978-3-642-22110-1 https://doi.org/10.1007/978-3-642-22110-1_38
Google Scholar
Cross Ref
- Jerome. Jochems. 2020. Higher-order constrained Horn clauses for higher-order program verification. Ph. D. Dissertation. Oxford University, UK.
Google Scholar
- Jerome Jochems, Eddie Jones, and Steven Ramsay. 2022. Higher-Order MSL Horn Constraints. https://doi.org/10.48550/ARXIV.2210.14649
Google Scholar
- Naoki Kobayashi. 2009. Types and Higher-Order Recursion Schemes for Verification of Higher-Order Programs. SIGPLAN Not., 44, 1 (2009), Jan, 416–428. issn:0362-1340 https://doi.org/10.1145/1594834.1480933
Google Scholar
Digital Library
- Naoki Kobayashi. 2013. Model checking higher-order programs. Journal of the ACM (JACM), 60, 3 (2013), 1–62. https://doi.org/10.1145/2487241.2487246
Google Scholar
Digital Library
- Naoki Kobayashi. 2021. An Overview of the HFL Model Checking Project. arXiv preprint arXiv:2109.04629, https://doi.org/10.4204/EPTCS.344.1
Google Scholar
Cross Ref
- Naoki Kobayashi and C.-H. Luke Ong. 2009. A Type System Equivalent to the Modal Mu-Calculus Model Checking of Higher-Order Recursion Schemes. In Logic in Computer Science, LICS 2009. IEEE Computer Society, 179–188. https://doi.org/10.1109/LICS.2009.29
Google Scholar
Digital Library
- Dale Miller and Gopalan Nadathur. 2012. Programming with Higher-Order Logic. Cambridge University Press. https://doi.org/10.1017/CBO9781139021326
Google Scholar
Cross Ref
- Dale Miller, Gopalan Nadathur, Frank Pfenning, and Andre Scedrov. 1991. Uniform proofs as a foundation for logic programming. Annals of Pure and Applied Logic, 51, 1 (1991), 125–157. issn:0168-0072 https://doi.org/10.1016/0168-0072(91)90068-W
Google Scholar
Cross Ref
- Andrey Mokhov, Georgy Lukyanov, Simon Marlow, and Jeremie Dimino. 2019. Selective applicative functors. Proceedings of the ACM on Programming Languages, 3, ICFP (2019), 1–29. https://doi.org/10.1145/3341694
Google Scholar
Digital Library
- David E. Muller and Paul E. Schupp. 1987. Alternating automata on infinite trees. Theoretical Computer Science, 54, 2 (1987), 267–276. issn:0304-3975 https://doi.org/10.1016/0304-3975(87)90133-2
Google Scholar
Digital Library
- Takashi Nagaya and Yoshihito Toyama. 2002. Decidability for Left-Linear Growing Term Rewriting Systems. Information and Computation, 178, 2 (2002), 499–514. issn:0890-5401 https://doi.org/10.1006/inco.2002.3157
Google Scholar
Cross Ref
- Robin P. Neatherway, Steven J. Ramsay, and C.-H. Luke Ong. 2012. A Traversal-Based Algorithm for Higher-Order Model Checking. SIGPLAN Not., 47, 9 (2012), Sep, 353–364. issn:0362-1340 https://doi.org/10.1145/2398856.2364578
Google Scholar
Digital Library
- Flemming Nielson, Hanne Riis Nielson, and Helmut Seidl. 2002. Normalizable Horn clauses, strongly recognizable relations, and Spi. In International Static Analysis Symposium. 20–35. https://doi.org/10.1007/3-540-45789-5_5
Google Scholar
Cross Ref
- C.-H. Luke Ong. 2006. On Model-Checking Trees Generated by Higher-Order Recursion Schemes. In 21th IEEE Symposium on Logic in Computer Science (LICS 2006), 12-15 August 2006, Seattle, WA, USA, Proceedings. 81–90. https://doi.org/10.1109/LICS.2006.38
Google Scholar
Digital Library
- C.-H. Luke Ong and Dominik Wagner. 2019. HoCHC: A Refutationally Complete and Semantically Invariant System of Higher-order Logic Modulo Theories. In 2019 34th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS). 1–14. https://doi.org/10.1109/LICS.2019.8785784
Google Scholar
Cross Ref
- Steven J. Ramsay, Robin P. Neatherway, and C.-H. Luke Ong. 2014. A Type-Directed Abstraction Refinement Approach to Higher-Order Model Checking. In Principles of Programming Languages, POPL’14. ACM, 61–72. https://doi.org/10.1145/2535838.2535873
Google Scholar
Digital Library
- Jakob Rehof and Paweł Urzyczyn. 2011. Finite Combinatory Logic with Intersection Types. In Typed Lambda Calculi and Applications, C.-H. Luke Ong (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 169–183. isbn:978-3-642-21691-6 https://doi.org/10.1007/978-3-642-21691-6_15
Google Scholar
Cross Ref
- Patrick Maxim Rondon, Ming Kawaguchi, and Ranjit Jhala. 2008. Liquid types. In Proceedings of the ACM SIGPLAN 2008 Conference on Programming Language Design and Implementation, Tucson, AZ, USA, June 7-13, 2008. 159–169. https://doi.org/10.1145/1375581.1375602
Google Scholar
Digital Library
- Sylvain Salvati and Igor Walukiewicz. 2016. Simply typed fixpoint calculus and collapsible pushdown automata. Math. Struct. Comput. Sci., 26, 7 (2016), 1304–1350. https://doi.org/10.1017/S0960129514000590
Google Scholar
Cross Ref
- Taku Terao and Naoki Kobayashi. 2014. A ZDD-based efficient higher-order model checking algorithm. In Asian Symposium on Programming Languages and Systems. 354–371. https://doi.org/10.1007/978-3-319-12736-1_19
Google Scholar
Cross Ref
- Tachio Terauchi. 2010. Dependent types from counterexamples. In Proceedings of the 37th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2010, Madrid, Spain, January 17-23, 2010. 119–130. https://doi.org/10.1145/1706299.1706315
Google Scholar
Digital Library
- Andreas Teucke and Christoph Weidenbach. 2017. Decidability of the Monadic Shallow Linear First-Order Fragment with Straight Dismatching Constraints. In Automated Deduction – CADE 26, Leonardo de Moura (Ed.). Springer International Publishing, Cham. 202–219. isbn:978-3-319-63046-5 https://doi.org/10.1007/978-3-319-63046-5_13
Google Scholar
Cross Ref
- Hiroshi Unno and Naoki Kobayashi. 2009. Dependent type inference with interpolants. In Proceedings of the 11th International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming, September 7-9, 2009, Coimbra, Portugal. 277–288. https://doi.org/10.1145/1599410.1599445
Google Scholar
Digital Library
- Niki Vazou, Alexander Bakst, and Ranjit Jhala. 2015. Bounded refinement types. In Proceedings of the 20th ACM SIGPLAN International Conference on Functional Programming, ICFP 2015, Vancouver, BC, Canada, September 1-3, 2015. 48–61. https://doi.org/10.1145/2784731.2784745
Google Scholar
Digital Library
- Niki Vazou, Patrick Maxim Rondon, and Ranjit Jhala. 2013. Abstract Refinement Types. In Programming Languages and Systems - 22nd European Symposium on Programming, ESOP 2013, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2013, Rome, Italy, March 16-24, 2013. Proceedings. 209–228. https://doi.org/10.1007/978-3-642-37036-6_13
Google Scholar
Digital Library
- Mahesh Viswanathan and Ramesh Viswanathan. 2004. A Higher Order Modal Fixed Point Logic. In CONCUR 2004 - Concurrency Theory, Philippa Gardner and Nobuko Yoshida (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 512–528. isbn:978-3-540-28644-8 https://doi.org/10.1007/978-3-540-28644-8_33
Google Scholar
Cross Ref
- Christoph Weidenbach. 1999. Towards an Automatic Analysis of Security Protocols in First-Order Logic. In Automated Deduction — CADE-16. Springer Berlin Heidelberg, Berlin, Heidelberg. 314–328. isbn:978-3-540-48660-2 https://doi.org/10.1007/3-540-48660-7_29
Google Scholar
Cross Ref
- He Zhu and Suresh Jagannathan. 2013. Compositional and Lightweight Dependent Type Inference for ML. In Verification, Model Checking, and Abstract Interpretation, 14th International Conference, VMCAI 2013, Rome, Italy, January 20-22, 2013. Proceedings. 295–314. https://doi.org/10.1007/978-3-642-35873-9_19
Google Scholar
Digital Library
Index Terms
Higher-Order MSL Horn Constraints
Recommendations
Higher-order constrained horn clauses for verification
Motivated by applications in automated verification of higher-order functional programs, we develop a notion of constrained Horn clauses in higher-order logic and a decision problem concerning their satisfiability. We show that, although satisfiable ...






Comments