### ACL2 TUTORIAL PDFACL2 TUTORIAL PDF

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: Sami Fenribar Country: Trinidad & Tobago Language: English (Spanish) Genre: Politics Published (Last): 9 April 2012 Pages: 131 PDF File Size: 13.62 Mb ePub File Size: 9.83 Mb ISBN: 640-8-16983-568-6 Downloads: 24575 Price: Free* [*Free Regsitration Required] Uploader: Gashicage

Try changing the nil in the definition of rev above to something else, like 1.

It would be even better if we could write a test that will check several types of lists to tutoriaal that our function does what we want. This page provides instructions for downloading the software, working in Racket’s ACL2 language, writing interactive graphical programs, and for reporting bugs.

We can just use rev rest xs to reverse the rest of the list, but what do we do with first xs? To do this, we need to write a property-style test. We could write some more check-expect style tests, but they can only tutogial us so far.

For put-at-end x xswe can use append:. In order to define a recursive function in ACL2, we need to think about what it would return in a couple of different cases. 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.

You need DrRacket version 5. First, the ‘3’ has a checkmark with a green background next to it.

CATERPILLAR 120M PDF

It can be installed using the raco command line utility. This automatic admission occurs in: This means that the function call executed without errors. Alternately, feel free to inquire on the Racket User’s mailing listfile a bug report via DrRacket’s Help menu, or contact the author.

You can see what kinds of values this generator returns by typing it in the REPL. If the proof or admission was successful, the error pane won’t open up by default.

A report on this course was presented at the ACL2 Workshop inand can be found here. To run your program, click on Run.

So we need to put 1 at the end of the reversed list.

### — ACL2 Version

Here’s a definition for ‘sum’ that you can either retype or copy and paste: To install Dracula using this utility, execute: Running Dracula Start DrRacket. When a test fails, it shows you which cases it failed on.

It will run, and if it passes, a green bar will appear to the left of the test. 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. This test has one generator. We want to take these parts and assemble a new, reversed list. In order to correct this, we need to add a hypothesis to our property: This simply means that the code was executed by ACL2 without any problems.

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. The reverse of an empty list is just an empty list: 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.

MANO KIME LOGIC AND COMPUTER DESIGN FUNDAMENTALS PDF

You will probably want to admit these functions to ACL2’s: The name of the test is rev-rev-test. Try typing some math into the REPL now: This adds the content of the Definitions Window to DrRacket’s “knowledge base”. If the automatic admission succeeds, the proof bar turns light green next to the admitted code.

You may also copy and paste such expressions into the Definitions Window. Dracula The objective of the “Dracula” project is to provide a programming environment for the ACL2 language and theorem prover. Try admitting your sum function from before. We don’t recommend this, but it is not an uncommon practice for Lisp development. The simplest automatic test provided by Proof Pad is check-expect.

There are a couple of things to note at this point. Upgrading To upgrade Dracula, run the following at the command line: You instantly see the result, which is 5 4 3 2 1. A test passes when the two arguments to check-expect evaluate to the same thing in this case, the list 5 4 3 2 1.

Now, what if xs is not empty? Admitted expressions will be highlighted green, and rejected expressions will be highlighted red.

Download and install from the Racket site. You also need ACL2 version 3.