Adding strongly equivalent normalization transformations #203
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Natural translation does not produce completable theories, and thus cannot be directly integrated with the existing implementation of completion. The paper "On Program Completion, with an Application to the Sum and Product Puzzle" describes a more restrictive class of regular rules that forbids intervals in the heads of rules. It also describes a transformation, NCOMP, which parallels program completion for rules in this class.
Natural translation nu (as defined in "Transforming Gringo Rules into Formulas in a Natural Way") can be defined as a translation option for anthem, however, external equivalence in anthem should follow the description of NCOMP and its corresponding restricted version of nu.
However, we can obtain rules in this restricted class from many regular rules via strongly equivalent transformations on programs (as suggested by "On Program Completion", section 6). This is one example of a feature we have discussed in the past, which is the ability to reduce an ASP program to a strongly equivalent mini-gringo program of a simpler form. Here I called this process "normalization" and provided an example of one such function that is relevant to nu and NCOMP. A recursive extension of this function is needed to pass the commented-out test case.