I see some inconsistency in the way Visual Prolog compiler traps and reports the following error: The interface 'winner{@Vacancy}' takes 1 argument(s). Consider the following code which I assumed to be valid; the compiler throws up this error at the the line marked /*1*/ , BUT NOT at the one marked /*2*/. To clear the error, I had to add an unbounded domain as illustrated by the commented statement -- which I did not like. Is there some logic to this behavior that I don't understand?
Code: Select all
interface winner{@Vacancy}
domains
method = all; best.
properties
vacancy:@Vacancy.
end interface
interface expression
predicates
trim:(winner::method) determ. /* 1 */
%trim:(winner{_}::method) determ.
end interface
class expression:expression
end class
implement expression
clauses
trim(winner::all). /* 2 */
end implement
implement main
clauses
run() :-
succeed(). % place your own code here
end implement main
goal
main::run().