Skip to main content

A Parametric Abstract Domain for Lattice-Valued Regular Expressions

  • Conference paper
  • First Online:

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

Abstract

We present a lattice-valued generalization of regular expressions as an abstract domain for static analysis. The parametric abstract domain rests on a generalization of Brzozowski derivatives and works for both finite and infinite lattices. We develop both a co-inductive, simulation algorithm for deciding ordering between two domain elements and a widening operator for the domain. Finally we illustrate the domain with a static analysis that analyses a communicating process against a lattice-valued regular expression expressing the environment’s network communication.

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.

    It has later been pointed out [14, 26, 27] that Brzozowski’s proof had a minor flaw, that could be fixed by patching the statement of the theorem [27] or by patching the definition of derivatives to avoid the syntactic occurrence of \(\delta \) [26]. We have followed the latter approach in our generalization.

  2. 2.

    Solving the equations for such error states before step 5 (collapsing) has the same effect: their collective solution is \(\emptyset \) in the matrix, and substituting the solution in removes any transitions to and from them, and thereby any observable effect of grouping an error state and a non-error state in the same equivalence class.

  3. 3.

    The result is also \(\epsilon + \emptyset \) for [20; 20], [21; 21], [22; 22] up to ACI of +, but that just constitutes a refinement identifying even more equivalent atoms.

  4. 4.

    Generally the solution to this equation is an over-approximation but so is the result of widening.

  5. 5.

    https://github.com/jmid/regexpanalyser.

  6. 6.

    http://janmidtgaard.dk/papers/Midtgaard-Nielson-Nielson:SAS16-full.pdf.

  7. 7.

    These are however referred to as ‘atomic lattices’ contradicting standard terminology [10, 15].

