Abstract
It is quite appealing to base the description of pattern-based searches on positive as well as negative conditions. We would like for example to specify that we search for white cars that are not station wagons.
To this end, we define the notion of anti-patterns and their semantics along with some of their properties. We then extend the classical notion of matching between patterns and ground terms to matching between anti-patterns and ground terms. We provide a rule-based algorithm that finds the solutions to such problems and prove its correctness and completeness. Anti-pattern matching is by nature different from disunification and quite interestingly the anti-pattern matching problem is unitary. Therefore the concept is appropriate to ground a powerful extension to pattern-based programming languages and we show how this is used to extend the expressiveness and usability of the Tom language.
UMR 7503 CNRS-INPL-INRIA-Nancy2-UHP.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Aiken, A., Kozen, D., Wimmers, E.: Decidability of systems of set constraints with negative constraints. Information and Computation 122(1), 30–44 (1995)
Aiken, A., Wimmers, E.L.: Solving systems of set constraints (extended abstract). In: LICS, pp. 329–340. IEEE Computer Society Press, Los Alamitos (1992)
Ait-Kaci, H., Podelski, A., Smolka, G.: A feature constraint system for logic programming with entailment. Theoretical Computer Science 122(1–2), 263–283 (1994)
Baader, F., et al.: On the expressivity of feature logics with negation, functional uncertainty, and sort equations. Journal of Logic, Language and Information 2, 1–18 (1993)
Baader, F., Nipkow, T.: Term Rewriting and all That. Cambridge University Press, Cambridge (1998)
Backofen, R., Smolka, G.: A complete and recursive feature theory. Theoretical Computer Science 146(1–2), 243–268 (1995)
Charatonik, W., Pacholski, L.: Negative set constraints with equality. In: LICS, pp. 128–136. IEEE Computer Society Press, Los Alamitos (1994)
Clark, K.L.: Negation as Failure. In: Gallaire, H., Minker, J., Nicolas, J. (eds.) Logic and databases, pp. 293–322. Plenum Press, New York (1978)
Comon, H.: Unification et disunification. Théories et applications. Thèse de Doctorat d’Université, Institut Polytechnique de Grenoble (France) (1988)
Comon, H.: Disunification: a survey. In: Lassez, J.-L., Plotkin, G. (eds.) Computational Logic. Essays in honor of Alan Robinson, pp. 322–359. MIT Press, Cambridge (1991)
Comon, H., Lescanne, P.: Equational problems and disunification. In: Kirchner, C. (ed.) Unification, pp. 297–352. Academic Press, London (1990)
Foster, J.S.: CLP(SC): Implementation and efficiency considerations. In: Proceedings Workshop on Set Constraints, held in Conjunction with CP’96, Boston, Massachusetts (1996)
Huet, G.: Résolution d’equations dans les langages d’ordre 1, 2, ..., ω. Thèse de Doctorat d’Etat, Université de Paris 7 (France) (1976)
Kirchner, C., Kirchner, H.: Rewriting, solving, proving (1999), A preliminary version of a book available at http://www.loria.fr/~ckirchne/rsp.ps.gz
Kirchner, C., Moreau, P.-E., Reilles, A.: Formal validation of pattern matching code. In: Barahona, P., Felty, A. (eds.) Proceedings of the 7th ACM SIGPLAN PPDP, July 2005, pp. 187–197. ACM Press, New York (2005)
Lassez, J.-L., Marriott, K.: Explicit representation of terms defined by counter examples. Journal of Automated Reasoning 3(3), 301–317 (1987)
Liquori, L.: iRho: the software [system description]. In: DCM: International Workshop on Development in Computational Models. Electr. Notes Theor. Comput. Sci, vol. 135(3), pp. 85–94 (2006)
Momigliano, A.: Elimination of negation in a logical framework. In: Clote, P.G., Schwichtenberg, H. (eds.) CSL 2000. LNCS, vol. 1862, pp. 411–426. Springer, Heidelberg (2000)
Moreau, P.-E., Ringeissen, C., Vittek, M.: A Pattern Matching Compiler for Multiple Target Languages. In: Hedin, G. (ed.) CC 2003 and ETAPS 2003. LNCS, vol. 2622, pp. 61–76. Springer, Heidelberg (2003)
Müller, M., Niehren, J., Podelski, A.: Inclusion constraints over non-empty sets of trees. In: Bidoit, M., Dauchet, M. (eds.) CAAP 1997, FASE 1997, and TAPSOFT 1997. LNCS, vol. 1214, pp. 217–231. Springer, Heidelberg (1997)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2007 Springer Berlin Heidelberg
About this paper
Cite this paper
Kirchner, C., Kopetz, R., Moreau, PE. (2007). Anti-pattern Matching. In: De Nicola, R. (eds) Programming Languages and Systems. ESOP 2007. Lecture Notes in Computer Science, vol 4421. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-71316-6_9
Download citation
DOI: https://doi.org/10.1007/978-3-540-71316-6_9
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-71314-2
Online ISBN: 978-3-540-71316-6
eBook Packages: Computer ScienceComputer Science (R0)