The inclusion of Regular Expressions (REs) is the kernel of any type-checking algorithm for XML manipulation languages. XML applications would benefit from the extension of REs with interleaving and counting, but this is not feasible in general, since inclusion is EXPSPACE-complete for such extended REs. In~\cite{GheColSar07-dbpl} we introduced a notion of ``conflict-free REs'', which are extended REs with excellent complexity behaviour, including a cubic inclusion algorithm~\cite{GheColSar07-dbpl} and linear membership \cite{GheColSar08-cikm}. Conflict-free REs have interleaving and counting, but the complexity is tamed by the ``conflict-free'' limitations, which have been found to be satisfied by the vast majority of the content models published on the Web. However, a type-checking algorithm needs to compare machine-generated subtypes against human-defined supertypes. The conflict-free restriction, while quite harmless for the human-defined supertype, is far too restrictive for the subtype. We show here that the PTIME inclusion algorithm can be actually extended to deal with totally unrestricted REs with counting and interleaving in the subtype position, provided that the supertype is conflict-free. This is exactly the expressive power that we need in order to use subtyping inside type-checking algorithms, and the cost of this generalized algorithm is only quadratic, which is as good as the best algorithm we have for the symmetric case (see \cite{ColGheSar-IS08}). The result is extremely surprising, since we had previously found that asymmetric inclusion becomes NP-hard as soon as the candidate subtype is enriched with binary intersection, a generalization that looked much more innocent than what we achieve here.

Efficient Asymmetric Inclusion Between Regular Expression Types

SARTIANI, CARLO
2009-01-01

Abstract

The inclusion of Regular Expressions (REs) is the kernel of any type-checking algorithm for XML manipulation languages. XML applications would benefit from the extension of REs with interleaving and counting, but this is not feasible in general, since inclusion is EXPSPACE-complete for such extended REs. In~\cite{GheColSar07-dbpl} we introduced a notion of ``conflict-free REs'', which are extended REs with excellent complexity behaviour, including a cubic inclusion algorithm~\cite{GheColSar07-dbpl} and linear membership \cite{GheColSar08-cikm}. Conflict-free REs have interleaving and counting, but the complexity is tamed by the ``conflict-free'' limitations, which have been found to be satisfied by the vast majority of the content models published on the Web. However, a type-checking algorithm needs to compare machine-generated subtypes against human-defined supertypes. The conflict-free restriction, while quite harmless for the human-defined supertype, is far too restrictive for the subtype. We show here that the PTIME inclusion algorithm can be actually extended to deal with totally unrestricted REs with counting and interleaving in the subtype position, provided that the supertype is conflict-free. This is exactly the expressive power that we need in order to use subtyping inside type-checking algorithms, and the cost of this generalized algorithm is only quadratic, which is as good as the best algorithm we have for the symmetric case (see \cite{ColGheSar-IS08}). The result is extremely surprising, since we had previously found that asymmetric inclusion becomes NP-hard as soon as the candidate subtype is enriched with binary intersection, a generalization that looked much more innocent than what we achieve here.
2009
9781605584232
File in questo prodotto:
File Dimensione Formato  
icdt09.pdf

solo utenti autorizzati

Tipologia: Documento in Post-print
Licenza: DRM non definito
Dimensione 221.23 kB
Formato Adobe PDF
221.23 kB Adobe PDF   Visualizza/Apri   Richiedi una copia

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11563/14057
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 16
  • ???jsp.display-item.citation.isi??? ND
social impact