Rename module for determining head type

This commit is contained in:
Patrick Lühne 2020-02-01 17:20:43 +01:00
parent 142531d334
commit 66902c1888
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
2 changed files with 6 additions and 6 deletions

View File

@ -1,11 +1,11 @@
mod context; mod context;
mod head_type;
mod translate_body; mod translate_body;
mod translate_head;
pub use context::Context; pub use context::Context;
use translate_body::translate_body; use head_type::*;
use translate_head::determine_head_type; use translate_body::*;
pub fn read(rule: &clingo::ast::Rule, context: &mut Context) -> Result<(), crate::Error> pub fn read(rule: &clingo::ast::Rule, context: &mut Context) -> Result<(), crate::Error>
{ {
@ -16,11 +16,11 @@ pub fn read(rule: &clingo::ast::Rule, context: &mut Context) -> Result<(), crate
match head_type match head_type
{ {
translate_head::HeadType::ChoiceWithSingleAtom(test) => HeadType::ChoiceWithSingleAtom(test) =>
log::debug!("translating choice rule with single atom"), log::debug!("translating choice rule with single atom"),
translate_head::HeadType::IntegrityConstraint => HeadType::IntegrityConstraint =>
log::debug!("translating integrity constraint"), log::debug!("translating integrity constraint"),
translate_head::HeadType::Trivial => HeadType::Trivial =>
{ {
log::debug!("skipping trivial rule"); log::debug!("skipping trivial rule");
return Ok(()); return Ok(());