Tutorial Description. ACL2 (“A Computational Logic for Applicative Common Lisp”) is both a programming language in which you can model computer systems. ACL2’s logic is constructed on top of a real programming language, Common Lisp, and supports a wide variety of. David Hardin’s current a liation: Ajile Systems. PDF | We describe a tutorial that demonstrates the use of the ACL2 theorem prover. We have three goals: to enable a motivated reader to start.

Author: Bat Mozahn
Country: Mozambique
Language: English (Spanish)
Genre: Environment
Published (Last): 27 April 2016
Pages: 187
PDF File Size: 19.78 Mb
ePub File Size: 8.98 Mb
ISBN: 120-7-97311-633-1
Downloads: 15084
Price: Free* [*Free Regsitration Required]
Uploader: Gobar

After we split it up into two parts, 1 and list 2 3 4 5we can reverse the list part to get list 5 4 3 2. tutoroal

Dracula The objective of the “Dracula” project is to provide a programming environment for the ACL2 language and theorem prover. You may also enter definitions into the Interactions Window if you want to test something on the fly.

Proof Pad: Introduction

tutorlal To do this, click on the proof bar next to the function you want to admit. We could write some more check-expect style tests, but they can only get us so far. Try admitting your sum function from before. To define and edit functions, use the Definitions uttorial. As you hover over tutorail proof bar, it will show you a preview of what’s going to be done; in particular, if you want to admit an expression, you have to first admit all the expressions above it.

One property we can test with DoubleCheck is that reversing a list twice gives you the same list you started with. Proof bar The proof bar is the normally white bar to the left of the definitions panel that allows you to view and manipulate the status of ACL2 with respect to your code. Download and install from the Racket site.


It can be installed using the raco command line utility. It will run, and if tutorila passes, a green bar will appear to the left of the test.

Now, what if xs is not empty? Now you can evaluate expressions in the Interactions Window that refer to the definitions in the Definitions Window.

Introduction to Proof Pad

We don’t recommend this, but tutoriaal is not an uncommon practice for Lisp development. The whole file so far is: We’ll talk more about the proof bar in the next section Definitions occur in an ordered way in the file; if you want to use the function “foo” within the function “bar”, you must put the definition of “foo” above the definition of “bar”.

This has to do with how ACL2 processes events; the ACL2 “world” must be logically consistent after each and every event, so if you used “foo” before defining it, ACL2 might be accepting something that won’t actually work.

You may now restart ACL2 if desired. Guards are restrictions on what values a function will take; in this case, endp xs expects a list, and we gave it a number. This simply means that the code was executed by ACL2 without any problems.

Aspects of ACL2 User Interaction

You need DrRacket version 5. Dracula has been used to teach tutorizl first-year undergraduate logic course at Northeastern University. Alternately, feel free to inquire on the Racket User’s mailing listfile a bug report via DrRacket’s Help menu, or contact the author.

This page provides instructions for downloading the software, working in Racket’s ACL2 language, zcl2 interactive graphical programs, and for reporting bugs.

If the Dracula language or its documentation does not get installed correctly, try tutrial the following command to fix it: If you don’t, see the troubleshooting page.


This means that the function call executed without errors. Running Dracula Start DrRacket. The first case is when the argument, xsis empty or nil. And what we want for the whole list is list 5 4 3 2 1. Define reverse reverse xs is a built-in function that takes a list and returns a list with all of the elements in the opposite order. Admitted expressions will be highlighted green, and rejected expressions will be highlighted red. You can see what kinds of values this generator returns by typing it in the REPL.

Here’s a definition for ‘sum’ that you can either retype or copy and paste: We want to take these parts and assemble a new, reversed list.

Aspects of ACL2 User Interaction

In this case, it fails all cases, but it might help you to diagnose the problem if only some of the cases fail too. DrRacket will then evaluate them next time you click Run. It generates values called xsusing the random-integer-list generator. Upgrading To upgrade Dracula, run the following at the command line: The reverse of an empty list is just an empty list: They only test the types of values that you generate, and you might have a bug that impacts only a small subset of cases, which means the generated test cases are unlikely to expose the bug.

For put-at-end x xswe can use append:.