Ignore built-in predicates in completion

This commit is contained in:
Patrick Lühne 2020-05-19 12:54:51 +02:00
parent 7020bc0bf0
commit 34b8dce9be
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
2 changed files with 5 additions and 2 deletions

View File

@ -144,7 +144,8 @@ impl Problem
let hidden_predicate_declarations =
predicate_declarations.iter().filter(|x| !output_predicate_declarations.contains(*x)
&& !input_predicate_declarations.contains(*x));
&& !input_predicate_declarations.contains(*x)
&& !(x.name.starts_with("p__") && x.name.ends_with("__")));
let mut statements = self.statements.borrow_mut();

View File

@ -143,8 +143,10 @@ impl<'p> Translator<'p>
for predicate_declaration in self.problem.predicate_declarations.borrow().iter()
{
// Dont perform completion for input predicates
// Dont perform completion for input predicates and built-in predicates
if self.problem.input_predicate_declarations.borrow().contains(predicate_declaration)
|| predicate_declaration.name.starts_with("p__")
&& predicate_declaration.name.ends_with("__")
{
continue;
}