By admin /

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: Mooguktilar Faezshura
Country: Libya
Language: English (Spanish)
Genre: Software
Published (Last): 10 December 2018
Pages: 81
PDF File Size: 6.79 Mb
ePub File Size: 15.85 Mb
ISBN: 899-7-89813-130-6
Downloads: 46388
Price: Free* [*Free Regsitration Required]
Uploader: Dasar

This page provides instructions for downloading the software, working in Racket’s ACL2 language, writing interactive graphical programs, and for reporting bugs. We can automate this process to make sure that rev continues to match our expectations, even if we change or rewrite it. In order to tutorkal this, we need to add a hypothesis tutoriql our property: The proof bar handles this for you. We can just use rev rest xs to reverse the rest of the list, but what do we do with first xs?

Upgrading To upgrade Dracula, run the following at the command line: One property we can test with DoubleCheck is that reversing a list twice gives you the same list you started with. A doublecheck test has three parts: If everything has been entered correctly, ACL2 will succeed, and the bar will tuyorial dark green with a checkmarkindicating that the property has been proven correct.

It generates values called xsusing the random-integer-list generator. Proof bar The proof bar is the normally afl2 bar to the left of the definitions panel that allows you to view and manipulate the status of ACL2 with respect to your code. The reverse of an empty list is just acl empty list: The whole file so far is: This way, ACL2 will know to only concern itself with values that satisfy true-listp — values that are lists.


— ACL2 Version

Download and install from the Racket site. This simply means that the code was executed by ACL2 without any problems.

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 wcl2 an expression, you have to first admit all the expressions above it.

To install Dracula using this utility, execute: 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.

Tutorial: reverse of reverse

Thanks to Rex Page for the inspiration for this project, Dale Vaillancourt for the initial implementation, and Matthias Felleisen for his constant support. This test has one generator. The first case is when the argument, xsis empty or nil.

We tutoriaal to take these parts and assemble a new, reversed list. 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. Tutoria Thanks to Rex Page for the inspiration for this project, Dale Vaillancourt for the initial implementation, and Matthias Felleisen for his constant support.


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

We don’t recommend this, but it is not an uncommon practice for Lisp development. Dracula is available as a Tutrial package. It can be installed using the raco command line utility.

Try changing the nil in the definition of rev above to something else, like 1. This automatic admission occurs in: Admitted expressions will be highlighted green, and rejected expressions will be highlighted red. hutorial

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. You can see that this makes the test fail.

Aspects of ACL2 User Interaction

Test reverse Now that we have a good working definition for reverse, we need to test it to see that it works. In order to define a recursive function in ACL2, we need to think about what it would return in a couple of different cases.

To do this, we need to write a property-style test.