⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 oo_prolog.html

📁 cetus网络开发资源指南,包括近2万个开发网址
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">

<HTML>

<!--$url-minder-options$ owner=manfred@manfred-schneider.de -->
<!--$url-minder-ignore$-->

<!-- Copyright (c) 1996-2000 by Cetus Team -->

<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="TEXT/HTML; CHARSET=ISO-8859-1">
<META NAME="REVISIT-AFTER" CONTENT="7 DAYS">

<TITLE>Cetus Links: 18,846 Links on Objects and Components / Prolog</TITLE>
<LINK REV="MADE" HREF="mailto:richkatz@earthlink.net">

<META NAME="AUTHOR" CONTENT="Richard Katz">
<META NAME="DESCRIPTION" CONTENT="Cetus Links: 18,846 Links on Objects and Components / Prolog">

<META NAME="KEYWORDS" CONTENT="Cetus Links, Cetus, Link,  
Object, Component, Object-Orientation, Component-Orientation, 
Orientation, OO, CBD, OOP, Class, Interface,

LP, Logic Programming, (C)LP, LLP, OOLP, 
Horn clause, predicate logic, 
Parallel Computing, declarative, backtracking, unification, 
Prolog, AMZI, SICStus, Quintus, LPA, Visual Prolog, Erlang, ECLiPSe,
Mercury, FLORID, LIFE, 
LogTalk, ObLog, 
NLP, agent, ILP, 
Static, Dynamic, Multiple, Inheritance, Methods,  

Computer, Language, Compiler, Interpreter, Code, Compilation, 
Interpretation, Program, Programming,  IDE, Debugger,

Collection, Resource, Archive, Software, Development, Engineering, 
Example, Demo, Tutorial, FAQ, Reference, Standard, Newsgroup,
Forum, Mailing, List, Chat, Article, Interoperability, Bibliography, 
Book, Proceeding, Magazine, Publication, Organization, User, Group,
Project, People, Conference, Workshop, Environment, Compiler, 
Interpreter, Utility, Tool, GUI, Database, Repository, ORB, Broker, 
Framework, Library, Company, Service, Product">

</HEAD>

<BODY BGCOLOR="#FFFFFF" LANG=EN BACKGROUND="side.gif">

<TABLE CELLPADDING=0 CELLSPACING=0 WIDTH="100%">
   <TR>
      <TD ALIGN=LEFT><IMG SRC="pixel.gif" WIDTH=165 HEIGHT=1><BR><IMG SRC="pixel.gif" WIDTH=20 HEIGHT=1>
        <A TARGET="_top" HREF="software.html"><IMG ALT="Home" SRC="home.gif" BORDER=0 WIDTH=40 HEIGHT=40></A>
        <IMG SRC="pixel.gif" WIDTH=20 HEIGHT=1>
        <A TARGET="_top" HREF="#oo_search_menue"><IMG ALT="[Search / Menue]" SRC="go_search.gif" BORDER=0 WIDTH=40 HEIGHT=40></A>
      <TD ALIGN=CENTER><H3>Object-Oriented Language: Prolog</H3>
      <TD ALIGN=RIGHT><IMG ALT="[Logo]" SRC="whale.gif" WIDTH=165 HEIGHT=57>
   </TR>
</TABLE>
<HR NOSHADE SIZE=1>

<UL>
	<LI><B>Intro</B>
</UL>


