Problem picking a predicate of certain arity
Posted: 3 Jun 2019 0:20
Hello Thomas,
just a minor issue: In below code the compiler (build 902) preferes wrong predicate getRule_nd/1-> over the correct getRule_nd/0-> which comes through an interface delegation. I am not absolutely sure, but I suppose that it is not intended.
just a minor issue: In below code the compiler (build 902) preferes wrong predicate getRule_nd/1-> over the correct getRule_nd/0-> which comes through an interface delegation. I am not absolutely sure, but I suppose that it is not intended.
Code: Select all
interface rule
end interface rule
%===
interface grammar
[presenter]
predicates
getRule_nd : () -> rule nondeterm.
predicates
getRule_nd : (symbol Head) -> rule nondeterm.
end interface grammar
%===
interface grammarSupportSite
predicates from grammar
getRule_nd/0->
end interface grammarSupportSite
%===
interface grammarSupport
[presenter]
predicates from grammar
getRule_nd/1->
end interface grammarSupport
%---
class grammarSupport : grammarSupport
constructors
new : (grammarSupportSite Site).
end class grammarSupport
%---
implement grammarSupport
facts
grammarSite : grammarSupportSite.
delegate
interface grammarSupportSite to grammarSite
clauses
new(Site) :-
grammarSite := Site.
clauses
getRule_nd(_Head) = _Rule :-
fail.
clauses
presenter() = presenter::mkPresenter_set(getRule_nd). % Throws error c603 :
% The flow pattern '()' does not exist
% for 'grammarSupport::getRule_nd/1->'
end implement grammarSupport