From cfbbf6e97e829e0c979c6c509304b5b49fb46148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Tue, 5 Jan 2016 03:32:51 +0000 Subject: [PATCH] avoid depending on library/... --- .gitignore | 4 +++- library/atts.yap | 13 ++++--------- pl/attributes.yap | 11 +++++++++++ 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index bba8b6c0d..53270c3cc 100644 --- a/.gitignore +++ b/.gitignore @@ -133,4 +133,6 @@ packages/bdd/cudd_config.h Makefile build Debug -debug \ No newline at end of file +debug +Release +Build \ No newline at end of file diff --git a/library/atts.yap b/library/atts.yap index 8fb701895..8fe204cf8 100644 --- a/library/atts.yap +++ b/library/atts.yap @@ -52,8 +52,10 @@ and the following user defined predicates can be used: :- multifile user:goal_expansion/3. -:- multifile - user:term_expansion/2. + :- multifile + user:term_expansion/2. + :- multifile + attributed_module/3. :- dynamic existing_attribute/4. :- dynamic modules_with_attributes/1. @@ -270,13 +272,6 @@ do_verify_attributes([Mod|Mods], AttVar, Binding, [Mod:Goal|Goals]) :- do_verify_attributes([_|Mods], AttVar, Binding, Goals) :- do_verify_attributes(Mods, AttVar, Binding, Goals). -has_modules_with_attributes(LMods) :- - modules_with_attributes(LMods). - -module_has_attributes(Mod) :- - attributed_module(Mod, _, _), !. - - /** @} */ diff --git a/pl/attributes.yap b/pl/attributes.yap index 2c798d6e3..3ce89345a 100644 --- a/pl/attributes.yap +++ b/pl/attributes.yap @@ -49,6 +49,13 @@ :- dynamic attributes:modules_with_attributes/1. :- dynamic attributes:attributed_module/3. + :- multifile + attributes:attributed_module/3. + +:- dynamic existing_attribute/4. +:- dynamic modules_with_attributes/1. +:- dynamic attributed_module/3. + /** @pred get_attr(+ _Var_,+ _Module_,- _Value_) @@ -371,6 +378,10 @@ attvar_residuals(att(Module,Value,As), V) --> attvar_residuals(As, V) ). + attributes:module_has_attributes(Mod) :- + attributes:attributed_module(Mod, _, _), !. + + list([]) --> []. list([L|Ls]) --> [L], list(Ls).