<BLOCKQUOTE>
	<P>Prolog is a goal-oriented, implicative language based on predicate logic. <I>Goal-oriented</I> means that a
	program proceeds by attempting to achieve a goal which is itself defined by other goals. Prolog operates in an
	inferential or <I>implicative </I>way: What you write are implications, and operation flows from one impliction
	to the next implied goal. A line of Prolog code is generally either a rule or a fact - code and data being largely
	interchangable. Prolog code often has a <I>declarative</I> interpretation, meaning that it specifies &quot;what&quot;
	exists but not &quot;how.&quot; This is different from <I>imperative </I>in which a program defines a series of
	steps to carry out (C or Basic for example).</P>
	<P><FONT SIZE="2">PROLOG</FONT> means PROgramming in LOGic. Implications are specified in the form of logical predicates
	called <I>Horn</I> clauses. A horn clause consists of a sought implication (a goal clause), and a set of clauses
	that must be be proven separated by <B><FONT SIZE="4">:-</FONT></B>. which simply means &quot;if.&quot; A typical
	Prolog statement has the form:</P>
	<BLOCKQUOTE>
		<P><B>goalclause(V<I><SUB>g</SUB></I>) <FONT SIZE="4">:-</FONT> clause</B><SUB><I><B><FONT SIZE="2">1</FONT></B></I></SUB><B>(V</B><SUB><I><B><FONT
		SIZE="2">1</FONT></B></I></SUB><B>),..,clause</B><SUB><I><B><FONT SIZE="2">m</FONT></B></I></SUB><B>(V</B><SUB><I><B><FONT
		SIZE="2">m</FONT></B></I></SUB><B>)</B></P>
	</BLOCKQUOTE>
	<P>which means <B>goalclause</B> is true for variable set <B>V</B><I><B><FONT SIZE="2">g</FONT></B></I> if the
	series of clauses <B>clause</B><I><B><FONT SIZE="2">1</FONT></B></I><B>,..,clause</B><I><B><FONT SIZE="2">m </FONT></B></I>are
	true. In other words:</P>
	<BLOCKQUOTE>
		<P><B>goalclause(V<I><SUB>g</SUB></I>) is true if clause</B><SUB><I><B><FONT SIZE="2">1</FONT></B></I></SUB><B>(V</B><SUB><I><B><FONT
		SIZE="2">1</FONT></B></I></SUB><B>) and ... and clause</B><SUB><I><B><FONT SIZE="2">m</FONT></B></I></SUB><B>(V</B><SUB><I><B><FONT
		SIZE="2">m</FONT></B></I></SUB><B>) are true.</B></P>
	</BLOCKQUOTE>
	<P>To represent just a fact instead of a rule, you specify just the head part of the horn clause (An implication
	with no conditions required to make it true is essentially a fact). Here is a sample with one rule and two facts:</P>
	<BLOCKQUOTE>
		<P><B>grandmother(G,S) :- parent(P,S), mother(G,P).<BR>
		mother(sarah,issac).<BR>
		parent(issac, jacob).</B></P>
	</BLOCKQUOTE>
	<P>The first statement means G is the grandmother of S if there is a parent P of S and G is the mother of P. The
	next two statements are facts indicating that issac is a parent of jacob and that sarah is the mother of issac.</P>
	<P>Prolog finds solutions by <I>unification: </I>binding a variable to a value. For an implication to succeed,
	all goal variables <B>V</B><I><B><FONT SIZE="2">g </FONT></B></I>on the left side of <B><FONT SIZE="4">:-</FONT></B>
	must find a solution by binding variables from the clauses which are activated on the right side. Standard Prolog
	evalutates clauses from left to right. When all clauses are examined and all variables in <B>V</B><I><B><FONT SIZE="2">g</FONT></B></I><B>
	</B>are bound, the goal succeeds. But if a variable can not be bound for a given clause, that clause fails. When
	any clause fails, Prolog <I>backtracks - </I>it goes back to the left to a previous clauses to continue trying
	to unify with alternative bindings. Backtracking give Prolog the ability to find multiple solutions to for a given
	query or goal.</P>
	<P><B>History: </B>Prolog was created in the early 1970s by <A HREF="#Alain">Alain Colmerauer</A>, <A HREF="#Kowalski">Robert
	Kowalski</A>, Phillipe Roussel and collegues. <A HREF="#1983">Modern implementation</A> began with a virtual machine
	called the &quot;<A HREF="#WAM">Warren Abstract Machine</A>&quot; implemented by <A HREF="#DHDWarren">David H.
	D. Warren</A> at Edinburgh. The Prolog language is now defined by an <A HREF="#oo_prolog_standards">ISO (1995)
	Standard</A>. However, much current theoretical value comes from continuing develoment: extensions, modifications
	and experimental aspects.</P>
	<P><B>Continuing Development: </B>The developmental aspects of Prolog and logic programming include:</P>
	<UL>
		<LI>Constraint logic programming (CLP)
		<LI>Parallelism and concurrency
		<LI>Linear logic (LLP)
		<LI>Inductive logic (ILP)
		<LI>Committed Choice Languages
		<LI>Higher-Order Logic (HOL)
		<LI>Object-oriented programming (OOLP).
		<LI>Java and XML Interoperability
	</UL>
	<P><B>Object-oriented Aspects: </B>OOLP of course relates directly to object orientation. Many Prolog systems <A
	HREF="#oo_prolog_compilers_interpreters">directly incorporate OO capabilities</A>. <FONT SIZE="2">LOGIN</FONT>,
	was an early OO extension of Prolog created in the mid-1980s by Ait Kaci (also the creator of the <A HREF="#LIFE">LIFE</A>
	language) and Nasr. However, today, nearly all Prolog systems can use OOLP through an OO add-on called <A HREF="#LogTalk">LogTalk.</A></P>
	<P>In addition most of the other developments above relate to OO and/or component capabilities in some way. And
	some go beyond traditional OO. For instance, some Constraint programming systems enhance Prolog so that it can
	bind variables &quot;incrementally&quot; so that variables are <I>constrained</I> (numerically, by enumarated type,
	or by class) before they are bound. Some standard Prolog systems include CLP extensions.</P>
	<P>Some logic languages <A HREF="#Mercury" target="_top">Mercury</A>, <A HREF="#KLIC">KLIC</A>, <A HREF="#Mozart"
	target="_top">Mozart</A> and <A HREF="#G鰀el">G&ouml;del</A> incorporate concurrency and parallelism and eliminate
	or restrict backtracking and unification. These are known as committed choice languages. They not Prolog, at least
	not as defined above, but are they logic languages. Others, <A HREF="#ECLiPSe">ECLiPSe</A> and <A HREF="#BAP">BAP</A>,
	however, offer parallelism and are extentions of Prolog.</P>
	<P>Linear logic models causality, state transitions, and accounting for resources used in logic. Linear logic programming
	originated from the work of <A HREF="#Girard">Jean-Yves Girard</A>. Linear logic systems such as <A HREF="#Lolli">Lolli</A>
	and <A HREF="#LLP" target="_top">LLP</A> are supersets (more or less) of Prolog that define additional operations
	for these purposes. Closely related to LLP is higher-order logic (HOL), as embodied in Lambda Prolog. HOL concerns
	topics such as provability and correctness and other functional programming concepts as opposed to OO, but is also
	used in solving problems concerning mobile agents (Pi Calculus) as defined by Robin Milner and others.</P>
	<P><A HREF="#Progol">Progol</A> is a superset of Prolog that provides rapid definition of classes and attributes.
	It includes extensions for <I>inductive logic</I>. Inductive logic often uses a schema of classes, instances and
	attribute values to define a rule base.</P>
	<P>In fact, objects, attributes, and inheritance are a frequent focus in logic applications. The ISO Prolog standard
	does not define traditional OO features: classes, inheritance, methods, and events (although OO standards are <A
	HREF="#PMG">under consideration</A>). However, Prolog is highly extensible. OO capabilities can be and often are
	implemented in extensions. Implementing traditional multiple inheritance can be done with just a few Prolog statem-ents,
	albiet maybe simplistically. But, it is equally possible to equip Prolog with additional object and inheritance
	capabilities not available in traditional OO.</P>
	<P>Doing so is sometimes necessary. Many practical and research logic problems push beyond the capabilities of
	traditional OO. In reasoning about beliefs, <A HREF="#Deontic">norms</A>, learning, linguistics, <A HREF="#agents">agents</A>,
	and incomplete knowledge, inheritance is extra-hierarchial and fluid. Knowledge changes over time and occurs as
	<A HREF="#networks"><I>inheritance networks</I></A> rather than as strict hierarchies - Additional inheritance
	and object relation styles need to be considered. It is valuable to view inheritance network tools as advanced
	OO with added capabilities for role definition, <A HREF="#defeasibility">defeasibility</A>, <A HREF="oo_prolog.html"
	target="_top">nonmonotonicity</A>, <A HREF="#abduction">abduction</A>, and <A HREF="#dynamic preference">preferencial
	inheritance</A>.</P>
	<P>In addition to OO extensions, there are also interoperability tools, database tools, deductive database Prolog
	systems, open source <A HREF="#cpp">C++ </A>WAM implementations, and <A HREF="#Java">Java implementations</A> of
	Prolog and Java-Prolog libraries. I would hazard a guess, there are now more combinations of Java-Prolog than of
	any other two computer langauges anywhere. Prolog-Java combinations often enable Prolog access to Java objects,
	properties, reflection capabilities, and wide array of interfaces.</P>
	<P>This page includes:</P>
	<UL>
		<LI><A HREF="#oo_prolog_compilers_interpreters">Liner Logic and Prolog systems</A> with OO abilities and/or extensions.
		<LI><A HREF="#general" target="_top">Generic OO extensions</A> that can be used with standard Prolog.
		<LI><A HREF="#Java" target="_top">Prolog - Java</A> implementations and <A HREF="#cpp">C++ WAM</A> implementations.
		<LI>Interoperability with the OO world: <A HREF="#oo_prolog_interoperability" target="_top">GUI, Web</A>, and with
		<A HREF="#oo_prolog_databases" target="_top">Deductive, OO, and relational databases</A>.
		<LI>Works that consider inheritance networks, and advanced inheritance.
	</UL>
	<P>OO provides an exciting and even broad, if incomplete spectrum in which to view logic programming, a field which
	is extensive and growing. This page thus explores many of the flavors of Prolog and LP.<IMG SRC="pixel.gif" WIDTH="1"
	HEIGHT="1" ALIGN="BOTTOM" BORDER="0">
