Nothing Special   »   [go: up one dir, main page]

Skip to main content

Unification Modulo Builtins

  • Conference paper
  • First Online:
Logic, Language, Information, and Computation (WoLLIC 2018)

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

Abstract

Combining rewriting modulo an equational theory and SMT solving introduces new challenges in the area of term rewriting. One such challenge is unification of terms in the presence of equations and of uninterpreted and interpreted function symbols. The interpreted function symbols are part of a builtin model which can be reasoned about using an SMT solver. In this article, we formalize this problem, that we call unification modulo builtins. We show that under reasonable assumptions, complete sets of unifiers for unification modulo builtins problems can be effectively computed by reduction to usual E-unification problems and by relying on an oracle for SMT solving.

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

    The prototype is available at: https://github.com/andreiarusoaie/unification-modulo-builtins.

References

  1. Aguirre, L., Martí-Oliet, N., Palomino, M., Pita, I.: Conditional narrowing modulo SMT and axioms. In: PPDP, pp. 17–28 (2017)

    Google Scholar 

  2. Arusoaie, A., Lucanu, D., Rusu, V.: A generic framework for symbolic execution. In: Erwig, M., Paige, R.F., Van Wyk, E. (eds.) SLE 2013. LNCS, vol. 8225, pp. 281–301. Springer, Cham (2013). https://doi.org/10.1007/978-3-319-02654-1_16

    Chapter  Google Scholar 

  3. Arusoaie, A., Lucanu, D., Rusu, V.: Symbolic execution based on language transformation. Comput. Lang. Syst. Struct. 44, 48–71 (2015)

    MATH  Google Scholar 

  4. Baader, F., Schulz, K.U.: Unification in the union of disjoint equational theories: combining decision procedures. JSC 21(2), 211–243 (1996)

    MathSciNet  MATH  Google Scholar 

  5. Bae, K., Rocha, C.: Guarded terms for rewriting modulo SMT. In: Proença, J., Lumpe, M. (eds.) FACS 2017. LNCS, vol. 10487, pp. 78–97. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-68034-7_5

    Chapter  Google Scholar 

  6. Ciobâcă, Ş., Lucanu, D.: A coinductive approach to proving reachability properties in logically constrained term rewriting systems. IJCAR (2018, to appear)

    Google Scholar 

  7. Ciobâcă, Ş., Lucanu, D.: RMT: proving reachability properties in constrained term rewriting systems modulo theories. Technical report TR 16–01, Alexandru Ioan Cuza University, Faculty of Computer Science (2016)

    Google Scholar 

  8. Ştefănescu, A., Ciobâcă, Ş., Mereuta, R., Moore, B.M., Şerbănută, T.F., Roşu, G.: All-path reachability logic. In: Dowek, G. (ed.) RTA 2014. LNCS, vol. 8560, pp. 425–440. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-08918-8_29

    Chapter  Google Scholar 

  9. Darlington, J., Guo, Y.: Constrained equational deduction. In: Kaplan, S., Okada, M. (eds.) CTRS 1990. LNCS, vol. 516, pp. 424–435. Springer, Heidelberg (1991). https://doi.org/10.1007/3-540-54317-1_111

    Chapter  Google Scholar 

  10. Falke, S., Kapur, D.: Dependency pairs for rewriting with built-in numbers and semantic data structures. In: Voronkov, A. (ed.) RTA 2008. LNCS, vol. 5117, pp. 94–109. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-70590-1_7

    Chapter  MATH  Google Scholar 

  11. Fuhs, C., Kop, C., Nishida, N.: Verifying procedural programs via constrained rewriting induction. ACM TOCL 18(2), 14:1–14:50 (2017)

    Article  MathSciNet  Google Scholar 

  12. Kirchner, C., Kirchner, H., Rusinowitch, M.: Deduction with symbolic constraints. Research report RR-1358, INRIA (1990). Projet EURECA

    Google Scholar 

  13. Kop, C., Nishida, N.: Term rewriting with logical constraints. In: Fontaine, P., Ringeissen, C., Schmidt, R.A. (eds.) FroCoS 2013. LNCS (LNAI), vol. 8152, pp. 343–358. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-40885-4_24

    Chapter  Google Scholar 

  14. Lucanu, D., Rusu, V., Arusoaie, A., Nowak, D.: Verifying reachability-logic properties on rewriting-logic specifications. In: Martí-Oliet, N., Ölveczky, P.C., Talcott, C. (eds.) Logic, Rewriting, and Concurrency. LNCS, vol. 9200, pp. 451–474. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-23165-5_21

    Chapter  MATH  Google Scholar 

  15. Nelson, G., Oppen, D.C.: Simplification by cooperating decision procedures. ACM TOPLAS 1(2), 245–257 (1979)

    Article  Google Scholar 

  16. Nigam, V., Talcott, C., Aires Urquiza, A.: Towards the automated verification of cyber-physical security protocols: bounding the number of timed intruders. In: Askoxylakis, I., Ioannidis, S., Katsikas, S., Meadows, C. (eds.) ESORICS 2016. LNCS, vol. 9879, pp. 450–470. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-45741-3_23

    Chapter  Google Scholar 

  17. Rocha, C., Meseguer, J., Muñoz, C.: Rewriting modulo SMT and open system analysis. JLAMP 86(1), 269–297 (2017)

    MathSciNet  MATH  Google Scholar 

  18. Roşu, G.: Matching logic. LMCS 13(4), 1–61 (2017)

    MathSciNet  MATH  Google Scholar 

  19. Schmidt-Schauss, M.: Unification in a combination of arbitrary disjoint equational theories. JSC 8(1), 51–99 (1989)

    MathSciNet  MATH  Google Scholar 

  20. Skeirik, S., Ştefănescu, A., Meseguer, J.: A constructor-based reachability logic for rewrite theories. CoRR, abs/1709.05045 (2017)

    Google Scholar 

