flora-commits Mailing List for Flora-2
Brought to you by:
kifer
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(59) |
Jun
(43) |
Jul
(4) |
Aug
(4) |
Sep
(102) |
Oct
(20) |
Nov
(47) |
Dec
(32) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(24) |
Feb
(34) |
Mar
(72) |
Apr
(36) |
May
(10) |
Jun
(46) |
Jul
(36) |
Aug
(24) |
Sep
(37) |
Oct
(27) |
Nov
(43) |
Dec
(40) |
| 2004 |
Jan
(35) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(30) |
Aug
(83) |
Sep
(68) |
Oct
(38) |
Nov
(3) |
Dec
(7) |
| 2005 |
Jan
(9) |
Feb
(31) |
Mar
(46) |
Apr
(73) |
May
(21) |
Jun
(1) |
Jul
(32) |
Aug
(33) |
Sep
(3) |
Oct
(28) |
Nov
(4) |
Dec
(23) |
| 2006 |
Jan
(22) |
Feb
(2) |
Mar
(12) |
Apr
(23) |
May
(73) |
Jun
(14) |
Jul
|
Aug
(20) |
Sep
(14) |
Oct
(5) |
Nov
|
Dec
(14) |
| 2007 |
Jan
(54) |
Feb
(81) |
Mar
(286) |
Apr
(313) |
May
(154) |
Jun
(85) |
Jul
(8) |
Aug
(11) |
Sep
(12) |
Oct
(14) |
Nov
(6) |
Dec
(6) |
| 2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
(12) |
May
(4) |
Jun
|
Jul
(13) |
Aug
(22) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(46) |
Jun
(43) |
Jul
(46) |
Aug
(9) |
Sep
(13) |
Oct
(31) |
Nov
(42) |
Dec
(18) |
| 2014 |
Jan
(7) |
Feb
(7) |
Mar
(11) |
Apr
(13) |
May
(16) |
Jun
(6) |
Jul
(17) |
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
|
| 2015 |
Jan
|
Feb
(17) |
Mar
(4) |
Apr
(3) |
May
(2) |
Jun
(3) |
Jul
(2) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
|
2
|
3
|
|
4
|
5
|
6
|
7
|
8
(1) |
9
|
10
|
|
11
(4) |
12
(2) |
13
|
14
|
15
|
16
|
17
|
|
18
|
19
|
20
|
21
|
22
|
23
|
24
|
|
25
|
26
|
27
(3) |
28
|
29
|
30
|
31
|
|
From: <ki...@us...> - 2003-05-27 05:29:30
|
Update of /cvsroot/flora/flora2/demos
In directory sc8-pr-cvs1:/tmp/cvs-serv3616a
Modified Files:
tree_traversal.flr
Log Message:
fixed infinite loop
Index: tree_traversal.flr
===================================================================
RCS file: /cvsroot/flora/flora2/demos/tree_traversal.flr,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- tree_traversal.flr 18 May 2002 17:43:27 -0000 1.1.1.1
+++ tree_traversal.flr 27 May 2003 05:29:27 -0000 1.2
@@ -35,7 +35,7 @@
%% This one measures cpu time for method M.
X[cpu(M)->T] :-
- cputime(T0)@prolog(), X[M->V], cputime(T1)@prolog(),
+ cputime(T0)@prolog(), atom(M)@prolog(), X[M->V], cputime(T1)@prolog(),
T is T1-T0,
write('Value of ')@prolog(),
write(X)@prolog(),
|
|
From: <ki...@us...> - 2003-05-27 05:08:34
|
Update of /cvsroot/flora/flora2/docs
In directory sc8-pr-cvs1:/tmp/cvs-serv31254
Modified Files:
flora2.tex
Log Message:
minor fix
Index: flora2.tex
===================================================================
RCS file: /cvsroot/flora/flora2/docs/flora2.tex,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- flora2.tex 23 Apr 2003 05:25:46 -0000 1.45
+++ flora2.tex 27 May 2003 05:08:31 -0000 1.46
@@ -1901,10 +1901,10 @@
We will explain shortly which {\tt flImport} query should be used in what
situation.
-{\bf Note:} If you are using an interim release of \FLORA, which is
-installed outside of the XSB directory structure, then you must let Prolog
-know the location of your distribution of \FLORA. This is done by executing
-{\tt asserta(library\_directory(path-to-flora))} {\it e.g.},
+{\bf Note:} If \FLORA is installed outside of the XSB directory structure,
+then you must let Prolog know the location of your distribution of \FLORA.
+This is done by executing {\tt asserta(library\_directory(path-to-flora))}
+{\it e.g.},
%%
\begin{verbatim}
?- asserta(library_directory('/home/me/flora2')).
@@ -1932,13 +1932,12 @@
{\tt :- import (flImport)/1 from flora2.}
\end{quote}
%%
- must appear at the top of {\tt test.P}.
- \item The above {\tt flImport} queries must appear near the top of the
- program (prior to any call to \FLORA predicates).
+ must appear near the top of {\tt test.P}, \emph{prior to any call} to
+ \FLORA predicates.
\end{enumerate}
%%
- The first syntax for {\tt flImport} above is used to both import the
+ The first form for {\tt flImport} above is used to both import the
predicate and also load the program file defining it into a given \FLORA
user module. The second syntax is used when the flora program is already
loaded into a module and we only need to import the corresponding
|
|
From: <ki...@us...> - 2003-05-27 04:49:50
|
Update of /cvsroot/flora/flora2/p2h
In directory sc8-pr-cvs1:/tmp/cvs-serv27372a/p2h
Modified Files:
prolog2hilog.c
Log Message:
fixed the bug where p2h{X,hilogpred} would convert it to Prolog.
Index: prolog2hilog.c
===================================================================
RCS file: /cvsroot/flora/flora2/p2h/prolog2hilog.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- prolog2hilog.c 23 Apr 2003 05:17:09 -0000 1.5
+++ prolog2hilog.c 27 May 2003 04:49:46 -0000 1.6
@@ -180,6 +180,8 @@
/* Don't convert if already Prolog */
if (!is_hilog(hterm,apply)) return hterm;
+ /* Don't convert if formula (predicate or molecule) */
+ if (is_formula(hterm)) return hterm;
arity=p2c_arity(hterm);
@@ -233,6 +235,7 @@
/* Don't convert if already HiLog */
if (is_hilog(pterm,apply)) return pterm;
+ /* Don't convert if formula (predicate or molecule) */
if (is_formula(pterm)) return pterm;
arity = p2c_arity(pterm);
@@ -318,6 +321,8 @@
}
+/* This detects both HiLog terms and predicates, but we really need to check
+ for HiLog terms only */
static int is_hilog(prolog_term term, char *apply_funct)
{
size_t length_diff;
|
|
From: <ki...@us...> - 2003-05-12 04:55:24
|
Update of /cvsroot/flora/flora2 In directory sc8-pr-cvs1:/tmp/cvs-serv11831 Modified Files: flrcompiler.P Log Message: fixed the bug with reified if-the-else and the like. Index: flrcompiler.P =================================================================== RCS file: /cvsroot/flora/flora2/flrcompiler.P,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- flrcompiler.P 23 Apr 2003 05:17:13 -0000 1.23 +++ flrcompiler.P 12 May 2003 04:55:20 -0000 1.24 @@ -3223,7 +3223,7 @@ ****************************************************************************/ compile_reifyop(Formula,Object,OidCode,Status) :- compile_body(Formula,Object1,Status), - (is_florasyslib_struct(Object1, Index,_Fun,_N,Args) + (is_florasyslib_struct(Object1, Index,FLLIBMODLIT,_N,Args) %% It is compiled into a LIBMODLIT/2: replace with LIBMODOBJ -> new_varobj(Index,Object), |
|
From: <ki...@us...> - 2003-05-12 02:38:42
|
Update of /cvsroot/flora/flora-testsuite/apptests/programs
In directory sc8-pr-cvs1:/tmp/cvs-serv4477/apptests/programs
Modified Files:
Grade.flr
Log Message:
adjusted for the change that eliminates :- arguments
Index: Grade.flr
===================================================================
RCS file: /cvsroot/flora/flora-testsuite/apptests/programs/Grade.flr,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Grade.flr 23 Apr 2003 05:28:45 -0000 1.4
+++ Grade.flr 12 May 2003 02:38:39 -0000 1.5
@@ -30,7 +30,7 @@
histogram(null,null,null,null).
%% Redirect the output from Goal to File
-print_to_file(File,${Goal}) :-
+print_to_file(File,Goal) :-
tell(File)@prolog(),
cputime(Start)@prolog(),
Goal,
|
|
From: <ki...@us...> - 2003-05-11 21:10:14
|
Update of /cvsroot/flora/flora2/docs
In directory sc8-pr-cvs1:/tmp/cvs-serv31505/docs
Added Files:
florablurb.tex
Log Message:
added blurb
--- NEW FILE: florablurb.tex ---
\documentclass[11pt]{article}
\usepackage{epsf,epsfig,subfigure,latexsym,latexsym,amssymb,alltt}
\usepackage{xspace,graphicx,makeidx}
\usepackage{hyperref}
\pagestyle{headings}
\bibliographystyle{plain}
\newtheorem{example}{Example}[section]
\newcommand{\FLIP}{{\mbox{\sc Flip}}\xspace}
\newcommand{\FLORA}{{\mbox{\sc ${\cal F}${lora}\rm\emph{-2}}}\xspace}
\newcommand{\FLORAone}{{\mbox{${\cal F}${\sc lora}}}\xspace}
\newcommand{\FLORID}{{\mbox{\sc Florid}}\xspace}
\newcommand{\fl}{\mbox{F-logic}\xspace}
\begin{document}
\pagenumbering{arabic}
\setcounter{page}{1}
\section{FLORA-2}
\FLORA is a sophisticated object-oriented knowledge base language and
application development platform. It is implemented as a set of run-time
libraries and a compiler that translates a unified language of \fl
\cite{KLW95}, HiLog \cite{hilog-jlp}, and Transaction Logic
\cite{trans-chapter-98,trans-tcs94} into tabled Prolog code.
Applications of \FLORA include intelligent agents, Semantic Web, ontology
management, integration of information, and others.
\index{FLIP}
\index{FLORID}
%%
The programming language supported by \FLORA is a dialect of \fl with
numerous extensions, which include a natural way to do meta-programming in
the style of HiLog and logical updates in the style of Transaction
Logic. \FLORA was designed with extensibility and flexibility in mind, and
it provides strong support for modular software design through its unique
feature of dynamic modules.
Other extensions, such as the versatile syntax of \FLORID path
expressions, are borrowed from
\FLORID, a C++-based \fl system developed at
Freiburg University.\footnote{
%%
See {\tt http://www.informatik.uni-freiburg.de/$\sim$dbis/florid/} for more
details.
%%
}
%%
Extensions aside, the syntax of \FLORA differs in many
important ways from \FLORID, from the original version of \fl, as described
in \cite{KLW95}, and from an earlier implementation of \FLORAone. These
syntactic changes were needed in order to bring the syntax of \FLORA closer
to that of Prolog and make it possible to include simple Prolog programs
into \FLORA programs without choking the compiler. Other syntactic
deviations from the original F-logic syntax are a direct consequence of the
added support for HiLog, which obviates the need for the ``@'' sign in
method invocations (this sign is now used to denote calls to \FLORA
modules).
\FLORA is distributed in two ways. First, it is part of the official
distribution of XSB and thus is installed together with XSB. Second, a
more up-to-date version of the system is available on \FLORA's Web site at
%%
\begin{quote}
{\tt http://flora.sourceforge.net}
\end{quote}
%%
These two versions can be
installed at the same time and used independently ({\it e.g.}, if you want
to keep abreast with the development of \FLORA or if a newer version was
released in-between the releases of XSB). The installation instructions are
somewhat different in these two cases. Here we only describe the process of
configuring the version \FLORA included with XSB.
\paragraph{Installing \FLORA under UNIX.}
To configure a version of \FLORA that was downloaded as part of the
distribution of XSB, simply configure XSB as usual:
%%
\begin{verbatim}
cd XSB/build
configure
makexsb
\end{verbatim}
%%
and then run
%%
\begin{verbatim}
makexsb packages
\end{verbatim}
%%
If you downloaded XSB from its CVS repository earlier and are updating your
copy using the {\tt cvs update} command, then it might be a good idea to
also do the following:
%%
\begin{verbatim}
cd packages/flora2
makeflora clean
makeflora
\end{verbatim}
%%
\paragraph{Installing \FLORA in Windows.}
First, you need Microsoft's {\tt nmake}.
Then use the following commands to configure
\FLORA (assuming that XSB is already installed and configured):
%%
\begin{verbatim}
cd flora2
makeflora clean
makeflora path-to-prolog-executable
\end{verbatim}
%%
Also make sure that the {\tt packages} directory contains a
shortcut called {\tt flora2.P} to the file
{\tt packages$\backslash$flora2$\backslash$flora2.P}.
\paragraph{Running \FLORA.}
\FLORA is fully integrated into the underlying XSB engine, including its
module system. In particular, \FLORA modules can invoke predicates defined in
other Prolog modules, and Prolog modules can query the objects defined in
\FLORA modules.
\index{local scheduling in XSB}
%%
Due to certain problems with XSB, \FLORA runs best when XSB is configured
with \emph{local} scheduling, which is the default XSB configuration.
However, with this type of scheduling, many Prolog intuitions that relate
to the operational semantics do not work. Thus, the programmer must think
``more declaratively'' and, in particular, to not rely on the
order in which answers are returned.
\index{runflora script}
\label{runflora-page}
%%
The easiest way to get a feel of the system
is to start \FLORA shell and begin to enter queries interactively.
The simplest way to do this is to use the shell script
%%
\begin{verbatim}
.../flora2/runflora
\end{verbatim}
%%
where ``...'' is the directory where \FLORA is downloaded. For instance, to
invoke the version supplied with XSB, you would type something like
%%
\begin{verbatim}
~/XSB/packages/flora2/runflora
\end{verbatim}
%%
At this point, \FLORA takes over and \fl syntax becomes the
norm. To get back to the Prolog command loop, type {\tt Control-D}
(Unix) or Control-Z (Windows), or
%%
\begin{quote}
\tt
| ?- flEnd.
\end{quote}
%%
\noindent
If you are using \FLORA shell frequently, it pays to define an alias, say
(in Bash):
%%
\begin{verbatim}
alias runflora='~/XSB/packages/flora2/runflora'
\end{verbatim}
%%
\FLORA can then be invoked directly from the shell prompt by typing
{\tt runflora}.
%%
It is even possible to tell \FLORA to execute commands on start-up.
For instance,
%%
\begin{verbatim}
foo> runflora -e "flHelp."
\end{verbatim}
%%
will cause the system to execute the help command right after after the
initialization. Then the usual \FLORA shell prompt is displayed.
\noindent
\FLORA comes with a number of demo programs that live in
%%
\begin{quote}
\verb|.../flora2/demos/|
\end{quote}
%%
The demos can be run issuing the command
``\verb|flDemo(demo-filename).|''
at the \FLORA prompt, {\it e.g.},
%%
\begin{quote}
\verb|flora2 ?- flDemo(flogic_basics).|
\end{quote}
%%
There is no need to change to the demo directory, as {\tt flDemo} knows
where to find these programs.
\end{document}
|
|
From: <ki...@us...> - 2003-05-11 21:09:43
|
Update of /cvsroot/flora/flora2/demos In directory sc8-pr-cvs1:/tmp/cvs-serv31284/demos Added Files: owl_benchmark.flr Log Message: added owl benchmark --- NEW FILE: owl_benchmark.flr --- %% OWL in Flora-2 (v0.2) %% %% Contributed by Harry Chen <har...@um...> %% % The followings are used by nsexpand.pl to replace shortname URI % with fully qualified URI. % % namespace owl_ http://www.w3.org/2002/07/owl# % namespace xsd_ http://www.w3.org/2001/XMLSchema# % namespace rdfs_ http://www.w3.org/2000/01/rdf-schema# % namespace rdf_ http://www.w3.org/1999/02/22-rdf-syntax-ns# % namespace dc_ http://purl.org/dc/elements/1.1/# %%%%%%%%%%%%%%%%%%%% RDF-S Part %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% RDF-S in Flora-2 (v0.2) %% %% This Flora-2 program provides an inference mechanism to reason over %% RDF-S data model and ontologies defined in RDF-S. This program is a %% part of the F-OWL system (a larger program that provides inferences %% for the OWL language). %% %% The inference mechanism in this program is built on the N-Triple %% representation of RDF statements. N-Triples are mapped into Flora-2 %% as F-logic formulas. Logic inferences are done in the allowable %% F-logic reasoning in Flora-2/XSB. %% %% NOTE: This is the source file for RDF-S inferences. All namespace %% URI should be declared in their "shortname" (e.g., rdf_, rdfs_). %% For more information, see doc/fowl-rdfs-intro.pdf. %% %% Credit: The initial mapping from N-Triple to Flora-2 are adopted %% from http://www.agfa.com/w3c/euler/rdfs-rules %% %% Author: Harry Chen, Tim Finin %% $Revision: 1.1 $, $Date: 2003/05/11 21:09:41 $ %% % The followings are used by nsexpand.pl to replace shortname URI % with fully qualified URI. % % namespace owl_ http://www.w3.org/2002/07/owl# % namespace xsd_ http://www.w3.org/2001/XMLSchema# % namespace rdfs_ http://www.w3.org/2000/01/rdf-schema# % namespace rdf_ http://www.w3.org/1999/02/22-rdf-syntax-ns# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% RDF-S Data Model Statements: Flora-2 atomic formulas that %% defines the RDF-S data model. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% rdf_Property : rdfs_Class. rdfs_Datatype : rdfs_Class. rdfs_Literal : rdfs_Class. rdfs_Resource : rdfs_Class. rdfs_Class : rdfs_Class. rdf_Statement : rdfs_Class. rdfs_Container : rdfs_Class. rdfs_Datatype :: rdfs_Class. rdf_Seq :: rdfs_Container. rdf_Alt :: rdfs_Container. rdf_Bag :: rdfs_Container. rdfs_ContainerMembershipProperty :: rdf_Property. rdf_XMLLiteral : rdfs_Datatype. rdfs_comment : rdfs_Property. rdfs_comment[rdfs_domain->rdfs_Resource]. rdfs_comment[rdfs_range->rdfs_Literal]. rdf_first : rdf_Property. rdf_first[rdfs_domain->rdf_List]. rdf_first[rdfs_range->rdfs_Resource]. rdfs_label : rdf_Property. rdfs_label[rdfs_domain->rdfs_Resource]. rdfs_label[rdfs_range->rdfs_Literal]. rdf_nil : rdf_List. rdf_subject : rdf_Property. rdf_subject[rdfs_domain->rdf_Statement]. rdf_subject[rdfs_range->rdfs_Resource]. rdf_object : rdf_Property. rdf_object[rdfs_domain->rdf_Statement]. rdf_object[rdfs_range->rdfs_Resource]. rdf_predicate : rdf_Property. rdf_predicate[rdfs_domain->rdf_Statement]. rdf_predicate[rdfs_range->rdfs_Resource]. rdfs_domain : rdf_Property. rdfs_domain[rdfs_domain->rdf_Property]. rdfs_domain[rdfs_range->rdfs_Class]. rdfs_range : rdf_Property. rdfs_range[rdfs_domain->rdf_Property]. rdfs_range[rdfs_range->rdfs_Class]. rdf_rest : rdf_Property. rdf_rest[rdfs_domain->rdf_List]. rdf_rest[rdfs_range->rdf_List]. rdfs_subClassOf : rdf_Property. rdfs_subClassOf[rdfs_domain->rdfs_Class]. rdfs_subClassOf[rdfs_range->rdfs_Class]. rdfs_subPropertyOf : rdf_Property. rdfs_subPropertyOf[rdfs_domain->rdf_Property]. rdfs_subPropertyOf[rdfs_range->rdf_Property]. rdf_type : rdf_Property. rdf_type[rdfs_range->rdfs_Class]. rdf_type[rdfs_domain->rdfs_Resource]. rdf_value : rdf_Property. rdf_value[rdfs_domain->rdfs_Resource]. rdf_value[rdfs_range->rdfs_Resource]. rdfs_member : rdf_Property. rdfs_member[rdfs_domain->rdfs_Resource]. rdfs_member[rdfs_range->rdfs_Resource]. rdfs_seeAlso : rdf_Property. rdfs_seeAlso[rdfs_domain->rdfs_Resource]. rdfs_seeAlso[rdfs_range->rdfs_Resource]. rdfs_isDefinedBy[rdfs_subPropertyOf->rdfs_seeAlso]. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% RDF-S Data Model Inference Rule: Flora-2 rules that defines %% logic inferences that can be made over the RDF-S data model. %% %% In v0.2, all RDF statements are assumed to be have %% representation rdf(<subject>,<predicate>,<value>) and are %% loaded into the XSB "main" module (not any another module). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Rule D1 %% Maps all N-triple statements into Flora data atoms S[P->O] :- rdf(S,P,O). %% Rule D2 %% Maps all RDF-S "Property" into Flora signature atoms X[P=>>O] :- P[rdfs_domain->X, rdfs_range->O], P : rdf_Property, X : rdfs_Class, O : rdfs_Class. %% Rule D3 %% Infers an instance of a class from Flora data and signature atoms. %% i.e., X is an instance of C if X is the value of some property P, %% and P has some defined Flora class schema C. X : C :- _[Prop *-> X, Prop *=> C]. %% Rule D4 %% Maps all RDF-S "Class" definitions into Flora data atoms. C : rdfs_Class :- C[rdf_type->rdfs_Class]. %% Rule D5 %% Maps all RDF "Property" definitions into Flora data atoms. X : rdf_Property :- X[rdf_type->rdf_Property]. %% Rule D6 %% Maps all subclasses relationship into Flora data atoms %% NOTE: this rule depends on Rule D3. C1 :: C2 :- C1 : rdfs_Class, C2 : rdfs_Class, C1[rdfs_subClassOf->C2]. %% Rule D7 %% Defines all RDF-S "Classes" are subclasses of the RDF-S "Resource". %% According to the RDF-S spec, Resource is also subclass of itself. %% However, because Flora-2 does not allow an object to be defined as %% a subclass of itself (i.e., C :: C is not allowed), we exclude %% "Resource" from being a subclass of itself. C :: rdfs_Resource :- C : rdfs_Class, tnot(C=rdfs_Resource). %% Rule D8 %% Defines everything is an instance of the class "Resource" Subject : rdfs_Resource :- Subject[_Predicate->_Value]. Value : rdfs_Resource :- _Subject[_Predicate->Value]. %% Rule D9 %% Infers all instances of a class from the rdf:type property. X : C :- X[rdf_type->C], C : rdfs_Class, X : rdfs_Resource. %% Rule D10 %% Infers all instances of a class from the rdfs:domain property. X : C :- X[P->_], P[rdfs_domain->C]. %% Rule D11 %% Infers all instances of a class from the rdfs:range property. X : C :- X[_->O], O[rdfs_range->C]. %% Rule D12 %% Defines inheritence over the property of a class. %% If C1 is a subclass of of C2 and C2 has property P with range O, %% then C1 also has property P with range O. C1[P=>>O] :- C1 :: C2, C2[P=>>O], C1 : rdfs_Class, C2 : rdfs_Class, P : rdf_Property, O : rdfs_Resource. %% Rule D13 %% Defines rdfs:subPropertyOf is a transitive property. %% (NOT TESTED) P1[rdfs_subPropertyOf->P2] :- P1[rdfs_subPropertyOf->X], X[rdfs_subPropertyOf->P2], tnot(P1=P2). %% Rule D14 %% Defines the property value of a class is a super-set of its all %% sub-property values. (NOT TESTED) %S[P1->O] :- P2[rdfs_subPropertyOf->P1], S[P2*->O]. %% Rule D15 %% Defines inheritence over the domain property. A sub-property %% inherits the domain value of its parent property. P[rdfs_domain->O] :- P[rdfs_subPropertyOf->SP], SP[rdfs_domain->O]. %% Rule D16 %% Defines inheritence over the range property. A sub-property %% inherits the range value of its parent property. P[rdfs_range->O] :- P[rdfs_subPropertyOf->SP], SP[rdfs_range->O]. %% Rule D17 %% Infers each instance of rdfs:ContainerMembershipProperty is an %% rdfs:subPropertyOf the rdfs:member property. X[rdfs_subPropertyOf -> rdfs_member] :- X:rdfs_ContainerMembershipProperty. %% Rule D18 %% Infers each instance of rdfs:Datatype is a subclass of the rdfs:Literal. X :: rdfs_Literal :- X : rdfs_Datatype. %%%%%%%%%%%%%%%%%% OWL Part %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 'http://www.w3.org/2002/07/owl':owl_Ontology. 'http://www.w3.org/2002/07/owl'[owl_versionInfo -> "March 18. 2003, GS"]. 'http://www.w3.org/2002/07/owl'[owl_imports -> 'http://www.w3.org/2000/01/rdf-schema']. 'http://www.w3.org/2002/07/owl'[dc_title -> "Classes and properties for the Web Ontology Language OWL"]. 'http://www.w3.org/2002/07/owl'[dc_creator -> "W3C Web Ontology (WebOnt) Working Group"]. 'http://www.w3.org/2002/07/owl'[dc_subject -> "OWL; Web Ontology Language; Semantic Web"]. 'http://www.w3.org/2002/07/owl'[dc_publisher -> "W3C"]. 'http://www.w3.org/2002/07/owl'[dc_date -> "2003-02-10"]. 'http://www.w3.org/2002/07/owl'[dc_format -> "text/xml"]. 'http://www.w3.org/2002/07/owl'[dc_language -> "en"]. 'http://www.w3.org/2002/07/owl'[dc_identifier -> "http://www.w3.org/2002/07/owl"]. owl_Class:rdfs_Class. owl_Class[rdfs_label -> "Class"]. owl_Class::rdfs_Class. owl_Thing:owl_Class. owl_Thing[rdfs_label -> "Thing"]. owl_Nothing:owl_Class. owl_ARP8:owl_Class. owl_ARP8[owl_complementOf -> owl_Nothing]. owl_ARP7[rdf_first -> owl_ARP8]. owl_ARP7[rdf_rest -> rdf_nil]. owl_ARP7:rdf_List. owl_ARP5[rdf_first -> owl_Nothing]. owl_ARP5[rdf_rest -> owl_ARP7]. owl_ARP5:rdf_List. owl_Thing[owl_unionOf -> owl_ARP5]. owl_Nothing:owl_Class. owl_Nothing[rdfs_label -> "Nothing"]. owl_Nothing[owl_complementOf -> owl_Thing]. owl_equivalentClass:rdf_Property. owl_equivalentClass[rdfs_label -> "equivalentClass"]. owl_equivalentClass[rdfs_subPropertyOf -> rdfs_subClassOf]. owl_equivalentClass[rdfs_domain -> owl_Class]. owl_equivalentClass[rdfs_range -> owl_Class]. owl_disjointWith:rdf_Property. owl_disjointWith[rdfs_label -> "disjointWith"]. owl_disjointWith[rdfs_domain -> owl_Class]. owl_disjointWith[rdfs_range -> owl_Class]. owl_equivalentProperty:rdf_Property. owl_equivalentProperty[rdfs_label -> "equivalentProperty"]. owl_equivalentProperty[rdfs_subPropertyOf -> rdfs_subPropertyOf]. owl_sameIndividualAs:rdf_Property. owl_sameIndividualAs[rdfs_label -> "sameIndividualAs"]. owl_sameIndividualAs[rdfs_domain -> owl_Thing]. owl_sameIndividualAs[rdfs_range -> owl_Thing]. owl_sameIndividualAs[rdfs_subPropertyOf -> owl_sameAs]. owl_sameAs:rdf_Property. owl_sameAs[rdfs_label -> "sameAs"]. owl_sameAs[rdfs_subPropertyOf -> owl_sameIndividualAs]. owl_differentFrom:rdf_Property. owl_differentFrom[rdfs_label -> "differentFrom"]. owl_differentFrom[rdfs_domain -> owl_Thing]. owl_differentFrom[rdfs_range -> owl_Thing]. owl_AllDifferent:rdfs_Class. owl_AllDifferent[rdfs_label -> "AllDifferent"]. owl_distinctMembers:rdf_Property. owl_distinctMembers[rdfs_label -> "distinctMembers"]. owl_distinctMembers[rdfs_domain -> owl_AllDifferent]. owl_distinctMembers[rdfs_range -> rdf_List]. owl_unionOf:rdf_Property. owl_unionOf[rdfs_label -> "unionOf"]. owl_unionOf[rdfs_domain -> owl_Class]. owl_unionOf[rdfs_range -> rdf_List]. owl_intersectionOf:rdf_Property. owl_intersectionOf[rdfs_label -> "intersectionOf"]. owl_intersectionOf[rdfs_domain -> owl_Class]. owl_intersectionOf[rdfs_range -> rdf_List]. owl_complementOf:rdf_Property. owl_complementOf[rdfs_label -> "complementOf"]. owl_complementOf[rdfs_domain -> owl_Class]. owl_complementOf[rdfs_range -> owl_Class]. owl_oneOf:rdf_Property. owl_oneOf[rdfs_label -> "oneOf"]. owl_oneOf[rdfs_domain -> owl_Class]. owl_oneOf[rdfs_range -> rdf_List]. owl_Restriction:rdfs_Class. owl_Restriction[rdfs_label -> "Restriction"]. owl_Restriction::owl_Class. owl_onProperty:rdf_Property. owl_onProperty[rdfs_label -> "onProperty"]. owl_onProperty[rdfs_domain -> owl_Restriction]. owl_onProperty[rdfs_range -> rdf_Property]. owl_allValuesFrom:rdf_Property. owl_allValuesFrom[rdfs_label -> "allValuesFrom"]. owl_allValuesFrom[rdfs_domain -> owl_Restriction]. owl_allValuesFrom[rdfs_range -> rdfs_Class]. owl_someValuesFrom:rdf_Property. owl_someValuesFrom[rdfs_label -> "someValuesFrom"]. owl_someValuesFrom[rdfs_domain -> owl_Restriction]. owl_someValuesFrom[rdfs_range -> rdfs_Class]. owl_minCardinality:rdf_Property. owl_minCardinality[rdfs_label -> "minCardinality"]. owl_minCardinality[rdfs_domain -> owl_Restriction]. owl_minCardinality[rdfs_range -> xsd_nonNegativeInteger]. owl_maxCardinality:rdf_Property. owl_maxCardinality[rdfs_label -> "maxCardinality"]. owl_maxCardinality[rdfs_domain -> owl_Restriction]. owl_maxCardinality[rdfs_range -> xsd_nonNegativeInteger]. owl_cardinality:rdf_Property. owl_cardinality[rdfs_label -> "cardinality"]. owl_cardinality[rdfs_domain -> owl_Restriction]. owl_cardinality[rdfs_range -> xsd_nonNegativeInteger]. owl_ObjectProperty:rdfs_Class. owl_ObjectProperty[rdfs_label -> "ObjectProperty"]. owl_ObjectProperty::rdf_Property. owl_DatatypeProperty:rdfs_Class. owl_DatatypeProperty[rdfs_label -> "DatatypeProperty"]. owl_DatatypeProperty::rdf_Property. owl_inverseOf:rdf_Property. owl_inverseOf[rdfs_label -> "inverseOf"]. owl_inverseOf[rdfs_domain -> owl_ObjectProperty]. owl_inverseOf[rdfs_range -> owl_ObjectProperty]. owl_TransitiveProperty:rdfs_Class. owl_TransitiveProperty[rdfs_label -> "TransitiveProperty"]. owl_TransitiveProperty::owl_ObjectProperty. owl_SymmetricProperty:rdfs_Class. owl_SymmetricProperty[rdfs_label -> "SymmetricProperty"]. owl_SymmetricProperty::owl_ObjectProperty. owl_FunctionalProperty:rdfs_Class. owl_FunctionalProperty[rdfs_label -> "FunctionalProperty"]. owl_FunctionalProperty::rdf_Property. owl_InverseFunctionalProperty:rdfs_Class. owl_InverseFunctionalProperty[rdfs_label -> "InverseFunctionalProperty"]. owl_InverseFunctionalProperty::rdf_Property. owl_AnnotationProperty:rdfs_Class. owl_AnnotationProperty::rdf_Property. rdfs_label:owl_AnnotationProperty. rdfs_comment:owl_AnnotationProperty. rdfs_seeAlso:owl_AnnotationProperty. rdfs_isDefinedBy:owl_AnnotationProperty. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% OWL-Lite Model Inference Rules %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Rule D1 %% All classes are subclasses of owl:Thing %% NOTE: owl:Thing is excluded because Flora2 does not allow %% an object to be defined as an instance and subclass of itself. C :: owl_Thing :- C : owl_Class, tnot(C=owl_Thing). %% Rule D2 %% Defines an instances of a class using the owl:allValuesFrom property. %% For a triple S[P->X] and a restriction class R with property P that has %% owl:allValuesFrom class C, X is a type of C if S is a type of R. X : C :- R[owl_onProperty->P], R[owl_allValuesFrom->C], S:R, S[P->X]. %% Rule D3 %% Defines the owl:inverseOf property P[owl_inverseOf->Q] :- Q[owl_inverseOf->P], tnot(P=Q). O[Q->S] :- P[owl_inverseOf->Q], S[P->O]. %% Rule D4 %% Defines the owl:SymmetricProperty O[P->S] :- P:owl_SymmetricProperty, S[P->O], tnot(S=O). %% Rule D5 %% Defines the owl:TransitiveProperty S[P->O] :- P:owl_TransitiveProperty, S[P->X], X[P->O], tnot(S=O). %% Rule D6 %% Defines the equivalence of two properties, NOT property equality. %% This rule defines two properties to have the same values. However, %% these two properties may have different intensional meaning. %% NOTE: DISABLED BECAUSE OF AN UNKNOWN BUG IN FLORA2 %P[owl_equivalentProperty->Q] :- P : rdf_Property, Q : rdf_Property, % P=Q %% Rule D6a %% Defines owl:equivalentProperty is transitive and symmetrical. P[owl_equivalentProperty->Q] :- P[owl_equivalentProperty->R], R[owl_equivalentProperty->Q]. S[R->O] :- P[owl_equivalentProperty->R], S[P->O]. %% Rule D7 %% Defines an individual is the same as itself. %% NOTE: DISABLED BECAUSE OF AN UNKNOWN BUG IN FLORA2 %X[owl_sameAs->Y] :- X=Y, X : _, Y : _. X[owl_sameAs->Z] :- X[owl_sameAs->Y], Y[owl_sameAs->Z]. %% Rule D8 %% Infers two distinctive individuals are the same individual %% if they are the objects of the same functional property. X[owl_sameAs->Y] :- P:owl_FunctionalProperty, S[P->X], S[P->Y]. %% Rule D9 %% Infers two distinctive individuals are the same individual %% if they are the subjects of the same inverse functional property X[owl_sameAs->Y] :- P:owl_InverseFunctionalProperty, X[P->O], Y[P->O]. %% Rule D10 %% Infers two distinctive individuals are the same individual %% if they are the objects of some property P which is the property %% of a restricted class, and this property is restricted to have %% max cardinality of 1. X[owl_sameAs->Y] :- R[owl_onProperty->P], R[owl_maxCardinality->"1"], S:R, S[P->X], S[P->Y]. %% RD10a %% Defines the property values of two distinctive individuals are the %% same if they are defined be to the same thing using owl:sameAs Z[P->Y] :- X[owl_sameAs->Z], X[P->Y], tnot(P=owl_sameAs). %% Rule D13 P:owl_InverseFunctionalProperty :- P[owl_inverseOf->Q], Q : owl_FunctionalProperty. %% Rule D14 P:owl_FunctionalProperty :- P[owl_inverseOf->Q], Q : owl_InverseFunctionalProperty. %% Rule D15 %% Defines a property to have cardinality M if the property has both %% maxCardinality and minCardinality M. R[owl_cardinality->M] :- R[owl_onProperty->_], R[owl_minCardinality->M], R[owl_maxCardinality->M]. %% Rule D16 %% Defines a property to have maxCardinality M if the property has %% cardinality M. R[owl_minCardinality->M] :- R[owl_onProperty->_], R[owl_cardinality->M]. %% Rule D17 %% Defines a property to have minCardinality M if the property has %% cardinality M. R[owl_maxCardinality->M] :- R[owl_onProperty->_], R[owl_cardinality->M]. %% Rule D18 %% Infers two individual are different if each of them belongs to two %% disjoint classes X[fowl_differentFrom->Y] :- X : A, Y : B, A[owl_disjointWith->B], tnot(X=Y). %% Rule D19 %% Infers two distinctive items X and Y are different from each other %% if they are items on a list L which is the object of an %% owl:distinctMembers property. X[owl_differentFrom->Y] :- X[fowl_differentFrom->Y]. X[fowl_differentFrom->Y] :- Y[fowl_differentFrom->X], tnot(X=Y). X[fowl_differentFrom->Y] :- L[rdf_first->X], L[rdf_rest->M], M[fowl_item->Y], _[owl_distinctMembers->L]. %% Rule D20 %% Defines any class is equivalent to itself. %% NOTE: DISABLED BECAUSE OF AN UNKNOWN BUG IN FLORA2 %X[owl_equivalentClass->Y] :- X : owl_Class, Y : owl_Class, X = Y. %% Rule D21 %% Defines owl:equivalentClass property is transitive & symmetrical. X[owl_equivalentClass->Z] :- X[owl_equivalentClass->Y], Y[owl_equivalentClass->Z]. %% Rule D22 %% Infers all instance of a class are also instances of another class that %% this class equivalent to. X : C2 :- X : C1, C1[owl_equivalentClass->C2]. %% Rule 20 %% Infers two unamed class defined by property restriction are %% equivalent if they have the same cardinality restriction on the %% same property %A[owl_equivalentClass->B] :- A[owl_onProperty->P], % A[owl_cardinality->M], % B[owl_onProperty->P], % B[owl_cardinality->M]. %% Rule 21 %% Infers two classes are equivalent if they are the complement of %% the same class. %% NOTE: DISABLED BECAUSE IT HAS NOT BEEN TESTED %A[owl_equivalentClass->B] :- A[owl_complementOf->C], % B[owl_complementOf->C]. %% Rule 22 %% Infers class A & B are equivalent if class B is the intersection %% of a list which only has one item A. %% NOTE: DISABLED BECAUSE IT HAS NOT BEEN TESTED %A[owl_equivalentClass->B] :- B[owl_intersectionOf->L], % L[rdf_first->A], L[rdf_rest->rdf_nil]. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Rules for supporting reasoning over a Collection of resources %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Rule L1 %% Defines a resource X is an item in a list S if X is %% the first item on the list S. S[fowl_item->X] :- S[rdf_first->X], S : rdf_List. %% Rule L2 %% Define a resource X is an item in a list S if X is the first item %% on some list B which is a part of list S (defined by rdf:rest). S[fowl_item->X] :- S[rdf_rest->B], B[fowl_item->X], S : rdf_List. %% Rule L3 %% Defines rdf:nil is not an item in any list. rdf_nil[fowl_item->_] :- false. %% Rule L4 %% Defines an rdf:List X includes another rdf:List S if %% 1) there are item A and B %% 2) A is the first item in S and B is the head of the rest of S %% 3) A is an item in X %% 4) B is included in X. X[fowl_includes->S] :- S[rdf_first->A], X[fowl_item->A], S[rdf_rest->B], X[fowl_includes->B], X : rdf_List, S : rdf_List, tnot(X=S). %% Rule L5 %% Define any rdf:List always includes rdf:nil X[fowl_includes->rdf_nil] :- X : rdf_List, tnot(X=rdf_nil). %% Rule L6 %X[fowl_oneItemIn->S] :- X[rdf_first->A], S[fowl_item->A], % X[rdf_rest->B], B[fowl_zeroItemsIn->S]. %% Rule L6 %X[fowl_oneItemIn->S] :- X[rdf_first->A], tnot(S[fowl_item->A]), % X[rdf_rest->B], B[fowl_oneItemIn->S]. %% Rule L7 %rdf_nil[fowl_zeroItemsIn->_] :- true. %% Rule L8 %X[fowl_zeroItemsIn->S] :- X[rdf_first->A], tnot(S[fowl_item->A]), % X[rdf_rest->B], B[fowl_zeroItemsIn->S]. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Rules for checking knowledge that is inconsistent with %% the OWL ontology model (only OWL-Lite is supported) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% inconsistent[resource=>>string, errmsg=>>string]. cardinalityInconsistent:inconsistent. beyondOWLLite:inconsistent. %% Rule IC1 %% The cardinality of a restriction class is exactly 1 for its %% owl:onProperty property. cardinalityInconsistent[resource->C, errmsg->"for a restriction class, the cardinality of its owl:onProperty must be 1"] :- C[owl_onProperty->P1], C[owl_onProperty->P2], tnot(P1=P2). %% Rule IC2 (not tested) beyondOWLLite[resource->C, errmsg->" for a restriction class which has a owl:allValuesFrom property, the object must be a named class"] :- C : owl_Restriction, C[owl_allValuesFrom->P], P : owl_Restriction. %%%%%%%%%%%%%%%%%%%%%%%% Animal Info %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Generated by ./nsreduce.pl % namespace http://users.ebiquity.org/~hchen4/ont/animals# animals_ % namespace http://www.w3.org/1999/02/22-rdf-syntax-ns# rdf_ % namespace http://www.w3.org/2000/01/rdf-schema# rdfs_ % namespace http://www.w3.org/2002/07/owl# owl_ % namespace http://www.w3.org/2001/10/XMLSchema# xsd_ rdf(uri("http://users.ebiquity.org/~hchen4/ont/animals"),rdf_type,owl_Ontology ). rdf(uri("http://users.ebiquity.org/~hchen4/ont/animals"),owl_versionInfo,"$Revision: 1.1 $" ). rdf(animals_Animal,rdf_type,owl_Class ). rdf(animals_Animal,rdfs_label,"Animal" ). rdf(animals_Male,rdf_type,owl_Class ). rdf(animals_Male,rdfs_subClassOf,animals_Animal ). rdf(animals_Female,rdf_type,owl_Class ). rdf(animals_Female,rdfs_subClassOf,animals_Animal ). rdf(animals_Man,rdf_type,owl_Class ). rdf(animals_Man,rdfs_subClassOf,animals_Person ). rdf(animals_Man,rdfs_subClassOf,animals_Male ). rdf(animals_HumanBeing,rdf_type,owl_Class ). rdf(animals_HumanBeing,owl_equivalentClass,animals_Person ). rdf(animals_Woman,rdf_type,owl_Class ). rdf(animals_Woman,rdfs_subClassOf,animals_Person ). rdf(animals_Woman,rdfs_subClassOf,animals_Female ). rdf(animals_hasAncestor,rdf_type,owl_ObjectProperty ). rdf(animals_hasAncestor,rdfs_domain,animals_Animal ). rdf(animals_hasAncestor,rdfs_range,animals_Animal ). rdf(animals_hasAncestor,rdf_type,owl_TransitiveProperty ). rdf(animals_hasParent,rdf_type,owl_ObjectProperty ). rdf(animals_hasParent,rdfs_subPropertyOf,animals_hasAncestor ). rdf(animals_hasFather,rdf_type,owl_ObjectProperty ). rdf(animals_hasFather,rdfs_subPropertyOf,animals_hasParent ). rdf(animals_hasFather,rdf_type,owl_FunctionalProperty ). rdf(animals_hasFather,rdfs_range,animals_Male ). rdf(animals_hasMother,rdf_type,owl_ObjectProperty ). rdf(animals_hasMother,rdf_type,owl_FunctionalProperty ). rdf(animals_hasMother,rdfs_subPropertyOf,animals_hasParent ). rdf(animals_hasMother,rdfs_range,animals_Female ). rdf(animals_biologicalMotherOf, rdf_type, owl_ObjectProperty). rdf(animals_biologicalMotherOf, rdf_type, owl_InverseFunctionalProperty). rdf(animals_biologicalMotherOf, rdfs_domain, animals_Woman). rdf(animals_biologicalMotherOf, rdfs_range, animals_Person). rdf(animals_hasFemaleParent,rdf_type,owl_ObjectProperty ). rdf(animals_hasFemaleParent,owl_equivalentProperty,animals_hasMother ). rdf(animals_hasMaleParent,rdf_type,owl_ObjectProperty ). rdf(animals_hasMaleParent,owl_equivalentProperty,animals_hasFather ). rdf(animals_hasDad,rdf_type,owl_ObjectProperty ). rdf(animals_hasDad,owl_equivalentProperty,animals_hasMaleParent). rdf(animals_hasFriend,rdf_type,owl_ObjectProperty ). rdf(animals_hasFriend,rdf_type,owl_SymmetricProperty ). rdf(animals_hasFriend,rdfs_domain,animals_Person). rdf(animals_hasFriend,rdfs_range,animals_Person). rdf(animals_shoesize,rdf_type,owl_DatatypeProperty ). rdf(animals_shoesize,rdf_type,owl_FunctionalProperty ). rdf(animals_shoesize,rdfs_range,xsd_decimal ). rdf(animals_age,rdf_type,owl_DatatypeProperty ). rdf(animals_age,rdf_type,owl_FunctionalProperty ). rdf(animals_age,rdfs_range,xsd_nonNegativeInteger ). rdf(animals_shirtsize,rdf_type,owl_DatatypeProperty ). rdf(animals_shirtsize,rdf_type,owl_FunctionalProperty ). rdf(animals_shirtsize,rdfs_range,xsd_decimal ). rdf(animals_Person,rdf_type,owl_Class ). rdf(animals_Person,rdfs_subClassOf,animals_Animal ). rdf(animals_jARP35,rdf_type,owl_Restriction ). rdf(animals_jARP35,owl_onProperty,animals_hasParent ). rdf(animals_jARP35,owl_allValuesFrom,animals_Person ). rdf(animals_Person,rdfs_subClassOf,animals_jARP35 ). rdf(animals_jARP38,rdf_type,owl_Restriction ). rdf(animals_jARP38,owl_onProperty,animals_hasFather ). rdf(animals_jARP38,owl_cardinality,"1" ). rdf(animals_Person,rdfs_subClassOf,animals_jARP38 ). rdf(animals_jARP40,rdf_type,owl_Restriction ). rdf(animals_jARP40,owl_onProperty,animals_shoesize ). rdf(animals_jARP40,owl_minCardinality,"1" ). rdf(animals_Person,rdfs_subClassOf,animals_jARP40 ). rdf(animals_jARP42,rdf_type,owl_Restriction ). rdf(animals_jARP42,owl_onProperty,animals_hasSpouse ). rdf(animals_jARP42,owl_allValuesFrom,animals_Person ). rdf(animals_jARP42,owl_maxCardinality,"1" ). rdf(animals_Person,rdfs_subClassOf,animals_jARP42 ). rdf(animals_TwoLeggedThing, rdf_type, owl_Class). rdf(animals_TwoLeggedPerson, rdf_type, owl_Class). rdf(animals_jARP34687, rdf_first, animals_TwoLeggedThing). rdf(animals_jARP34687, rdf_rest, rdf_nil). rdf(animals_jARP34687, rdf_type, rdf_List). rdf(animals_jARP34685, rdf_first, animals_Person). rdf(animals_jARP34685, rdf_rest, animals_jARP34687). rdf(animals_jARP34685, rdf_type, rdf_List). rdf(animals_TwoLeggedPerson, owl_intersectionOf, animals_jARP34685). rdf(animals_Harry, rdf_type, animals_TwoLeggedPerson). rdf(animals_hasSpouse, rdf_type, owl_ObjectProperty). rdf(animals_hasSpouse, rdfs_domain, animals_Person). rdf(animals_hasSpouse, rdfs_range, animals_Person). rdf(animals_hasSpouse, rdf_type, owl_FunctionalProperty). rdf(animals_spouseOf, rdf_type, owl_ObjectProperty). rdf(animals_spouseOf, owl_inverseOf, animals_hasSpouse). rdf(animals_hasChild,rdf_type,owl_ObjectProperty ). rdf(animals_hasChild,owl_inverseOf,animals_hasParent ). rdf(animals_hasKid, rdf_type, owl_ObjectProperty). rdf(animals_hasKid, rdfs_subPropertyOf, animals_hasChild). rdf(animals_hasChild, rdfs_subPropertyOf, animals_hasKid). rdf(animals_hasMom,rdf_type,owl_ObjectProperty ). rdf(animals_hasMom,owl_equivalentProperty,animals_hasMother ). rdf(animals_John,rdf_type,animals_Person ). rdf(animals_John,animals_shoesize,"14" ). rdf(animals_John,animals_age,"37" ). rdf(animals_John,animals_shirtsize,"12" ). rdf(animals_Mark,rdf_type,animals_Person). rdf(animals_Mark,animals_shoesize,"8" ). rdf(animals_Mark,animals_age,"18" ). rdf(animals_Mark,animals_shirtsize,"9" ). rdf(animals_Mark,animals_hasFather,animals_John ). rdf(animals_JohnSmith, rdf_type, animals_Animal). rdf(animals_Mark,animals_hasFather,animals_JohnSmith). rdf(animals_David,rdf_type,animals_Person). rdf(animals_David,animals_hasChild,animals_John ). rdf(animals_Alice,rdf_type,animals_Person). rdf(animals_Alice,animals_hasFriend,animals_John ). rdf(animals_Jack,rdf_type,animals_Person). rdf(animals_Jack,animals_hasFriend,animals_Alice ). rdf(animals_Cool_David,owl_sameAs,animals_David). rdf(animals_Tall_David,owl_sameAs,animals_Cool_David). rdf(animals_Eve, rdf_type, animals_Person). rdf(animals_Eve, animals_biologicalMotherOf, animals_John). rdf(animals_Eve, animals_hasSpouse, animals_David). rdf(animals_Eve, animals_hasSpouse, animals_TheBeLovedHusbandOfEve). rdf(animals_TheBeLovedHusbandOfEve, rdf_type, animals_Person). rdf(animals_MotherOfJohn, rdf_type, animals_Person). rdf(animals_MotherOfJohn, animals_biologicalMotherOf, animals_John). rdf(animals_jARP46379, rdf_first, animals_John). rdf(animals_jARP46379, rdf_rest, rdf_nil). rdf(animals_jARP46379, rdf_type, rdf_List). rdf(animals_jARP46377, rdf_first, animals_Jack). rdf(animals_jARP46377, rdf_rest, animals_jARP46379). rdf(animals_jARP46377, rdf_type, rdf_List). rdf(animals_jARP46375, rdf_first, animals_Alice). rdf(animals_jARP46375, rdf_rest, animals_jARP46377). rdf(animals_jARP46375, rdf_type, rdf_List). rdf(animals_jARP46373, rdf_first, animals_David). rdf(animals_jARP46373, rdf_rest, animals_jARP46375) . rdf(animals_jARP46373, rdf_type, rdf_List). rdf(animals_jARP46372, owl_distinctMembers, animals_jARP46373) . rdf(animals_jARP46372, rdf_type, owl_AllDifferent). %%%%%%%%%%%%%%%%%%%%% Query %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ?- (nl, writeln('*** This query runs for a veeeery loooong tiiiime.'))@prolog(), X : owl_Class. |
|
From: <ki...@us...> - 2003-05-11 21:09:22
|
Update of /cvsroot/flora/flora2/debugger
In directory sc8-pr-cvs1:/tmp/cvs-serv31128/debugger
Modified Files:
static_data.in flrdebugger.P dynamic_data.in
Log Message:
debugger/decoder fixes
Index: static_data.in
===================================================================
RCS file: /cvsroot/flora/flora2/debugger/static_data.in,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- static_data.in 24 Mar 2003 08:08:41 -0000 1.11
+++ static_data.in 11 May 2003 21:09:19 -0000 1.12
@@ -81,10 +81,13 @@
%% The following predicates are hidden only under flTrace, not flTraceLow %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-flora_hide_this_hide(FLORA_TNOT_PREDICATE,1).
+flora_hide_this_hide((FLORA_TNOT_PREDICATE)/1).
+%% unclear why the next one is needed to supress 't_not' - maybe a bug in
+%% XSB debugger
+hide_this_hide('t_not',3).
-flora_show_this_hide(flCompile,1).
-flora_show_this_hide(flLoad,1).
+flora_show_this_hide((flCompile)/1).
+flora_show_this_hide((flLoad)/1).
%% These are handled by the debugger only if flTraceLow is NOT in effect.
flora_show_this_hide(FLLIBCOLLECTSET/4).
Index: flrdebugger.P
===================================================================
RCS file: /cvsroot/flora/flora2/debugger/flrdebugger.P,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- flrdebugger.P 21 Mar 2003 02:31:02 -0000 1.10
+++ flrdebugger.P 11 May 2003 21:09:19 -0000 1.11
@@ -201,10 +201,11 @@
%% Rule for handling system modules.
%% This prevents tracing inside flora system modules.
%% We might add a switch that would enable this optionally.
- %% Not clear if this useful.
+ %% Not clear if this is useful.
assert((show_this_hide(X,Y) :-
\+flora_switch(low_level_trace),
- flora_decode_predicate(X,_,WS,_,_,_),
+ functor(PX,X,Y),
+ flora_decode_predicate(PX,_,WS,_,_,_),
flora_module_name(WS,systemmodule,_)
)),
%% Rules for prefixes of predicates that need
@@ -217,25 +218,25 @@
)),
assert((hide_this_show(X,Y) :-
\+flora_switch(low_level_trace),
- (flora_hide_this_show(pref(X1/Y)), atom(X),atom(X1), str_sub(X1,X,0), !
+ ( flora_hide_this_show(pref(X1/Y)), atom(X),atom(X1), str_sub(X1,X,0), !
; flora_hide_this_show(match(X1/Y)), atom(X),atom(X1), str_sub(X1,X), !
)
)),
assert((show_this_hide(X,Y) :-
\+flora_switch(low_level_trace),
- (flora_show_this_hide(pref(X1/Y)), atom(X),atom(X1), str_sub(X1,X,0), !
+ ( flora_show_this_hide(pref(X1/Y)), atom(X),atom(X1), str_sub(X1,X,0), !
; flora_show_this_hide(match(X1/Y)), atom(X),atom(X1), str_sub(X1,X), !
)
)),
assert((trace_this_noprint(X,Y) :-
\+flora_switch(low_level_trace),
- (flora_trace_this_noprint(pref(X1/Y)), atom(X),atom(X1), str_sub(X1,X,0), !
+ ( flora_trace_this_noprint(pref(X1/Y)), atom(X),atom(X1), str_sub(X1,X,0), !
; flora_trace_this_noprint(match(X1/Y)), atom(X),atom(X1), str_sub(X1,X), !
)
)),
assert((trace_this_print(X,Y) :-
\+flora_switch(low_level_trace),
- (flora_trace_this_print(pref(X1/Y)), atom(X),atom(X1), str_sub(X1,X,0), !
+ ( flora_trace_this_print(pref(X1/Y)), atom(X),atom(X1), str_sub(X1,X,0), !
; flora_trace_this_print(match(X1/Y)), atom(X),atom(X1), str_sub(X1,X), !
)
)).
Index: dynamic_data.in
===================================================================
RCS file: /cvsroot/flora/flora2/debugger/dynamic_data.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- dynamic_data.in 25 Jan 2003 21:20:30 -0000 1.7
+++ dynamic_data.in 11 May 2003 21:09:19 -0000 1.8
@@ -172,14 +172,25 @@
flora_hide_this_hide(WRAP_EXISTS/1).
flora_hide_this_hide(WRAP_OBJEQL/2).
-flora_hide_this_hide(match(candidate_object/_)).
-
/***************************************************************************
intermediate F-logic predicates that appear in the trailer
***************************************************************************/
flora_hide_this_hide(silent_sub/2).
flora_show_this_hide(inheritance_sub/2).
+flora_show_this_hide(inheritance_ifd/3).
+flora_show_this_hide(inheritance_imvd/3).
+flora_show_this_hide(inheritance_imvddef/2).
+flora_show_this_hide(inheritance_ifd_eql/3).
+flora_show_this_hide(inheritance_imvd_eql/3).
+flora_show_this_hide(inheritance_imvddef_eql/2).
+
+flora_show_this_hide(match((local_)/2)).
+flora_show_this_hide(match(multiple_object_/_)).
+flora_show_this_hide(match(multiple_class_/_)).
+flora_show_this_hide(match(candidate_object_/_)).
+flora_show_this_hide(match(candidate_class_/_)).
+
/*
%% These are no longer used
|
|
From: <ki...@us...> - 2003-05-11 21:09:21
|
Update of /cvsroot/flora/flora2/syslib
In directory sc8-pr-cvs1:/tmp/cvs-serv31128/syslib
Modified Files:
flrdecode.P
Log Message:
debugger/decoder fixes
Index: flrdecode.P
===================================================================
RCS file: /cvsroot/flora/flora2/syslib/flrdecode.P,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- flrdecode.P 26 Apr 2003 18:03:35 -0000 1.7
+++ flrdecode.P 11 May 2003 21:09:18 -0000 1.8
@@ -138,12 +138,18 @@
; CallType == (inheritance)
-> decode_molecule(Basename,ArgList,Workspace,MolCode,0),
RestCode = ['(Trying to derive by inheritance) '|MolCode]
+ ; CallType == (inheritance_candidate)
+ -> decode_molecule(Basename,ArgList,Workspace,MolCode,0),
+ RestCode = ['(Checking inheritance candidate) '|MolCode]
+ ; CallType == (explicit_definition)
+ -> decode_molecule(Basename,ArgList,Workspace,MolCode,0),
+ RestCode = ['(Checking explicit definition for method) '|MolCode]
; CallType == (dynhead_before)
-> decode_molecule(Basename,ArgList,Workspace,MolCode,0),
- RestCode = ['(Trying to derive by dynamic before-rules) '|MolCode]
+ RestCode = ['(Trying to derive via dynamic before-rules) '|MolCode]
; CallType == (dynhead_after)
-> decode_molecule(Basename,ArgList,Workspace,MolCode,0),
- RestCode = ['(Trying to derive by dynamic after-rules) '|MolCode]
+ RestCode = ['(Trying to derive via dynamic after-rules) '|MolCode]
),
!.
@@ -158,7 +164,7 @@
%% Debugging
flora_decode_goal(Call,_) :-
- flora_abort([Call,': decode_literal_internal/3 failed to decode']).
+ flora_abort([Call,': flora_decode_goal/2 failed to decode']).
%%%%%%%%%%%%%%%%%%%% flora decode oid %%%%%%%%%%%%%%%%%%%%%%%
@@ -190,9 +196,13 @@
%% Wrapper, Args, Code
decode_molecule_base(WRAP_FD, [O,M,V], [O,'[',M,' -> ',V,']']).
+decode_molecule_base(WRAP_FD, [O,M], [O,'[',M,' -> ','_',']']).
decode_molecule_base(WRAP_MVD, [O,M,V], [O,'[',M,' ->> ',V,']']).
+decode_molecule_base(WRAP_MVD, [O,M], [O,'[',M,' ->> ','_',']']).
decode_molecule_base(WRAP_IFD, [O,M,V], [O,'[',M,' *-> ',V,']']).
+decode_molecule_base(WRAP_IFD, [O,M], [O,'[',M,' *-> ','_',']']).
decode_molecule_base(WRAP_IMVD, [O,M,V], [O,'[',M,' *->> ',V,']']).
+decode_molecule_base(WRAP_IMVD, [O,M], [O,'[',M,' *->> ','_',']']).
decode_molecule_base(WRAP_FDSIG, [O,M,V], [O,'[',M,' => ',V,']']).
decode_molecule_base(WRAP_IFDSIG, [O,M,V], [O,'[',M,' *=> ',V,']']).
decode_molecule_base(WRAP_MVDSIG, [O,M,V], [O,'[',M,' =>> ',V,']']).
@@ -449,11 +459,16 @@
%% The following is a debugging statement.
%% Helps weed out calls that should be suppressed by the debugger
/*
- writeln(('Decodecall: ',Call,Type1,Workspace,Prefix,Basename1,ArgList)),
+ writeln(('Decodecall: ',Call,Type1,Workspace,Prefix,Basename1,ArgList,ArgList1)),
*/
(Type1 == (flora)
-> (Prefix==inheritance_
-> Basename = Basename1, Type = (inheritance), ArgList = ArgList1
+
+ ; (Prefix==candidate_class_ ; Prefix==candidate_object_)
+ -> Basename = Basename1, Type = (inheritance_candidate), ArgList = ArgList1
+ ; Prefix==local_
+ -> Basename = Basename1, Type = (explicit_definition), ArgList = ArgList1
; Prefix==dyna_ % This is actually hidden (possible future use)
-> Basename = Basename1, Type = (dynhead_before), ArgList = ArgList1
|
|
From: <ch...@us...> - 2003-05-08 12:22:33
|
Update of /cvsroot/flora/flora2
In directory sc8-pr-cvs1:/tmp/cvs-serv3642
Modified Files:
flrcoder.P flrdependency.H flrdependency.P flrparser.P
Log Message:
fix a bug in dependency checking
Index: flrcoder.P
===================================================================
RCS file: /cvsroot/flora/flora2/flrcoder.P,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- flrcoder.P 27 Mar 2003 11:44:12 -0000 1.16
+++ flrcoder.P 8 May 2003 12:22:29 -0000 1.17
@@ -1193,6 +1193,11 @@
flora_build_struct(Term1,DWS,FLBODYPREFIX,VarList,Code,Spec),
flora_set_counter(using_debug_prefix,OldDbgPref).
+flora_build_struct(Term,DWS,_Prefix,_VarList,Code,(Code,Index)) :-
+ is_prnewoid(Term,Oid,Index),
+ !,
+ flora_build_newoid(Oid,DWS,Code).
+
flora_build_struct(Term,DWS,Prefix,VarList,Code,(CodeInd,Index)) :-
is_flogic(Term,F,N,Args),
!,
@@ -1484,3 +1489,10 @@
****************************************************************************/
flora_build_newpred(F,N,Args,DWS,Prefix,VarList,Code,CodeInd) :-
flora_build_wsliteral(USERMODULE,F,N,Args,DWS,DWS,Prefix,VarList,Code,CodeInd).
+
+/****************************************************************************
+ flora_build_newoid(+Oid,+DWS,-Code)
+****************************************************************************/
+flora_build_newoid(Oid,_DWS,Code) :-
+ flora_concat_atoms([FLORA_SYMBOL,'''',Oid],Code).
+
Index: flrdependency.H
===================================================================
RCS file: /cvsroot/flora/flora2/flrdependency.H,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- flrdependency.H 26 Nov 2002 05:09:49 -0000 1.5
+++ flrdependency.H 8 May 2003 12:22:29 -0000 1.6
@@ -1,7 +1,7 @@
:- import append/3, member/2, length/2 from basics.
-:- import variant/2 from subsumes.
+:- import subsumes/2,variant/2 from subsumes.
:- import
flora_set_counter/2,
Index: flrdependency.P
===================================================================
RCS file: /cvsroot/flora/flora2/flrdependency.P,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- flrdependency.P 26 Mar 2003 17:32:21 -0000 1.5
+++ flrdependency.P 8 May 2003 12:22:29 -0000 1.6
@@ -38,7 +38,7 @@
#include "flora_errors.flh"
#define MAXDEPTH 3
-#define STARTPOINT 0
+#define STARTPOINT 1
#define DEFAULT_WORKSPACE ''
#mode save
@@ -200,8 +200,8 @@
depth(X,0) :- atomic(X), !.
depth(X,0) :- var(X), !.
depth(X,N1) :-
- functor(X,F,_),
- X =.. [F|Y],
+ !,
+ X =.. [_F|Y],
param_depth(Y,N),
N1 is N+1.
@@ -209,7 +209,7 @@
param_depth(+ParamList,-MaxDepth)
given a list of parameters, returns the max depth of all params
****************************************************************************/
-param_depth([X],N) :- depth(X,N).
+param_depth([X],N) :- depth(X,N),!.
param_depth([H|T],N) :-
depth(H,N1),
param_depth(T,N2),
@@ -295,17 +295,20 @@
assert(dependency(Term,Body,anu(A,N,U),Templete)),
assert_dependency_list(Term,T).
-depend_detail((Sk1,IndSk1)) :-
+depend_detail((_Sk1,IndSk1)) :-
retractall(checked(_)),
- L = [(Sk1,(Sk1,IndSk1),anu(_,_,_),STARTPOINT,_)],
+ findall((RuleBody,anu(A,N,U)),
+ same_rule(IndSk1,_RuleHead,RuleBody,anu(A,N,U)), BodyList),
+ my_append([],BodyList,L,STARTPOINT,_Template),
traversal(L).
/****************************************************************************
traversal(+List)
BFS for all possible dependencies from Sk1 to Sk2. Originally List only
- contains Sk1. Sk2 is asserted by target(Sk2). Each time the first element
- of the list is taken out. We find the rules whose heads can unify with this
- element and consider the bodies of those rules. If
+ contains terms that Sk1 directly depends on. Sk2 is asserted by target(Sk2).
+ Each time the first element of the list is taken out. We find the rules
+ whose heads can unify with this element and consider the bodies of those
+ rules. If
1) the rule body unifies with Sk2, then we have found a dependency
2) we have checked the body (asserted by checked/1) with the same (A,N,U)
and Template value, then it will be discarded
@@ -316,19 +319,15 @@
Head = (Term,(T,IndTerm),anu(A,N,U),Times,Template),
compare_with_target(Term,(T,IndTerm),anu(A,N,U),Template),
- ( (checked(CT),variant(CT,(Term,anu(A,N,U),Template))) ->
+ ( (checked((CT,anu(A1,N1,U1),Template1)),
+ subsumes(CT,Term),
+ variant((A1,N1,U1,Template1),(A,N,U,Template))) ->
NewList=Tail
;
assert(checked((Term,anu(A,N,U),Template))),
- ( (Times==STARTPOINT) ->
- findall((RuleBody,anu(A,N,U)),
- same_rule(IndTerm,_RuleHead,RuleBody,anu(A,N,U)),
- BodyList)
- ;
- findall((RuleBody,anu(A,N,U)),
+ findall((RuleBody,anu(A,N,U)),
match_rule(Term,_RuleHead,RuleBody,anu(A,N,U)),
- BodyList)
- ),
+ BodyList),
NewTimes is Times+1,
my_append(Tail,BodyList,NewList,NewTimes,Template)
),
@@ -350,12 +349,9 @@
compare_with_target(Term,(T,IndTerm),anu(A,N,U),Template) :-
target(Sk2),
- ( Term=Sk2 ->
- assert(dependency((T,IndTerm),anu(A,N,U),Template)),
- fail
- ;
- fail
- ).
+ Term=Sk2,
+ assert(dependency((T,IndTerm),anu(A,N,U),Template)),
+ fail.
compare_with_target(_Term,(_T,_IndTerm),anu(_A,_N,_U),_Template).
/****************************************************************************
Index: flrparser.P
===================================================================
RCS file: /cvsroot/flora/flora2/flrparser.P,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- flrparser.P 23 Apr 2003 05:17:13 -0000 1.23
+++ flrparser.P 8 May 2003 12:22:29 -0000 1.24
@@ -3466,11 +3466,13 @@
!,
flora_db_list(Mode,L,T,I,Code,Status).
+/*
flora_db_pathexp(_Mode,ObjectTerm,_Code,Status) :-
%% New oid directive is not allowed in insert/delete
get_spectoken(ObjectTerm,FL_NEWOID),
!,
parsing_error(ObjectTerm,ERROR_NEWOID,Status).
+*/
flora_db_pathexp(_Mode,ObjectTerm,Code,[]) :-
flobject_struct(ObjectTerm,Code),
|