</BLOCKQUOTE>


<UL>
	<LI><B>Go to</B>
	<UL>
		<LI><A HREF="#oo_prolog_start_here" target="_top">Start here</A>, &nbsp; <A HREF="#oo_prolog_examples" target="_top">Examples</A>,
		&nbsp; <A HREF="#oo_prolog_demos" target="_top">Demos</A>, &nbsp; <A HREF="#oo_prolog_fun" target="_top">Fun</A>
		<LI><A HREF="#oo_prolog_central_sites" target="_top">Central Sites</A>, &nbsp; <A HREF="#oo_prolog_related_sites"
		target="_self">Related Sites</A>, &nbsp; <A HREF="#oo_prolog_link_collections" target="_top">Link Collections</A>
		<LI><A HREF="#oo_prolog_tutorials" target="_top">Tutorials</A>, &nbsp; <A HREF="#oo_prolog_faqs" target="_top">FAQs</A>,
		&nbsp; <A HREF="#oo_prolog_support" target="_top">Support</A>, &nbsp; <A HREF="#oo_prolog_references" target="_top">References</A>,
		&nbsp; <A HREF="#oo_prolog_standards">Standards</A>
		<LI><A HREF="#oo_prolog_general_newsgroups" target="_top">General Newsgroups</A>, &nbsp; <!--<A TARGET="_top" HREF="#oo_prolog_national_newsgroups">National