Download references

Acknowledgments

We thank the anonymous reviewers for their valuable suggestions. This work was supported by a grant of the Romanian National Authority for Scientific Research and Innovation, CNCS/CCCDI - UEFISICDI, project number PN-III-P2-2.1-BG-2016-0394, within PNCDI III.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ştefan Ciobâcă .

Editor information

Editors and Affiliations

A Maude Prototype

A Maude Prototype

Since the algorithm needs to manipulate terms (for instance, to compute the abstractions) we use the metalevel capabilities of Maude to implement the following functionalities:

  • For a given meta-representation of a term, getAbstraction returns the abstraction of a term w.r.t. the set of builtins sorts, which need to be provided explicitly. When computing abstractions, fresh variables are generated;

  • The E-unifiers of the abstractions are computed by unifyAbstractions;

  • The unsatisfiable formulas are filtered out by filterUnsatUMBs;

  • The E-unification modulo builtins algorithm that we propose is implemented by completeSetOfUMBs, which gets as input the meta-representations of two terms and returns the unifiers modulo builtins in two steps: it first generates the substitution-formula pairs with completeSetOfUMBsUnfiltered, and then it eliminates the unsatisfiable solutions using the aforementioned filterUnsatUMBs.

We show how to use our prototype to find the E-unifiers modulo builtins of the E-unification modulo builtins problem \(\textsf {n} \mapsto 1, \textsf {cnt} \mapsto 42 =Z, \textsf {n} \mapsto 1\), introduced in Example 12. First, Maude finds a complete set of ACI-unifiers for the abstractions of the two terms. Then, from these unifiers we generate the pairs \(\{(\tau _1', \phi _1'), (\tau _2', \phi _2') \}\), as shown in Example 12):

figure b

The variables abs0, abs1, ..., are generated during the abstraction process, while %1, %2, ...are generated by the Maude’s variant unifier.

Finally, completeSetOfUMBs – the main function in our prototype – filters out the first unifier, which has an unsatisfiable constraint. Because the interaction between Maude and the SMT solver only supports integers and booleans, we have encoded identifiers (of sort Id) into integers before sending the formula to the SMT solver. The solution is:

figure c

The result is essentially that the variable Z must be \(\textsf {cnt} \mapsto 42\), since %1 = abs2:Id = count and %2 = abs3:Id = 42.

We now show how our prototype solves the four E-unification modulo builtins problems discussed in the Introduction:

  1. 1.

    \(\textsf {n} \mapsto N =\textsf {cnt} \mapsto C' + N', \textsf {n} \mapsto N' + 3\)

  2. 2.

    \(\textsf {n} \mapsto 2 \times N + 1, \textsf {cnt} \mapsto C =\textsf {cnt} \mapsto C' + N', \textsf {n} \mapsto N' + 3\)

  3. 3.

    \(\textsf {n} \mapsto 2 \times N, \textsf {cnt} \mapsto C =\textsf {cnt} \mapsto C' + N', \textsf {n} \mapsto N' + 3\)

  4. 4.

    \(\textsf {n} \mapsto 1, \textsf {cnt} \mapsto C =\textsf {cnt} \mapsto C' + N', \textsf {n} \mapsto N' + 3\)

The set of unifiers modulo builtins is computed by our Maude prototype for each case as shown below:

figure d

For the first E-umb problem, the tool returns noUMBResults, which means that it does not have any solution. For the other examples, the prototype finds the unifiers, as expected.

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer-Verlag GmbH Germany, part of Springer Nature

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Ciobâcă, Ş., Arusoaie, A., Lucanu, D. (2018). Unification Modulo Builtins. In: Moss, L., de Queiroz, R., Martinez, M. (eds) Logic, Language, Information, and Computation. WoLLIC 2018. Lecture Notes in Computer Science(), vol 10944. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-57669-4_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-662-57669-4_10

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-662-57668-7

  • Online ISBN: 978-3-662-57669-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics