potassco/clingo-rs

Add new rule that does not introduce new Atoms

drwadu opened this issue · 1 comments

I am trying to avoid grounding, while adding new rules to the underlying logic program, which means adding a new program that extends the old program by the new rules is not an option.

I was planning to use rule, which accepts &[Atom] for the head-parameter. Among the examples I could only find cases where the head of the added rule
is either empty, or introducing new atoms.

  1. How do I add rules that do not introduce new atoms in the head?
  2. Is there a way to convert a Symbol or a Literal to an Atom?

I might just fail to see it.

Thanks for pointing that out. It is missing in the API.
In branch backport-0.6/issue43 I added an impl From<Literal> for Atom.
You may want to use that branch because the next release will include some breaking changes.