Otteri rdf näitefail
Allikas: Lambda
% this is the way comments start
set(hyper_res). % another alternative is set(binary_res)
set(factor). % probably comes automatically
set(print_kept). % this will print out ALL derived and kept stuff
formula_list(sos). % use list(sos) if not formula syntax
rdf(s1,amet,koristaja).
rdf(s1,telefon,123).
rdf(s2,amet,valvur).
rdf(s2,telefon,345).
rdf(s3,pealkiri,eriuudis).
rdf(s3,link,www_epl_ee).
% following three rows are not formula syntax: x,y,z,u,v,w are vars
% -rdf(x,amet,z) |
% -rdf(x,telefon,u) |
% rdf(x,tyyp,tootaja).
% this is formula syntax
all x all z all u (
rdf(x,amet,z) &
rdf(x,telefon,u)
->
rdf(x,tyyp,tootaja) ).
% and there is no query! try giving -rdf(s1,tyyp,tootaja) as query.
% useful for query: say that s1 is not s2
% s1!=s2.
% query example: look for all guys not s2
% all x (rdf(x,tyyp,tootaja) &
% x!=s2
% ->
% $answer(x)).
end_of_list.