File: An_Example_of_ACL2_in_Use.html

package info (click to toggle)
acl2 3.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 36,712 kB
  • ctags: 38,396
  • sloc: lisp: 464,023; makefile: 5,470; sh: 86; csh: 47; cpp: 25; ansic: 22
file content (45 lines) | stat: -rw-r--r-- 1,546 bytes parent folder | download
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
<html>
<head><title>An_Example_of_ACL2_in_Use.html  --  ACL2 Version 3.1</title></head>
<body text=#000000 bgcolor="#FFFFFF">
<h2>An Example of ACL2 in Use</h2>

To introduce you to ACL2 we will consider the <code>app</code> function discussed
in the <a href="Common_Lisp.html">Common Lisp</a> page, <b>except</B> we will omit
for the moment the <b>declare</B> form, which in ACL2 is called a <b>guard</B>.
  We will deal with guards later.  <p>

Here is the definition again

<pre>
<b>(defun app (x y)</B>
  <b>(cond ((endp x) y)</B>
        <b>(t (cons (car x) </B>
                 <b>(app (cdr x) y)))))</B>
</pre>

<p>
<p>

<p>

The next few stops along the Walking Tour will show you

<pre>
  * how to use the ACL2 documentation,
  * what happens when the above definition is submitted to ACL2,
  * what happens when you evaluate calls of <code>app</code>,
  * what one simple theorem about <code>app</code> looks like, 
  * how ACL2 proves the theorem, and
  * how that theorem can be used in another proof.
</pre>

Along the way we will talk about the <b>definitional principle</B>, <b>types</B>,
the ACL2 <b>read-eval-print loop</B>, and how the <b>theorem prover</B> works.<p>

When we complete this part of the tour we will introduce the notion of
<b>guards</B> and revisit several of the topics above in that context.<p>

<a href="How_To_Find_Out_about_ACL2_Functions.html"><img src=walking.gif></a>
<br><br><br><a href="acl2-doc.html"><img src="llogo.gif"></a> <a href="acl2-doc-index.html"><img src="index.gif"></a>
</body>
</html>