SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
123
Access to Specific Declarative Knowledge
by Expert Systems: The Impact of Logic
Programming
Yannis VASSILIOU, James CLIFFORD, and
Matthias JARKE
ComputerApplicationsandInformation Systems, GraduateSchool
of Business Administration, New York University,NY, USA
As part of the operation of an Expert System, a deductive
component accesses a database of facts to help simulate the
behavior of a human expert in a particular problem domain.
The nature of this access is examined, and four access strategies
are identified. Features of each of these strategies are addressed
within the framework of a logic-based deductive component
and the relational model of data.
Keywords: Expert Systems, Database Management Systems,
Knowledge Representation, Logic Programming,
Relational Database, Relational Algebra, Predicate
Evaluation, Metalevel Evaluation, Language Trans-
lation, Query Optimization.
Jim Clifford is an Assistant Profes-
sor of Computer Applications and In-
formation Systems at New York Uni-
versity. His research interests lie in the
areas of database management, artifi-
cial intelligence, and user interfaces.
His major work has been the develop-
ment of a formal Historical Database
Model (HDBM), an extension of the
relational model to incorporate a tem-
poral dimension.
Professor Clifford received his B.A.
in music from Yale University. After
serving several years as Database Administrator for the Yale
Center for British Art, he went on to receive his M.S. and
Ph.D. degrees in Computer Science from the State University
of New York at Stony Brook.
1. Introduction
Decision Support Systems (DSS) require the
simultaneous management of data, models, and
dialogues [25]. DSS research has placed particular
emphasis on providing consistent user views of
models and data [2], and on supporting access to
databases by decision models [10]. The emergence
of practical Artificial Intelligence (AI) techniques
over the last few years impacts these problems in
at least two ways. On the one hand, the interac-
tions among DSS components, and between DSS
and user can arguably be handled more smoothly
using AI methods for model* management [3,11]
and user interfaces [1]. On the other hand, the
addition of knowledge-based decision models, in
particular expert systems, to the model base of a
DSS presents new challenges for DSS implementa-
tion. It is this latter problem that is the focus of
this paper.
An Expert System (ES) is a problem-solving
computer system that incorporates enough knowl-
edge in some specialized problem domain to reach
a level of performance comparable to that of a
human expert. Expert Systems differ from exact or
heuristic optimization procedures, as used in con-
ventional DSS, in that they mostly base their
recommendations on informal and qualitative de-
Matthias Jarke is an Associate Pro-
fessor of Computer Applications and
Information Systems at the Graduate
School of Business Administration of
New York University. He received Di-
plomas in Business Administration
d1977) and Computer Science (1979),
a Ph.D. in Economical Sciences
(1980) from Hamburg University,West
Germany. His research interests in-
dude the design, evaluationLand opti-
mization of high-level database inter-
fazes to end users, decision support
systems, and expert systems, both from a systems programming
and from a user perspective.
North-Holland
Decision Support Systems 1 (1985) 123-141
Yannis Vassiliou's research interests
are in the area of Database Manage-
ment and its applications. His early
work includes research in relational
database theory, in particular, on the
problem of 'null' values in databases.
Currently, he is investigating the inter-
action of pure database research with
2 ~
~" ~ I ~ other research and application areas.
Professor Vassiliou received a B.S.
in Mathematics from the University of
Athens. He did his graduate studies in
the Computer Science Department of
the University of Toronto, where he received M.Sc. and Ph.D.
degrees. Since 1980, he has been a member of the faculty at
New York University.
016%9236/85/$3.30 © 1985, Elsevier Science Publishers B.V. (North-Holland)
124 Y. Vassiliou,J. Clifforg M. Jarke / Expert System Access to Specific Keowledge
cision rules acquired from a human expert, rather
than on a complete mathematical formalization of
a decision problem [6].
In the heart of an ES lies the program that
'reasons' and makes deductions, the inference en-
gine. To reason, both general knowledge or rules
(e.g., if a person works for a company then he/she
gets employee benefits), and specific declarative
knowledge or data (e.g., John works for NYU), are
needed. Various formalisms have been developed
and advocated for the representation of this
knowledge, including frames [19], conceptual de-
pendency graphs [24], production rules [30],
semantic networks [5], and standard first-order
logic. Many of these techniques are capable of
representing both general and specific knowledge.
Current Expert Systems differ in sophistication,
conceptual complexity, and computational com-
plexity; for instance, the knowledge base may or
may not include such concepts as causality, intent,
physical principles, and simple empirical associa-
tions.
A typical scenario for consulting an ES, for
example one using production rules for its knowl-
edge representation, is as follows. The user begins
by presenting the system with a goal or desired
conclusion. The inference engine then chains (for-
ward or backward) through a set of production
rules to rink the conclusion with the assumptions,
or known 'facts'. Finally, the system's conclusion
is presented to the user, who can optionally ask for
an explanation of the 'chain of reasoning' used to
arrive at the given result.
This paper is primarily concerned with the
organization and access of the simple declarative
knowledge in the knowledge base ot ESs. To
organize these data, two dimensions need to be
considered: variety and population. For instance,
in a logic-based representation, 'variety' refers to
the number of different predicates required, and
'population' to the number of instances of these
predicates.
Early ESs are mostly prototypes, characterized
by a large variety and a small population of specific
knowledge; therefore inefficiency of data handling
is not a critical issue. Consequently, with very few
exceptions, little attention has been given in ES
design to the handling of very large populations.
The mechanism to retrieve the specific facts in
these systems does not reachthe sophistication
and performance of database management systems
(DBMS), systems that deal effectively with large
volumes of data [9].
This paper investigates the technical issues of
enhancing Expert Systems with database manage-
ment facilities. The motivation for such enhance-
ments is provided by the rapid advent of ES and
the expectation that they will have an increasingly
important impact in the business applications sec-
tor - an environment that often implies the pres-
ence of large databases, usually under the control
of a DBMS.
In Section 2, four database access strategies are
identified and developed in stages. Tools devel-
oped at an earlier stage are often necessary in each
subsequent stage. The framework is illustrated with
the use of first-order logic and relational database
management. In particular, the logic programming
language Prolog [7] is presented in Section 3, and
its uses as a programming language, a relational
database system, and an ES deductive component,
are outlined. The way Prolog fits into the proposed
framework of access strategieg is the topic of Sec-
tions 4 and 5. The last section presents a summary
and some problems for further research.
2. DatabaseAccess Strategiesby ExpertSystems
Two general architectures are envisioned for the
combination of the deductive and the database
access components of an expert system. These two
components can either be integrated into one sys-
tem (the ES), or be independent systems with a
defined protocol for communication [29].
Depending on the level of sophistication for the
database access facility, integration suggests two
distinct access strategies: elementary database
access, and generalized database management. A
major distinguishing characteristic between these
general strategies is their respective ability to deal
with secondary storage management, and therefore
their capability to deal with large populations of
specific facts.
With the advent of ESs in the business environ-
ment, a strong motivation for coupling an ES with
an external DBMS has emerged [15]. The invest-
ment of an enterprise in two different types of
systems, both intended to assist decision making
and smooth the flow of operations, is greatly
justified if the two systems are able to communi-
cate effectively. Thus, the large amounts of data
Y. Vassiliou,J. Clifford, M. Jarke / Expert System Access to Specific Knowledge 125
managed by a DBMS can be accessed by the ES in
the reasoning process. Moreover, the ES can offer
an intelligent interface to a DBMS (in addition to
query language interfaces, report generators, etc.).
Depending on the nature of communication be-
tween the two independent systems (ES and
DBMS), two more access strategies are identified:
loose, and tight coupling.
Figure 1 illustrates a natural sequence in the
development of these access strategies. An over-
view is given in the rest of this section.
2.1. Elementary Database Access Within An Expert
System- Strategy 1
!
On the simplest level, the whole population of
specific declarative knowledge can be represented
directly in the knowledge base formalism provided
by the Expert System. Mechanisms such as
semantic networks and frames, data structures
where all knowledge about an ebject is collected
together, are commonly used in ESs adopting this
strategy. Furthermore, several languages have been
developed to access and manipulate frames and
semantic networks, e.g., NETL, KRL, and KLONE
[20].
This first strategy for representing the data
required by the ES is based on the assumption that
during the system's operation the facts reside in
main storage. This simplifies the development of
access routines, but presents an obvious limitation
on the size of the declarative knowledge popu-
lation.
2.2. Generalized DBMS Within An Expert System
- Strategy 2
Considering a broader spectrum of the domains
to which ES technology is being applied, we see
that a very large population of specific knowledge
is often required. Such Expert Systems have ele-
mentary database management facilities as sep-
arate processes [20]. The minimum requirements
for this access strategy are secondary storage
management and indexing schemes. This seems to
be the norm for current ESs, even though not all
such systems exhibit the same level Of sophistica-
tion.
Moving a step further, a generalized DBMS
may be implemented as a sub-process of the ES.
The quest for 'generalized' database operations in
the ES, rather than application-specific database
access, may not be cost-effective in many cases,
however. A case where generalization is effectively
THE DECLARATIVEKNOW~,EIE,
E ACCESSREQUIREMENTSOF ES
I
! I
INTEGRATION OF ES AND DBNS COUPLING
OF ES WITH EXTERNALDBMS
! 1
f - i [ - I
ELEMENTARY-ACCESS GENERALIgED-DBNS LOOSE-COUPLING TIGHT-COUPLING
I I
I I
V
Development In Stages
~ml.
126 Y. Vassiliott J. CIifforg M. Jarke / Expert System Access to Specific Knowledge
justified is when the ES uses it as stepping stone to
one of the coupling mechanism described in Sec-
tions 2.3 and 2.4.
The major limitation in this stage is that often
an existing very large database may be needed in
the Expert System application. If a generalized
commercial DBMS is in place managing this
database, it may be prohibitively costly to main-
tain a separate copy of the whole database for the
ES. As an example, Olson and Ellis in [21] report
experiences with an Expert System used to de-
termine problems with oil wells where data from a
very large IMS database was needed but could not
be made available.
and that the ES needs to consult this database at
various points during its operation. In this case, an
online communication channel between the ES
and the DBMS is required. Queries can be gener-
ated and transmitted to the DBMS dynamically,
and answers can be received and transformed into
the internal knowledge representation. Thus in
tight coupling the ES must know both when and
how to consult the DBMS, and must be able to
understand the answers.
A naive use of the communication channel
would assume the redirection of all ES queries to
the DBMS. Any such approach is bound to face at
least two major difficulties:
2.3. Loose Coupfing Of The ES With An External
DBMS - Strategy 3
Conceptually the simplest solution to the prob-
lem of using existing databases managed by an
external DBMS is to extract a snapshot of the
required data from the DBMS when the ES begins
to work on a set of related problems. This portion
of the database is stored in the internal database
of the ES as described in the previous section. For
this scenario to work, the following mechanisms
are required:
1. A link to a DBMS with unload facilities;
2. Automatic generation of an ES database
from the extracted database;
3. An 'intelligence' mechanism to know in ad-
vance which portion of the database is required for
extraction.
Such a strategy presents several practical ad-
vantages and could be used in combination with
any of the two previous access strategies. However,
loose coupling is not suitable if the portion of the
database to be extracted is not known in advance.
This affects the provision of the third of the re-
quired mechanisms above, which is clearly the
hardest to automate. When this mechanism is not
automated, the decisions have to be made 'stati-
cally' with human intervention. Furthermore, loose
coupling is inefficient when different portions of
the database are needed for the Expert System at
different times. This leads to the need for the final
stage: tight coupling of the ES with a DBMS.
2.4. Tight Coupling Of The ES With An External
DBMS - Strategy 4
For this access strategy it is assumed that a very
large database exists under a generalized DBMS,
(A) Number of Database Calls: Since the ES nor-
mally operates with one piece of information at a
time (record), a large number of calls to a database
may be required for each ES goal. Assuming that
the coupling is made at the query language level,
rather than an internal DBMS level, such a large
number of DBMS calls will result in unacceptable
system performance. The number of calls at the
query language level could be reduced, as we shall
show, if these calls result to a collection (set) of
records.
(B) Complexity of Database Calls: Database lan-
guages usually have limited coverage. For instance,
the majority of query languages do not support
recursion. For reasons of transportability and sim-
plicity, it may not be desired to include in the
coupling mechanism the 'embedding' program-
ming language (e.g., PL/1, COBOL), a language
that would solve the discrepancies in power be-
tween the ES and DBMS representations and lan-
guages.
Therefore, to attain tight-coupling, particular
care has to be given to global optimization in
using the communication channel, and to the rep-
resentation and language translation problems. To
the authors' knowledge, tight-coupling to an ex-
isting DBMS has not yet been implemented in
actual systems. It appears, however, that the im-
pact of logic programming and the commercializa-
tion of relational database systems will have a
profound effect for tight-coupling in future system
architectures. Prolog is currently the most widely
known logic programming language; it has been
announced as the basis of the 5th Generation
Y. Vassiliou,J. Clifford,M. Jarke / Expert System Access to Specific Knowledge 127
Computer Project in Japan [12]. It is becoming
clear that logic-based programming languages like
Prolog will be highly influential in the ESs of
tomorrow. In the remaining sections of this paper,
Prolog and a research effort to develop a for-
malism for coupling a Prolog-based Expert System
with a relational DBMS are described.
3. A Prolog Introduction
3.1. Prologas a Programming Language
Prolog is a programming language based on a
subset of first-order logic, the Horn-clauses.
Roughly, this Amounts to dropping disjunction
from logical consequents, and talking only about
definite antecedent-consequent relationships.
3.1.1. Statements
There are three basic statements in Prolog (the
symbol ~- denotes implication, and the
symbol & denotes the logical AND):
~- P. means
A. means
P ~ Q &R & S. means
Q and R and S imply P
A clause has both a declarative and a proce-
dural interpretation. Thus,
P~-Q&R&S
can be read declaratively:
P is true if Q and R and S are true
or, procedurally (similar to 'stepwise refinement'
[32]):
to satisfy P first satisfy Q and R and S
P is a goal
A is an assertion
3.1.2. Programs
A Prolog program is a sequence of clauses
whose variables are considered to be universally
quantified. Logic predicates are represented with
Prolog programs, and since more than one clause
may be needed to define a predicate (goal), there is
a corresponding AND/OR graph for eacl~ predi-
cate. The execution of a program involves a
depth-first search with backtracking on these
graphs, and uses the unification process based on
the resolution principle [23].
As an example of a Prolog program, consider
the appending of two lists to form a third. In this
Prolog system notation, predicate names are in
upper-case, variables are in lower-case, character
strings that-start with upper-case denote constant
values, brackets enclose lists, [ ] is the empty list,
and the operator 'r separates the first element of
the list from the rest.
APPEND([ ], y, y).
APPEND([xIy], z, [xlw])*- APPEND(y, z, w).
Clause one asserts that appending the empty
list to any list leaves the list unchanged (stopping
the recursion). Clause two states that ify appended
to z results in w, then a list with first element x
and remainder y, when appended to z, results in a
list with first element x and remainder w.
Given the goal: ' <--APPEND([A], [B, C], new)',
Prolog tries to instantiate the variable new to
whatever value makes the predicate true. The first
clause cannot be used the first time around ([A] is
not [ ]). If the instantiation x--[A], y- [ ], z-
[B, C], and new = [AIw] is made then the second
clause applies. This requires the evaluation of the
right-hand side goal: ' ,- APPEND([ ], [B, C], w).
For this goal the first clause applies, w is instanti-
ated to [B, C] and through recursion, new is in-
stantiated to [A, B, C]. Prolog would report this
result as the answer to the goal:
new = [A, B, C]
An important characteristic of Prolog programs
is that there need be no distinction between input
and output parameters. Thus, for example, one
can also ask for the list that, when appended to a
given fist, results in another given list:
*--APPEND([A], x, [A, B, C])
and Prolog returns the answer:
x=[B,c]
3.2. PrologAnd Relational Database Management
To clarify Prolog's approach to relational
database management, a°short description of two
different views of relational databases is required.
The traditional view of relational databases [8] is
that of a collection of tables. Formally, a relational
database is a relational structure [17]. Queries on
the database are expressed in languages having the
power of first-order logic and are evaluated in the
128 Y. Vassiliou,J. Clifford,M. Jarke / Expert System Access to SpecificKnowledge
relational structure (evaluational approach). In
contrast, a proof-theoretic view would look at a
database as a collection of sentences - a theory. A
database query is answered by proving it to be a
logical consequence of the theory (non-evalua-
tional approach). This distinction is described in
detail in [131. Essentially, it amounts to the dif-
ference between theories and their interpretations.
Kowalski shows in [17] that, under certain con-
ditions, this distinction is irrelevant. In particular,
it can be shown that all queries in first-order logic
evaluate to the same value whether the relational
database is interpreted as a structure or as a logic
database, provided that:
(1) There are finitelymany variable-free atoms;
(2) The database is described by Horn clauses;
(3) The axioms of equality and domain closure
are present; and,
(4) Negation is interpreted as finite failure.
Relational databases can therefore be repre-
sented directly in Prolog as a listing of all instanti-
ated predicated corresponding to relation tuples.
For instance, consider the database-oriented view
of the world of Suppliers-and-Parts rq]. The rela-
tion schemes are:
SUPPLIER(sno, sname, status, city)
PART(pno, phame, color, city)
SUPPLY(sno, pno, qty)
An instance of the database would be represented
in Prolog as:
SUPPLIERS(S1, SMITH, 20, LONDON).
SUPPLIERS(S2, JONES, 10, PARIS).
PART(P1, NUT, RED, 12, LONDON).
PART(P3, SCREW, BLUE, ROME).
SUPPLY(S1, P1, 300).
SUPPLY(S2, P2, 200).
In addition to database representation, Prolog
can be used directly as a database query language.
Each query may have the format [17]:
where (target-variables) is a list of variables (cor-
responding to attribute names). The interpretation
is that the user wants to retrieve all instantiations
satisfying the goal statements. Thus, (target-varia-
bles) corresponds to the target list in conventional
query languages. For instance, consider the Prolog
statements:
/* For all suppliers,
list the supplier number and
the city they live in */
LIVES(sno, city)./* where • /
LIVES(sno, city)
•--SUPPLIER(sno, any_sname, any_status,
city).
/* List the supplier number
for those suppliers who supply more
than one parts */
~- SUPPLIES_MANY(sno). /* where * /
SUPPLIES_MANY(sno)
•-- SUPPLY(sno, pl, ql) &
i SUPPLY(sno, p2, q2) & NOT(p1 --
p2).
, List the supplier number
for those suppliers who do not supply
more than one part,
and live either in London or in Paris */
SPECIAL_SUPPLIER(sno)./. where */
SPECIAL_SUPPLIER
~- NOT(SUPPLIES MANY(sno)) &
OR(LIVES(sno, LONDON), LIVES(sno,
PARIS)).
These examples can be used to illustrate both
the query capabilitiesof the Prolog formalism, and
its powerful mechanism for creating 'generalized'
views. Such views differ from the traditionalDBMS
views in that, through the use of variables, they
can accept parameters. In essence, views allow for
a flexible data representation. Details of the use of
Prolog for integrity constraints, database updates
and historical databases are given in [17].
*- QUERY((target-variables)).
QUERY((target-variables))
GOAL A & GOAL B & ... &GOAL_N
3.3. Prolog and Expert Systems
A knowledge base can be represented in first-
order logic if the formulas are suitably interpreted.
Y. Vassiliou,J. Clifford, M. Jarke / Expert System Access to Specific Knowledge 129
Therefore, Prolog may be used for the knowledge
representation. Furthermore, Prolog has the ad-
vantage that it already has (in its automatic theo-
rem prover) a very powerful inference engine in
place. The unification algorithm used in Prolog is
more general than a simple pattern matching al-
gorithm (common in production rule-based sys-
tems [20]).
As an illustration, we present a small 'toy'
Expert System in Prolog. The area of interest is the
well-known world of suppliers, parts, and supplies.
In this simple example, the 'expert' is supposed to
recommend where to place an order by applying
the following rules:
1. Order onl~ from suppliers who have sup-
plied the same part and all its subparts before.
2. Suppliers from southern Europe are usually
cheaper than those from northern Europe. No
suppliers outside Europe should be considered.
3. Display all possible choices within the 'opti-
mal' category.
A Prolog expert for this job would obviously
need a representation both of the above rules and
of the data they require, such as location and
previous supply for each part, and the classifica-
tion Of locations into northern and southern
Europe. A sketch of a possible Prolog knowledge
base follows.
First, the database of specific facts is presented.
It is noted that only binary or unary relations are
used in this example, but this is not limiting in
that there is a simple way to move between binary
representations and ternary representations [16].
/* Simple declarative facts (database) */
SUPPLIER(SMITH).
SUPPLIER(JONES).
SUPPLIER(BRAND).
PART(NUT).
PART(WIDGET).
PART(GIZMO).
PART(SCREW).
PART(GADGET).
PART(THINGUM).
PART(SUPERTHINGUM).
SUBPART(NUT,WIDGET). "
SUBPART(SCREW,GADGET).
SUBPART(GADGET,GIZMO).
SUBPART(THINGUM,SUPERTHINGUM).
HAS SUPPLIED(SMITH,NUT).
HAS_SUPPLIED(SMITH,WIDGET).
HAS_SUPPLIED(SMITH,GIZMO).
HAS_SUPPLIED(SMITH,THINGUM).
HAS_SUPPLIED(JONES,SCREW).
HAS_SUPPLIED(JONES,
HAS_SUPPLIED(JONES,
HAS_SUPPLIED(JONES,
HAS_SUPPLIED(JONES,
NUT).
WIDGET).
GADGET).
GIZMO).
HAS_SUPPLIED(JONES,SUPERTHINGUM).
HAS_SUPPLIED(BRAND,SCREW).
LIVES(SMITH,ROME).
LIVES(JONES,LONDON).
LIVES(BRAND,OSLO).
NORTH(LONDON).
NORTH(OSLO).
SOUTH(ROME).
SOUTH(ATHENS).
Second, the part of the knowledge base contain-
ing the general rules is presented.
/, General rules • /
SUGGESTORDER(supplier,part)
GOOD_AND_CHEAP(supplier,part).
/* if no good and cheap suppliers exist, then: •/
SUGGEST_ORDER(supplier,part)
NOT(GOOD_AND_CHEAP(any_supplier,part))&
NORTH EUROPEAN(supplier)&
POTENTIAL_SUPPLIER(supplier,part).
GOOD_AND_CHEAP(supplier,part)
POTENTIAL_SUPPLIER(supplier,part)&
SOUTH_EUROPEAN(supplier).
POTENTIAL_SUPPLIER(supplier,part)
SUPPLIER(supplier)&
PART(part)&
NOT(MISSING_SUBPART(supplier,part)).
MISSINGSUBPART(supplier;part)
NOT(HAS_SUPPLIED(supplier,part)).
MISSING_SUBPART(supplier,part)
SUBPART(any_part, part) &
MISSING_SUBPART(supplier,any_part).
NORTH_EUROPEAN(supplier)
•- LiVES(supplier,city),NORTH(city).
SOUTH EUROPEAN(supplier)
LIVES(supplier,city),SOUTH(city).
To illustrate the use of the above simple Expert
System, some examples are given below. It is noted
that the user places a goal (desired conclusion) at
130 IT. Vassilimt J. Clifford. M. Jarke / Expert System Access to Specific Knowledge
the '[?-' prompt and the system returns with a 'no'
answer if the goal cannot be proven, and with an
assignment of values to the variables used other-
wise. If the goal has more solutions (other variable
assignments exist), they are obtained with the typ-
ing of a semi-colon until the answer 'no' is re-
turned.
/. Example Execution
[?.-SUGGEST_ORDER(x, WIDGET).
x = SMITH;
no
r?.-SUGGEST_ORDER(x, GIZMO).
x ffiJONES;
no
[?- SUGGEST_ORDER(x, SCREW).
x = JONES;
x ffiBRAND;
no
4. Prolog as the Mechanism for Integration
4.1. Prolog and Access Strategy 1
As outlined in the previous section, elementary
database management corresponds to a direct use
of Prolog. The limitations in this strategy .are:
(A) Large Databases. Executing Prolog programs
in the manner described above requires that the
assertions representing the database (instantiated
predicates) be in main storage. Even when the
database can fit in main storage, and despite the
fact that Prolog implementations are very efficient,
there are limitations in secondary indexing. For
instance, the Prolog DEC-10 compiler, which is
considered to be the most efficient implementa-
tion, has only one index for the internal database.
In short, both external and internal data manage-
ment are needed for large databases.
(B) Generality. Simple-minded use of Prolog can
offer only elementary data management facilities.
For instance, there are no data dictionary, no
database schema, and no generalized set-oriented
relational operations. It may be argued that lack of
generality is a matter of convenience rather than
.~i~ issue of substance. On the other hand, it is
closely related to the first limitation, and in the
next stage a uniform mechanism to deal with both
is used.
4.2. A Generalized Database System in Prolog -
Access Strategy 2
Generalized DBMSs gain much of their power
by abstracting from specific query predicates to
generalized retrieval mechanisms such as the set-
oriented relational algebra operators or the SQL
nesting mechanisms. One advantage of using these
abstractions in Prolog is that they allow gener-
alized selection of predicates instead of forcing the
database programmers to define such predicates
separately for each class of data.
Therefore, we could take a further step towards
integrating the deductive capabilities of Prolog
with database management capabilities by imple-
menting a general purpose DBMS directly in Pro-
log. This can be done quite easily, and provides a
means of adding flexible and ge~cral data access
mechanisms to the inference engine.
In order to effect this stage in ES enhancement
with data management facilities, the first require-
ment is the definition of an internal representation
of a relational database. The following Prolog
version is a simple and direct strategy for this
purpose.
DBSCHEMA = [DB-NAME, [relations], [constraints]]
REL i -- [REL-NAME, [scheme], [domains]]
/* for each RELi, 1 ~ i < n */
SCHEME ffi[al ..... ak]
/* a list of attributes */
DOMAINS = [dI..... d k]
/* a list of domains with • /
/* DOM(a:)= d, */
CONSTRAINTS = [[list-of-fds],
/* functional dependencies */
[list-of-vds],
/* value dependencies */
[list-of-sds]]
/* subset dependencies */
FD ffi[REL-NAME, LHS, RHS]
/* corresponds: LHS ~ RHS */
LHS ffi[a,1, a12,ail ]
/* a list of attributes */
RHS ffi Ibis, bj2, bjm]
/* a list of attributes */
VD ffi[REL-NAME, ATFR-NAME, LOWER-BOUND,
UPPER-BOUND]
/, The values for ATTR-NAME must be within
the bounds • /
Y. Vassiliou,J. Clifford, M. Jarke / Expert System Access to Specific Knowledge 131
SD = [REL-NAME1, ATTR-NAME1, REL-NAME2,
ATTR-NAME2]
/, The values in ATTR-NAME1 must also be
in ATTR-NAME2 * /
DBINSTANCE = [DB-NAME, [relation-instances]]
RELATION-INSTANCE = [REL-NAME, [tuples]]
TUPLE, = [V1..... Vk]
/* Viisind i,l<i<k */
This strategy provides a straightforward imple-
mentation of the structure of a relational database
as seen by the user (in this case the ES). The
Suppliers-and-Parts database of Section 3.2, repre-
sented in this format, is given in Appendix 1.
Given such a representation scheme, one can
define any number of generalized operations to
provide the facilities of a DBMS. The feasibility of
this has been demonstrated in [18]. The basis for
the implementation is the predicate 'SETOF' built
into most Prolog versions. SETOF(x, c, r), re-
turns in the set r all such elements of x that
satisfy condition c. For instance, the projection of
a relation R on scheme (xl, x2,...,x,,) onto the
attributes xjl, xj2,..., Xjk will have the form:
levelled architecture of DBMSs [9].
Another feature provided by many DEMSs is
the ability to define a 'view' of the database for
particular applications. These views define only
that portion, or rearrangement, of the database of
interest to a particular user community, effectively
screening out the rest of the database from their
sight. For example, users interested only in the set
of suppliers without any of their attributes, could
define the following view:
SUPPLIES(s)
*- PROJECT(SUPPLY, [SNAME], s).
The user (typically the ES) has a choice between
set-oriented and tuple-at-a-time retrieval oper-
ations. This is accomplished with the introduction
of an evaluable predicate called 'SIMCALL'. This
predicate simulates Prolog's calls of predicates cor-
responding to relations (i.e., returns a tuple in-
stantiatmn). Thus, each call of the predicate
SUPPLY, defined below, will return one tuple of
the relation SUPPLY (stored in the format de-
scribed in this Section).
SEfOF'(xjl, XjE,...,xjl~), ((xil, xi2,-..,x,,,)
R(xl, x2,...,x,,)), s)
SUPPLY(sno, pno, qty)
,-- SIMCALL(SUPPLY, [sno, pno, qty]).
where m = n - k, and (x~t, x+2,..., x,,,)* denotes
the existential quantification of these variables.
As a specific example, the projection of a rela-
tion R on scheme (a, b, c) onto the attribute c is
'computed' by the following Prolog program:
I?- SETOF(c, ((a, b)'R(a, b, c)), s).
Note, however, that this view of the projection
operator requires the user to know the entire
scheme of each relation and the order of the
attributes in the scheme; this may be too much to
ask in general. The approach taken here (details
are given in Appendix 1) by contrast, provides a
simple way to specify projection as a generalized
operator acting on any relation and set of attri-
butes. Prolog programs map from this simpler,
user-oriented view of the operations, to their im-
plementation for the particular database anti rep-
resentation scheme chosen. This provides a degree
of logical data independence as in the traditional
Another issue for the implementation of a gen-
eralized DBMS within Prolog is that of efficient
secondary storage management. For the latter, it is
reasonable to devise a more sophisticated storage
strategy (e.g., B-Trees), and perhaps to use aux-
iliary indexing schemes, hashing, etc. The use of
some of these storage structures for implementing
a simple business database in Prolog is described
in [22], and some general Prolog data structures
and accessing programs are formalized in [27].
The work reported in [22] demonstrates that for
specific applications, indexing schemes that guide
decisions about which portions of external files
should be read into the internal database can be
devised. Furthermore, the basic data access predi-
cate (routine) of Prolog can be changed to direct
data searches of secondary storage. Such Prolog
modifications have been criticized as providing
only temporary solutions, while complicating Pro-
log's basic structure and further divorcing the lan-
guage system from formal logic.
132 Y. Vassiliou,J. Clifford, M. Jarke / Expert System Access to Specific Knowledge
5. Prolog and Relational DBMS as Independent
Systems
5.1. Loose Coupling of Prolog With a Relational
DBMS
Loose coupling can easily be implemented using
Prolog and a relational DBMS, under the assump-
tion that a generalized facility as described above
exists. A portion of the external database is loaded
off-line (before the start of the Expert System
session). A superset of the data required by the ES
can actually be extracted, but the strategy may
prove infeasible if the superset is too large or not
known in advance (too many parameters).
mulating the queries in the relational language
SQL [9], performing certain optimizations upon
the original SQL queries so generated, issuing the
SQL queries to the DBMS along a communication
channel, receiving the result of the que.ryfrom the
DBMS along this same channel, and re-formulat-
ing that result within the internal database struc-
ture of the ES. At that point, the 'meta-evaluation'
of the user's request is completed, and the Prolog
inference engine can evaluate the request with the
required data in its working memory.
As an example of the need for optimization,
consider a naive channel use (all Prolog goals are
directed to the external DBMS), and the definition
of the Prolog clause:
5.2. Tight Coupling of Prolog With a Relational
DBMS
5.2.1. Overview
Tight coupling refers to a dynamic use of the
communication channel between the two systems.
Essentially, the external database becomes an 'ex-
tension' of the internal Prolog database. As in the
general case, the same two basic problems must be
resolved: optimization of database calls, and com-
plexity of queries. Moreover, such a coupling sys-
tem requires dynamic decision-making about the
location of the data needed to solve the current
problem, and an effective strategy for managing
internal storage.
The basic scenario for tightly coupling a Pro-
log-based ES with an existing relational DBMS is
as follows. The user consults the ES with a prob-
lem to be solved or a decision to be made; typi-
cally this will be expressed in some sort of user-
friendl), language interface, but for our purposes
we can assume that it is expressed directly as a
Prolog predicate. Rather than evaluate this user
request directly, in a tightly-coupled framework
the predicate would be massaged (c.f., 'RE-
FLECT', section 5.2.3) into a slightly modified
form whose evaluation can be delayed while vari-
ous transformations are performed upon it. This
process is analogous to a 'pre-processing' stage in
language translation. The altered predicate is then
'meta-evaluated' (5.2.3). This involves analyzing
the request in its Prolog formulation and dynami-
cally determining whatever DBMS queries are re-
quired at that state in the ES execution for obtain-
ing the solution. In our case, this involves for-
SECOND_ LEVEL_SUBPART(subpno, pno)
SUBPART(subpno, pnol) & SUB-
PART(pnol, pno).
where it is assumed that 'SUBPART' is a stored
relation for direct (first-level) sub-relationships be-
tween parts.
In evaluating this goal, Prolog will call the
leftmost 'SUBPART' (redirected to the DBMS as
an attempt to evaluate it) for a database tuple.
Subpno and pnol will be instantiated to some
constant values. Then Prolog will call the right-
most 'SUBPART' with pnol already instantiated.
Such a 'follow-up' call will be made for each
successful instantiation of pno. Moreover, the pro-
cess is repeated for each tuple of subpart. If no
second-level subpart exists in the database, all
these 'follow-up' goals will fail. Thus the minimum
of 2n + 1 number of database calls is required,
where n is the number of tuples. (The extra call is
the unsuccessful attempt to instantiate the leftmost
'SUBPART' when all tuples have been looked at).
If there are k second-level subparts, then 2n + k +
1 database calls are needed. This naive approach
will thus generate a particularly inefficient version
of a 'nested iteration' query evaluation algorithm
and will not make use of any query optimization
procedures of the DBMS.
This difficulty can be overcome by collecting
and jointly executing database calls rather than
executing them separately whenever issued by the
ES. In essence, this revised technique replaces the
pure depth-first approach of Prolog by a combina-
tion of a depth-first reasoning and a breadth-first
database call execution.
Y. Vassiliou,J. Clifford, M. Jarke / Expert System Access to Specific Knowledge 133
In practice, an amalgamation of the ES lan-
guage with its meta-language is used, based on the
'reflection principle' [31]. This allows for a de-
ferred evaluation of predicates requiring database
calls, while at the same time the inference engine
(theorem prover) of the ES is working. Since all
inferences are performed at the meta-level (simula-
tion of object-level proofs), it is feasible to bring
the complex ES queries to a form where some
optimization and direct translation to a set of
DBMS queries is feasible.
The queries are directed to the DBMS, and the
answers obtained are transformed to the format
accepted by the ES for internal databases. Then,
the ES can continue its reasoning at the object-
level. Each invocation of predicates corresponding
to database relations now amounts to an ES inter-
nal database goal, rather than a call to an external
DBMS. The theoretical basis and a detailed de-
scription of this approach are presented in sections
5.2.2 and 5.2.3.
The second diffict/lty in successfully coupling a
Prolog-based ES with a relational DBMS is that
Prolog goals, considered as queries, can be sub-
stantially more complex than queries expressed in
a database query language such as SQL. For ex-
ample, most DBMS query languages are not able
to handle a recursive call such as the Prolog pro-
gram:
ANY_LEVEL_SUBPART(subpno,pno)
*-SUBPART(subpao,pno).
ANY_LEVEL_SUBPART(subpno,pno)
SUBPART(subpno, pl) & ANY_LEVEL_SUB-
PART(pl,pno).
Much research exists on the issue of recursion
in databases. An important distinguishing char-
acteristic is that the depth of recursive calls to
databases is usually relatively shallow. For in-
stance, considering again the example of subparts,
recursion may only go to a few levels deep before
subsequent recursive calls result in 'null' answers
(no tuples qualifying). This implies an immediate
strategy within the framework of language
amalgamation discussed above. To translate a re-
cursive Prolog goal to SQL, generate a series of
calls that can be translated directly to SQL, ex-
ecute the SQL calls, and stop when recursion ends
(SQL calls return null results). The major problem
with this strategy is that it is not possible to know
in advance how many such goals must be gener-
ated (the translation takes place in the ES). There-
fore, it is not feasible to jointly execute these SQL
calls. In other terms, little can be done for the
translation at compile time, since the end of recur-
sion can only be determined at execution, time.
Even under these restrictions, much optimiza-
tion can be done within the proposed framework.
For example, results (tuple values) from initial
SQL calls are used for subsequent SQL calls.
Other approaches explored (e.g., [14]) handle re-
cursion elegantly and in a general way at compile
time using a method that replaces recursion by
iteration.
5.2.2. The Theoretical Basis for Language
Amalgamation
In order to be able to talk about a language L,
the use of a meta-language ML is required. The
amalgamation of an object language with its
meta-language refers to the ability to move be-
tween the two languages whenever it appears more
convenient or efficient to use one rather than the
other.
Suppose that a goal G is to be proven from a
set of assumptions (hypotheses) A in a first-order
language L. There are two ways to do this:
(a) Use the proof procedure of L.
(b) Simulate the proof procedure of L in ML as
follows: use a 'reflect' relationship that names the
assumptions A and goal G of L as Meta-A and
Meta-G in ML. The provability of G from A is
represented by the provabilit3/ of the predicate
'METAEVALUATE(Meta-A, Meta-G)' from
sentences in ML.
Implementing amalgamation of L and ML re-
quires the definition of the METAEVALUATE
predicate and the naming relationship. In ad-
dition, it requires a link (reflection principle) be-
tween the two languages.
In this specific case, Horn clause logic (Prolog)
is used as the object language. The meta-language
is Prolog itself - with the restriction that all
sentences are variable-free. This allows us to re-
main in first-order logic. ,Thus, the naming rela-
tionship maps variables to special-form constants
which simulate a variable in meta-Prolog.
This implementation of amalgamation is based
on the high level description of the DEMO predi-
cate presented in [4], and is similar to the imple-
mentation of [18]. The work reported here extends
134 Y. Vassilicu,J. Clifford,M. Jarke / Expert System Access WSpecificKnowledge
the above approaches by providing a more general
treatment of evaluable predicates. For instance,
finite negation (not) and disjunction (or) are
treated with no restrictions. In addition, the issue
of its use in the context of the general ES-DBMS
coupling mechanism is addressed.
Linking Prolog and meta-Prolog is accom-
plished with the introduction of a binary predicate
called 'META'. For each Prol6g clause, a corre-
sponding instantiation of the 'META' predicate
exists.
The first term of 'META' is a list of predicates;
the head of the list is the head of the correspond-
ing clause, and the other list elements are the
terms in the body of the clause. All variables in
these predicates are translated into constants with
a special prefix (V_). The second term of 'META'
allows the grouping of meta instantiations in a
program. For example, the corresponding meta
predicate for:
ATHENS_SUPPLIER(sno, sname)
,- SUPPLIER(sno, shame, status,
ATHENS).
is
META([ATHENS.SUPPLIER(V_sno,
V_sname),
SUPPLIER(V sno, V_sname, V status,
ATHENS)], PR1).
where PR1 is the name of the program (group of
' META' instantiations).
Since the objective of this approach is to defer
the evaluation of predicates which correspond to
database relations, all such predicates are in a
delayed evaluation form. In particular, these predi-
cates are defined in Prolog as follows:
SUPPLY(sno, pno, qty)
*- DBCALL(SUPPLY, [sno, pno, qty]).
using the non-evaluable binary predicate
'DBCALL'. Other predicates whose evaluation de-
rends on the database values (e.g., equal, not
equal) are treated in the same way.
The implementation of the predicate
'METAEVALUATE' is described, together with
examples of its use, in Appendix 2. Only a high-
level description is given here.
Given a set of assumptions A and a set of goals
G to be proven in the object language, prove the
meta-Prolog predicate:
METAEVALUATE(assumptions,
meta_goals,
control, new_goals).
in the meta-language, where 'assumptions' is the
collection of the original assumptions A in the
meta-language, and meta_goals is the meta-lan-
guage name of the goals G. Control is a parameter
which specifies either a bound in the proof of
METAEVALUATE or an action to be taken later
(e.g., optimization, translation to relational algebra
or SQL). The result, new goals, is a series of
Prolog predicates in a deferred evaluation state (a
series of DBCALLs and other non-evaluable pre-
dicates).
5.2.3. The Mechanismfor Tight-Coupling
This section describes the overall mechanism
that allows for deferred database calls. The mecha-
nism is presented pictoriallyin Fig. 2. The use of a
simple but complete example will illustrate the
concepts involved.
(A) REFLECT(object_assumptions, meta as-
sumptions, program_name): This function pro-
duces 'META' predicates as described in the pre-
vious section from a set of Prolog statements. It
also groups the meta predicates by providing a
unique programname. The REFLECT function is
invoked once before the start of a session.
(B) METAEVALUATE(program_name,
meta goals, control, newgoals): Described in sec-
tion 5.2.2.
(B.1) GENERATE(new goals, result): This pro-
gram is activated by METAEVALUATE when the
control parameter assumes a particular value.
Given a series of new_goals, it creates an internal
database relation (result). In doing so, it uses and
controls the execution of the sub-programs 'OPTI-
MIZE', 'SQL TRANSLATE', 'SQL_CALL', and
'FORMAT_DATABASE'. Details of the imple-
mentation of these procedures will be given in a
forthcoming paper.
(B.1.1) OPTIMIZE(new_goals,
optimized_goals): This program performs some
optimization of the goals generated in METAE-
VALUATE. One optimization is the removal of
redundant goals. Another optimization identifies
Y. Vassiliou,J. Clifford,M. Jarke / Expert System Access to Speofic Knowledge :35
EXPERT SYSTEM DBMS
OBJECT LEVEL
Reach a goal G that
requlres db calls
REFLECT
I
I
META LEVEL
NETAEVALUATE
GENERATE
REFLECT
Goal G may now be proven wlth
calls to an internal ES database
DATABASE LEVEL
OPTIMIZE
SQL..TRANSLATE
Sat_CALL
DBHS
Query
Evaluation
FOimAT DATABASE
Figure 2.
cases where a series of DBMS queries is required
(e.g., in recursion). By imposing an ordering on the
goals, 'OPTIMIZE' makes it possible that a query
result can be used for answering the next query
more efficiently.
(B.1.2) SQL-TRANSLA TE (optimized_goals,
sql_query): This generates SQL queries from opti-
mized goals. First, the procedure identifies the
database relations involved from the predicate
names in optimized_goals and its knowledge about
the database schema (SQL's FROM clause). Next,
it identifies target attributes (SQL's SELECT
clause) from the universally quantified variables of
the original goals, and ignores all other variables
in the goals unless they serve as join fields (e.g.,
rell.fieldl = rel2.field2). All constant values are
translated to restrictions on field values (e.g.,
fieldname = constant).
(B.1.3) SQL.CALL(sqI_query, answer_location):
This is another program activated by 'GENER-
ATE'. It invokes the existing DBMS by sending an
sql_query, with the result redirected to a file iden-
tified by answer_location. Each answer to a query
contributes to the eventual result of 'GENER-
ATE'.
(B.1.3.1) FORMA T-DATABASE(answer_loca-
136 Y. Vassiliou,J. Clifford, M. Jarke / Expert System Access to Specific Knowledge
tion, internal_db): Since the existing DBMS can-
not be expected to deliver the result in the format
required by Prolog, this function produces an in-
ternal Prolog sub-database from the file identified
by SQL_CALL. Each such database contributes
then to the eventual result of the calling func'Aon,
' GENERATE'.
As an illustration of the process outlined above
consider the following example. The actual Prolog
execution and a more detailed description can be
found in Appendix 2. Assume an ES that uses a
series of informal, heuristic and exact rules, to-
gether with a large database of Suppliers-and-Parts
managed by an external DBMS. The portion of
this external database which is necessary for the
example is assumed to contain the stored relations
SUPPLY and SUPPLIER. The hypothetical ES
has the schema descriptions of the external data-
base and several rules concerning this database.
No actual tuples are stored in the internal ES
database. Assume further, the ES rule (goal)
'PERFORM_ORDER', which among other predi-
cates involves the predicate (generalized view):
'GOODBETSUPPLIER', based on the stored
relations and other generalized views.
PERFORM_ORDER(sname, price, delivery)
COLLECT_REQUIREMENTS(max _price,
latest_del, pno) &
GOOD_BET_SUPPLIER(sno, pno) &
MAKE_ADJUSTMENTS(sno, new_de-
livery) &
where"GOOD BET SUPPLIER' is defined as:
GOOD_ BET_SUPPLIER(sno, pno)
(-..
NORTH_EUROPEAN(sno) & MAJOR SUPPLIER(sno,
pno).
NORTH_ EUROPEAN(sno)
,'- OR(SUPPLIER(sno, n,
LONDON) & SUPPLIER(sno, n, st, PARIS)).
MAJOR_SUPPLIER(sno, pno)
~- SUPPLY (sno,
qty), & GREATER(qty, 300).
st,
pno,
PLIER' would require database calls, 'METAE-
VALUATE' as the subgoal immediately preceding
it is used:
PERFORM ORDER(sname, price, delivery)
(.__
COLLECT_ REQUIREMENTS(max _price,
latest_del,
pno) & METAEVALUATE(PR1,
[GOOD_ BETjSUPPLIER(V_sno, V pno)],
5,
newgoals) & ! &
GOOD_BET_SUPPLIER(sno, pno) &
MAKE_ADJUSTMENTS(sno, new_de-
livery) & ...
Note that the 'cut' (l) subgoal assures that the
METAEVALUATE predicate will only be ex-
ecuted once.
The first result from 'METAEVALUATE' is (see
also Appendix 2):
newgoals --[OR(DBCALL(SUPPLIER,
IV sno, V_n, V st, LONDON]),
DBCALL(SUPPLIER,
[V sno, V n, Vst, PARIS1))&
DBCALL(SUPPLY, [V_sno,
V_pno, V_qty])&
DBCALL(GREATER, [V qty,
300])]
Given the specific value (5) for the control
parameter of 'METAEVALUATE', the program
'GENERATE' will be invoked. First, its sub-pro-
grams'OPTIMIZE' and 'SQL TRANSLATE' will
transform the new goals to the SQL_query:
SELECT sno, pno
FROM SUPPLIER, SUPPLY
WHERE ((SUPPLIER.city = ' LONDON')
OR (SUPPLIER.city =' PARIS'))
AND (SUPPLY.qty > 300)
AND (SUPPLY.sno --
SUPPLIER.sno);
The call will be made to the external DBMS
(program: SQL_CALL), and the answer will be
retrieved from answer_location (program: FOR-
MAT_DATABASE). Finally, a new internal
database will be generated with the description:
Since an instantiation of 'GOOD_BETSUP- GOOD_BET SUPPLIER(sno, pno)
Y. Vassiliou,J. Clifford, M. Jarke / Expert System Access to Specific Knowledge 137
After this process, the next statements in the Ex-
pert System clause can use 'GOODBETSUP-
PLIER' in the usual Prolog way. No additional
external database calls are needed.
In essence, instead of calling the DBMS each
time a tuple is needed, all 'qualifying' tuples are
brought into the internal database. It should be
noted that the above strategy is similar to the
'query modification' algorithm [26] used in some
commercial DBMSs for view processing. Possibly,
the single most important advantage in using the
theorem prover for query modification is that the
whole mechanism is integrated smoothly and natu-
rally into an ES implementation as a generalized
tool.
type of coupling is most appropriate.
Finally, a research question of particular inter-
est to the database community is the use of an ES
as a DBMS 'interface' [15]. Could an ES be used
as a sophisticated access mechanism (e.g., high-
level optimization, understanding of user intent)?
How could an ES assist in the implementation of
language constructs that allow one to formulate
arbitrary predicates with relation variables? Such
constructs may be used for integrity checking and
improved locking mechanisms. A tight-coupling
mechanism, like the one described in this paper,
may be required by such a 'DBMS-expert'.
References
6. Concluding Remarks - Further Research
In this paper a number of strategies for estab-
lishing a cooperative communication between the
deductive and data components of an Expert Sys-
tem were outlined. It was shown that the spectrum
of possible mechanisms to link these two compo-
nents is effectively a continuum from, at one ex-
treme, a single logic-based system that implements
both components, to, at the other extreme, two
completely separate systems with a strong channel
of communication.
A number of interesting research questions are
raised by this spectrum of possible mechanisms for
coupling these two essential components of an
Expert System. Among the questions examined
are: what is a general architecture for the com-
munication channel between these two compo-
nents? How can the ES DBCALLs be translated
into the query language of the DBMS? When and
how should these queries be optimized? A research
topic under investigation is that of internal ES
database space management. How does one
manage the amount of free space for storing the
results of external database calls? When space has
to be freed, how is the decision reached and opti-
mized as to which portion of the internal database
to delete? A longer range research question con-
cerns the integration of these four access strategies
into a single, meta-expert system that combines
the expertise of the problem domain with expertise
about these four connection types. Given a par-
ticular type of problem in the domain of the
expert, this meta-expert system would decide which
[71
[8l
[9]
[101
[111
[1] Blanning, R.W. Natural Language Query Processing for
Model Management, Communications of the ACM (1984)
in press.
[2] Bonczek, R.H., C.W. Holsapple, A.B. Whinston, The
Evolution from MIS to DSS: Extension of Data Manage-
ment to Model Management, Decision Support Systems,
Ginzberg,M.J.,W.R. Reitman, E.A.Stohr, (eds) pp. 61-78,
North-Holland, Amsterdam, New York (1982).
[3] Bonez,ek, R.H., C.W. Holsapple, A.B.Whinston, Specifica-
tion of Modelling Knowledge in DSS, Processesand Tools
for Decision Support, Sol, H.G. (ed.), North-Holland,
Amsterdam, New York (1983).
[4] Bowen, K.A. and R.A. Kowalski, Amalgamating Lan-
guage and Metalanguage in Logic Programming', in: Logic
Programming, Clark, K. and S.A.Tarnlund, eds., Academic
Press, New York (1982).
[5] Brachman, R., On the Epistemological Status of Semantic
Networks, AssociativeNetworks: Representationand Useof
Knowledge by Computer, NN. Findler (ed.) pp. 3-50,
Academic Press, New York (1977).
[6] Clifford, J., M. Jarke, and Y. Vassiliou, A Short Introduc-
tion to Expert Systems, IEEE Database Engineering Bul-
letin, 6,4 (Dec. 1983).
Clocksin, W.F. and C.S. Meilish, Programming in Prolog,
Springer-Verlag, New York (1981).
Codd, E.F., A Relational Model for Large Shared Data
Banks, CACM, (June 1970) pp. 377-387.
Date, C.J., An Introduction to DatabaseSystems, (3rd edn),
Addison-Wesley, New York (1982).
Donovan, J.J., Database System Approach to Manage-
ment Decision Support, ACM Transactions on Database
Systems 1 (1976) pp. 344-369.
Elam, J.J. and J.C. Henderson, Knowledge Engineering
Concepts for Decision Support System Design and Imple-
mentation, Information and Management 6 (1983) pp.
109-114.
[12] Feigenbaum, E.A. and P. McCorduck, The Fifth Genera-
tion Artificial Intelligence and Japan's Computer Challenge
to the World, Addison-Wesley, New York (1983).
[13] Gallaire, H. and J. Minker, Logicand Databases, Plenum,
New York (1978).
138 Y. Vassiliou,J. Clifford.M. Jarke / Expert System Access to SpecificKnowledge
[14] Henschen, L. and S. Naqvi, On Compiling Queries in
RecursiveFirst-Order Databases, Proc. Workshopon Logi-
cal Basesfor Data Bases, Toulouse (Dec. 1982).
[15] Jarke, M. and Y. Vassiliou, Coupling Expert Systems with
Database Management Systems, Artificial IntelligenceAp-
plicationsfor BusinessW. Reitman (ed.), pp. 65-85, Ablex,
(1984).
[16] Kowalsld, R.A., Logicfor ProblemSolving North-Holland
Elsevier,New York (1979).
[17] Kowalski, R.A.,Logicas a Database Language(July 1981)
unpublished.
[18] Kunifuji, S. and H. Yokota, Prolog and Relational Data-
bases for Fifth Generation Computer Systems, Proc.
Workshopon LogicalBasesfor Data Bases,Toulouse (Dec.
1982).
[19] Minsky, M., A Framework for Representing Knowledge,
in: The Psychologyof Computer Vision.P.H. Winston (ed.)
pp. 211-277, McGraw-Hill, New York (1975).
[20] Nau, D., Expert Computer Systems, Computer(Feb. 1983)
pp. 63-85.
[21] Olson, J.P. and S.P. Ellis, PROBWELL - An Expert
Advisor for Determining Problems with Producing Wells,
Proc. IBM Scientific/Engineering Conference, Poughkeep-
sie, New York (Nov. 1982).
[22] Pereira, L.M. and A. Porto, A Prolog Implementation of a
Large Systemon a SmallMachine, Departmento de infor-
matica, Universidade Nova de Lisboa (1982).
[23] Robinson J.A., A Machine Oriented LogicBased on the
Resolution Principle, JACM Vol. 1 (1965) pp. 23-41.
[24] Schank, R.C., Conceptual Information Processing,
North-Holland, Amsterdam, New York (1975).
[25] Sprague, R.H. and E.D. Carlson, BuildingEffective Deci-
sion Support Systems. Prentice-Hail, EnglewoodCliffs NY
(1982).
[26] Stonebraker, M., Implementation of Integrity Constraints
and Viewsby Query Modification, Proc.ACM-SIGMOD
Conf. (1975) pp. 65-77.
[27] Tamlund, S.-A., LogicalBasis for Data Bases (1978) un-
published.
[28] Travis, L. and C. Kellogg, Deductive Power in Knowledge
Management Systems: Ideas and Experiments, Proc.
Workshopon LogicalBasesfor Data Bases, Toulouse (Dec.
1982).
[29] Vassifiou, Y., J. Clifford and M. Jarke, How does an
Expert SystemGet Its Data?, NYU Working Paper CRL;
~50, GBA 82-26 (CR), extended abstract in Proc. 9th
VLDB Conf., Florence (Oct. 1983).
[30] Waterman, D. and F. Hayes-Roth, (eds) Pattern Directed
Inference Systems, Academic Press, New York (1979).
[31] Weyhrauch, R., Prolegomena to a Theory of Mechanical
Formal Reasoning, Artificial Intelligence, 13 (1980) pp.
133-170.
[32] Wilth, N., Program Development by Stepwise Refine-
ment, CACM 14 (1971) pp. 221-227.
Appendix I
,/
* / This is the database used as the examplein several */
/* sections of the paper. It has been copied from Date,
and it deals
/* with the world of SUPPLIERS AND_ PARTS.
/ * * * * * * * * * * ~*** 0 . * * * * * * * . 0 . * * * * *
t
DBSCHEMA(SUPPLIERS_AND_ PARTS,.
DCITYI],
[[SUPPLIER,
[SNO, SNAME, STATUS, CITY],
[DSNO, DSNAME, DSTATUS,
[PART,
[PNO, PNAME, COLOR, WEIGHT,
cITYI,
DPNO, DPNAME, DCOLOR,
DWEIGHT, DCITYII,
[SUPPLY,
[SNO, PNO, QTY],
[DSNO, DPNO, DQTY]]],
[ [FD, SUPPLIER, [SNO], [SNAME,
STATUS, CITY]],
[FD, SUPPLIER, [SNAME], [SNO,
STATUS, CITY]f,
• [FD, PART, [PNO], [PNAME, COLOR,
WEIGHT, CITY]f,
[FD, SUPPLIER, [CITY], [STATUS]],
[FD, PART, [PNAME, COLOR],
[CITY]],
[SNO]],
[VD, SUPPLIER, STATUS, 10, 60],
[SD, SUPPLY, [SNO], SUPPLIER,
[SD, SUPPLY, [PNO], PART, [PNO]]]).
The envisioned use of the database is as fol-
lows. A predicate "open" is used to initiate the
database name.
OPEN(database-name)
For instance, the Prolog statement
[?-OPEN(SUPPLIERS_AND_ PARTS).
will instantiate the database-name. No other men-
tion of this name need be made in the sequel.
Some small examples of possible queries on this
database scheme follow.
I?- RELNAME(rel).
rel= SUPPLIER
I?-SCHEME(SUPPLIER, scheme).
scheme = [SNO, SNAME, STATUS, CITY]
[%SHOWKEY(SUPPLIER, key).
key = [SNO];
key = [SNAME]
i?- SHOWSD(relation, sds).
Y. Vassiliou, J. Clifford, M. Jarke / Expert System Access to Specific'Knowledge 139
relation = [supply, supplier]
sds -- [sno, sno];
relation = [supply, part]
sds = [pno, pno]
/, An instance of the database •/
DBINSTANCE(SUPPLIERS_ AND_ PARTS,
[[SUPPLIER,
[[S1, SMITH, 20, LONDON],
[$2, JONES, 10, PARIS],
[$3, BLAKE, 30, PARIS],
[$4, CLARK, 20, LONDON],
[$5, ADAMS, 30, ATHENS]]I,
[PART,
[P1, NUT, RED, 12, LONDON],
~P2,BOLT, GREEN, 17, PARIS],
[P3, SCREW,BLUE,L 17, ROME],
[P4, SCREW,RED, 14, LONDON],
[PS,CAM, BLUE, 12, PARIS],
[P6,COG, RED, 19, LONDON]]]
[SUPPLY,
[[S1,P1,300],
IS1, P2, 200],
[S1, P3, 400],
IS1, P4, 2001,
IS1, PS, 1001,
IS1, P6, 1001,
is2, P1, 3OOl,
[$2, P2, 4001,
IS3, P2, 2001,
[$4, V2, 2001,
[$4, P4, 3001,
[$4, P5, 40011]]).
/* Natural Join.
/* General Form: NATJOIN(relnamel, relname2,
result, scheme)/
I%NATJOIN(SUPPLY, PART, result, scheme).
result = [[$1, Pl, 300, LONDON, RED, NUT," 12],
[$2, Pl, 300, LONDON, RED, NUT, 12],
[$1, P2, 200, PARIS, GREEN, BOLT, 17],
[$2, P2, 400, PARIS, GREEN, BOLT, 17l,
[$3, P2, 200, PARIS, GREEN, BOLT, 17],
[$4, P2, 200, PARIS, GREEN, BOLT, 17],
[$1, P3, 4Y~; ROME, BLUE, SCREW, 17],
[$1, F4, 200, LONDON, RED, SCREW, 14],
[$4, P4, 300, LONDON, RED, SCREW, 14],
[$1, PS, 100, PARIS, BLUE, CAM, 12],
[$4, PS, 400, PARIS, BLUE, CAM, 12]],
[$1, P6, 100, LONDON, RED, COG, 19]],
scheme = [SNO, PNO, QTY, CITY, COLOR, PNAME,
WEIGHT];
,/
/* The following statement simulates the tuple-at-
time
/, treatment of Prolog for relational databases
defined
/, as predicates with the form:
/ • SU PPLY (sl,
100) */
/*
,°o */
,/
,/
,/
pl,
*/
*/
***** ******O***** ****** ** ******
,/
/, These examples illustrate a subset of a relational */
/* DBMS, built upon the representation scheme dis-
cussed in */
/* Section 4. The variable and predicate names have */
/* been chosen so as to make the meaning clear. */
• ******************************* ,/
/, Projection */
/* General form: PROJECT(relname, attrlist, projection) */
1%PROJECT(SUPPLIER, [CITY], cities).
cities--[[LONDON], [PARIS], [PARIS], [LONDONI,
[ATHENS]]
/* Selection. */
/* General Form: SELECT (relname, attrs, ops, v~s,
res) */
I?- SELECT(SUPPLIER, [CITY, STATUS], [ =, > ],
[PARIS, 20], result).
result--[[$3, BLAKE, 30, PARIS]]
**********************************
SUPPLY(sno, pno, qty) ~- SIMCALL(SUPPLY, [sno, pno,
qtyi).
I?- SUPPLY(sno, pno, qty).
pno = Pl,
sno -- S1,
qty = 300
Appendix 2
***************************** */
/, ,/
/, The predicate METAEVALUATE has four param-
eters: ' */
/, ,/
/, METAEVALUATE(Assumptions, Goals, Control,
NewGoals) */
/, ,/
/, Given Assumptions and a set of Goals to be
proven, */
/* using Control, return a liew set of goals
(NewGoals) */
140 Y. Vassiliou,J. Clifford,M. Jarke / Expert System Access to Specific Knowledge
/* - all in a non-evaluable
form
/* Algorithm:
/, 1.-Selecta Goal (first one).
/* 2.-Select an appropriate Assumption (clause)
with meta
/, 3.-Rename the variables in the clauses
/, 4.-Match the renamed variables
/* 5.-Add the body of the clause to the rest of
/, the goals producing intermediate goals
/* 6.-Apply the variable differences to the above
goals
7.-Use METAEVALUATE recursively.
,/
,/
,/
,/
*/
*/
,/
,/
,/
,/
/, */
/, */
/* Recursion stops when: */
/* -no goals exist, or */
/* -all remaining goals are DBCALLs, or */
/* -the arguments of "or" and "not" are all
DBCALLs */
/, ,/
• ***************************** */
METAEVALUATE(goal,control, goal)
*--STOPEVALUATING(goal) & !.
METAEVALUATE(meta, [goailrest], control, newgoals)
~-META(clause,meta) &
RENAMEVARS(clause,[goallrest],[carlcons])&
MATCH(goal, car, dill)&
ADD(meta, cons, rest, intergoals)&
APPLY(intergoals,diff, othergoals)&
METAEVALUATE(meta, othergoals, control, new-
goals).
/* Description of an external database (stored rela- */
tions)
/* This database will be used in the examples that
follow */
SUPPLY(sno, pno, qty)
4--DBCALL(SUPPLY,[sno,pno, qty]).
SUPPLIER(sno, sname, status, city)
DBCALL(SUPPLIER, [sno, sname, status, city]).
PART(pno, pname, color, weight, city)
DBCALL(PART, [pno, pname, color, weight, city]).
SUBPART(subpno, pno)
¢--DBCALL(SUBPART, [subpno, pno]).
/* Some geneh-alizedviewsof the extemal database */
/* (used internally) • /
ANY_LEVEL_SUBPART(spno, pno)
SUBPART(spno, pno).
ANY- LEVEL_SUBPART(spno, pno)
~- SUBPART(spno, pl) &
ANY LEVEL_SUBPART(pl, pno).
SUPPLIES_MANY(sno) *--SUPPLY(sno, pnol, qtyl) &
SUPPLY(sno, pno2, qty2) &
NOTEQUAL(pnol, pno2).
SPECIAL_SUPPLIER(sno)
NOT(SUPPLIES_MANY(sno)) &
NORTH_ EUROPEAN(sno).
NORTH_ EUROPEAN(sno)
OR(SUPPLIER(sno, n, st, LONDON),
SUPPLIER(sno, n, st, PARIS)).
MAJOR_ SUPPLIER(sno, pno)
,-SUPPLY(sno, pno, qty)& GREATER(qty, 300).
GOOD BET SUPPLIER(sno, pno)
*--NORTH_ EUROPEAN(sno) &
MAJOR_ SUPPLIER(sno, pno).
/* Meta predicate instantiations corresponding to the */
/* stored relations and views.Note the use of PR1 */
/* as a program name. */
META([SUPPLIER(V sno, V sname, V status, V_city),
DBCALL(suppfier, [V sno, V shame,
V_status, V city])], PR1).
META([PART(V pno, V pname, V_color,V_weight,V_city),
DBCALL(PART, [V_pno, V_pname, V_color,
V_weight,V_city])],PR1).
META([SUPPLY(V sno, V_pno, V_qty),
DBCALL(SUPPLY, [V.sno, V_pno, V_qty])],PR1).
META([SUBPART(V_subpno, %1_
pno),
DBCALL(SUBPART, [V_subpno, V_pno])], PR1).
META([ANY_LEVEL_SUBPART(V_spno, V_pno),
SUBPART(V spno, V pno)], PR1).
META([ANY LEVEL_SUBPART(V_spno, V_pno),
SUBPART(V spno, V pl),
ANY_LEVEL_SUBPART(V_pl, V pno)], PR1).
META([SUPPLIES_MANY(V_sno),
SUPPLY(V sno, V_pnol, V_qtyl),
SUPPLY(V sno, V pno2, V_qty2),
NOTEQUAL(V pnol, V pno2)], PR1).
META(ISPECIALSUPPLIER(V sno),
NOT(SUPPLIES_MANY(V_sno)),
NORTH EUROPEAN(V_sno)], PR1).
META([NORTH_ EUROPEAN(V sno),
OR(SUPPLIER(V sno, V_N, V_st, LONDON),
SUPPLIER(V sno, V_N, V st, PARIS))], PR1.
META([MAJOR_SUPPLIER(V_sno, V_pno),
SUPPLY(V_sno, V pno, V_qty),
GREATER(V_qty, 300)], PR1).
META([GOOD BET_SUPPLIER(V_sno, V_pno),
Y. Vassiliou,J. Clifford, Ill. Jarke / Expert System Access to Specific Knowledge 141
NORTH EUROPEAN(V_sno),
MAJOR_SUPPLIER(V_sno, Y-pno)], PR1).
/* Examples of the execution of "metaevaluate". */
/* The Cont~'ol value is 1, specifying no extra
action */
/* (e.g. optimization) */
I?-METAEVALUATE(PR1,
[GOOD_ BET_SUPPLIER(V_ sno, GADGET)], 1, newgoals).
newgoals = [OR(DBCALL(SUPPLIER,
IV sno, V N, V_st, LONDON]),
DBCALL(SUPPLIER,
IV sno, V N, V_st, PARIS])),
DBCALL(SUPPLY, IV sno, GADGET, V_qty],
DBCALL(GREATER,[V_qty, 300])];
[?- METAEVALUATE(PR1,
[SPECIAL_SUPPLIER(V_ sno)], 1, newgoals).
newgoals = [NOT(DBCALL(SUPPLY,
[V_sno, V_pnol, V qtyl]),
DBCALL(SUPPLY,
[V_sno, V pno2, V_qty2]),
DBCALL(NOTEQUAL,
IV_pnol, V_pno2l)),
OR(DBCALL(SUPPLIER,
[V_sno, V_N, V st, LONDON]),
DBCALL(SUPPLIER,
[V_sno, V_N, V_st, PARIS]))]
/* A recursive call. Recursion stops after three level~./
[?.-METAEVALUATE(PR1,
[ANY LEVEL,_SUBPARTS(BOLTS, V_sup)], 1, newgoals).
newgoals = [DBCALL(SUBPART, [BOLTS, V_sup])];
newgoals = [DBCALL(SUBPART, [BOLTS, Y-pl]),
DBCALL(SUBPART, IV_pl, V sup])]:
newgoals = [DBCALL(SUBPART, [BOLTS, V pl]),
DBCALL(SUBPART,[V_pl, Y-pll]),
DBCALL(SUBPART, IV_pll, V_sup])]
I?- METAEVALUATE(PR1,
[SUPPLIES_MANY(V who),
NORTH_ EUROPEAN(Vwho)], 1, ng).
ng = [DBCALL(SUPPLY, [y-who, V pnol, V_qtyl]),
DBCALL(SUPPLY, IV who, Y-pnol, V_qty2]),
DBCALL(NOTEQUAL: IV_pnol, V_pno2]),
OR(DBCALL(SUPPLIER,
[Vwho, V_n, V_st, LONDON]).
DBCALL(SUPPLIER,
IV_who,V_n, V_st, PARIS]))]
]?- METAEVALUATE(PR1,
[OR(SUPPLIES_ MANY(SMITH).
NOT(NORTH EUROPEAN(SMITH)))], 1, ng).
ng = [OR(DBCALL(SUPPLY, [SMITH, V_pnol, V qtylD,
DBCALL(SUPPLY, [SMITH, V_pno2, V_qty2]),
DBCALL(NOTEQUAL, IV pnol, V pno2]),
NOT(OR(DBCALL(SUPPLIER,
[SMITH, V_n, V st, LONDON]),
DBCALL(SUPPLIER, [SMITH, V_n,
V st, PARIS]))))]

Contenu connexe

Similaire à Access To Specific Declarative Knowledge By Expert Systems The Impact Of Logic Programming

An Assignment On Information System Modeling On Teaching Data And Process Int...
An Assignment On Information System Modeling On Teaching Data And Process Int...An Assignment On Information System Modeling On Teaching Data And Process Int...
An Assignment On Information System Modeling On Teaching Data And Process Int...Andrea Porter
 
A relational model of data for large shared data banks
A relational model of data for large shared data banksA relational model of data for large shared data banks
A relational model of data for large shared data banksSammy Alvarez
 
Applying Classification Technique using DID3 Algorithm to improve Decision Su...
Applying Classification Technique using DID3 Algorithm to improve Decision Su...Applying Classification Technique using DID3 Algorithm to improve Decision Su...
Applying Classification Technique using DID3 Algorithm to improve Decision Su...IJMER
 
A Systems Approach To Qualitative Data Management And Analysis
A Systems Approach To Qualitative Data Management And AnalysisA Systems Approach To Qualitative Data Management And Analysis
A Systems Approach To Qualitative Data Management And AnalysisMichele Thomas
 
Data Integration in Multi-sources Information Systems
Data Integration in Multi-sources Information SystemsData Integration in Multi-sources Information Systems
Data Integration in Multi-sources Information Systemsijceronline
 
Finding new framework for resolving problems in various dimensions by the use...
Finding new framework for resolving problems in various dimensions by the use...Finding new framework for resolving problems in various dimensions by the use...
Finding new framework for resolving problems in various dimensions by the use...Alexander Decker
 
INTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKING
INTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKINGINTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKING
INTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKINGdannyijwest
 
INTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKING
INTELLIGENT SOCIAL NETWORKS MODEL BASED  ON SEMANTIC TAG RANKINGINTELLIGENT SOCIAL NETWORKS MODEL BASED  ON SEMANTIC TAG RANKING
INTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKINGdannyijwest
 
INTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKING
INTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKINGINTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKING
INTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKINGIJwest
 
AN ENHANCED ELECTRONIC TRANSCRIPT SYSTEM (E-ETS)
AN ENHANCED ELECTRONIC TRANSCRIPT SYSTEM (E-ETS)AN ENHANCED ELECTRONIC TRANSCRIPT SYSTEM (E-ETS)
AN ENHANCED ELECTRONIC TRANSCRIPT SYSTEM (E-ETS)ijcsit
 
An Approach to Automate the Relational Database Design Process
An Approach to Automate the Relational Database Design Process An Approach to Automate the Relational Database Design Process
An Approach to Automate the Relational Database Design Process ijdms
 
A security decision reaction architecture for heterogeneous distributed network
A security decision reaction architecture for heterogeneous distributed networkA security decision reaction architecture for heterogeneous distributed network
A security decision reaction architecture for heterogeneous distributed networkchristophefeltus
 
A HUMAN-CENTRIC APPROACH TO GROUP-BASED CONTEXT-AWARENESS
A HUMAN-CENTRIC APPROACH TO GROUP-BASED CONTEXT-AWARENESSA HUMAN-CENTRIC APPROACH TO GROUP-BASED CONTEXT-AWARENESS
A HUMAN-CENTRIC APPROACH TO GROUP-BASED CONTEXT-AWARENESSIJNSA Journal
 
Army Study: Ontology-based Adaptive Systems of Cyber Defense
Army Study: Ontology-based Adaptive Systems of Cyber DefenseArmy Study: Ontology-based Adaptive Systems of Cyber Defense
Army Study: Ontology-based Adaptive Systems of Cyber DefenseRDECOM
 

Similaire à Access To Specific Declarative Knowledge By Expert Systems The Impact Of Logic Programming (20)

An Assignment On Information System Modeling On Teaching Data And Process Int...
An Assignment On Information System Modeling On Teaching Data And Process Int...An Assignment On Information System Modeling On Teaching Data And Process Int...
An Assignment On Information System Modeling On Teaching Data And Process Int...
 
Cal Essay
Cal EssayCal Essay
Cal Essay
 
A relational model of data for large shared data banks
A relational model of data for large shared data banksA relational model of data for large shared data banks
A relational model of data for large shared data banks
 
Applying Classification Technique using DID3 Algorithm to improve Decision Su...
Applying Classification Technique using DID3 Algorithm to improve Decision Su...Applying Classification Technique using DID3 Algorithm to improve Decision Su...
Applying Classification Technique using DID3 Algorithm to improve Decision Su...
 
A Systems Approach To Qualitative Data Management And Analysis
A Systems Approach To Qualitative Data Management And AnalysisA Systems Approach To Qualitative Data Management And Analysis
A Systems Approach To Qualitative Data Management And Analysis
 
Data Integration in Multi-sources Information Systems
Data Integration in Multi-sources Information SystemsData Integration in Multi-sources Information Systems
Data Integration in Multi-sources Information Systems
 
Finding new framework for resolving problems in various dimensions by the use...
Finding new framework for resolving problems in various dimensions by the use...Finding new framework for resolving problems in various dimensions by the use...
Finding new framework for resolving problems in various dimensions by the use...
 
INTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKING
INTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKINGINTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKING
INTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKING
 
INTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKING
INTELLIGENT SOCIAL NETWORKS MODEL BASED  ON SEMANTIC TAG RANKINGINTELLIGENT SOCIAL NETWORKS MODEL BASED  ON SEMANTIC TAG RANKING
INTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKING
 
INTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKING
INTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKINGINTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKING
INTELLIGENT SOCIAL NETWORKS MODEL BASED ON SEMANTIC TAG RANKING
 
Lecture2 is353-ea(the zachma framework)
Lecture2 is353-ea(the zachma framework)Lecture2 is353-ea(the zachma framework)
Lecture2 is353-ea(the zachma framework)
 
STUDY OF AGENT ASSISTED METHODOLOGIES FOR DEVELOPMENT OF A SYSTEM
STUDY OF AGENT ASSISTED METHODOLOGIES FOR DEVELOPMENT OF A SYSTEMSTUDY OF AGENT ASSISTED METHODOLOGIES FOR DEVELOPMENT OF A SYSTEM
STUDY OF AGENT ASSISTED METHODOLOGIES FOR DEVELOPMENT OF A SYSTEM
 
An Enhanced Electronic Transcript System (E-ETS)
An Enhanced Electronic Transcript System (E-ETS)An Enhanced Electronic Transcript System (E-ETS)
An Enhanced Electronic Transcript System (E-ETS)
 
AN ENHANCED ELECTRONIC TRANSCRIPT SYSTEM (E-ETS)
AN ENHANCED ELECTRONIC TRANSCRIPT SYSTEM (E-ETS)AN ENHANCED ELECTRONIC TRANSCRIPT SYSTEM (E-ETS)
AN ENHANCED ELECTRONIC TRANSCRIPT SYSTEM (E-ETS)
 
AN ENHANCED ELECTRONIC TRANSCRIPT SYSTEM (E-ETS)
AN ENHANCED ELECTRONIC TRANSCRIPT SYSTEM (E-ETS)AN ENHANCED ELECTRONIC TRANSCRIPT SYSTEM (E-ETS)
AN ENHANCED ELECTRONIC TRANSCRIPT SYSTEM (E-ETS)
 
An Approach to Automate the Relational Database Design Process
An Approach to Automate the Relational Database Design Process An Approach to Automate the Relational Database Design Process
An Approach to Automate the Relational Database Design Process
 
A security decision reaction architecture for heterogeneous distributed network
A security decision reaction architecture for heterogeneous distributed networkA security decision reaction architecture for heterogeneous distributed network
A security decision reaction architecture for heterogeneous distributed network
 
A security decision reaction architecture for heterogeneous distributed network
A security decision reaction architecture for heterogeneous distributed networkA security decision reaction architecture for heterogeneous distributed network
A security decision reaction architecture for heterogeneous distributed network
 
A HUMAN-CENTRIC APPROACH TO GROUP-BASED CONTEXT-AWARENESS
A HUMAN-CENTRIC APPROACH TO GROUP-BASED CONTEXT-AWARENESSA HUMAN-CENTRIC APPROACH TO GROUP-BASED CONTEXT-AWARENESS
A HUMAN-CENTRIC APPROACH TO GROUP-BASED CONTEXT-AWARENESS
 
Army Study: Ontology-based Adaptive Systems of Cyber Defense
Army Study: Ontology-based Adaptive Systems of Cyber DefenseArmy Study: Ontology-based Adaptive Systems of Cyber Defense
Army Study: Ontology-based Adaptive Systems of Cyber Defense
 

Plus de Audrey Britton

Developing And Writing A Diversity Statement Cent
Developing And Writing A Diversity Statement CentDeveloping And Writing A Diversity Statement Cent
Developing And Writing A Diversity Statement CentAudrey Britton
 
RESEARCH PAPER WRITING FORMAT Tanh
RESEARCH PAPER WRITING FORMAT TanhRESEARCH PAPER WRITING FORMAT Tanh
RESEARCH PAPER WRITING FORMAT TanhAudrey Britton
 
How To Plan And Write An Essay Fast. A Teacher Tells All. Writers Bureau
How To Plan And Write An Essay Fast. A Teacher Tells All. Writers BureauHow To Plan And Write An Essay Fast. A Teacher Tells All. Writers Bureau
How To Plan And Write An Essay Fast. A Teacher Tells All. Writers BureauAudrey Britton
 
Disney Stationary Tinkerbell And Friends, Disney Scrapb
Disney Stationary Tinkerbell And Friends, Disney ScrapbDisney Stationary Tinkerbell And Friends, Disney Scrapb
Disney Stationary Tinkerbell And Friends, Disney ScrapbAudrey Britton
 
Websites That Write Essays For You Top 10 Services
Websites That Write Essays For You Top 10 ServicesWebsites That Write Essays For You Top 10 Services
Websites That Write Essays For You Top 10 ServicesAudrey Britton
 
Digital Elephant Writing Paper Printable Elephant P
Digital Elephant Writing Paper Printable Elephant PDigital Elephant Writing Paper Printable Elephant P
Digital Elephant Writing Paper Printable Elephant PAudrey Britton
 
Top Experts To Write Paper For Money In All Disciplines
Top Experts To Write Paper For Money In All DisciplinesTop Experts To Write Paper For Money In All Disciplines
Top Experts To Write Paper For Money In All DisciplinesAudrey Britton
 
This May Be The Worst College Paper Ever WrittenBut A Whistleblower ...
This May Be The Worst College Paper Ever WrittenBut A Whistleblower ...This May Be The Worst College Paper Ever WrittenBut A Whistleblower ...
This May Be The Worst College Paper Ever WrittenBut A Whistleblower ...Audrey Britton
 
What Cause Climate Change Essay. The Causes Of Cli
What Cause Climate Change Essay. The Causes Of CliWhat Cause Climate Change Essay. The Causes Of Cli
What Cause Climate Change Essay. The Causes Of CliAudrey Britton
 
Essay Writing Service Write My Essay Essay Writing Help
Essay Writing Service Write My Essay Essay Writing HelpEssay Writing Service Write My Essay Essay Writing Help
Essay Writing Service Write My Essay Essay Writing HelpAudrey Britton
 
Thesis Vs. Dissertation Vs. Research Paper - Basic Dif
Thesis Vs. Dissertation Vs. Research Paper - Basic DifThesis Vs. Dissertation Vs. Research Paper - Basic Dif
Thesis Vs. Dissertation Vs. Research Paper - Basic DifAudrey Britton
 
013 Good Persuasive Essay Topics Example Thatsno
013 Good Persuasive Essay Topics Example Thatsno013 Good Persuasive Essay Topics Example Thatsno
013 Good Persuasive Essay Topics Example ThatsnoAudrey Britton
 
Using Quotes In An Essay Ultimate B
Using Quotes In An Essay Ultimate BUsing Quotes In An Essay Ultimate B
Using Quotes In An Essay Ultimate BAudrey Britton
 
Brown Paper Texture Background Stock Photos Creative Market
Brown Paper Texture Background  Stock Photos  Creative MarketBrown Paper Texture Background  Stock Photos  Creative Market
Brown Paper Texture Background Stock Photos Creative MarketAudrey Britton
 
Critique Paper Example How To Write An Article Cr
Critique Paper Example  How To Write An Article CrCritique Paper Example  How To Write An Article Cr
Critique Paper Example How To Write An Article CrAudrey Britton
 
Write My Paper Hub - Your Reliable Academic Writing Assi
Write My Paper Hub - Your Reliable Academic Writing AssiWrite My Paper Hub - Your Reliable Academic Writing Assi
Write My Paper Hub - Your Reliable Academic Writing AssiAudrey Britton
 
ITALIAN LESSON Italian Writing 1 By DrakeCroft On
ITALIAN LESSON Italian Writing 1 By DrakeCroft OnITALIAN LESSON Italian Writing 1 By DrakeCroft On
ITALIAN LESSON Italian Writing 1 By DrakeCroft OnAudrey Britton
 
Manuscript Paper Japanese Writing Paper Stock Illustra
Manuscript Paper Japanese Writing Paper Stock IllustraManuscript Paper Japanese Writing Paper Stock Illustra
Manuscript Paper Japanese Writing Paper Stock IllustraAudrey Britton
 
Star Writing Template Freebie By Cupcakes A
Star Writing Template Freebie By Cupcakes AStar Writing Template Freebie By Cupcakes A
Star Writing Template Freebie By Cupcakes AAudrey Britton
 
Short Paragraph On Water Pollution. Paragraph On Water Pollution ...
Short Paragraph On Water Pollution. Paragraph On Water Pollution ...Short Paragraph On Water Pollution. Paragraph On Water Pollution ...
Short Paragraph On Water Pollution. Paragraph On Water Pollution ...Audrey Britton
 

Plus de Audrey Britton (20)

Developing And Writing A Diversity Statement Cent
Developing And Writing A Diversity Statement CentDeveloping And Writing A Diversity Statement Cent
Developing And Writing A Diversity Statement Cent
 
RESEARCH PAPER WRITING FORMAT Tanh
RESEARCH PAPER WRITING FORMAT TanhRESEARCH PAPER WRITING FORMAT Tanh
RESEARCH PAPER WRITING FORMAT Tanh
 
How To Plan And Write An Essay Fast. A Teacher Tells All. Writers Bureau
How To Plan And Write An Essay Fast. A Teacher Tells All. Writers BureauHow To Plan And Write An Essay Fast. A Teacher Tells All. Writers Bureau
How To Plan And Write An Essay Fast. A Teacher Tells All. Writers Bureau
 
Disney Stationary Tinkerbell And Friends, Disney Scrapb
Disney Stationary Tinkerbell And Friends, Disney ScrapbDisney Stationary Tinkerbell And Friends, Disney Scrapb
Disney Stationary Tinkerbell And Friends, Disney Scrapb
 
Websites That Write Essays For You Top 10 Services
Websites That Write Essays For You Top 10 ServicesWebsites That Write Essays For You Top 10 Services
Websites That Write Essays For You Top 10 Services
 
Digital Elephant Writing Paper Printable Elephant P
Digital Elephant Writing Paper Printable Elephant PDigital Elephant Writing Paper Printable Elephant P
Digital Elephant Writing Paper Printable Elephant P
 
Top Experts To Write Paper For Money In All Disciplines
Top Experts To Write Paper For Money In All DisciplinesTop Experts To Write Paper For Money In All Disciplines
Top Experts To Write Paper For Money In All Disciplines
 
This May Be The Worst College Paper Ever WrittenBut A Whistleblower ...
This May Be The Worst College Paper Ever WrittenBut A Whistleblower ...This May Be The Worst College Paper Ever WrittenBut A Whistleblower ...
This May Be The Worst College Paper Ever WrittenBut A Whistleblower ...
 
What Cause Climate Change Essay. The Causes Of Cli
What Cause Climate Change Essay. The Causes Of CliWhat Cause Climate Change Essay. The Causes Of Cli
What Cause Climate Change Essay. The Causes Of Cli
 
Essay Writing Service Write My Essay Essay Writing Help
Essay Writing Service Write My Essay Essay Writing HelpEssay Writing Service Write My Essay Essay Writing Help
Essay Writing Service Write My Essay Essay Writing Help
 
Thesis Vs. Dissertation Vs. Research Paper - Basic Dif
Thesis Vs. Dissertation Vs. Research Paper - Basic DifThesis Vs. Dissertation Vs. Research Paper - Basic Dif
Thesis Vs. Dissertation Vs. Research Paper - Basic Dif
 
013 Good Persuasive Essay Topics Example Thatsno
013 Good Persuasive Essay Topics Example Thatsno013 Good Persuasive Essay Topics Example Thatsno
013 Good Persuasive Essay Topics Example Thatsno
 
Using Quotes In An Essay Ultimate B
Using Quotes In An Essay Ultimate BUsing Quotes In An Essay Ultimate B
Using Quotes In An Essay Ultimate B
 
Brown Paper Texture Background Stock Photos Creative Market
Brown Paper Texture Background  Stock Photos  Creative MarketBrown Paper Texture Background  Stock Photos  Creative Market
Brown Paper Texture Background Stock Photos Creative Market
 
Critique Paper Example How To Write An Article Cr
Critique Paper Example  How To Write An Article CrCritique Paper Example  How To Write An Article Cr
Critique Paper Example How To Write An Article Cr
 
Write My Paper Hub - Your Reliable Academic Writing Assi
Write My Paper Hub - Your Reliable Academic Writing AssiWrite My Paper Hub - Your Reliable Academic Writing Assi
Write My Paper Hub - Your Reliable Academic Writing Assi
 
ITALIAN LESSON Italian Writing 1 By DrakeCroft On
ITALIAN LESSON Italian Writing 1 By DrakeCroft OnITALIAN LESSON Italian Writing 1 By DrakeCroft On
ITALIAN LESSON Italian Writing 1 By DrakeCroft On
 
Manuscript Paper Japanese Writing Paper Stock Illustra
Manuscript Paper Japanese Writing Paper Stock IllustraManuscript Paper Japanese Writing Paper Stock Illustra
Manuscript Paper Japanese Writing Paper Stock Illustra
 
Star Writing Template Freebie By Cupcakes A
Star Writing Template Freebie By Cupcakes AStar Writing Template Freebie By Cupcakes A
Star Writing Template Freebie By Cupcakes A
 
Short Paragraph On Water Pollution. Paragraph On Water Pollution ...
Short Paragraph On Water Pollution. Paragraph On Water Pollution ...Short Paragraph On Water Pollution. Paragraph On Water Pollution ...
Short Paragraph On Water Pollution. Paragraph On Water Pollution ...
 

Dernier

How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17Celine George
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFVivekanand Anglo Vedic Academy
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...Nguyen Thanh Tu Collection
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxMohamed Rizk Khodair
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文中 央社
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMELOISARIVERA8
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...Nguyen Thanh Tu Collection
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project researchCaitlinCummins3
 
How to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 InventoryHow to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 InventoryCeline George
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxheathfieldcps1
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/siemaillard
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptxPoojaSen20
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital ManagementMBA Assignment Experts
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppCeline George
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45MysoreMuleSoftMeetup
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi RajagopalEADTU
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptxVishal Singh
 

Dernier (20)

How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptx
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
IPL Online Quiz by Pragya; Question Set.
IPL Online Quiz by Pragya; Question Set.IPL Online Quiz by Pragya; Question Set.
IPL Online Quiz by Pragya; Question Set.
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
How to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 InventoryHow to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 Inventory
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 

Access To Specific Declarative Knowledge By Expert Systems The Impact Of Logic Programming

  • 1. 123 Access to Specific Declarative Knowledge by Expert Systems: The Impact of Logic Programming Yannis VASSILIOU, James CLIFFORD, and Matthias JARKE ComputerApplicationsandInformation Systems, GraduateSchool of Business Administration, New York University,NY, USA As part of the operation of an Expert System, a deductive component accesses a database of facts to help simulate the behavior of a human expert in a particular problem domain. The nature of this access is examined, and four access strategies are identified. Features of each of these strategies are addressed within the framework of a logic-based deductive component and the relational model of data. Keywords: Expert Systems, Database Management Systems, Knowledge Representation, Logic Programming, Relational Database, Relational Algebra, Predicate Evaluation, Metalevel Evaluation, Language Trans- lation, Query Optimization. Jim Clifford is an Assistant Profes- sor of Computer Applications and In- formation Systems at New York Uni- versity. His research interests lie in the areas of database management, artifi- cial intelligence, and user interfaces. His major work has been the develop- ment of a formal Historical Database Model (HDBM), an extension of the relational model to incorporate a tem- poral dimension. Professor Clifford received his B.A. in music from Yale University. After serving several years as Database Administrator for the Yale Center for British Art, he went on to receive his M.S. and Ph.D. degrees in Computer Science from the State University of New York at Stony Brook. 1. Introduction Decision Support Systems (DSS) require the simultaneous management of data, models, and dialogues [25]. DSS research has placed particular emphasis on providing consistent user views of models and data [2], and on supporting access to databases by decision models [10]. The emergence of practical Artificial Intelligence (AI) techniques over the last few years impacts these problems in at least two ways. On the one hand, the interac- tions among DSS components, and between DSS and user can arguably be handled more smoothly using AI methods for model* management [3,11] and user interfaces [1]. On the other hand, the addition of knowledge-based decision models, in particular expert systems, to the model base of a DSS presents new challenges for DSS implementa- tion. It is this latter problem that is the focus of this paper. An Expert System (ES) is a problem-solving computer system that incorporates enough knowl- edge in some specialized problem domain to reach a level of performance comparable to that of a human expert. Expert Systems differ from exact or heuristic optimization procedures, as used in con- ventional DSS, in that they mostly base their recommendations on informal and qualitative de- Matthias Jarke is an Associate Pro- fessor of Computer Applications and Information Systems at the Graduate School of Business Administration of New York University. He received Di- plomas in Business Administration d1977) and Computer Science (1979), a Ph.D. in Economical Sciences (1980) from Hamburg University,West Germany. His research interests in- dude the design, evaluationLand opti- mization of high-level database inter- fazes to end users, decision support systems, and expert systems, both from a systems programming and from a user perspective. North-Holland Decision Support Systems 1 (1985) 123-141 Yannis Vassiliou's research interests are in the area of Database Manage- ment and its applications. His early work includes research in relational database theory, in particular, on the problem of 'null' values in databases. Currently, he is investigating the inter- action of pure database research with 2 ~ ~" ~ I ~ other research and application areas. Professor Vassiliou received a B.S. in Mathematics from the University of Athens. He did his graduate studies in the Computer Science Department of the University of Toronto, where he received M.Sc. and Ph.D. degrees. Since 1980, he has been a member of the faculty at New York University. 016%9236/85/$3.30 © 1985, Elsevier Science Publishers B.V. (North-Holland)
  • 2. 124 Y. Vassiliou,J. Clifforg M. Jarke / Expert System Access to Specific Keowledge cision rules acquired from a human expert, rather than on a complete mathematical formalization of a decision problem [6]. In the heart of an ES lies the program that 'reasons' and makes deductions, the inference en- gine. To reason, both general knowledge or rules (e.g., if a person works for a company then he/she gets employee benefits), and specific declarative knowledge or data (e.g., John works for NYU), are needed. Various formalisms have been developed and advocated for the representation of this knowledge, including frames [19], conceptual de- pendency graphs [24], production rules [30], semantic networks [5], and standard first-order logic. Many of these techniques are capable of representing both general and specific knowledge. Current Expert Systems differ in sophistication, conceptual complexity, and computational com- plexity; for instance, the knowledge base may or may not include such concepts as causality, intent, physical principles, and simple empirical associa- tions. A typical scenario for consulting an ES, for example one using production rules for its knowl- edge representation, is as follows. The user begins by presenting the system with a goal or desired conclusion. The inference engine then chains (for- ward or backward) through a set of production rules to rink the conclusion with the assumptions, or known 'facts'. Finally, the system's conclusion is presented to the user, who can optionally ask for an explanation of the 'chain of reasoning' used to arrive at the given result. This paper is primarily concerned with the organization and access of the simple declarative knowledge in the knowledge base ot ESs. To organize these data, two dimensions need to be considered: variety and population. For instance, in a logic-based representation, 'variety' refers to the number of different predicates required, and 'population' to the number of instances of these predicates. Early ESs are mostly prototypes, characterized by a large variety and a small population of specific knowledge; therefore inefficiency of data handling is not a critical issue. Consequently, with very few exceptions, little attention has been given in ES design to the handling of very large populations. The mechanism to retrieve the specific facts in these systems does not reachthe sophistication and performance of database management systems (DBMS), systems that deal effectively with large volumes of data [9]. This paper investigates the technical issues of enhancing Expert Systems with database manage- ment facilities. The motivation for such enhance- ments is provided by the rapid advent of ES and the expectation that they will have an increasingly important impact in the business applications sec- tor - an environment that often implies the pres- ence of large databases, usually under the control of a DBMS. In Section 2, four database access strategies are identified and developed in stages. Tools devel- oped at an earlier stage are often necessary in each subsequent stage. The framework is illustrated with the use of first-order logic and relational database management. In particular, the logic programming language Prolog [7] is presented in Section 3, and its uses as a programming language, a relational database system, and an ES deductive component, are outlined. The way Prolog fits into the proposed framework of access strategieg is the topic of Sec- tions 4 and 5. The last section presents a summary and some problems for further research. 2. DatabaseAccess Strategiesby ExpertSystems Two general architectures are envisioned for the combination of the deductive and the database access components of an expert system. These two components can either be integrated into one sys- tem (the ES), or be independent systems with a defined protocol for communication [29]. Depending on the level of sophistication for the database access facility, integration suggests two distinct access strategies: elementary database access, and generalized database management. A major distinguishing characteristic between these general strategies is their respective ability to deal with secondary storage management, and therefore their capability to deal with large populations of specific facts. With the advent of ESs in the business environ- ment, a strong motivation for coupling an ES with an external DBMS has emerged [15]. The invest- ment of an enterprise in two different types of systems, both intended to assist decision making and smooth the flow of operations, is greatly justified if the two systems are able to communi- cate effectively. Thus, the large amounts of data
  • 3. Y. Vassiliou,J. Clifford, M. Jarke / Expert System Access to Specific Knowledge 125 managed by a DBMS can be accessed by the ES in the reasoning process. Moreover, the ES can offer an intelligent interface to a DBMS (in addition to query language interfaces, report generators, etc.). Depending on the nature of communication be- tween the two independent systems (ES and DBMS), two more access strategies are identified: loose, and tight coupling. Figure 1 illustrates a natural sequence in the development of these access strategies. An over- view is given in the rest of this section. 2.1. Elementary Database Access Within An Expert System- Strategy 1 ! On the simplest level, the whole population of specific declarative knowledge can be represented directly in the knowledge base formalism provided by the Expert System. Mechanisms such as semantic networks and frames, data structures where all knowledge about an ebject is collected together, are commonly used in ESs adopting this strategy. Furthermore, several languages have been developed to access and manipulate frames and semantic networks, e.g., NETL, KRL, and KLONE [20]. This first strategy for representing the data required by the ES is based on the assumption that during the system's operation the facts reside in main storage. This simplifies the development of access routines, but presents an obvious limitation on the size of the declarative knowledge popu- lation. 2.2. Generalized DBMS Within An Expert System - Strategy 2 Considering a broader spectrum of the domains to which ES technology is being applied, we see that a very large population of specific knowledge is often required. Such Expert Systems have ele- mentary database management facilities as sep- arate processes [20]. The minimum requirements for this access strategy are secondary storage management and indexing schemes. This seems to be the norm for current ESs, even though not all such systems exhibit the same level Of sophistica- tion. Moving a step further, a generalized DBMS may be implemented as a sub-process of the ES. The quest for 'generalized' database operations in the ES, rather than application-specific database access, may not be cost-effective in many cases, however. A case where generalization is effectively THE DECLARATIVEKNOW~,EIE, E ACCESSREQUIREMENTSOF ES I ! I INTEGRATION OF ES AND DBNS COUPLING OF ES WITH EXTERNALDBMS ! 1 f - i [ - I ELEMENTARY-ACCESS GENERALIgED-DBNS LOOSE-COUPLING TIGHT-COUPLING I I I I V Development In Stages ~ml.
  • 4. 126 Y. Vassiliott J. CIifforg M. Jarke / Expert System Access to Specific Knowledge justified is when the ES uses it as stepping stone to one of the coupling mechanism described in Sec- tions 2.3 and 2.4. The major limitation in this stage is that often an existing very large database may be needed in the Expert System application. If a generalized commercial DBMS is in place managing this database, it may be prohibitively costly to main- tain a separate copy of the whole database for the ES. As an example, Olson and Ellis in [21] report experiences with an Expert System used to de- termine problems with oil wells where data from a very large IMS database was needed but could not be made available. and that the ES needs to consult this database at various points during its operation. In this case, an online communication channel between the ES and the DBMS is required. Queries can be gener- ated and transmitted to the DBMS dynamically, and answers can be received and transformed into the internal knowledge representation. Thus in tight coupling the ES must know both when and how to consult the DBMS, and must be able to understand the answers. A naive use of the communication channel would assume the redirection of all ES queries to the DBMS. Any such approach is bound to face at least two major difficulties: 2.3. Loose Coupfing Of The ES With An External DBMS - Strategy 3 Conceptually the simplest solution to the prob- lem of using existing databases managed by an external DBMS is to extract a snapshot of the required data from the DBMS when the ES begins to work on a set of related problems. This portion of the database is stored in the internal database of the ES as described in the previous section. For this scenario to work, the following mechanisms are required: 1. A link to a DBMS with unload facilities; 2. Automatic generation of an ES database from the extracted database; 3. An 'intelligence' mechanism to know in ad- vance which portion of the database is required for extraction. Such a strategy presents several practical ad- vantages and could be used in combination with any of the two previous access strategies. However, loose coupling is not suitable if the portion of the database to be extracted is not known in advance. This affects the provision of the third of the re- quired mechanisms above, which is clearly the hardest to automate. When this mechanism is not automated, the decisions have to be made 'stati- cally' with human intervention. Furthermore, loose coupling is inefficient when different portions of the database are needed for the Expert System at different times. This leads to the need for the final stage: tight coupling of the ES with a DBMS. 2.4. Tight Coupling Of The ES With An External DBMS - Strategy 4 For this access strategy it is assumed that a very large database exists under a generalized DBMS, (A) Number of Database Calls: Since the ES nor- mally operates with one piece of information at a time (record), a large number of calls to a database may be required for each ES goal. Assuming that the coupling is made at the query language level, rather than an internal DBMS level, such a large number of DBMS calls will result in unacceptable system performance. The number of calls at the query language level could be reduced, as we shall show, if these calls result to a collection (set) of records. (B) Complexity of Database Calls: Database lan- guages usually have limited coverage. For instance, the majority of query languages do not support recursion. For reasons of transportability and sim- plicity, it may not be desired to include in the coupling mechanism the 'embedding' program- ming language (e.g., PL/1, COBOL), a language that would solve the discrepancies in power be- tween the ES and DBMS representations and lan- guages. Therefore, to attain tight-coupling, particular care has to be given to global optimization in using the communication channel, and to the rep- resentation and language translation problems. To the authors' knowledge, tight-coupling to an ex- isting DBMS has not yet been implemented in actual systems. It appears, however, that the im- pact of logic programming and the commercializa- tion of relational database systems will have a profound effect for tight-coupling in future system architectures. Prolog is currently the most widely known logic programming language; it has been announced as the basis of the 5th Generation
  • 5. Y. Vassiliou,J. Clifford,M. Jarke / Expert System Access to Specific Knowledge 127 Computer Project in Japan [12]. It is becoming clear that logic-based programming languages like Prolog will be highly influential in the ESs of tomorrow. In the remaining sections of this paper, Prolog and a research effort to develop a for- malism for coupling a Prolog-based Expert System with a relational DBMS are described. 3. A Prolog Introduction 3.1. Prologas a Programming Language Prolog is a programming language based on a subset of first-order logic, the Horn-clauses. Roughly, this Amounts to dropping disjunction from logical consequents, and talking only about definite antecedent-consequent relationships. 3.1.1. Statements There are three basic statements in Prolog (the symbol ~- denotes implication, and the symbol & denotes the logical AND): ~- P. means A. means P ~ Q &R & S. means Q and R and S imply P A clause has both a declarative and a proce- dural interpretation. Thus, P~-Q&R&S can be read declaratively: P is true if Q and R and S are true or, procedurally (similar to 'stepwise refinement' [32]): to satisfy P first satisfy Q and R and S P is a goal A is an assertion 3.1.2. Programs A Prolog program is a sequence of clauses whose variables are considered to be universally quantified. Logic predicates are represented with Prolog programs, and since more than one clause may be needed to define a predicate (goal), there is a corresponding AND/OR graph for eacl~ predi- cate. The execution of a program involves a depth-first search with backtracking on these graphs, and uses the unification process based on the resolution principle [23]. As an example of a Prolog program, consider the appending of two lists to form a third. In this Prolog system notation, predicate names are in upper-case, variables are in lower-case, character strings that-start with upper-case denote constant values, brackets enclose lists, [ ] is the empty list, and the operator 'r separates the first element of the list from the rest. APPEND([ ], y, y). APPEND([xIy], z, [xlw])*- APPEND(y, z, w). Clause one asserts that appending the empty list to any list leaves the list unchanged (stopping the recursion). Clause two states that ify appended to z results in w, then a list with first element x and remainder y, when appended to z, results in a list with first element x and remainder w. Given the goal: ' <--APPEND([A], [B, C], new)', Prolog tries to instantiate the variable new to whatever value makes the predicate true. The first clause cannot be used the first time around ([A] is not [ ]). If the instantiation x--[A], y- [ ], z- [B, C], and new = [AIw] is made then the second clause applies. This requires the evaluation of the right-hand side goal: ' ,- APPEND([ ], [B, C], w). For this goal the first clause applies, w is instanti- ated to [B, C] and through recursion, new is in- stantiated to [A, B, C]. Prolog would report this result as the answer to the goal: new = [A, B, C] An important characteristic of Prolog programs is that there need be no distinction between input and output parameters. Thus, for example, one can also ask for the list that, when appended to a given fist, results in another given list: *--APPEND([A], x, [A, B, C]) and Prolog returns the answer: x=[B,c] 3.2. PrologAnd Relational Database Management To clarify Prolog's approach to relational database management, a°short description of two different views of relational databases is required. The traditional view of relational databases [8] is that of a collection of tables. Formally, a relational database is a relational structure [17]. Queries on the database are expressed in languages having the power of first-order logic and are evaluated in the
  • 6. 128 Y. Vassiliou,J. Clifford,M. Jarke / Expert System Access to SpecificKnowledge relational structure (evaluational approach). In contrast, a proof-theoretic view would look at a database as a collection of sentences - a theory. A database query is answered by proving it to be a logical consequence of the theory (non-evalua- tional approach). This distinction is described in detail in [131. Essentially, it amounts to the dif- ference between theories and their interpretations. Kowalski shows in [17] that, under certain con- ditions, this distinction is irrelevant. In particular, it can be shown that all queries in first-order logic evaluate to the same value whether the relational database is interpreted as a structure or as a logic database, provided that: (1) There are finitelymany variable-free atoms; (2) The database is described by Horn clauses; (3) The axioms of equality and domain closure are present; and, (4) Negation is interpreted as finite failure. Relational databases can therefore be repre- sented directly in Prolog as a listing of all instanti- ated predicated corresponding to relation tuples. For instance, consider the database-oriented view of the world of Suppliers-and-Parts rq]. The rela- tion schemes are: SUPPLIER(sno, sname, status, city) PART(pno, phame, color, city) SUPPLY(sno, pno, qty) An instance of the database would be represented in Prolog as: SUPPLIERS(S1, SMITH, 20, LONDON). SUPPLIERS(S2, JONES, 10, PARIS). PART(P1, NUT, RED, 12, LONDON). PART(P3, SCREW, BLUE, ROME). SUPPLY(S1, P1, 300). SUPPLY(S2, P2, 200). In addition to database representation, Prolog can be used directly as a database query language. Each query may have the format [17]: where (target-variables) is a list of variables (cor- responding to attribute names). The interpretation is that the user wants to retrieve all instantiations satisfying the goal statements. Thus, (target-varia- bles) corresponds to the target list in conventional query languages. For instance, consider the Prolog statements: /* For all suppliers, list the supplier number and the city they live in */ LIVES(sno, city)./* where • / LIVES(sno, city) •--SUPPLIER(sno, any_sname, any_status, city). /* List the supplier number for those suppliers who supply more than one parts */ ~- SUPPLIES_MANY(sno). /* where * / SUPPLIES_MANY(sno) •-- SUPPLY(sno, pl, ql) & i SUPPLY(sno, p2, q2) & NOT(p1 -- p2). , List the supplier number for those suppliers who do not supply more than one part, and live either in London or in Paris */ SPECIAL_SUPPLIER(sno)./. where */ SPECIAL_SUPPLIER ~- NOT(SUPPLIES MANY(sno)) & OR(LIVES(sno, LONDON), LIVES(sno, PARIS)). These examples can be used to illustrate both the query capabilitiesof the Prolog formalism, and its powerful mechanism for creating 'generalized' views. Such views differ from the traditionalDBMS views in that, through the use of variables, they can accept parameters. In essence, views allow for a flexible data representation. Details of the use of Prolog for integrity constraints, database updates and historical databases are given in [17]. *- QUERY((target-variables)). QUERY((target-variables)) GOAL A & GOAL B & ... &GOAL_N 3.3. Prolog and Expert Systems A knowledge base can be represented in first- order logic if the formulas are suitably interpreted.
  • 7. Y. Vassiliou,J. Clifford, M. Jarke / Expert System Access to Specific Knowledge 129 Therefore, Prolog may be used for the knowledge representation. Furthermore, Prolog has the ad- vantage that it already has (in its automatic theo- rem prover) a very powerful inference engine in place. The unification algorithm used in Prolog is more general than a simple pattern matching al- gorithm (common in production rule-based sys- tems [20]). As an illustration, we present a small 'toy' Expert System in Prolog. The area of interest is the well-known world of suppliers, parts, and supplies. In this simple example, the 'expert' is supposed to recommend where to place an order by applying the following rules: 1. Order onl~ from suppliers who have sup- plied the same part and all its subparts before. 2. Suppliers from southern Europe are usually cheaper than those from northern Europe. No suppliers outside Europe should be considered. 3. Display all possible choices within the 'opti- mal' category. A Prolog expert for this job would obviously need a representation both of the above rules and of the data they require, such as location and previous supply for each part, and the classifica- tion Of locations into northern and southern Europe. A sketch of a possible Prolog knowledge base follows. First, the database of specific facts is presented. It is noted that only binary or unary relations are used in this example, but this is not limiting in that there is a simple way to move between binary representations and ternary representations [16]. /* Simple declarative facts (database) */ SUPPLIER(SMITH). SUPPLIER(JONES). SUPPLIER(BRAND). PART(NUT). PART(WIDGET). PART(GIZMO). PART(SCREW). PART(GADGET). PART(THINGUM). PART(SUPERTHINGUM). SUBPART(NUT,WIDGET). " SUBPART(SCREW,GADGET). SUBPART(GADGET,GIZMO). SUBPART(THINGUM,SUPERTHINGUM). HAS SUPPLIED(SMITH,NUT). HAS_SUPPLIED(SMITH,WIDGET). HAS_SUPPLIED(SMITH,GIZMO). HAS_SUPPLIED(SMITH,THINGUM). HAS_SUPPLIED(JONES,SCREW). HAS_SUPPLIED(JONES, HAS_SUPPLIED(JONES, HAS_SUPPLIED(JONES, HAS_SUPPLIED(JONES, NUT). WIDGET). GADGET). GIZMO). HAS_SUPPLIED(JONES,SUPERTHINGUM). HAS_SUPPLIED(BRAND,SCREW). LIVES(SMITH,ROME). LIVES(JONES,LONDON). LIVES(BRAND,OSLO). NORTH(LONDON). NORTH(OSLO). SOUTH(ROME). SOUTH(ATHENS). Second, the part of the knowledge base contain- ing the general rules is presented. /, General rules • / SUGGESTORDER(supplier,part) GOOD_AND_CHEAP(supplier,part). /* if no good and cheap suppliers exist, then: •/ SUGGEST_ORDER(supplier,part) NOT(GOOD_AND_CHEAP(any_supplier,part))& NORTH EUROPEAN(supplier)& POTENTIAL_SUPPLIER(supplier,part). GOOD_AND_CHEAP(supplier,part) POTENTIAL_SUPPLIER(supplier,part)& SOUTH_EUROPEAN(supplier). POTENTIAL_SUPPLIER(supplier,part) SUPPLIER(supplier)& PART(part)& NOT(MISSING_SUBPART(supplier,part)). MISSINGSUBPART(supplier;part) NOT(HAS_SUPPLIED(supplier,part)). MISSING_SUBPART(supplier,part) SUBPART(any_part, part) & MISSING_SUBPART(supplier,any_part). NORTH_EUROPEAN(supplier) •- LiVES(supplier,city),NORTH(city). SOUTH EUROPEAN(supplier) LIVES(supplier,city),SOUTH(city). To illustrate the use of the above simple Expert System, some examples are given below. It is noted that the user places a goal (desired conclusion) at
  • 8. 130 IT. Vassilimt J. Clifford. M. Jarke / Expert System Access to Specific Knowledge the '[?-' prompt and the system returns with a 'no' answer if the goal cannot be proven, and with an assignment of values to the variables used other- wise. If the goal has more solutions (other variable assignments exist), they are obtained with the typ- ing of a semi-colon until the answer 'no' is re- turned. /. Example Execution [?.-SUGGEST_ORDER(x, WIDGET). x = SMITH; no r?.-SUGGEST_ORDER(x, GIZMO). x ffiJONES; no [?- SUGGEST_ORDER(x, SCREW). x = JONES; x ffiBRAND; no 4. Prolog as the Mechanism for Integration 4.1. Prolog and Access Strategy 1 As outlined in the previous section, elementary database management corresponds to a direct use of Prolog. The limitations in this strategy .are: (A) Large Databases. Executing Prolog programs in the manner described above requires that the assertions representing the database (instantiated predicates) be in main storage. Even when the database can fit in main storage, and despite the fact that Prolog implementations are very efficient, there are limitations in secondary indexing. For instance, the Prolog DEC-10 compiler, which is considered to be the most efficient implementa- tion, has only one index for the internal database. In short, both external and internal data manage- ment are needed for large databases. (B) Generality. Simple-minded use of Prolog can offer only elementary data management facilities. For instance, there are no data dictionary, no database schema, and no generalized set-oriented relational operations. It may be argued that lack of generality is a matter of convenience rather than .~i~ issue of substance. On the other hand, it is closely related to the first limitation, and in the next stage a uniform mechanism to deal with both is used. 4.2. A Generalized Database System in Prolog - Access Strategy 2 Generalized DBMSs gain much of their power by abstracting from specific query predicates to generalized retrieval mechanisms such as the set- oriented relational algebra operators or the SQL nesting mechanisms. One advantage of using these abstractions in Prolog is that they allow gener- alized selection of predicates instead of forcing the database programmers to define such predicates separately for each class of data. Therefore, we could take a further step towards integrating the deductive capabilities of Prolog with database management capabilities by imple- menting a general purpose DBMS directly in Pro- log. This can be done quite easily, and provides a means of adding flexible and ge~cral data access mechanisms to the inference engine. In order to effect this stage in ES enhancement with data management facilities, the first require- ment is the definition of an internal representation of a relational database. The following Prolog version is a simple and direct strategy for this purpose. DBSCHEMA = [DB-NAME, [relations], [constraints]] REL i -- [REL-NAME, [scheme], [domains]] /* for each RELi, 1 ~ i < n */ SCHEME ffi[al ..... ak] /* a list of attributes */ DOMAINS = [dI..... d k] /* a list of domains with • / /* DOM(a:)= d, */ CONSTRAINTS = [[list-of-fds], /* functional dependencies */ [list-of-vds], /* value dependencies */ [list-of-sds]] /* subset dependencies */ FD ffi[REL-NAME, LHS, RHS] /* corresponds: LHS ~ RHS */ LHS ffi[a,1, a12,ail ] /* a list of attributes */ RHS ffi Ibis, bj2, bjm] /* a list of attributes */ VD ffi[REL-NAME, ATFR-NAME, LOWER-BOUND, UPPER-BOUND] /, The values for ATTR-NAME must be within the bounds • /
  • 9. Y. Vassiliou,J. Clifford, M. Jarke / Expert System Access to Specific Knowledge 131 SD = [REL-NAME1, ATTR-NAME1, REL-NAME2, ATTR-NAME2] /, The values in ATTR-NAME1 must also be in ATTR-NAME2 * / DBINSTANCE = [DB-NAME, [relation-instances]] RELATION-INSTANCE = [REL-NAME, [tuples]] TUPLE, = [V1..... Vk] /* Viisind i,l<i<k */ This strategy provides a straightforward imple- mentation of the structure of a relational database as seen by the user (in this case the ES). The Suppliers-and-Parts database of Section 3.2, repre- sented in this format, is given in Appendix 1. Given such a representation scheme, one can define any number of generalized operations to provide the facilities of a DBMS. The feasibility of this has been demonstrated in [18]. The basis for the implementation is the predicate 'SETOF' built into most Prolog versions. SETOF(x, c, r), re- turns in the set r all such elements of x that satisfy condition c. For instance, the projection of a relation R on scheme (xl, x2,...,x,,) onto the attributes xjl, xj2,..., Xjk will have the form: levelled architecture of DBMSs [9]. Another feature provided by many DEMSs is the ability to define a 'view' of the database for particular applications. These views define only that portion, or rearrangement, of the database of interest to a particular user community, effectively screening out the rest of the database from their sight. For example, users interested only in the set of suppliers without any of their attributes, could define the following view: SUPPLIES(s) *- PROJECT(SUPPLY, [SNAME], s). The user (typically the ES) has a choice between set-oriented and tuple-at-a-time retrieval oper- ations. This is accomplished with the introduction of an evaluable predicate called 'SIMCALL'. This predicate simulates Prolog's calls of predicates cor- responding to relations (i.e., returns a tuple in- stantiatmn). Thus, each call of the predicate SUPPLY, defined below, will return one tuple of the relation SUPPLY (stored in the format de- scribed in this Section). SEfOF'(xjl, XjE,...,xjl~), ((xil, xi2,-..,x,,,) R(xl, x2,...,x,,)), s) SUPPLY(sno, pno, qty) ,-- SIMCALL(SUPPLY, [sno, pno, qty]). where m = n - k, and (x~t, x+2,..., x,,,)* denotes the existential quantification of these variables. As a specific example, the projection of a rela- tion R on scheme (a, b, c) onto the attribute c is 'computed' by the following Prolog program: I?- SETOF(c, ((a, b)'R(a, b, c)), s). Note, however, that this view of the projection operator requires the user to know the entire scheme of each relation and the order of the attributes in the scheme; this may be too much to ask in general. The approach taken here (details are given in Appendix 1) by contrast, provides a simple way to specify projection as a generalized operator acting on any relation and set of attri- butes. Prolog programs map from this simpler, user-oriented view of the operations, to their im- plementation for the particular database anti rep- resentation scheme chosen. This provides a degree of logical data independence as in the traditional Another issue for the implementation of a gen- eralized DBMS within Prolog is that of efficient secondary storage management. For the latter, it is reasonable to devise a more sophisticated storage strategy (e.g., B-Trees), and perhaps to use aux- iliary indexing schemes, hashing, etc. The use of some of these storage structures for implementing a simple business database in Prolog is described in [22], and some general Prolog data structures and accessing programs are formalized in [27]. The work reported in [22] demonstrates that for specific applications, indexing schemes that guide decisions about which portions of external files should be read into the internal database can be devised. Furthermore, the basic data access predi- cate (routine) of Prolog can be changed to direct data searches of secondary storage. Such Prolog modifications have been criticized as providing only temporary solutions, while complicating Pro- log's basic structure and further divorcing the lan- guage system from formal logic.
  • 10. 132 Y. Vassiliou,J. Clifford, M. Jarke / Expert System Access to Specific Knowledge 5. Prolog and Relational DBMS as Independent Systems 5.1. Loose Coupling of Prolog With a Relational DBMS Loose coupling can easily be implemented using Prolog and a relational DBMS, under the assump- tion that a generalized facility as described above exists. A portion of the external database is loaded off-line (before the start of the Expert System session). A superset of the data required by the ES can actually be extracted, but the strategy may prove infeasible if the superset is too large or not known in advance (too many parameters). mulating the queries in the relational language SQL [9], performing certain optimizations upon the original SQL queries so generated, issuing the SQL queries to the DBMS along a communication channel, receiving the result of the que.ryfrom the DBMS along this same channel, and re-formulat- ing that result within the internal database struc- ture of the ES. At that point, the 'meta-evaluation' of the user's request is completed, and the Prolog inference engine can evaluate the request with the required data in its working memory. As an example of the need for optimization, consider a naive channel use (all Prolog goals are directed to the external DBMS), and the definition of the Prolog clause: 5.2. Tight Coupling of Prolog With a Relational DBMS 5.2.1. Overview Tight coupling refers to a dynamic use of the communication channel between the two systems. Essentially, the external database becomes an 'ex- tension' of the internal Prolog database. As in the general case, the same two basic problems must be resolved: optimization of database calls, and com- plexity of queries. Moreover, such a coupling sys- tem requires dynamic decision-making about the location of the data needed to solve the current problem, and an effective strategy for managing internal storage. The basic scenario for tightly coupling a Pro- log-based ES with an existing relational DBMS is as follows. The user consults the ES with a prob- lem to be solved or a decision to be made; typi- cally this will be expressed in some sort of user- friendl), language interface, but for our purposes we can assume that it is expressed directly as a Prolog predicate. Rather than evaluate this user request directly, in a tightly-coupled framework the predicate would be massaged (c.f., 'RE- FLECT', section 5.2.3) into a slightly modified form whose evaluation can be delayed while vari- ous transformations are performed upon it. This process is analogous to a 'pre-processing' stage in language translation. The altered predicate is then 'meta-evaluated' (5.2.3). This involves analyzing the request in its Prolog formulation and dynami- cally determining whatever DBMS queries are re- quired at that state in the ES execution for obtain- ing the solution. In our case, this involves for- SECOND_ LEVEL_SUBPART(subpno, pno) SUBPART(subpno, pnol) & SUB- PART(pnol, pno). where it is assumed that 'SUBPART' is a stored relation for direct (first-level) sub-relationships be- tween parts. In evaluating this goal, Prolog will call the leftmost 'SUBPART' (redirected to the DBMS as an attempt to evaluate it) for a database tuple. Subpno and pnol will be instantiated to some constant values. Then Prolog will call the right- most 'SUBPART' with pnol already instantiated. Such a 'follow-up' call will be made for each successful instantiation of pno. Moreover, the pro- cess is repeated for each tuple of subpart. If no second-level subpart exists in the database, all these 'follow-up' goals will fail. Thus the minimum of 2n + 1 number of database calls is required, where n is the number of tuples. (The extra call is the unsuccessful attempt to instantiate the leftmost 'SUBPART' when all tuples have been looked at). If there are k second-level subparts, then 2n + k + 1 database calls are needed. This naive approach will thus generate a particularly inefficient version of a 'nested iteration' query evaluation algorithm and will not make use of any query optimization procedures of the DBMS. This difficulty can be overcome by collecting and jointly executing database calls rather than executing them separately whenever issued by the ES. In essence, this revised technique replaces the pure depth-first approach of Prolog by a combina- tion of a depth-first reasoning and a breadth-first database call execution.
  • 11. Y. Vassiliou,J. Clifford, M. Jarke / Expert System Access to Specific Knowledge 133 In practice, an amalgamation of the ES lan- guage with its meta-language is used, based on the 'reflection principle' [31]. This allows for a de- ferred evaluation of predicates requiring database calls, while at the same time the inference engine (theorem prover) of the ES is working. Since all inferences are performed at the meta-level (simula- tion of object-level proofs), it is feasible to bring the complex ES queries to a form where some optimization and direct translation to a set of DBMS queries is feasible. The queries are directed to the DBMS, and the answers obtained are transformed to the format accepted by the ES for internal databases. Then, the ES can continue its reasoning at the object- level. Each invocation of predicates corresponding to database relations now amounts to an ES inter- nal database goal, rather than a call to an external DBMS. The theoretical basis and a detailed de- scription of this approach are presented in sections 5.2.2 and 5.2.3. The second diffict/lty in successfully coupling a Prolog-based ES with a relational DBMS is that Prolog goals, considered as queries, can be sub- stantially more complex than queries expressed in a database query language such as SQL. For ex- ample, most DBMS query languages are not able to handle a recursive call such as the Prolog pro- gram: ANY_LEVEL_SUBPART(subpno,pno) *-SUBPART(subpao,pno). ANY_LEVEL_SUBPART(subpno,pno) SUBPART(subpno, pl) & ANY_LEVEL_SUB- PART(pl,pno). Much research exists on the issue of recursion in databases. An important distinguishing char- acteristic is that the depth of recursive calls to databases is usually relatively shallow. For in- stance, considering again the example of subparts, recursion may only go to a few levels deep before subsequent recursive calls result in 'null' answers (no tuples qualifying). This implies an immediate strategy within the framework of language amalgamation discussed above. To translate a re- cursive Prolog goal to SQL, generate a series of calls that can be translated directly to SQL, ex- ecute the SQL calls, and stop when recursion ends (SQL calls return null results). The major problem with this strategy is that it is not possible to know in advance how many such goals must be gener- ated (the translation takes place in the ES). There- fore, it is not feasible to jointly execute these SQL calls. In other terms, little can be done for the translation at compile time, since the end of recur- sion can only be determined at execution, time. Even under these restrictions, much optimiza- tion can be done within the proposed framework. For example, results (tuple values) from initial SQL calls are used for subsequent SQL calls. Other approaches explored (e.g., [14]) handle re- cursion elegantly and in a general way at compile time using a method that replaces recursion by iteration. 5.2.2. The Theoretical Basis for Language Amalgamation In order to be able to talk about a language L, the use of a meta-language ML is required. The amalgamation of an object language with its meta-language refers to the ability to move be- tween the two languages whenever it appears more convenient or efficient to use one rather than the other. Suppose that a goal G is to be proven from a set of assumptions (hypotheses) A in a first-order language L. There are two ways to do this: (a) Use the proof procedure of L. (b) Simulate the proof procedure of L in ML as follows: use a 'reflect' relationship that names the assumptions A and goal G of L as Meta-A and Meta-G in ML. The provability of G from A is represented by the provabilit3/ of the predicate 'METAEVALUATE(Meta-A, Meta-G)' from sentences in ML. Implementing amalgamation of L and ML re- quires the definition of the METAEVALUATE predicate and the naming relationship. In ad- dition, it requires a link (reflection principle) be- tween the two languages. In this specific case, Horn clause logic (Prolog) is used as the object language. The meta-language is Prolog itself - with the restriction that all sentences are variable-free. This allows us to re- main in first-order logic. ,Thus, the naming rela- tionship maps variables to special-form constants which simulate a variable in meta-Prolog. This implementation of amalgamation is based on the high level description of the DEMO predi- cate presented in [4], and is similar to the imple- mentation of [18]. The work reported here extends
  • 12. 134 Y. Vassilicu,J. Clifford,M. Jarke / Expert System Access WSpecificKnowledge the above approaches by providing a more general treatment of evaluable predicates. For instance, finite negation (not) and disjunction (or) are treated with no restrictions. In addition, the issue of its use in the context of the general ES-DBMS coupling mechanism is addressed. Linking Prolog and meta-Prolog is accom- plished with the introduction of a binary predicate called 'META'. For each Prol6g clause, a corre- sponding instantiation of the 'META' predicate exists. The first term of 'META' is a list of predicates; the head of the list is the head of the correspond- ing clause, and the other list elements are the terms in the body of the clause. All variables in these predicates are translated into constants with a special prefix (V_). The second term of 'META' allows the grouping of meta instantiations in a program. For example, the corresponding meta predicate for: ATHENS_SUPPLIER(sno, sname) ,- SUPPLIER(sno, shame, status, ATHENS). is META([ATHENS.SUPPLIER(V_sno, V_sname), SUPPLIER(V sno, V_sname, V status, ATHENS)], PR1). where PR1 is the name of the program (group of ' META' instantiations). Since the objective of this approach is to defer the evaluation of predicates which correspond to database relations, all such predicates are in a delayed evaluation form. In particular, these predi- cates are defined in Prolog as follows: SUPPLY(sno, pno, qty) *- DBCALL(SUPPLY, [sno, pno, qty]). using the non-evaluable binary predicate 'DBCALL'. Other predicates whose evaluation de- rends on the database values (e.g., equal, not equal) are treated in the same way. The implementation of the predicate 'METAEVALUATE' is described, together with examples of its use, in Appendix 2. Only a high- level description is given here. Given a set of assumptions A and a set of goals G to be proven in the object language, prove the meta-Prolog predicate: METAEVALUATE(assumptions, meta_goals, control, new_goals). in the meta-language, where 'assumptions' is the collection of the original assumptions A in the meta-language, and meta_goals is the meta-lan- guage name of the goals G. Control is a parameter which specifies either a bound in the proof of METAEVALUATE or an action to be taken later (e.g., optimization, translation to relational algebra or SQL). The result, new goals, is a series of Prolog predicates in a deferred evaluation state (a series of DBCALLs and other non-evaluable pre- dicates). 5.2.3. The Mechanismfor Tight-Coupling This section describes the overall mechanism that allows for deferred database calls. The mecha- nism is presented pictoriallyin Fig. 2. The use of a simple but complete example will illustrate the concepts involved. (A) REFLECT(object_assumptions, meta as- sumptions, program_name): This function pro- duces 'META' predicates as described in the pre- vious section from a set of Prolog statements. It also groups the meta predicates by providing a unique programname. The REFLECT function is invoked once before the start of a session. (B) METAEVALUATE(program_name, meta goals, control, newgoals): Described in sec- tion 5.2.2. (B.1) GENERATE(new goals, result): This pro- gram is activated by METAEVALUATE when the control parameter assumes a particular value. Given a series of new_goals, it creates an internal database relation (result). In doing so, it uses and controls the execution of the sub-programs 'OPTI- MIZE', 'SQL TRANSLATE', 'SQL_CALL', and 'FORMAT_DATABASE'. Details of the imple- mentation of these procedures will be given in a forthcoming paper. (B.1.1) OPTIMIZE(new_goals, optimized_goals): This program performs some optimization of the goals generated in METAE- VALUATE. One optimization is the removal of redundant goals. Another optimization identifies
  • 13. Y. Vassiliou,J. Clifford,M. Jarke / Expert System Access to Speofic Knowledge :35 EXPERT SYSTEM DBMS OBJECT LEVEL Reach a goal G that requlres db calls REFLECT I I META LEVEL NETAEVALUATE GENERATE REFLECT Goal G may now be proven wlth calls to an internal ES database DATABASE LEVEL OPTIMIZE SQL..TRANSLATE Sat_CALL DBHS Query Evaluation FOimAT DATABASE Figure 2. cases where a series of DBMS queries is required (e.g., in recursion). By imposing an ordering on the goals, 'OPTIMIZE' makes it possible that a query result can be used for answering the next query more efficiently. (B.1.2) SQL-TRANSLA TE (optimized_goals, sql_query): This generates SQL queries from opti- mized goals. First, the procedure identifies the database relations involved from the predicate names in optimized_goals and its knowledge about the database schema (SQL's FROM clause). Next, it identifies target attributes (SQL's SELECT clause) from the universally quantified variables of the original goals, and ignores all other variables in the goals unless they serve as join fields (e.g., rell.fieldl = rel2.field2). All constant values are translated to restrictions on field values (e.g., fieldname = constant). (B.1.3) SQL.CALL(sqI_query, answer_location): This is another program activated by 'GENER- ATE'. It invokes the existing DBMS by sending an sql_query, with the result redirected to a file iden- tified by answer_location. Each answer to a query contributes to the eventual result of 'GENER- ATE'. (B.1.3.1) FORMA T-DATABASE(answer_loca-
  • 14. 136 Y. Vassiliou,J. Clifford, M. Jarke / Expert System Access to Specific Knowledge tion, internal_db): Since the existing DBMS can- not be expected to deliver the result in the format required by Prolog, this function produces an in- ternal Prolog sub-database from the file identified by SQL_CALL. Each such database contributes then to the eventual result of the calling func'Aon, ' GENERATE'. As an illustration of the process outlined above consider the following example. The actual Prolog execution and a more detailed description can be found in Appendix 2. Assume an ES that uses a series of informal, heuristic and exact rules, to- gether with a large database of Suppliers-and-Parts managed by an external DBMS. The portion of this external database which is necessary for the example is assumed to contain the stored relations SUPPLY and SUPPLIER. The hypothetical ES has the schema descriptions of the external data- base and several rules concerning this database. No actual tuples are stored in the internal ES database. Assume further, the ES rule (goal) 'PERFORM_ORDER', which among other predi- cates involves the predicate (generalized view): 'GOODBETSUPPLIER', based on the stored relations and other generalized views. PERFORM_ORDER(sname, price, delivery) COLLECT_REQUIREMENTS(max _price, latest_del, pno) & GOOD_BET_SUPPLIER(sno, pno) & MAKE_ADJUSTMENTS(sno, new_de- livery) & where"GOOD BET SUPPLIER' is defined as: GOOD_ BET_SUPPLIER(sno, pno) (-.. NORTH_EUROPEAN(sno) & MAJOR SUPPLIER(sno, pno). NORTH_ EUROPEAN(sno) ,'- OR(SUPPLIER(sno, n, LONDON) & SUPPLIER(sno, n, st, PARIS)). MAJOR_SUPPLIER(sno, pno) ~- SUPPLY (sno, qty), & GREATER(qty, 300). st, pno, PLIER' would require database calls, 'METAE- VALUATE' as the subgoal immediately preceding it is used: PERFORM ORDER(sname, price, delivery) (.__ COLLECT_ REQUIREMENTS(max _price, latest_del, pno) & METAEVALUATE(PR1, [GOOD_ BETjSUPPLIER(V_sno, V pno)], 5, newgoals) & ! & GOOD_BET_SUPPLIER(sno, pno) & MAKE_ADJUSTMENTS(sno, new_de- livery) & ... Note that the 'cut' (l) subgoal assures that the METAEVALUATE predicate will only be ex- ecuted once. The first result from 'METAEVALUATE' is (see also Appendix 2): newgoals --[OR(DBCALL(SUPPLIER, IV sno, V_n, V st, LONDON]), DBCALL(SUPPLIER, [V sno, V n, Vst, PARIS1))& DBCALL(SUPPLY, [V_sno, V_pno, V_qty])& DBCALL(GREATER, [V qty, 300])] Given the specific value (5) for the control parameter of 'METAEVALUATE', the program 'GENERATE' will be invoked. First, its sub-pro- grams'OPTIMIZE' and 'SQL TRANSLATE' will transform the new goals to the SQL_query: SELECT sno, pno FROM SUPPLIER, SUPPLY WHERE ((SUPPLIER.city = ' LONDON') OR (SUPPLIER.city =' PARIS')) AND (SUPPLY.qty > 300) AND (SUPPLY.sno -- SUPPLIER.sno); The call will be made to the external DBMS (program: SQL_CALL), and the answer will be retrieved from answer_location (program: FOR- MAT_DATABASE). Finally, a new internal database will be generated with the description: Since an instantiation of 'GOOD_BETSUP- GOOD_BET SUPPLIER(sno, pno)
  • 15. Y. Vassiliou,J. Clifford, M. Jarke / Expert System Access to Specific Knowledge 137 After this process, the next statements in the Ex- pert System clause can use 'GOODBETSUP- PLIER' in the usual Prolog way. No additional external database calls are needed. In essence, instead of calling the DBMS each time a tuple is needed, all 'qualifying' tuples are brought into the internal database. It should be noted that the above strategy is similar to the 'query modification' algorithm [26] used in some commercial DBMSs for view processing. Possibly, the single most important advantage in using the theorem prover for query modification is that the whole mechanism is integrated smoothly and natu- rally into an ES implementation as a generalized tool. type of coupling is most appropriate. Finally, a research question of particular inter- est to the database community is the use of an ES as a DBMS 'interface' [15]. Could an ES be used as a sophisticated access mechanism (e.g., high- level optimization, understanding of user intent)? How could an ES assist in the implementation of language constructs that allow one to formulate arbitrary predicates with relation variables? Such constructs may be used for integrity checking and improved locking mechanisms. A tight-coupling mechanism, like the one described in this paper, may be required by such a 'DBMS-expert'. References 6. Concluding Remarks - Further Research In this paper a number of strategies for estab- lishing a cooperative communication between the deductive and data components of an Expert Sys- tem were outlined. It was shown that the spectrum of possible mechanisms to link these two compo- nents is effectively a continuum from, at one ex- treme, a single logic-based system that implements both components, to, at the other extreme, two completely separate systems with a strong channel of communication. A number of interesting research questions are raised by this spectrum of possible mechanisms for coupling these two essential components of an Expert System. Among the questions examined are: what is a general architecture for the com- munication channel between these two compo- nents? How can the ES DBCALLs be translated into the query language of the DBMS? When and how should these queries be optimized? A research topic under investigation is that of internal ES database space management. How does one manage the amount of free space for storing the results of external database calls? When space has to be freed, how is the decision reached and opti- mized as to which portion of the internal database to delete? A longer range research question con- cerns the integration of these four access strategies into a single, meta-expert system that combines the expertise of the problem domain with expertise about these four connection types. Given a par- ticular type of problem in the domain of the expert, this meta-expert system would decide which [71 [8l [9] [101 [111 [1] Blanning, R.W. Natural Language Query Processing for Model Management, Communications of the ACM (1984) in press. [2] Bonczek, R.H., C.W. Holsapple, A.B. Whinston, The Evolution from MIS to DSS: Extension of Data Manage- ment to Model Management, Decision Support Systems, Ginzberg,M.J.,W.R. Reitman, E.A.Stohr, (eds) pp. 61-78, North-Holland, Amsterdam, New York (1982). [3] Bonez,ek, R.H., C.W. Holsapple, A.B.Whinston, Specifica- tion of Modelling Knowledge in DSS, Processesand Tools for Decision Support, Sol, H.G. (ed.), North-Holland, Amsterdam, New York (1983). [4] Bowen, K.A. and R.A. Kowalski, Amalgamating Lan- guage and Metalanguage in Logic Programming', in: Logic Programming, Clark, K. and S.A.Tarnlund, eds., Academic Press, New York (1982). [5] Brachman, R., On the Epistemological Status of Semantic Networks, AssociativeNetworks: Representationand Useof Knowledge by Computer, NN. Findler (ed.) pp. 3-50, Academic Press, New York (1977). [6] Clifford, J., M. Jarke, and Y. Vassiliou, A Short Introduc- tion to Expert Systems, IEEE Database Engineering Bul- letin, 6,4 (Dec. 1983). Clocksin, W.F. and C.S. Meilish, Programming in Prolog, Springer-Verlag, New York (1981). Codd, E.F., A Relational Model for Large Shared Data Banks, CACM, (June 1970) pp. 377-387. Date, C.J., An Introduction to DatabaseSystems, (3rd edn), Addison-Wesley, New York (1982). Donovan, J.J., Database System Approach to Manage- ment Decision Support, ACM Transactions on Database Systems 1 (1976) pp. 344-369. Elam, J.J. and J.C. Henderson, Knowledge Engineering Concepts for Decision Support System Design and Imple- mentation, Information and Management 6 (1983) pp. 109-114. [12] Feigenbaum, E.A. and P. McCorduck, The Fifth Genera- tion Artificial Intelligence and Japan's Computer Challenge to the World, Addison-Wesley, New York (1983). [13] Gallaire, H. and J. Minker, Logicand Databases, Plenum, New York (1978).
  • 16. 138 Y. Vassiliou,J. Clifford.M. Jarke / Expert System Access to SpecificKnowledge [14] Henschen, L. and S. Naqvi, On Compiling Queries in RecursiveFirst-Order Databases, Proc. Workshopon Logi- cal Basesfor Data Bases, Toulouse (Dec. 1982). [15] Jarke, M. and Y. Vassiliou, Coupling Expert Systems with Database Management Systems, Artificial IntelligenceAp- plicationsfor BusinessW. Reitman (ed.), pp. 65-85, Ablex, (1984). [16] Kowalsld, R.A., Logicfor ProblemSolving North-Holland Elsevier,New York (1979). [17] Kowalski, R.A.,Logicas a Database Language(July 1981) unpublished. [18] Kunifuji, S. and H. Yokota, Prolog and Relational Data- bases for Fifth Generation Computer Systems, Proc. Workshopon LogicalBasesfor Data Bases,Toulouse (Dec. 1982). [19] Minsky, M., A Framework for Representing Knowledge, in: The Psychologyof Computer Vision.P.H. Winston (ed.) pp. 211-277, McGraw-Hill, New York (1975). [20] Nau, D., Expert Computer Systems, Computer(Feb. 1983) pp. 63-85. [21] Olson, J.P. and S.P. Ellis, PROBWELL - An Expert Advisor for Determining Problems with Producing Wells, Proc. IBM Scientific/Engineering Conference, Poughkeep- sie, New York (Nov. 1982). [22] Pereira, L.M. and A. Porto, A Prolog Implementation of a Large Systemon a SmallMachine, Departmento de infor- matica, Universidade Nova de Lisboa (1982). [23] Robinson J.A., A Machine Oriented LogicBased on the Resolution Principle, JACM Vol. 1 (1965) pp. 23-41. [24] Schank, R.C., Conceptual Information Processing, North-Holland, Amsterdam, New York (1975). [25] Sprague, R.H. and E.D. Carlson, BuildingEffective Deci- sion Support Systems. Prentice-Hail, EnglewoodCliffs NY (1982). [26] Stonebraker, M., Implementation of Integrity Constraints and Viewsby Query Modification, Proc.ACM-SIGMOD Conf. (1975) pp. 65-77. [27] Tamlund, S.-A., LogicalBasis for Data Bases (1978) un- published. [28] Travis, L. and C. Kellogg, Deductive Power in Knowledge Management Systems: Ideas and Experiments, Proc. Workshopon LogicalBasesfor Data Bases, Toulouse (Dec. 1982). [29] Vassifiou, Y., J. Clifford and M. Jarke, How does an Expert SystemGet Its Data?, NYU Working Paper CRL; ~50, GBA 82-26 (CR), extended abstract in Proc. 9th VLDB Conf., Florence (Oct. 1983). [30] Waterman, D. and F. Hayes-Roth, (eds) Pattern Directed Inference Systems, Academic Press, New York (1979). [31] Weyhrauch, R., Prolegomena to a Theory of Mechanical Formal Reasoning, Artificial Intelligence, 13 (1980) pp. 133-170. [32] Wilth, N., Program Development by Stepwise Refine- ment, CACM 14 (1971) pp. 221-227. Appendix I ,/ * / This is the database used as the examplein several */ /* sections of the paper. It has been copied from Date, and it deals /* with the world of SUPPLIERS AND_ PARTS. / * * * * * * * * * * ~*** 0 . * * * * * * * . 0 . * * * * * t DBSCHEMA(SUPPLIERS_AND_ PARTS,. DCITYI], [[SUPPLIER, [SNO, SNAME, STATUS, CITY], [DSNO, DSNAME, DSTATUS, [PART, [PNO, PNAME, COLOR, WEIGHT, cITYI, DPNO, DPNAME, DCOLOR, DWEIGHT, DCITYII, [SUPPLY, [SNO, PNO, QTY], [DSNO, DPNO, DQTY]]], [ [FD, SUPPLIER, [SNO], [SNAME, STATUS, CITY]], [FD, SUPPLIER, [SNAME], [SNO, STATUS, CITY]f, • [FD, PART, [PNO], [PNAME, COLOR, WEIGHT, CITY]f, [FD, SUPPLIER, [CITY], [STATUS]], [FD, PART, [PNAME, COLOR], [CITY]], [SNO]], [VD, SUPPLIER, STATUS, 10, 60], [SD, SUPPLY, [SNO], SUPPLIER, [SD, SUPPLY, [PNO], PART, [PNO]]]). The envisioned use of the database is as fol- lows. A predicate "open" is used to initiate the database name. OPEN(database-name) For instance, the Prolog statement [?-OPEN(SUPPLIERS_AND_ PARTS). will instantiate the database-name. No other men- tion of this name need be made in the sequel. Some small examples of possible queries on this database scheme follow. I?- RELNAME(rel). rel= SUPPLIER I?-SCHEME(SUPPLIER, scheme). scheme = [SNO, SNAME, STATUS, CITY] [%SHOWKEY(SUPPLIER, key). key = [SNO]; key = [SNAME] i?- SHOWSD(relation, sds).
  • 17. Y. Vassiliou, J. Clifford, M. Jarke / Expert System Access to Specific'Knowledge 139 relation = [supply, supplier] sds -- [sno, sno]; relation = [supply, part] sds = [pno, pno] /, An instance of the database •/ DBINSTANCE(SUPPLIERS_ AND_ PARTS, [[SUPPLIER, [[S1, SMITH, 20, LONDON], [$2, JONES, 10, PARIS], [$3, BLAKE, 30, PARIS], [$4, CLARK, 20, LONDON], [$5, ADAMS, 30, ATHENS]]I, [PART, [P1, NUT, RED, 12, LONDON], ~P2,BOLT, GREEN, 17, PARIS], [P3, SCREW,BLUE,L 17, ROME], [P4, SCREW,RED, 14, LONDON], [PS,CAM, BLUE, 12, PARIS], [P6,COG, RED, 19, LONDON]]] [SUPPLY, [[S1,P1,300], IS1, P2, 200], [S1, P3, 400], IS1, P4, 2001, IS1, PS, 1001, IS1, P6, 1001, is2, P1, 3OOl, [$2, P2, 4001, IS3, P2, 2001, [$4, V2, 2001, [$4, P4, 3001, [$4, P5, 40011]]). /* Natural Join. /* General Form: NATJOIN(relnamel, relname2, result, scheme)/ I%NATJOIN(SUPPLY, PART, result, scheme). result = [[$1, Pl, 300, LONDON, RED, NUT," 12], [$2, Pl, 300, LONDON, RED, NUT, 12], [$1, P2, 200, PARIS, GREEN, BOLT, 17], [$2, P2, 400, PARIS, GREEN, BOLT, 17l, [$3, P2, 200, PARIS, GREEN, BOLT, 17], [$4, P2, 200, PARIS, GREEN, BOLT, 17], [$1, P3, 4Y~; ROME, BLUE, SCREW, 17], [$1, F4, 200, LONDON, RED, SCREW, 14], [$4, P4, 300, LONDON, RED, SCREW, 14], [$1, PS, 100, PARIS, BLUE, CAM, 12], [$4, PS, 400, PARIS, BLUE, CAM, 12]], [$1, P6, 100, LONDON, RED, COG, 19]], scheme = [SNO, PNO, QTY, CITY, COLOR, PNAME, WEIGHT]; ,/ /* The following statement simulates the tuple-at- time /, treatment of Prolog for relational databases defined /, as predicates with the form: / • SU PPLY (sl, 100) */ /* ,°o */ ,/ ,/ ,/ pl, */ */ ***** ******O***** ****** ** ****** ,/ /, These examples illustrate a subset of a relational */ /* DBMS, built upon the representation scheme dis- cussed in */ /* Section 4. The variable and predicate names have */ /* been chosen so as to make the meaning clear. */ • ******************************* ,/ /, Projection */ /* General form: PROJECT(relname, attrlist, projection) */ 1%PROJECT(SUPPLIER, [CITY], cities). cities--[[LONDON], [PARIS], [PARIS], [LONDONI, [ATHENS]] /* Selection. */ /* General Form: SELECT (relname, attrs, ops, v~s, res) */ I?- SELECT(SUPPLIER, [CITY, STATUS], [ =, > ], [PARIS, 20], result). result--[[$3, BLAKE, 30, PARIS]] ********************************** SUPPLY(sno, pno, qty) ~- SIMCALL(SUPPLY, [sno, pno, qtyi). I?- SUPPLY(sno, pno, qty). pno = Pl, sno -- S1, qty = 300 Appendix 2 ***************************** */ /, ,/ /, The predicate METAEVALUATE has four param- eters: ' */ /, ,/ /, METAEVALUATE(Assumptions, Goals, Control, NewGoals) */ /, ,/ /, Given Assumptions and a set of Goals to be proven, */ /* using Control, return a liew set of goals (NewGoals) */
  • 18. 140 Y. Vassiliou,J. Clifford,M. Jarke / Expert System Access to Specific Knowledge /* - all in a non-evaluable form /* Algorithm: /, 1.-Selecta Goal (first one). /* 2.-Select an appropriate Assumption (clause) with meta /, 3.-Rename the variables in the clauses /, 4.-Match the renamed variables /* 5.-Add the body of the clause to the rest of /, the goals producing intermediate goals /* 6.-Apply the variable differences to the above goals 7.-Use METAEVALUATE recursively. ,/ ,/ ,/ ,/ */ */ ,/ ,/ ,/ ,/ /, */ /, */ /* Recursion stops when: */ /* -no goals exist, or */ /* -all remaining goals are DBCALLs, or */ /* -the arguments of "or" and "not" are all DBCALLs */ /, ,/ • ***************************** */ METAEVALUATE(goal,control, goal) *--STOPEVALUATING(goal) & !. METAEVALUATE(meta, [goailrest], control, newgoals) ~-META(clause,meta) & RENAMEVARS(clause,[goallrest],[carlcons])& MATCH(goal, car, dill)& ADD(meta, cons, rest, intergoals)& APPLY(intergoals,diff, othergoals)& METAEVALUATE(meta, othergoals, control, new- goals). /* Description of an external database (stored rela- */ tions) /* This database will be used in the examples that follow */ SUPPLY(sno, pno, qty) 4--DBCALL(SUPPLY,[sno,pno, qty]). SUPPLIER(sno, sname, status, city) DBCALL(SUPPLIER, [sno, sname, status, city]). PART(pno, pname, color, weight, city) DBCALL(PART, [pno, pname, color, weight, city]). SUBPART(subpno, pno) ¢--DBCALL(SUBPART, [subpno, pno]). /* Some geneh-alizedviewsof the extemal database */ /* (used internally) • / ANY_LEVEL_SUBPART(spno, pno) SUBPART(spno, pno). ANY- LEVEL_SUBPART(spno, pno) ~- SUBPART(spno, pl) & ANY LEVEL_SUBPART(pl, pno). SUPPLIES_MANY(sno) *--SUPPLY(sno, pnol, qtyl) & SUPPLY(sno, pno2, qty2) & NOTEQUAL(pnol, pno2). SPECIAL_SUPPLIER(sno) NOT(SUPPLIES_MANY(sno)) & NORTH_ EUROPEAN(sno). NORTH_ EUROPEAN(sno) OR(SUPPLIER(sno, n, st, LONDON), SUPPLIER(sno, n, st, PARIS)). MAJOR_ SUPPLIER(sno, pno) ,-SUPPLY(sno, pno, qty)& GREATER(qty, 300). GOOD BET SUPPLIER(sno, pno) *--NORTH_ EUROPEAN(sno) & MAJOR_ SUPPLIER(sno, pno). /* Meta predicate instantiations corresponding to the */ /* stored relations and views.Note the use of PR1 */ /* as a program name. */ META([SUPPLIER(V sno, V sname, V status, V_city), DBCALL(suppfier, [V sno, V shame, V_status, V city])], PR1). META([PART(V pno, V pname, V_color,V_weight,V_city), DBCALL(PART, [V_pno, V_pname, V_color, V_weight,V_city])],PR1). META([SUPPLY(V sno, V_pno, V_qty), DBCALL(SUPPLY, [V.sno, V_pno, V_qty])],PR1). META([SUBPART(V_subpno, %1_ pno), DBCALL(SUBPART, [V_subpno, V_pno])], PR1). META([ANY_LEVEL_SUBPART(V_spno, V_pno), SUBPART(V spno, V pno)], PR1). META([ANY LEVEL_SUBPART(V_spno, V_pno), SUBPART(V spno, V pl), ANY_LEVEL_SUBPART(V_pl, V pno)], PR1). META([SUPPLIES_MANY(V_sno), SUPPLY(V sno, V_pnol, V_qtyl), SUPPLY(V sno, V pno2, V_qty2), NOTEQUAL(V pnol, V pno2)], PR1). META(ISPECIALSUPPLIER(V sno), NOT(SUPPLIES_MANY(V_sno)), NORTH EUROPEAN(V_sno)], PR1). META([NORTH_ EUROPEAN(V sno), OR(SUPPLIER(V sno, V_N, V_st, LONDON), SUPPLIER(V sno, V_N, V st, PARIS))], PR1. META([MAJOR_SUPPLIER(V_sno, V_pno), SUPPLY(V_sno, V pno, V_qty), GREATER(V_qty, 300)], PR1). META([GOOD BET_SUPPLIER(V_sno, V_pno),
  • 19. Y. Vassiliou,J. Clifford, Ill. Jarke / Expert System Access to Specific Knowledge 141 NORTH EUROPEAN(V_sno), MAJOR_SUPPLIER(V_sno, Y-pno)], PR1). /* Examples of the execution of "metaevaluate". */ /* The Cont~'ol value is 1, specifying no extra action */ /* (e.g. optimization) */ I?-METAEVALUATE(PR1, [GOOD_ BET_SUPPLIER(V_ sno, GADGET)], 1, newgoals). newgoals = [OR(DBCALL(SUPPLIER, IV sno, V N, V_st, LONDON]), DBCALL(SUPPLIER, IV sno, V N, V_st, PARIS])), DBCALL(SUPPLY, IV sno, GADGET, V_qty], DBCALL(GREATER,[V_qty, 300])]; [?- METAEVALUATE(PR1, [SPECIAL_SUPPLIER(V_ sno)], 1, newgoals). newgoals = [NOT(DBCALL(SUPPLY, [V_sno, V_pnol, V qtyl]), DBCALL(SUPPLY, [V_sno, V pno2, V_qty2]), DBCALL(NOTEQUAL, IV_pnol, V_pno2l)), OR(DBCALL(SUPPLIER, [V_sno, V_N, V st, LONDON]), DBCALL(SUPPLIER, [V_sno, V_N, V_st, PARIS]))] /* A recursive call. Recursion stops after three level~./ [?.-METAEVALUATE(PR1, [ANY LEVEL,_SUBPARTS(BOLTS, V_sup)], 1, newgoals). newgoals = [DBCALL(SUBPART, [BOLTS, V_sup])]; newgoals = [DBCALL(SUBPART, [BOLTS, Y-pl]), DBCALL(SUBPART, IV_pl, V sup])]: newgoals = [DBCALL(SUBPART, [BOLTS, V pl]), DBCALL(SUBPART,[V_pl, Y-pll]), DBCALL(SUBPART, IV_pll, V_sup])] I?- METAEVALUATE(PR1, [SUPPLIES_MANY(V who), NORTH_ EUROPEAN(Vwho)], 1, ng). ng = [DBCALL(SUPPLY, [y-who, V pnol, V_qtyl]), DBCALL(SUPPLY, IV who, Y-pnol, V_qty2]), DBCALL(NOTEQUAL: IV_pnol, V_pno2]), OR(DBCALL(SUPPLIER, [Vwho, V_n, V_st, LONDON]). DBCALL(SUPPLIER, IV_who,V_n, V_st, PARIS]))] ]?- METAEVALUATE(PR1, [OR(SUPPLIES_ MANY(SMITH). NOT(NORTH EUROPEAN(SMITH)))], 1, ng). ng = [OR(DBCALL(SUPPLY, [SMITH, V_pnol, V qtylD, DBCALL(SUPPLY, [SMITH, V_pno2, V_qty2]), DBCALL(NOTEQUAL, IV pnol, V pno2]), NOT(OR(DBCALL(SUPPLIER, [SMITH, V_n, V st, LONDON]), DBCALL(SUPPLIER, [SMITH, V_n, V st, PARIS]))))]