References

  1. Alur, R., Dill, D.L.: A theory of timed automata. TCS 126(2), 183–235 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  2. Alur, R., Henzinger, T.A., Vardi, M.Y.: Parametric real-time reasoning. In: STOC 1993, pp. 592–601 (1993)

    Google Scholar 

  3. Arden, D.N.: Delayed-logic and finite-state machines. In: 2nd Annual Symposium on Switching Circuit Theory and Logical Design, pp. 133–151. IEEE Computer Society (1961)

    Google Scholar 

  4. Bourdoncle, F.: Abstract debugging of higher-order imperative languages. In: PLDI 1993, pp. 46–55 (1993)

    Google Scholar 

  5. Brand, D., Zafiropulo, P.: On communicating finite state machines. JACM 30, 323–342 (1983)

    Article  MathSciNet  MATH  Google Scholar 

  6. Brzozowski, J.A.: Derivatives of regular expressions. JACM 11(4), 481–494 (1964)

    Article  MathSciNet  MATH  Google Scholar 

  7. Cousot, P., Cousot, R.: Static determination of dynamic properties of programs. In: ISOP 1976, pp. 106–130. Dunod, Paris (1976)

    Google Scholar 

  8. Cousot, P., Cousot, R.: Semantic analysis of communicating sequential processes. In: de Bakker, J., van Leeuwen, J. (eds.) ICALP 1980. LNCS, vol. 85, pp. 119–133. Springer, Heidelberg (1980)

    Chapter  Google Scholar 

  9. Cousot, P., Cousot, R.: Abstract interpretation and application to logic programs. J. Logic Program. 13(2–3), 103–179 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  10. Davey, B.A., Priestley, H.A.: Introduction to Lattices and Order, 2nd edn. Cambridge University Press, Cambridge (2002)

    Book  MATH  Google Scholar 

  11. Feret, J.: Abstract interpretation-based static analysis of mobile ambients. In: Cousot, P. (ed.) SAS 2001. LNCS, vol. 2126, pp. 412–430. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  12. Le Gall, T., Jeannet, B.: Lattice automata: a representation for languages on infinite alphabets, and some applications to verification. In: Riis Nielson, H., Filé, G. (eds.) SAS 2007. LNCS, vol. 4634, pp. 52–68. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  13. Le Gall, T., Jeannet, B., Jéron, T.: Verification of communication protocols using abstract interpretation of FIFO queues. In: Johnson, M., Vene, V. (eds.) AMAST 2006. LNCS, vol. 4019, pp. 204–219. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  14. Grabmayer, C.: Using proofs by coinduction to find “Traditional” proofs. In: Fiadeiro, J.L., Harman, N.A., Roggenbach, M., Rutten, J. (eds.) CALCO 2005. LNCS, vol. 3629, pp. 175–193. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  15. Grätzer, G.: General Lattice Theory. Academic Press, New York (1978)

    Book  MATH  Google Scholar 

  16. Rydhof Hansen, R., Jensen, J.G., Nielson, F., Riis Nielson, H.: Abstract interpretation of mobile ambients. In: Cortesi, A., Filé, G. (eds.) SAS 1999. LNCS, vol. 1694, pp. 134–148. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  17. Henglein, F., Nielsen, L.: Regular expression containment: coinductive axiomatization and computational interpretation. In: POPL 2011, pp. 385–398 (2011)

    Google Scholar 

  18. Hoare, T., van Staden, S., Möller, B., Struth, G., Villard, J., Zhu, H., O’Hearn, P.: Developments in concurrent Kleene Algebra. In: Höfner, P., Jipsen, P., Kahl, W., Müller, M.E. (eds.) RAMiCS 2014. LNCS, vol. 8428, pp. 1–18. Springer, Heidelberg (2014)

    Chapter  Google Scholar 

  19. Kozen, D.: A completeness theorem for Kleene algebras and the algebra of regular events. Inf. Comput. 110(2), 366–390 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  20. Lesens, D., Halbwachs, N., Raymond, P.: Automatic verification of parameterized linear networks of processes. In: POPL 1997, pp. 346–357 (1997)

    Google Scholar 

  21. Logozzo, F.: Separate compositional analysis of class-based object-oriented languages. In: Rattray, C., Maharaj, S., Shankland, C. (eds.) AMAST 2004. LNCS, vol. 3116, pp. 334–348. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  22. Martin, J.C.: Introduction to Languages and the Theory of Computation. McGraw-Hill, New York (1997)

    MATH  Google Scholar 

  23. Mauborgne, L.: Tree schemata and fair termination. In: Palsberg, J. (ed.) SAS 2000. LNCS, vol. 1824, pp. 302–319. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  24. Midtgaard, J., Møller, A.: Quickchecking static analysis properties. In: ICST 2015, pp. 1–10. IEEE Computer Society (2015)

    Google Scholar 

  25. Owens, S., Reppy, J., Turon, A.: Regular-expression derivatives re-examined. J. Funct. Program. 19(2), 173–190 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  26. Rosu, G., Viswanathan, M.: Testing extended regular language membership incrementally by rewriting. In: Nieuwenhuis, R. (ed.) RTA 2003. LNCS, vol. 2706, pp. 499–514. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  27. Salomaa, A.: Two complete axiom systems for the algebra of regular events. JACM 13(1), 158–169 (1966)

    Article  MathSciNet  MATH  Google Scholar 

  28. Vasconcelos, V.T., Gay, S., Ravara, A.: Typechecking a multithreaded functional language with session types. TCS 368(1–2), 64–87 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  29. Venet, A.: Abstract cofibered domains: application to the alias analysis of untyped programs. In: Cousot, R., Schmidt, D.A. (eds.) SAS 1996. LNCS, vol. 1145, pp. 366–382. Springer, Heidelberg (1996)

    Chapter  Google Scholar 

  30. Venet, A.: Automatic determination of communication topologies in mobile systems. In: Levi, G. (ed.) SAS 1998. LNCS, vol. 1503, pp. 152–167. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  31. Zafiropulo, P., West, C.H., Rudin, H., Cowan, D.D., Brand, D.: Towards analyzing and synthesizing protocols. IEEE Trans. Commun. Com–28(4), 651–661 (1980)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jan Midtgaard .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer-Verlag GmbH Germany

About this paper

Cite this paper

Midtgaard, J., Nielson, F., Nielson, H.R. (2016). A Parametric Abstract Domain for Lattice-Valued Regular Expressions . In: Rival, X. (eds) Static Analysis. SAS 2016. Lecture Notes in Computer Science(), vol 9837. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-53413-7_17

Download citation

  • DOI: https://doi.org/10.1007/978-3-662-53413-7_17

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-662-53412-0

  • Online ISBN: 978-3-662-53413-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics