Is there some way to declare a domain with the same name & structure as a fact, or must I use (2) strategy below?
Code: Select all
domains
testDom = test( string, string ). % (1) Causes declaration conflict
% testDom = testDom(string,string). % (2) No error
class facts
test : ( string, string ).
class predicates
process : ( testDom ).
clauses
process( TD ):-
TD = testDom(S1,S2),
% TD = test(S1,S2),
stdio::write( S1, "\t", S2 ).