Newsgroups</A>,   -->
		&nbsp; <A HREF="#oo_prolog_mailing_lists" target="_top">Mailing Lists</A>
		<LI><A HREF="#oo_prolog_general_articles" target="_top">General Articles</A>, &nbsp; <A HREF="#oo_prolog_special_articles"
		target="_self">Special Articles</A>, &nbsp; <A HREF="#oo_prolog_interoperability" target="_top">Interoperability</A>
		<LI><A HREF="#oo_prolog_bibliographies" target="_top">Bibliographies</A>, &nbsp; <A HREF="#oo_prolog_books" target="_top">Books</A>,
		&nbsp; <!--<A TARGET="_top" HREF="#oo_prolog_proceddings">Proceedings</A>,
  --><A HREF="#oo_prolog_magazines"
		target="_self">Magazines</A>, &nbsp; <A HREF="#oo_prolog_other_publications" target="_top">Other Publications</A>
		<LI><A HREF="#oo_prolog_organizations" target="_top">Organizations</A>, &nbsp; <!--<A TARGET="_top" HREF="#oo_prolog_projects">Projects</A>,
  --><A
		HREF="#oo_prolog_people">People</A>, &nbsp; <A HREF="#oo_prolog_conferences_workshops" target="_top">Conferences
		/ Workshops</A>
		<LI><A HREF="#oo_prolog_development_environments" target="_top">Development Environments</A>, &nbsp; <A HREF="#oo_prolog_compilers_interpreters"
		target="_self">Compilers / Interpreters</A>, &nbsp; <A HREF="#oo_prolog_utilities_tools" target="_top">Utilities
		/ Tools</A>
		<LI><!--<A TARGET="_top" HREF="#oo_prolog_guis">GUIs</A>,  --><A HREF="#oo_prolog_databases" target="_top">Databases</A>
		&nbsp; <!--<A TARGET="_top" HREF="#oo_prolog_orbs">ORBs</A>-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -