-
Notifications
You must be signed in to change notification settings - Fork 2
/
instructions_for_prolog.html
46 lines (43 loc) · 1.78 KB
/
instructions_for_prolog.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
<title>Instructions for Geoquery</title>
</head>
<body>
<span style="font-weight: bold;">Instructions for running Prolog
queries for Geoquery Data </span><span style="font-family: monospace;"><br>
<br>
</span>
<ol>
<li>Load up Sicstus Prolog(tm) with the <span style="font-family: monospace;">swipl</span> in the terminal.</li>
<br>
<li>Prove <span style="font-family: monospace;">compile('geoquery').</span>
<span style="font-family: monospace;"></span></li>
<span style="font-family: monospace;"></span><br>
<li>To try executing an actual query, try to prove this predicate:</li>
</ol>
<div style="margin-left: 40px;"><span style="font-family: monospace;">execute_query(<Query>,
Ans).</span><br>
where <Query> is a parsed query in logical form (you can grab an
example from "geoqueries880") and the set of answers is returned in Ans.
<br>
</div>
<span style="font-family: times new roman;"><br>
</span>
<span style="font-weight: bold;">Querying the KB using Prolog or FUNQL </span><span style="font-family: monospace;"><br>
<br>
</span>
<ol>
<li> <strong>FUNQL: </strong>Run <span style="font-family: monospace;">echo "execute_funql_query($QUERY, X)." | swipl -s eval.pl 2>&1 | grep "X = " </span>
<li> <strong>PROLOG: </strong>Run <span style="font-family: monospace;">echo "execute_query($QUERY, X)." | swipl -s geo_long.pl 2>&1 | grep "X = "
</span>
</ol>
<span style="font-family: times new roman;"><br>
</span>
<hr style="width: 100%; height: 2px;">
<pre style="font-family: times new roman;"><br></pre>
<ol>
<span style="font-family: monospace;"> </span>
</ol>
<span style="font-family: monospace;"></span>
</body></html>