Skip to main content

Weak Inverse Neighborhoods of Languages

  • Conference paper
  • First Online:
Developments in Language Theory (DLT 2023)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13911))

Included in the following conference series:

  • 319 Accesses

Abstract

While the edit-distance neighborhood is useful for approximate pattern matching, it is not suitable for the negative lookahead feature for the practical regex matching engines. This motivates us to introduce a new operation. We define the edit-distance interior operation on a language L to compute the largest subset I(L) of L such that the edit-distance neighborhood of I(L) is in L. In other words, L includes the edit-distance neighborhood of the largest edit-distance interior language. Given an edit-distance value r, we show that the radius-r edit-distance interior operation is a weak inverse of the radius-r edit-distance neighborhood operation, and vice versa. In addition, we demonstrate that regular languages are closed under the edit-distance interior operation whereas context-free languages are not. Then, we characterize the edit-distance interior languages and present a proper hierarchy with respect to the radius of operations. The family of edit-distance interior languages is closed under intersection, but not closed under union, complement and catenation.

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

Access this chapter

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

References

  1. Aho, A.V., Peterson, T.G.: A minimum distance error-correcting parser for context-free languages. SAIM J. Comput. 1(4), 281–353 (1972)

    MathSciNet  MATH  Google Scholar 

  2. Benedikt, M., Puppis, G., Riveros, C.: Bounded repairability of word languages. J. Comput. Syst. Sci. 79(8), 1302–1321 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  3. Berglund, M., van der Merwe, B., van Litsenborgh, S.: Regular expressions with lookahead. J. Univ. Comput. Sci. 27(4), 324–340 (2021)

    Google Scholar 

  4. Bispo, J., Sourdis, I., Cardoso, J.M., Vassiliadis, S.: Regular expression matching for reconfigurable packet inspection. In: Proceedings of the 2006 IEEE International Conference on Field Programmable Technology (FPT), pp. 119–126 (2006)

    Google Scholar 

  5. Chakraborty, D., Das, D., Goldenberg, E., Koucký, M., Saks, M.: Approximating edit distance within constant factor in truly sub-quadratic time. J. ACM 67(6), 36:1–36:22 (2020)

    Google Scholar 

  6. Chapman, C., Stollee, K.T.: Exploring regular expression usage and context in Python. In: Proceedings of the 25th International Symposium on Software Testing and Analysis (ISSTA), pp. 282–293 (2016)

    Google Scholar 

  7. Cheon, H., Hahn, J., Han, Y.S., Ko, S.K.: Most pseudo-copy languages are not context-free. In: Proceedings of the 27th International Computing and Combinatorics Conference (COCOON), pp. 189–200 (2021)

    Google Scholar 

  8. Cheon, H., Han, Y.S.: Computing the shortest string and the edit-distance for parsing expression languages. In: Proceedings of the 24th International Conference on Developments in Language Theory (DLT), pp. 43–54 (2020)

    Google Scholar 

  9. Cormode, G., Muthukrishnan, S.: The string edit distance matching problem with moves. ACM Transactions on Algorithms 3(1), 2:1–2:19 (2007)

    Google Scholar 

  10. Ecma International: ECMA-262: ECMAScript(R) 2015 language specification. In: ECMA International (2015)

    Google Scholar 

  11. Ford, B.: Parsing expression grammars: A recognition-based syntactic foundation. In: Proceedings of the 31st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pp. 111–122 (2004)

    Google Scholar 

  12. Hamming, R.W.: Error detecting and error correcting codes. Bell Syst. Tech. J. 29(2), 147–160 (1950)

    Article  MathSciNet  MATH  Google Scholar 

  13. Han, Y.S., Ko, S.K.: Edit-distance between visibly pushdown languages. In: Proceedings of the 43rd International Conference on Current Trends in Theory and Practice of Computer Science (SOFSEM), pp. 196–207 (2017)

    Google Scholar 

  14. Han, Y.S., Ko, S.K., Salomaa, K.: The edit-distance between a regular language and a context-free language. Int. J. Found. Comput. Sci. 24(7), 1067–1082 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  15. Hazel, P.: pcre2pattern man page, https://www.pcre.org/current/doc/html/pcre2pattern.html. Accessed 23 Feb 2023

  16. Levenshtein, V.I.: Binary codes capable of correcting deletions, insertions, and reversals. Soviet Phy. Doklady 10(8), 707–710 (1966)

    MathSciNet  Google Scholar 

  17. Microsoft and other contributors: Regular expression language–quick reference (2022). https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference. Accessed 25 Feb 2023

  18. Mohri, M.: Edit-distance of weighted automata: General definitions and algorithms. Int. J. Found. Comput. Sci. 14(6), 957–982 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  19. Ng, T., Rappaport, D., Salomaa, K.: State complexity of neighborhoods and approximate patern matching. Int. J. Found. Comput. Sci. 29(2), 315–329 (2018)

    Article  MATH  Google Scholar 

  20. Okhotin, A., Salomaa, K.: Edit distance neighborhoods of input-driven pushdown automata. Theoret. Comput. Sci. 777, 417–430 (2019)

    Article  MathSciNet  MATH  Google Scholar 

  21. Salomaa, K., Schofield, P.: State complexity of additive weighted finite automata. Int. J. Found. Comput. Sci. 18(6), 1407–1416 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  22. Shar, L.K., Tan, H.B.K.: Mining input sanitization patterns for predicting sql injection and cross site scripting vulnerabilities. In: Proceedings of the 34th International Conference on Software Engineering (ICSE), pp. 1293–1296 (2012)

    Google Scholar 

  23. Sipser, M.: Introduction to the Theory of Computation, 3rd edn. Cengage Learning, MA, USA (2013)

    MATH  Google Scholar 

  24. Wood, D.: Theory of Computation. Harper & Row, NY, USA (1987)

    MATH  Google Scholar 

Download references

Acknowledgments

This research was supported by the NRF grant (RS-2023-00208094). We wish to thank the anonymous reviewers for their valuable suggestions.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yo-Sub Han .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Cheon, H., Han, YS. (2023). Weak Inverse Neighborhoods of Languages. In: Drewes, F., Volkov, M. (eds) Developments in Language Theory. DLT 2023. Lecture Notes in Computer Science, vol 13911. Springer, Cham. https://doi.org/10.1007/978-3-031-33264-7_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-33264-7_6

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-33263-0

  • Online ISBN: 978-3-031-33264-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics