Ximi Elga


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: Kitilar Akinotaur
Country: Jamaica
Language: English (Spanish)
Genre: Life
Published (Last): 25 January 2009
Pages: 215
PDF File Size: 5.63 Mb
ePub File Size: 9.27 Mb
ISBN: 658-3-84445-787-3
Downloads: 41630
Price: Free* [*Free Regsitration Required]
Uploader: Kajicage

Alternately, feel free to inquire on the Racket User’s mailing listfile a bug report via DrRacket’s Help menu, or contact the author. Keep reading below for installation instructions, and check out the links on the left for tutorials, examples, and bug report instructions.

— ACL2 Version

This adds the content of the Definitions Window to DrRacket’s “knowledge base”. Essentially, the REPL will execute any code you type in the text field on bottom the “prompt” and show the result in the log above. When a test fails, it shows you which cases it failed on. If you don’t, see the troubleshooting page.

For put-at-end x xswe can use append:. The name of the test is rev-rev-test. The first case is when the argument, xsis empty or nil. In this case, our test as written will fail.

tutorizl Try changing the nil in the definition of rev above to something else, like 1. The whole file so far is: 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.


Proof Pad: Introduction

Try typing some math into the REPL now: In order to correct this, we need to add a hypothesis to our property: If the proof or admission was successful, the error pane won’t open up by default. If it fails, it instead turns red, an ‘x’ is shown, and the details pane opens up to show you the error message you received. This way, ACL2 will know to only concern itself with values that satisfy true-listp — values that are lists.

This page provides instructions for downloading the software, working in Racket’s ACL2 language, writing interactive graphical programs, and for reporting bugs. Now, what if xs is not empty? We want to take these parts and assemble a new, reversed list. Once you’ve admitted some code to the ACL2 logic which can take some time for complex functions or theoremsthe proof bar turns green next to the form or forms that were admitted. Now you can evaluate expressions in the Interactions Window that refer to the definitions in the Definitions Window.

The simplest automatic test provided by Proof Pad is check-expect. 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.

As you hover over the 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.

The intent of this is to let you test your functions in the REPL, even if they aren’t carefully written enough in the way ACL2 expects to be used in: Uninstalling To uninstall Dracula, run the following at the command line: This simply means that the code was executed by ACL2 without any problems. Running Dracula Start DrRacket. There are a couple of things to note at this point.


You need DrRacket version 5. You also need ACL2 version 3.

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. Acknowledgements Thanks to Rex Page for the inspiration for this project, Dale Vaillancourt for the initial implementation, and Matthias Felleisen for his constant support.

This means that the function call executed without errors.

Tutorial: reverse of reverse

To install Dracula using this utility, execute: A doublecheck test has three parts: You can read more about ACL2’s two modes herethough this is strictly optional reading; you don’t need to have an intimate understanding of this for Proof Pad, since it abstracts these parts away for you.

It can be installed using the raco command ac,2 utility. One property we can test with DoubleCheck is that reversing a list twice gives you the same list you started with. It will run, and if it passes, a green bar will appear to the left of the test.