Anti-unification of Unordered Goals

Research output: Contribution in Book/Catalog/Report/Conference proceedingConference contribution

39 Downloads (Pure)


Anti-unification in logic programming refers to the process of capturing common syntactic structure among given goals, computing a single new goal that is more general called a generalization of the given goals. Finding an arbitrary common generalization for two goals is trivial, but looking for those common generalizations that are either as large as possible (called largest common generalizations) or as specific as possible (called most specific generalizations) is a non-trivial optimization problem, in particular when goals are considered to be unordered sets of atoms. In this work we provide an in-depth study of the problem by defining two different generalization relations. We formulate a characterization of what constitutes a most specific generalization in both settings. While these generalizations can be computed in polynomial time, we show that when the number of variables in the generalization needs to be minimized, the problem becomes NP-hard. We subsequently revisit an abstraction of the largest common generalization when anti-unification is based on injective variable renamings, and prove that it can be computed in polynomially bounded time.
Original languageEnglish
Title of host publicationProceedings of the 30th EACSL Annual Conference on Computer Science Logic (CSL 2022)
EditorsFlorin Manea, Alex Simpson
Number of pages17
ISBN (Electronic)9783959772181
Publication statusPublished - 27 Jan 2022
EventComputer Science Logic 2022 - Göttingen, Germany
Duration: 14 Feb 202219 Feb 2022

Publication series

NameLeibniz International Proceedings in Informatics (LIPIcs)
ISSN (Electronic)1868-8969


ConferenceComputer Science Logic 2022
Abbreviated titleCSL 2022
Internet address


  • Anti-unification
  • Logic Programming
  • NP-completeness
  • Time complexity
  • Algorithms
  • Inductive Logic Programming


Dive into the research topics of 'Anti-unification of Unordered Goals'. Together they form a unique fingerprint.

Cite this