Clorm: An ORM API for Clingo

Introduction

Clorm is a Python library that provides an Object Relational Mapping (ORM) style interface to the Clingo Answer Set Programming (ASP) solver. It allows facts to be asserted to, and extracted from, the ASP solver in an intuitive and easy to use way. The goal of this library is to supplement the existing Clingo API to make it easier to build and maintain Python applications that integrate with Clingo.

When integrating an ASP program into a larger application a typical requirement is to model the problem domain as a statically written ASP program, but then to generate problem instances and process the results dynamically. Clorm makes this integration cleaner, both in terms of code readability but also by making it easier to refactor the python code as the ASP program evolves.

  • Works with Python 3.7+ and Clingo 5.4+ (developed on Python 3.9 and Clingo 5.5)

Note

Clorm is now being hosted under the Potassco umbrella (which is the home of Clingo and the other ASP tools). The GitHub and Anaconda namespaces have been changed accordingly.

Indices and tables