Posted on: April 25, 2020 Posted by: admin Comments: 0


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: Arashirg Dataxe
Country: Bermuda
Language: English (Spanish)
Genre: Literature
Published (Last): 27 December 2016
Pages: 224
PDF File Size: 18.32 Mb
ePub File Size: 17.20 Mb
ISBN: 606-5-97563-802-3
Downloads: 66303
Price: Free* [*Free Regsitration Required]
Uploader: Mitilar

— ACL2 Version

Download and tutoril from the Racket site. Finally, we have the tutorizl 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. In order to define a recursive function in ACL2, we need to think about what it would return in a couple of different cases.

You instantly see the result, which is 5 4 3 2 1. If the proof or admission was successful, the error pane won’t open up by default.

Admitted expressions will be highlighted green, and rejected expressions will be highlighted red. Guards are restrictions on what values a function will take; in this case, endp xs expects a list, and we gave it a number. Dracula The objective of the “Dracula” project is to provide a programming environment for the ACL2 language and theorem prover.

Proof Pad: Tutorial (reverse)

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 need DrRacket version 5.

The definitions area is where you write your functions, theorems, and other state-altering expressions. Now, what if xs is not empty? 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. We could write some more check-expect style tests, but they can only get us so far. You may also copy and paste such expressions into the Definitions Window. Upgrading To upgrade Dracula, run the following at the command line: The reverse of an empty list is just an empty list: We can automate this process to make sure that rev continues to match our expectations, even if we change or rewrite it.


On Windows, this utility is in the directory where Racket is installed; on Mac or Unix, it is in the bin subdirectory. In this case, it fails all cases, but it might help you to diagnose the problem if only some of the cases fail too.

We don’t recommend this, but it is not an uncommon practice for Lisp development. Try typing some math into the REPL now: Uninstalling To uninstall Dracula, run the following at the command line: This has to do with tutoril ACL2 processes events; the ACL2 “world” tutoriao 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.

It will run, and if it passes, a green bar will appear to the left of the test. If everything has been entered correctly, ACL2 will succeed, and the bar will turn dark green with a checkmarkindicating that the property has been proven correct.

Aspects of ACL2 User Interaction

First, the ‘3’ has a checkmark with a green background next to tutorual. To define and edit functions, use the Definitions window. To do this, we need to write a property-style test. So we need to put 1 at the end of the reversed list. If the Dracula language or its documentation does not get installed correctly, try running the following command to fix it: You will probably want to admit these functions to ACL2’s: One property we can test with DoubleCheck is that reversing a list twice gives you the same list you started with.


There are a couple of things to note at this point. Here’s a definition for ‘sum’ that you can either retype or copy and tktorial Running Thtorial Start DrRacket. If a single case fails, the test fails. A doublecheck test has three parts: Acknowledgements Thanks to Rex Page for the inspiration for this project, Dale Vaillancourt for the initial implementation, and Matthias Felleisen for his constant support.

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. To install Dracula using this utility, execute: The REPL is a good place to test the functions you write in the definitions area, or just to get a sense of how to use a certain function or feature.

This simply means that the code was executed by ACL2 without any problems. If the automatic admission succeeds, the proof bar turns light green next to the admitted code. DrRacket will then evaluate them tutoriial time you click Run. Try changing the nil in the definition of rev above to something else, like 1.

Keep reading below for installation instructions, and check out the links on the left for tutorials, examples, and bug report instructions.

We can just use rev rest xs to reverse the rest of the list, but what do we do with first xs? In order to correct tutoriall, we need to add a hypothesis to our property: Try admitting your sum function from before. After we split it up into two parts, 1 and list 2 3 4 5we can reverse the list part to get tutoriaal 5 4 3 2.

And what we want for the whole list is list 5 4 3 2 1. If you don’t, see the troubleshooting page.


Leave a Comment