Summary
In the present work, we describe a procedure and a prototype implementation for the automatic recognition of design patterns from documentation of software artefacts design and implementation, provided in a machine readable form, namely, the XML Metadata Interchange (XMI) coded representation of UML class diagrams. The procedure exploits a semantic representation of the patterns to be recognized, based on an existing Web Ontology Language (OWL), known as object design ontology layer (ODOL), defined by the University of Massey (New Zealand), which has been augmented with an OWL‐S based representation of the patterns' dynamic behaviour. Both the UML set of diagrams related to the analysed software artefacts and the ODOL+OWL‐S patterns representation are automatically scanned and translated into a first‐order logic representation (namely Prolog). A set of first‐order logic rules, independent from the specific pattern to be recognized, has been defined to describe the heuristics and features which trigger the recognition, exploiting the Prolog description of the patterns to be recognized and the base of Prolog facts, which represents the UML documentation. Copyright © 2015 John Wiley & Sons, Ltd.