Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial work to make clingo understand aspif #387

Merged
merged 22 commits into from
Sep 7, 2022
Merged

Initial work to make clingo understand aspif #387

merged 22 commits into from
Sep 7, 2022

Conversation

rkaminsk
Copy link
Member

@rkaminsk rkaminsk commented Aug 26, 2022

Files in ASPIF format can be loaded from files passed on the command line or via the API functions to load/parse files. For this purpose, the API functions have been extended with an optional parameter receiving a Control object. This breaks backward compatibility of the C-API regarding those functions. C++ projects should work by simply recompiling and Python projects are most likely not affected.

This allows systems like clingcon and clingo-dl to read ASPIF input.

Restrictions

  1. Only one ASPIF file containing exactly one step can be loaded and the control object must not have been used for grounding yet.
  2. The ASPIF format does not store a mapping from symbolic to numeric atoms. A best effort is made to generate one from it's output statement.

Example

$ echo "a." | clingo --mode=gringo | clingo 0
clingo version 5.6.0
Reading from stdin
Solving...
Answer: 1
a
SATISFIABLE

Models       : 1
Calls        : 1
Time         : 0.001s (Solving: 0.00s 1st Model: 0.00s Unsat: 0.00s)
CPU Time     : 0.001s

@rkaminsk rkaminsk added this to the v5.6.0 milestone Aug 26, 2022
@rkaminsk rkaminsk self-assigned this Aug 26, 2022
@rkaminsk rkaminsk linked an issue Aug 26, 2022 that may be closed by this pull request
@rkaminsk rkaminsk marked this pull request as ready for review September 7, 2022 11:20
@rkaminsk rkaminsk merged commit c692aab into wip Sep 7, 2022
@rkaminsk rkaminsk deleted the feature/aspif branch September 7, 2022 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose ASPIF reader/writer via the API
1 participant