Thomas may correct me, but I think the answer is
no, the fact in the inherited class
aa should not be displayed in the project tree in the class implementation of
bb. This is because the fact in class
aa is not accessible in the implementation of class
bb.
The project tree displays for inherited classes only their public contents. The fact in class
aa is declared but only locally inside
aa.
I extend your example with two points: 1) The property
class_aa_objectFact in the interface of
aa, which makes the fact accessible from outside. 2) The predicate
local_p1 in the implementation of
aa. The example then is:
Code: Select all
interface aa
predicates
p1 : (integer X).
properties
class_aa_objectFact : integer.
end interface aa
%-
class aa : aa
end class aa
%-
implement aa
facts
class_aa_objectFact : integer := 7.
clauses
p1(X) :-
class_aa_objectFact := X, % just some code to suppresses "unused"-warnings
local_p1(class_aa_objectFact).
predicates
local_p1 : (integer X).
clauses
local_p1(_X).
end implement aa
%===
interface cc
predicates
p2 : (integer X).
end interface cc
%---
class bb : cc
end class bb
%-
implement bb inherits aa
clauses
p2(_X).
end implement bb
In the project tree you see: 1) The property
class_aa_objectFact, which is public in
aa, is displayed in the class implementation of
bb. 2) The predicate
local_p1, which is only declared locally in
aa, is not displayed in the class implementation of
bb.
ProjectTree.jpg
You do not have the required permissions to view the files attached to this post.