Skip to main content

A New Refinement Type System for Automated \(\nu \text {HFL}_\mathbb {Z}\) Validity Checking

  • Conference paper
  • First Online:

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

Abstract

Kobayashi et al. have recently shown that various verification problems for higher-order functional programs can naturally be reduced to the validity checking problem for \(\text {HFL}_\mathbb {Z}\), a higher-order fixpoint logic extended with integers. We propose a refinement type system for checking the validity of \(\nu \text {HFL}_\mathbb {Z}\) formulas, where \(\nu \text {HFL}_\mathbb {Z}\) is a fragment of \(\text {HFL}_\mathbb {Z}\) without least fixpoint operators, but sufficiently expressive for encoding safety property verification problems. Our type system has been inspired by the type system of Burn et al. for solving the satisfiability problem for HoCHC, which is essentially equivalent to the \(\nu \text {HFL}_\mathbb {Z}\) validity checking problem. Our type system is more expressive, however, due to a more sophisticated subtyping relation. We have implemented a type-based \(\nu \text {HFL}_\mathbb {Z}\) validity checker ReTHFL based on the proposed type system, and confirmed through experiments that ReTHFL can solve more instances than Horus, the tool based on Burn et al.’s type system.

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.

    Throughout the paper, we assume integer arithmetic as the underlying constraint language of HoCHC.

  2. 2.

    Equivalently, \( \psi \,x : \bullet \langle x > 0 \rangle \), provided that \( \psi \) has no free occurrence of \( x \).

  3. 3.

    A reader may wonder why we do not assume \( \mathbf{rty} (\tau _2') \) in the other premise. This is because the subtyping judgements \( \varDelta ; \varTheta \vdash \tau _2 \prec \tau _2' \) and \( \varDelta ; \varTheta \wedge \mathbf{rty} (\tau _2') \vdash \tau _2 \prec \tau _2' \) are equivalent in the sense that the derivability of one of them implies the other’s. We chose the simpler judgement.

  4. 4.

    The formal definition of the validity of a refinement type judgement will be defined in the next subsection.

  5. 5.

    The syntax of HoCHC is modified in a way that emphasises the relationship to \(\nu \text {HFL}_\mathbb {Z}\).

References

  1. Bjørner, N., Gurfinkel, A., McMillan, K., Rybalchenko, A.: Horn clause solvers for program verification. In: Beklemishev, L.D., Blass, A., Dershowitz, N., Finkbeiner, B., Schulte, W. (eds.) Fields of Logic and Computation II. LNCS, vol. 9300, pp. 24–51. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-23534-9_2

    Chapter  Google Scholar 

  2. Burn, T.C., Ong, C.L., Ramsay, S.J.: Higher-order constrained horn clauses for verification. Proc. ACM Program. Lang. 2(POPL), 11:1–11:28 (2018). https://doi.org/10.1145/3158099

    Article  Google Scholar 

  3. Champion, A., Chiba, T., Kobayashi, N., Sato, R.: ICE-based refinement type discovery for higher-order functional programs. In: Beyer, D., Huisman, M. (eds.) TACAS 2018. LNCS, vol. 10805, pp. 365–384. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-89960-2_20

    Chapter  Google Scholar 

  4. Hojjat, H., Rümmer, P.: The ELDARICA horn solver. In: Proceedings of FMCAD 2018, pp. 1–7. IEEE (2018). https://doi.org/10.23919/FMCAD.2018.8603013

  5. Iwayama, N., Kobayashi, N., Tsukada, T.: Predicate abstraction and CEGAR for \({\nu }\text{HFL}_\mathbb{Z}\) validity checking (2020). Draft

    Google Scholar 

  6. Katsura, H., Iwayama, N., Kobayashi, N., Tsukada, T.: A new refinement type system for automated \({\nu }\text{ HFL}_\mathbb{Z}\) validity checking (2020). A longer version of this paper, http://www.kb.is.s.u-tokyo.ac.jp/~katsura/papers/aplas20.pdf

  7. Kobayashi, N., Nishikawa, T., Igarashi, A., Unno, H.: Temporal verification of programs via first-order fixpoint logic. In: Chang, B.-Y.E. (ed.) SAS 2019. LNCS, vol. 11822, pp. 413–436. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-32304-2_20

    Chapter  Google Scholar 

  8. Kobayashi, N., Tsukada, T., Watanabe, K.: Higher-order program verification via HFL model checking. In: Ahmed, A. (ed.) ESOP 2018. LNCS, vol. 10801, pp. 711–738. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-89884-1_25

    Chapter  Google Scholar 

  9. Komuravelli, A., Gurfinkel, A., Chaki, S.: SMT-based model checking for recursive programs. Formal Methods Syst. Des. 48(3), 175–205 (2016). https://doi.org/10.1007/s10703-016-0249-4

    Article  MATH  Google Scholar 

  10. Kuwahara, T., Sato, R., Unno, H., Kobayashi, N.: Predicate abstraction and CEGAR for disproving termination of higher-order functional programs. In: Kroening, D., Păsăreanu, C.S. (eds.) CAV 2015. LNCS, vol. 9207, pp. 287–303. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-21668-3_17

    Chapter  Google Scholar 

  11. Rondon, P.M., Kawaguchi, M., Jhala, R.: Liquid types. In: Gupta, R., Amarasinghe, S.P. (eds.) Proceedings of the PLDI 2008, pp. 159–169. ACM (2008). https://doi.org/10.1145/1375581.1375602

  12. Satake, Y., Unno, H., Yanagi, H.: Probabilistic inference for predicate constraint satisfaction. In: Proceedings of the AAAI, vol. 34, pp. 1644–1651 (2020). https://doi.org/10.1609/aaai.v34i02.5526

  13. Sato, R., Iwayama, N., Kobayashi, N.: Combining higher-order model checking with refinement type inference. In: Proceedings of PEPM 2019, pp. 47–53 (2019). https://doi.org/10.1145/3294032.3294081

  14. Swamy, N., et al.: Dependent types and multi-monadic effects in F*. In: 43rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pp. 256–270. ACM (2016). https://www.fstar-lang.org/papers/mumon/

  15. Vazou, N., Seidel, E.L., Jhala, R., Vytiniotis, D., Jones, S.L.P.: Refinement types for Haskell. In: Jeuring, J., Chakravarty, M.M.T. (eds.) Proceedings of the 19th ACM SIGPLAN International Conference on Functional Programming, Gothenburg, Sweden, 1–3 September 2014, pp. 269–282. ACM (2014). https://doi.org/10.1145/2628136.2628161

  16. Viswanathan, M., Viswanathan, R.: A higher order modal fixed point logic. In: Gardner, P., Yoshida, N. (eds.) CONCUR 2004. LNCS, vol. 3170, pp. 512–528. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-28644-8_33

    Chapter  Google Scholar 

  17. Watanabe, K., Tsukada, T., Oshikawa, H., Kobayashi, N.: Reduction from branching-time property verification of higher-order programs to HFL validity checking. In: Proceedings of PEPM 2019, pp. 22–34 (2019). https://doi.org/10.1145/3294032.3294077

Download references

Acknowledgments

We would like to thank anonymous referees for useful comments. This work was supported by JSPS Kakenhi JP15H05706, JP20H00577, and JP20H05703.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hiroyuki Katsura .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Katsura, H., Iwayama, N., Kobayashi, N., Tsukada, T. (2020). A New Refinement Type System for Automated \(\nu \text {HFL}_\mathbb {Z}\) Validity Checking. In: Oliveira, B.C.d.S. (eds) Programming Languages and Systems. APLAS 2020. Lecture Notes in Computer Science(), vol 12470. Springer, Cham. https://doi.org/10.1007/978-3-030-64437-6_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-64437-6_5

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-64436-9

  • Online ISBN: 978-3-030-64437-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics