potassco / clintest

🧪 A test framework for clingo programs
https://potassco.org/clintest/
MIT License
7 stars 1 forks source link

Add a model API #18

Open teiesti opened 9 months ago

teiesti commented 9 months ago

Currently, clintest uses clingo.solving.Model quite prominently. This has two major drawbacks:

  1. One cannot persist models for later use as clingo.solving.Model references some clingo internal data that vanishes once the search continues.
  2. One cannot create a model without using clingo.control.Control.solve. This implies nobody can use solver that is not based on clingo.

This problem could perhaps be solved by adding our own model API, i.e., an abstract class clintest.model.Model. For clintest.model.Model we could add a wrapper or resort to some kind of duck typing.