ITV0060 lab 2 example: erinevus redaktsioonide vahel

Allikas: Lambda
Mine navigeerimisribale Mine otsikasti
Resümee puudub
 
Resümee puudub
 
(ei näidata sama kasutaja üht vahepealset redaktsiooni)
1. rida: 1. rida:
<pre>
<pre>
% clear automatic strategy selection and preprocessing
% clear automatic strategy selection
clear(auto).
clear(auto).


7. rida: 7. rida:


% select the search strategy
% select the search strategy
%set(pos_hyper_resolution).
set(hyper_res).
set(hyper_res).
set(factor).
set(factor).
%set(positive_inference).
%set(paramodulation).
set(para_into).
set(para_into).
set(para_from).
set(para_from).


% select sensible amount of output
% select sensible amount of output
%clear(echo_input).
% clear(print_given).  
%clear(print_initial_clauses). % remove this to see input!
clear(print_given).  
set(print_kept).  % this is important: prints all generated and kept clauses
set(print_kept).  % this is important: prints all generated and kept clauses
assign(stats_level, 0).
assign(stats_level, 0).
24. rida: 19. rida:
% just make it stop after N secs
% just make it stop after N secs
assign(max_seconds, 10).
assign(max_seconds, 10).
% useful iff you want to have several proofs/more than one query answer
assign(max_proofs, 1000000).


formula_list(sos).
formula_list(sos).
33. rida: 25. rida:
type(car2,van,2).
type(car2,van,2).
type(car3,bike,3).
type(car3,bike,3).
% rdfs-style taxonomy


subclass(van,vehicle,4).
subclass(van,vehicle,4).
subclass(vehicle,thing,5).
subclass(vehicle,thing,5).
% example rule for rdfs subclass


all X all Y all Z all P all Q  
all X all Y all Z all P all Q  
42. rida: 38. rida:
% example query: remove if you do not want to query
% example query: remove if you do not want to query


all X all Z (-type(X,thing,Z) | $answer(X,Z)).
% all X all Z (-type(X,thing,Z) | $answer(X,Z)).


end_of_list.
end_of_list.
</pre>
</pre>

Viimane redaktsioon: 14. märts 2011, kell 12:47

% clear automatic strategy selection
clear(auto).

% use capital letters (A,X,T,...) as vars
set(prolog_style_variables).

% select the search strategy
set(hyper_res).
set(factor).
set(para_into).
set(para_from).

% select sensible amount of output
% clear(print_given). 
set(print_kept).  % this is important: prints all generated and kept clauses
assign(stats_level, 0).

% just make it stop after N secs
assign(max_seconds, 10).

formula_list(sos).

type(car1,van,1).
type(car2,van,2).
type(car3,bike,3).

% rdfs-style taxonomy

subclass(van,vehicle,4).
subclass(vehicle,thing,5).

% example rule for rdfs subclass

all X all Y all Z all P all Q 
  (type(X,Y,P) & subclass(Y,Z,Q)  -> type(X,Z,$PROD(P,Q))) .

% example query: remove if you do not want to query

% all X all Z (-type(X,thing,Z) | $answer(X,Z)).

end_of_list.