Skip to content

siemens/OOASP

Repository files navigation

OOASP

OOASP is a schema for describing object-oriented models with Answer Set Programming.

OOASP has been developed for research purposes to demonstrate how to describe and instantiate object-oriented models in Answer Set Programming. The main application area is product configuration i.e. reasoning about product configuration models.

Older encodings produced along with the original publications on OOASP can be found in old_encodings. Currently, the main focus of this project is a prototype for interactive configuration using OOASP as described below.

Interactive Configuration with ASP

Prototype for interactive configuration using ASP initially developed by Susana Hahn (Potassco Solutions) as part of a collaboration between Potassco Solutions and Siemens.

Installation

poetry install

Usage

Before running any of the programs, make sure the virtual environment has been activated. This can be done using the command:

poetry shell

The files corresponding to the current version are in ooasp.

The package usage and new features are showcased in the jupyter notebooks inside the folder usage.

In order to create a configuration using the command line use the file app.py found in the ooasp directory. This program allows for the specification of an initial partial configuration using arguments in the format --component N where N refers to the number of components present in the initial configuration and component to the class name of the component.Example: python ooasp/app.py --elementA 5

  • For benchmarking add the options: --stats=2 --outf=2 -q to obtain a JSON. Then inspect the "OOASP" section.
  • For visualizing the configuration use: --view

UI Usage

Run the clinguin UI with the following command:

clinguin client-server --ui-files clinguin_ui/ui.lp --backend=OOASPBackend --clingraph-files ooasp/encodings/viz_config.lp --default-graph=config --custom-classes clinguin_ui/ooasp_backend.py --domain-files examples/racks/kb.l

Documentation

For the documentation of the protoype see DOC.md

Literature

Research Papers on OOASP

OOASP: Connecting Object-Oriented and Logic Programming (2015): Conference paper | Preprint

Research Papers on Interactive Configuration with ASP

Interactive Configuration with ASP Multi-Shot Solving (2023): Workshop Paper

Challenges of Developing an API for Interactive Configuration using ASP (2022): Extended Abstract

Solver Requirements for Interactive Configuration (2020): Journal article

Licensing

OOASP is distributed under the MIT License.

Copyright (c) 2022-2024 Siemens AG Oesterreich