% ------------------------------------------------------------------------------------------------------
% Hybrid Description Logic typed LPs
% 
% Shows the use of external description logic type systems, e.g. OWL (Lite / DL) or RDFS type systems
% The external type system(s) are imported via "import"
% An external reasoner is needed.
%
% In this example a OWL Lite reasoner is used.
% 
% ------------------------------------------------------------------------------------------------------

:-eval(consult('ContractLog/owl.prova')).

% import external type system (T-Box model) and individual fact base (A-Box)
import("examples/function_tests/dl_typing/WineProjectOWL.owl").

% use external owl reasoner
% for a list of available reasoners see OWL2PROVA.java
reasoner("owl").

% ground DL facts
p(X:default_White_Wine) :- q(X:default_White_Wine).
q(default_White_Wine:Chardonnay).
:-solve(p(X:default_Wine)).
:-solve(p(default_White_Wine:Chardonnay)).

% non ground DL facts are interpreted as queries on external facts
a(X:default_Red_Wine).
a(Y:default_White_Wine).
:-solve(a(X:default_Wine)).

:-solve(a(default_Red_Wine:default_ChiChi)).

% typed variables in complex terms
c(b(X:default_Red_Wine)).
c(b(default_White_Wine:Chardonnay)).
:-solve(c(b(X:default_Wine))).
