This directory contains the following files:

masc.h: The class templates that must be loaded with any MASC SystemC model.

translate.lisp: The translator that converts the S-expression representation 
                of a MASC model (generated by the MASC parser) to an ACL2 program.

imul.cpp:  A SystemC model of a 32-bit radix-4 Booth integer multiplier.

imul.m: The MASC version of the model generated by the MASC parser.

imul.ast.lsp: The S-expression representation of the model generated by 
               the MASC parser.

imul.lisp: The ACL2 translation of the model generated by the MASC parser 
           and "translate.lisp".

proof.lisp:  The script for a proof of correctness of the model.

------------------------------------------------------------------------------

Note that our use of GL requires that we also use ACL2H, the experimental 
modification of ACL2 for HONS, memoization, and applicative hash tables.

------------------------------------------------------------------------------

The file imul.lisp may be recreated and certified as follows:

ACL2 !>(certify-book "translate")

ACL2 !>(translate-program "imul.ast.lsp" "imul.lisp" state)

ACL2 !>:u

ACL2 !>(set-inhibit-output-lst '(prove event proof-tree))

ACL2 !>(certify-book "imul")

------------------------------------------------------------------------------

The function imultest takes a pair of 32-bit integers and returns 3 values.
The first is a boolean (1 or 0) indicating agreement between the other two,
which are the products computed by * and imul, respectively:


ACL2 !>(include-book "imul")

ACL2 !>(imultest 2 3)
(imultest 2 3)
(1 6 6)

ACL2 !>(set-print-base 16 state)
(set-print-base 16 state)
<state>

ACL2 !>(imultest #xFEDCBA98 #x12345678)
(imultest #xFEDCBA98 #x12345678)
(1 121FA00A35068740 121FA00A35068740)

------------------------------------------------------------------------------

To certify the proof script:

ACL2 !>:ubt! 1

ACL2 !>(include-book "centaur/gl/gl" :dir :system)

ACL2 !>(certify-book "proof" 1)


