Changes

From Nordan Symposia
Jump to navigationJump to search
5 bytes removed ,  03:52, 19 August 2007
Line 79: Line 79:  
Let us return to our [[Socrates]] [[syllogism]]. We enter into our Knowledge Base the following piece of code:
 
Let us return to our [[Socrates]] [[syllogism]]. We enter into our Knowledge Base the following piece of code:
   −
<code>
+
 
mortal(X) :- man(X).
+
mortal(X) :- man(X).
man(socrates). </code>
+
man(socrates). </code>
    
This states that all men are mortal and that Socrates is a man. Now we can ask [[Prolog]] about Socrates.
 
This states that all men are mortal and that Socrates is a man. Now we can ask [[Prolog]] about Socrates.
   −
<code>
  −
?- mortal(socrates).
     −
Yes </code>
+
?- mortal(socrates).
 +
 
 +
Yes  
    
On the other hand :
 
On the other hand :
   −
<code>
  −
?- mortal(plato).
     −
No </code>
+
?- mortal(plato).
 +
 
 +
No  
    
This is because [[Prolog]] does not know anything about [[Plato]], and hence defaults to any property about Plato being false (the so-called [[closed world assumption]]). [[Prolog]] can be used for vastly more complicated inference tasks. See the corresponding article for further examples.
 
This is because [[Prolog]] does not know anything about [[Plato]], and hence defaults to any property about Plato being false (the so-called [[closed world assumption]]). [[Prolog]] can be used for vastly more complicated inference tasks. See the corresponding article for further examples.
 +
 +
[[Category: General Reference]]
    
===Automatic inference and the semantic web===
 
===Automatic inference and the semantic web===

Navigation menu