Using Hashtables to Find the Generation Point of a Problematic Cons

Similar documents
A Tool for Simplifying ACL2 Definitions

Improving Eliminate-Irrelevance for ACL2

Induction Schemes. Math Foundations of Computer Science

Backtracking and Induction in ACL2

Reasoning About Programs Panagiotis Manolios

Announcement. Overview. LISP: A Quick Overview. Outline of Writing and Running Lisp.

Common Lisp. Blake McBride

Extending ACL2 with SMT solvers

Software Verification with ACL2

Finite Set Theory. based on Fully Ordered Lists. Jared Davis UT Austin. ACL2 Workshop 2004

A Futures Library and Parallelism Abstractions for a Functional Subset of Lisp

INF4820: Algorithms for Artificial Intelligence and Natural Language Processing. Common Lisp Fundamentals

CSCI337 Organisation of Programming Languages LISP

SCHEME 7. 1 Introduction. 2 Primitives COMPUTER SCIENCE 61A. October 29, 2015

Polymorphic Types in ACL2

SCHEME AND CALCULATOR 5b

Homework 1. Notes. What To Turn In. Unix Accounts. Reading. Handout 3 CSCI 334: Spring, 2017

Functional programming with Common Lisp

Gene Kim 9/9/2016 CSC 2/444 Lisp Tutorial

Mechanized Operational Semantics

Lecture #5 Kenneth W. Flynn RPI CS

Reasoning About Programs Panagiotis Manolios

Refinement and Theorem Proving

Function Memoization and Unique Object Representation for ACL2 Functions

Reasoning About Programs Panagiotis Manolios

Homework 1. Reading. Problems. Handout 3 CSCI 334: Spring, 2012

Lisp Basic Example Test Questions

Function Memoization and Unique Object Representation for ACL2 Functions

Proof-Pattern Recognition and Lemma Discovery in ACL2

An Executable Model for JFKr

Verifying Centaur s Floating Point Adder

Lecture Notes on Lisp A Brief Introduction

A Mechanically Checked Proof of the Correctness of the Boyer-Moore Fast String Searching Algorithm

by the evening of Tuesday, Feb 6

Parameterized Congruences in ACL2

Environments

LISP. Everything in a computer is a string of binary digits, ones and zeros, which everyone calls bits.

Artificial Intelligence Programming

SCHEME 8. 1 Introduction. 2 Primitives COMPUTER SCIENCE 61A. March 23, 2017

Vanilla Lisp Shell (VLS)

CS 842 Ben Cassell University of Waterloo

An ACL2 Tutorial. Matt Kaufmann and J Strother Moore

(defmacro while (condition &body body) `(iterate loop () (if,condition (loop)))))

Reasoning about copydata

SCHEME The Scheme Interpreter. 2 Primitives COMPUTER SCIENCE 61A. October 29th, 2012

INF4820. Common Lisp: Closures and Macros

Allegro CL Certification Program

Introduction to ACL2. CS 680 Formal Methods for Computer Verification. Jeremy Johnson Drexel University

An Industrially Useful Prover

Common LISP-Introduction

Proving Theorems about Java and the JVM

1. Allowed you to see the value of one or more variables, or 2. Indicated where you were in the execution of a program

Spring 2018 Discussion 7: March 21, Introduction. 2 Primitives

Fall 2017 Discussion 7: October 25, 2017 Solutions. 1 Introduction. 2 Primitives

Allegro CL Certification Program

Symbolic Programming. Dr. Zoran Duric () Symbolic Programming 1/ 89 August 28, / 89

Reasoning About Programs Panagiotis Manolios

Basics of Using Lisp! Gunnar Gotshalks! BLU-1

UMBC CMSC 331 Final Exam

Emacs: Editing, Writing and Programming

Efficient, Formally Verifiable Data Structures using ACL2 Single-Threaded Objects for High-Assurance Systems

c constructor P, Q terms used as propositions G, H hypotheses scope identifier for a notation scope M, module identifiers t, u arbitrary terms

Coq quick reference. Category Example Description. Inductive type with instances defined by constructors, including y of type Y. Inductive X : Univ :=

A Library For Hardware Verification

Debugging in LISP. trace causes a trace to be printed for a function when it is called

Common LISP Tutorial 1 (Basic)

Project 5 - The Meta-Circular Evaluator

April 2 to April 4, 2018

Documentation for LISP in BASIC

Compositional Cutpoint Verification

Functions, Conditionals & Predicates

An Overview of the DE Hardware Description Language and Its Application in Formal Verification of the FM9001 Microprocessor

Mathematica for the symbolic. Combining ACL2 and. ACL2 Workshop 2003 Boulder,CO. TIMA Laboratory -VDS Group, Grenoble, France

Project 5 - The Meta-Circular Evaluator

An Explicit Continuation Evaluator for Scheme

;;; Determines if e is a primitive by looking it up in the primitive environment. ;;; Define indentation and output routines for the output for

CONTENTS defstructure CONTENTS Contents 1 Introduction 3 2 User's Guide Basic Use Typed Structur

ACT-R 6.0 Software Updates Summer 08 Summer 09. Dan Bothell Carnegie Mellon University

A LISP Interpreter in ML

A guided tour of hydra.el

Administrivia. Simple data types

Copyright. David Lawrence Rager

Introduction. hashing performs basic operations, such as insertion, better than other ADTs we ve seen so far

CS/COE 0449 term 2174 Lab 5: gdb

A verified runtime for a verified theorem prover

Efficient execution in an automated reasoning environment

UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division

Software Manual for Windows Z/EVES Version 2.3

Bit-Blasting ACL2 Theorems

Unit 1: Understanding Production Systems

Write a procedure powerset which takes as its only argument a set S and returns the powerset of S.

Indium Documentation. Release Nicolas Petton

Scheme Quick Reference

Well-Formedness Guarantees for ACL2 Metafunctions and Clause Processors

CIS4/681 { Articial Intelligence 2 > (insert-sort '( )) ( ) 2 More Complicated Recursion So far everything we have dened requires

CSCI 2210: Programming in Lisp. Progn. Block. CSCI Programming in Lisp; Instructor: Alok Mehta 1. ANSI Common Lisp, Chapters 5-10

Question Score Points Out Of 25

Chapter 5 Hashing. Introduction. Hashing. Hashing Functions. hashing performs basic operations, such as insertion,

Introduction 2 Lisp Part I

This should prevent residual sexism, racism, favoritism lurking in the unconscious of your professor & TA from biasing grading!!

Transcription:

Using Hashtables to Find the Generation Point of a Problematic Cons Often when you generate a piece of bad data, you don t see a failure until after the program makes a lot of progress. In this case, issuing a simple backtrace from the Lisp (I use CCL) prompt doesn t reveal much about what s actually causing the problem (the problem is the generation of bad data). This document showcases a solution that captures backtrace data by using a hashtable keyed with the bad data. This allows the developer to later find the relevant backtrace, so long as they have access to the bad data via the current backtrace. The limitations of this method are: (1) The bad data needs to be a cons, so it doesn t work when the key is t or nil and (2) that you need some guesses as to where the bad data is generated. The second limitation is trivialized when you have a constructor for generating the data. In which case, you can just modify the constructor of that data to save the key-value-pair in the hashtable. In this example, the constructor is function silent-masg. Originally silent-masg just returned t, but then I redefined it to return a cons pair. And since the cons pair was just as bad as t, the problem was equally observable. 1 Modifications to ACL2 Source Code These modifications could probably be copy+pasted into an ACL2 session, but I prefered to install them into the ACL2 source code for this work. I performed the following steps: 1. Added silent-masg to the list of constants symbols in *primitive-program-fns-with-raw-code*. 2. Inserted the following code before the definition of silent-masg. #-acl2-loop-only (defvar *cons-to-backtrace-hashtable* nil) #-acl2-loop-only (setf *cons-to-backtrace-hashtable* (make-hash-table :test eq :size (expt 2 20))) 3. Finally, I modified my definition of silent-masg to store the key-value-pair in the hashtable. (defun silent-masg () ; This is for use in silent-error-masg. 1

(declare (xargs :guard t)) (let ((cp (cons silent-masg t))) #-acl2-loop-only (setf (gethash cp *cons-to-backtrace-hashtable*) (ccl::backtrace-as-list)) cp)) 2 Script for the ACL2 Session (set-debugger-enable t) (ld books/arithmetic-5/lib/floor-mod/floor-mod-basic.lisp ) ; used to find the stack frame and value slot with the offending cons pair :b ; the offending cons pair is in stack frame 1, value slot 1 :v 1 1 ; instead of that exact value, the key is really its cdar (cdar *) ; pretty print the saved stack frame (pprint (gethash * *cons-to-backtrace-hashtable*)) 2

3 ACL2 Session To make the ACL2 session more readable, I truncated all of the lines that didn t pretty print well. By looking at pages eleven and twelve of the document and examining the shown backtrace, we can see that function translate-hint-masg-with-state is generating the offending bad data. lhug-7.cs.utexas.edu:~/r/acl2-msg-modified$./ccl-saved_acl2 Welcome to Clozure Common Lisp Version 1.5-r13651 (LinuxX8664)! ACL2 Version 4.0 built September 1, 2010 12:37:31. Copyright (C) 2010 University of Texas at Austin ACL2 comes with ABSOLUTELY NO WARRANTY. This is free software and you are welcome to redistribute it under certain conditions. For details, see the GNU General Public License. Initialized with (INITIALIZE-ACL2 INCLUDE-BOOK *ACL2-PASS-2-FILES*). See the documentation topic note-4-0 for recent changes. Note: We have modified the prompt in some underlying Lisps to further distinguish it from the ACL2 prompt. ACL2 Version 4.0. Level 1. Cbd "/v/filer4b/v8q002/hvg/ragerdl/repos/acl2-msg-modified/". Distributed books directory "/v/filer4b/v8q002/hvg/ragerdl/repos/acl2-msg-modified/books/". Type :help for help. Type (good-bye) to quit completely out of ACL2. ACL2!>(set-debugger-enable t) <state> ACL2!>(ld "books/arithmetic-5/lib/floor-mod/floor-mod-basic.lisp") ACL2 Version 4.0. Level 2. Cbd "/v/filer4b/v8q002/hvg/ragerdl/repos/acl2-msg-modified/books/arithmetic-5/lib/flo Distributed books directory "/v/filer4b/v8q002/hvg/ragerdl/repos/acl2-msg-modified/books/". Type :help for help. Type (good-bye) to quit completely out of ACL2. "ACL2" Form: ( TABLE ACL2-DEFAULTS-TABLE...) ACL2-DEFAULTS-TABLE 3

Form: ( INCLUDE-BOOK "../basic-ops/building-blocks"...) Time: 0.06 seconds (prove: 0.00, print: 0.00, other: 0.06) "/v/filer4b/v8q002/hvg/ragerdl/repos/acl2-msg-modified/books/arithmetic-5/lib/ba Form: ( INCLUDE-BOOK "forcing-types"...) Time: 0.01 seconds (prove: 0.00, print: 0.00, other: 0.01) "/v/filer4b/v8q002/hvg/ragerdl/repos/acl2-msg-modified/books/arithmetic-5/lib/fl To turn on non-linear arithmetic, execute : (SET-DEFAULT-HINTS ((NONLINEARP-DEFAULT-HINT STABLE-UNDER-SIMPLIFICATIONP HIST PSPV))) or : (SET-DEFAULT-HINTS ((NONLINEARP-DEFAULT-HINT++ ID STABLE-UNDER-SIMPLIFICATIONP HIST NIL))) See the README for more about non-linear arithmetic and general information about using this library. Form: ( INCLUDE-BOOK "../basic-ops/top"...) Time: 0.42 seconds (prove: 0.00, print: 0.00, other: 0.42) "/v/filer4b/v8q002/hvg/ragerdl/repos/acl2-msg-modified/books/arithmetic-5/lib/ba Form: ( INCLUDE-BOOK "floor-mod-basic-helper"...) Time: 0.02 seconds (prove: 0.00, print: 0.00, other: 0.02) "/v/filer4b/v8q002/hvg/ragerdl/repos/acl2-msg-modified/books/arithmetic-5/lib/fl ((NONLINEARP-DEFAULT-HINT++ ID STABLE-UNDER-SIMPLIFICATIONP HIST NIL)) Form: ( IN-THEORY (DISABLE...)) Time: 0.01 seconds (prove: 0.00, print: 0.00, other: 0.01) 4

3105 ACL2 Observation in ( DEFTHM INTEGERP-MOD-1...): Our heuristics choose (MOD X Y) as the :TYPED-TERM. ACL2 Warning [Subsume] in ( DEFTHM INTEGERP-MOD-1...): A newly proposed :REWRITE rule generated from INTEGERP-MOD-1 probably subsumes the previously added :REWRITE rule INTEGERP-MOD, in the sense that the new rule will now probably be applied whenever the old rule would have been. ACL2 Warning [Subsume] in ( DEFTHM INTEGERP-MOD-1...): The previously added rule INTEGERP-MOD subsumes a newly proposed :REWRITE rule generated from INTEGERP-MOD-1, in the sense that the old rule rewrites a more general target. Because the new rule will be tried first, it may nonetheless find application. But we reduce the conjecture to T, by the :type-prescription rules INTEGERP-MOD and RATIONALP-MOD. Q.E.D. Form: ( DEFTHM INTEGERP-MOD-1...) Rules: ((:TYPE-PRESCRIPTION INTEGERP-MOD) (:TYPE-PRESCRIPTION RATIONALP-MOD)) Warnings: Subsume INTEGERP-MOD-1 ACL2 Observation in ( DEFTHM INTEGERP-MOD-2...): Our heuristics choose (MOD X Y) as the :TYPED-TERM. [Note: A hint was supplied for our processing of the goal above. Thanks!] But simplification reduces this to T, using the :definitions FLOOR, MOD and SYNP, the :executable-counterparts of EQUAL and UNARY--, primitive type reasoning and the :rewrite rules (* (* x y) z), (* 0 x), (* 1 x), (* a (/ a)), (* x (if a b c)), (* y x), (+ 0 x), (+ x (- x)), (+ x (if a b c)), (+ y x), (- (if a b c)), BUBBLE-DOWN-+-MATCH-1, DEFAULT-DIVIDE, DEFAULT-MOD-2, INTEGERP==>DENOMINATOR-=-1, INTEGERP==>NUMERATOR-=-X and NORMALIZE-ADDENDS. Q.E.D. 5

Form: ( DEFTHM INTEGERP-MOD-2...) Rules: ((:DEFINITION FLOOR) (:DEFINITION MOD) (:DEFINITION SYNP) (:EXECUTABLE-COUNTERPART EQUAL) (:EXECUTABLE-COUNTERPART UNARY--) (:FAKE-RUNE-FOR-TYPE-SET NIL) (:REWRITE (* (* x y) z) ) (:REWRITE (* 0 x) ) (:REWRITE (* 1 x) ) (:REWRITE (* a (/ a)) ) (:REWRITE (* x (if a b c)) ) (:REWRITE (* y x) ) (:REWRITE (+ 0 x) ) (:REWRITE (+ x (- x)) ) (:REWRITE (+ x (if a b c)) ) (:REWRITE (+ y x) ) (:REWRITE (- (if a b c)) ) (:REWRITE BUBBLE-DOWN-+-MATCH-1) (:REWRITE DEFAULT-DIVIDE) (:REWRITE DEFAULT-MOD-2) (:REWRITE INTEGERP==>DENOMINATOR-=-1) (:REWRITE INTEGERP==>NUMERATOR-=-X) (:REWRITE NORMALIZE-ADDENDS)) Time: 0.02 seconds (prove: 0.01, print: 0.00, other: 0.01) INTEGERP-MOD-2 ACL2 Observation in ( DEFTHM INTEGERP-MOD-3...): Our heuristics choose (MOD X (EXPT 2 I)) as the :TYPED-TERM. [Note: A hint was supplied for our processing of the goal above. Thanks!] We now split the goal into the cases specified by the :CASES hint to produce four new non-trivial subgoals. Subgoal 4 (IMPLIES (AND (NOT (EQUAL I 0)) (<= 0 I) (<= I 0)) (IMPLIES (INTEGERP X) (INTEGERP (MOD X (EXPT 2 I))))). But we reduce the conjecture to T, by the :executable-counterparts of <, INTEGERP and RATIONALP and the :type-prescription rules EXPT-TYPE-PRESCRIPTION-INTEGERP-BASE, 6

EXPT-TYPE-PRESCRIPTION-NONNEGATIVE-BASE, EXPT-TYPE-PRESCRIPTION-POSITIVE-BASE and INTEGERP-MOD-1. Subgoal 3 (IMPLIES (EQUAL I 0) (IMPLIES (INTEGERP X) (INTEGERP (MOD X (EXPT 2 I))))). But we reduce the conjecture to T, by the :executable-counterparts of <, INTEGERP and RATIONALP, primitive type reasoning and the :typeprescription rules EXPT-TYPE-PRESCRIPTION-INTEGERP-BASE, EXPT-TYPE-PRESCRIPTION-NONNEGATIVE-BASE, EXPT-TYPE-PRESCRIPTION-POSITIVE-BASE, INTEGERP-/-EXPT-1 and INTEGERP-MOD-2. Subgoal 2 (IMPLIES (< I 0) (IMPLIES (INTEGERP X) (INTEGERP (MOD X (EXPT 2 I))))). By case analysis we reduce the conjecture to Subgoal 2 (IMPLIES (AND (< I 0) (INTEGERP X)) (INTEGERP (MOD X (EXPT 2 I)))). But simplification reduces this to T, using the :definition SYNP, the :executable-counterparts of <, INTEGERP, RATIONALP and UNARY-/, primitive type reasoning, the :rewrite rules (/ (expt x n)), (/ (if a b c)), DEFAULT-EXPT-2, DEFAULT-LESS-THAN-1 and INTEGERP-MOD-2 and the :typeprescription rules EXPT-TYPE-PRESCRIPTION-INTEGERP-BASE, EXPT-TYPE-PRESCRIPTION-NONNEGATIVE-BASE and EXPT-TYPE-PRESCRIPTION-POSITIVE-BASE. Subgoal 1 (IMPLIES (< 0 I) (IMPLIES (INTEGERP X) (INTEGERP (MOD X (EXPT 2 I))))). But we reduce the conjecture to T, by the :executable-counterparts of <, INTEGERP and RATIONALP, primitive type reasoning and the :typeprescription rules EXPT-TYPE-PRESCRIPTION-INTEGERP-BASE, EXPT-TYPE-PRESCRIPTION-NONNEGATIVE-BASE, EXPT-TYPE-PRESCRIPTION-POSITIVE-BASE and INTEGERP-MOD-1. Q.E.D. 7

Form: ( DEFTHM INTEGERP-MOD-3...) Rules: ((:DEFINITION NOT) (:DEFINITION SYNP) (:EXECUTABLE-COUNTERPART <) (:EXECUTABLE-COUNTERPART INTEGERP) (:EXECUTABLE-COUNTERPART RATIONALP) (:EXECUTABLE-COUNTERPART UNARY-/) (:FAKE-RUNE-FOR-TYPE-SET NIL) (:REWRITE (/ (expt x n)) ) (:REWRITE (/ (if a b c)) ) (:REWRITE DEFAULT-EXPT-2) (:REWRITE DEFAULT-LESS-THAN-1) (:REWRITE INTEGERP-MOD-2) (:TYPE-PRESCRIPTION EXPT-TYPE-PRESCRIPTION-INTEGERP-BASE) (:TYPE-PRESCRIPTION EXPT-TYPE-PRESCRIPTION-NONNEGATIVE-BASE) (:TYPE-PRESCRIPTION EXPT-TYPE-PRESCRIPTION-POSITIVE-BASE) (:TYPE-PRESCRIPTION INTEGERP-/-EXPT-1) (:TYPE-PRESCRIPTION INTEGERP-MOD-1) (:TYPE-PRESCRIPTION INTEGERP-MOD-2)) Time: 0.04 seconds (prove: 0.03, print: 0.01, other: 0.00) INTEGERP-MOD-3 Form: ( IN-THEORY (DISABLE...)) 3105 ACL2 Observation in ( DEFTHM RATIONALP-MOD...): Our heuristics choose (MOD X Y) as the :TYPED-TERM. The event ( DEFTHM RATIONALP-MOD...) is redundant. See :DOC redundantevents. Form: ( DEFTHM RATIONALP-MOD...) :REDUNDANT Form: ( IN-THEORY (DISABLE...)) Time: 0.01 seconds (prove: 0.00, print: 0.00, other: 0.01) 3103 The event ( DEFTHM FLOOR-MOD-ELIM...) is redundant. See :DOC redundant- 8

events. Form: ( DEFTHM FLOOR-MOD-ELIM...) :REDUNDANT The event ( DEFTHM LINEAR-FLOOR-BOUNDS-1...) is redundant. See :DOC redundant-events. Form: ( DEFTHM LINEAR-FLOOR-BOUNDS-1...) :REDUNDANT The event ( DEFTHM LINEAR-FLOOR-BOUNDS-2...) is redundant. See :DOC redundant-events. Form: ( DEFTHM LINEAR-FLOOR-BOUNDS-2...) :REDUNDANT The event ( DEFTHM LINEAR-FLOOR-BOUNDS-3...) is redundant. See :DOC redundant-events. Form: ( DEFTHM LINEAR-FLOOR-BOUNDS-3...) :REDUNDANT The event ( DEFTHM MOD-BOUNDS-1...) is redundant. See :DOC redundantevents. Form: ( DEFTHM MOD-BOUNDS-1...) :REDUNDANT The event ( DEFTHM MOD-BOUNDS-2...) is redundant. See :DOC redundantevents. 9

Form: ( DEFTHM MOD-BOUNDS-2...) :REDUNDANT By case analysis we reduce the conjecture to Goal (IMPLIES (AND (ACL2-NUMBERP Y) (INTEGERP (* X (/ Y))) (NOT (EQUAL Y 0))) (EQUAL (MOD X Y) 0)). This simplifies, using the :definition SYNP, the :executable-counterpart of EQUAL and the :rewrite rules (equal (if a b c) x) and DEFAULT-MOD-1, to Goal (IMPLIES (AND (ACL2-NUMBERP Y) (INTEGERP (* X (/ Y))) (NOT (EQUAL Y 0)) (ACL2-NUMBERP X)) (EQUAL (MOD X Y) 0)). [Note: branch.] ACL2 Error in ( DEFTHM MOD-BOUNDS-3...): > Error: value T is not of the expected type LIST. > While executing: CCL::APPEND-2, in process listener(1). > Type :GO to continue, :POP to abort, :R for a list of available restarts. > If continued: Skip evaluation of (acl2::acl2-default-restart) > Type :? for other options. 1 > [RAW LISP] :b *(7F615E1C6B80) : 0 (APPEND-2 T ((#\0 SILENT-MASG. T))) 52 (7F615E1C6BF0) : 1 (FMT0 T ((#\0 SILENT-MASG. T)) 0 3 43 ACL2-OUTPUT-CHANNEL::S (7F615E1C6C80) : 2 (FMT1 "~@0" ((#\0 SILENT-MASG. T)) 43 ACL2-OUTPUT-CHANNEL::S (7F615E1C6CE8) : 3 (FMT-ABBREV1 "~@0" ((#\0 SILENT-MASG. T)) 43 ACL2-OUTPUT-CHA (7F615E1C6D40) : 4 (FMT-ABBREV "~@0" ((#\0 SILENT-MASG. T)) 43 ACL2-OUTPUT-CHAN (7F615E1C6D88) : 5 (ERROR-FMS NIL (DEFTHM. MOD-BOUNDS-3) "~@0" ((#\0 SILENT-MAS (7F615E1C6DD8) : 6 (ERROR1 (DEFTHM. MOD-BOUNDS-3) "~@0" ((#\0 SILENT-MASG. T)) (7F615E1C6E40) : 7 (WATERFALL 0 NIL ((#)) ((# NIL) (NIL) (NIL # # NIL) (IMPLIES (7F615E1C6EF8) : 8 (PROVE-LOOP1 0 NIL ((#)) ((# NIL) (NIL) (NIL # # NIL) (IMPLIE (7F615E1C6F78) : 9 (PROVE-LOOP0 ((#)) ((# NIL) (NIL) (NIL # # NIL) (IMPLIES # #) 10

(7F615E1C7008) : 10 (PROVE-LOOP ((#)) ((# NIL) (NIL) (NIL # # NIL) (IMPLIES # #) (7F615E1C70D0) : 11 (PROVE (IMPLIES (IF # # #) (EQUAL # #)) ((# NIL) (NIL) (NIL (7F615E1C7140) : 12 (DEFTHM-FN1 MOD-BOUNDS-3 (IMPLIES (AND # # #) (EQUAL # 0)) A (7F615E1C7310) : 13 (RAW-EV-FNCALL DEFTHM-FN (MOD-BOUNDS-3 (IMPLIES # #) ACL2_IN (7F615E1C73C0) : 14 (EV (DEFTHM-FN MOD-BOUNDS-3 # STATE #...) ((STATE. ACL2 (7F615E1C7458) : 15 (EV-FOR-TRANS-EVAL (DEFTHM-FN MOD-BOUNDS-3 # STATE #...) (7F615E1C74C0) : 16 (LD-READ-EVAL-PRINT ACL2_INVISIBLE:: The Live State Itself ) (7F615E1C7588) : 17 (LD-LOOP ACL2_INVISIBLE:: The Live State Itself ) 133 (7F615E1C75B0) : 18 (LD-FN-BODY "books/arithmetic-5/lib/floor-mod/floor-mod-basi (7F615E1C7608) : 19 (LD-FN0 ((STANDARD-OI. "books/arithmetic-5/lib/floor-mod/fl (7F615E1C7748) : 20 (RAW-EV-FNCALL LD-FN ((# #) ACL2_INVISIBLE:: The Live State (7F615E1C77F8) : 21 (EV (LD-FN (CONS # #) STATE T) ((STATE. ACL2_INVISIBLE:: T (7F615E1C7890) : 22 (EV-FOR-TRANS-EVAL (LD-FN (CONS # #) STATE T) (STATE) (NIL (7F615E1C78F8) : 23 (LD-READ-EVAL-PRINT ACL2_INVISIBLE:: The Live State Itself ) (7F615E1C79C0) : 24 (LD-LOOP ACL2_INVISIBLE:: The Live State Itself ) 133 (7F615E1C79E8) : 25 (LD-FN-BODY ACL2-INPUT-CHANNEL::STANDARD-OBJECT-INPUT-0 ((LD directory ~xb.~ Type :help for help.~%type (good-bye) to ~ quit completely out of ACL2.~ ~%") (LD-QUERY-CONTROL-ALIST) (L (7F615E1C7A40) : 26 (LD-FN0 ((STANDARD-OI. ACL2-INPUT-CHANNEL::STANDARD-OBJECT- (7F615E1C7B80) : 27 (LD-FN ((STANDARD-OI. ACL2-INPUT-CHANNEL::STANDARD-OBJECT-I (7F615E1C7BE8) : 28 (LP) 7445 (7F615E1C7C40) : 29 (CALL-CHECK-REGS LP) 229 (7F615E1C7C78) : 30 (CHEAP-EVAL (LP)) 101 (7F615E1C7CB0) : 31 (ACL2-DEFAULT-RESTART) 709 (7F615E1C7CD0) : 32 (CALL-CHECK-REGS ACL2-DEFAULT-RESTART) 229 (7F615E1C7D08) : 33 (CHEAP-EVAL (ACL2-DEFAULT-RESTART)) 101 (7F615E1C7D40) : 34 (FUNCALL # #<(:INTERNAL CCL::EVAL-STRING CCL::STARTUP-CCL)> (7F615E1C7D88) : 35 (STARTUP-CCL ("home:ccl-init" "home:\\.ccl-init")) 1661 (7F615E1C7DF8) : 36 (FUNCALL # #<(:INTERNAL (CCL:TOPLEVEL-FUNCTION (CCL::LISP-DE (7F615E1C7E18) : 37 (FUNCALL # #<(:INTERNAL CCL::MAKE-MCL-LISTENER-PROCESS)>) 64 (7F615E1C7EB0) : 38 (RUN-PROCESS-INITIAL-FORM #<TTY-LISTENER listener(1) [Active (7F615E1C7F48) : 39 (FUNCALL # #<(:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (CCL: (7F615E1C7F98) : 40 (FUNCALL # #<(:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION)>) 1 > [RAW LISP] :v 1 1 ((#\0 SILENT-MASG. T)) 1 > [RAW LISP] (cdar *) (SILENT-MASG. T) 1 > [RAW LISP] (pprint (gethash * *cons-to-backtrace-hashtable*)) ((CCL::BACKTRACE-AS-LIST ":CONTEXT" ":PROCESS" ":ORIGIN" ":COUNT" 11

"1152921504606846975" ":START-FRAME-NUMBER" "0" ":PRINT-LEVEL" "2" ":PRINT-LENGTH" "5" ":SHOW-INTERNAL-FRAMES" ) (SILENT-MASG) (TRANSLATE-HINT-MASG-WITH-STATE "(MOD-BOUNDS-3. \"Goal \")" "(\"Subgoal D2\" :DYNAMIC-E/D (# #) :NONLINEARP NIL)" "(\"a ~#0~[custom keyword~/computed~] hint for ~x1: The ~ ~#0~[custom keyword~/computed~] hint ~%~#0~[~x2 ~ ~/~q2~]produced the non-nil result~%~y3.~@4regarding this ~ value\" (#\\0. 1) (#\\1. \"Goal \") (#\\2 LIST NIL # STATE) (TRANSLATE-OR-HINT-MASG-WITH-STATE "(MOD-BOUNDS-3. \"Goal \")" "\"Goal \"" "((:DYNAMIC-E/D # :NONLINEARP NIL) (:NONLINEARP T))" "(\"a ~#0~[custom keyword~/computed~] hint for ~x1: The ~ ~#0~[custom keyword~/computed~] hint ~%~#0~[~x2 ~ ~/~q2~]produced the non-nil result~%~y3.~@4regarding this ~ value\" (#\\0. 1) (#\\1. \"Goal \") (#\\2 LIST NIL # STATE) (TRANSLATE-HINT-SETTINGS-MASG-WITH-STATE "(MOD-BOUNDS-3. \"Goal \")" "\"Goal \"" "(:OR (# #))" "(\"a ~#0~[custom keyword~/computed~] hint for ~x1: The ~ ~#0~[custom keyword~/computed~] hint ~%~#0~[~x2 ~ ~/~q2~]produced the non-nil result~%~y3.~@4regarding this ~ value\" (#\\0. 1) (#\\1. \"Goal \") (#\\2 LIST NIL # STATE) (TRANSLATE-HINT-MASG-WITH-STATE "MOD-BOUNDS-3" "(\"Goal \" :OR (# #))" "(\"a ~#0~[custom keyword~/computed~] hint for ~x1: The ~ ~#0~[custom keyword~/computed~] hint ~%~#0~[~x2 ~ ~/~q2~]produced the non-nil result~%~y3.~@4regarding this ~ 12

value\" (#\\0. 1) (#\\1. \"Goal \") (#\\2 LIST NIL # STATE) (EVAL-AND-TRANSLATE-HINT-EXPRESSION-MASG-WITH-STATE "(MOD-BOUNDS-3 T (CONS # #))" "((0) NIL. 2)" "((NOT #) (NOT #) (EQUAL Y #) (NOT #) (EQUAL # #))" "T" "((SETTLED-DOWN-CLAUSE NIL #. HIT) (SIMPLIFY-CLAUSE # #. HIT-REWRITE) (PREPR "((# NIL) (#) (NIL # # NIL) (IMPLIES # #) (IMPLIES # #)...)" ":OMITTED" ":OMITTED" ":OMITTED" (FIND-APPLICABLE-HINT-SETTINGS1-MASG-WITH-STATE "((0) NIL. 2)" "((NOT #) (NOT #) (EQUAL Y #) (NOT #) (EQUAL # #))" "((SETTLED-DOWN-CLAUSE NIL #. HIT) (SIMPLIFY-CLAUSE # #. HIT-REWRITE) (PREPR "((# NIL) (#) (NIL # # NIL) (IMPLIES # #) (IMPLIES # #)...)" "T" (WATERFALL0 "(ELIMINATE-DESTRUCTORS-CLAUSE FERTILIZE-CLAUSE GENERALIZE-CLAUSE EL "((0) NIL. 2)" "((NOT #) (NOT #) (EQUAL Y #) (NOT #) (EQUAL # #))" "((SETTLED-DOWN-CLAUSE NIL #. HIT) (SIMPLIFY-CLAUSE # #. HIT-REWRI "((# NIL) (#) (NIL # # NIL) (IMPLIES # #) (IMPLIES # #)...)" "((3665 # # # #...) (ENABLED-ARRAY-0. 4000) (#\\E #\\N #\\A #\\B # "((COMMAND-LANDMARK GLOBAL-VALUE 6335 # \"/v/filer4b/v8q002/hvg/rage (WATERFALL1 "(APPLY-TOP-HINTS-CLAUSE PREPROCESS-CLAUSE SIMPLIFY-CLAUSE SETTLED-D "((0) NIL. 2)" "((NOT #) (NOT #) (EQUAL Y #) (NOT #) (EQUAL # #))" "((SETTLED-DOWN-CLAUSE NIL #. HIT) (SIMPLIFY-CLAUSE # #. HIT-REWRI "((# NIL) (#) (NIL # # NIL) (IMPLIES # #) (IMPLIES # #)...)" "T" 13

"((3665 # # # #...) (ENABLED-ARRAY-0. 4000) (#\\E #\\N #\\A #\\B # "((COMMAND-LANDMARK GLOBAL-VALUE 6335 # \"/v/filer4b/v8q002/hvg/rage (WATERFALL1-LST "SETTLED-DOWN-CLAUSE" "((0) NIL. 2)" "((# # # # #))" "((SETTLED-DOWN-CLAUSE NIL #. HIT) (SIMPLIFY-CLAUSE # #. HIT-REWRITE) (PREPR "((# NIL) (#) (NIL # # NIL) (IMPLIES # #) (IMPLIES # #)...)" "T" "((3665 # # # #...) (ENABLED-ARRAY-0. 4000) (#\\E #\\N #\\A #\\B #\\L...). (WATERFALL1 "(APPLY-TOP-HINTS-CLAUSE PREPROCESS-CLAUSE SIMPLIFY-CLAUSE SETTLED-D "((0) NIL. 2)" "((NOT #) (NOT #) (EQUAL Y #) (NOT #) (EQUAL # #))" "((SIMPLIFY-CLAUSE # #. HIT-REWRITE) (PREPROCESS-CLAUSE # #. HIT)) "((# NIL) (#) (NIL # # NIL) (IMPLIES # #) (IMPLIES # #)...)" "((3665 # # # #...) (ENABLED-ARRAY-0. 4000) (#\\E #\\N #\\A #\\B # "((COMMAND-LANDMARK GLOBAL-VALUE 6335 # \"/v/filer4b/v8q002/hvg/rage (WATERFALL1-LST "((0) NIL. 1)" "((# # # # #))" "((SIMPLIFY-CLAUSE # #. HIT-REWRITE) (PREPROCESS-CLAUSE # #. HIT))" "((# NIL) (#) (NIL # # NIL) (IMPLIES # #) (IMPLIES # #)...)" "((3665 # # # #...) (ENABLED-ARRAY-0. 4000) (#\\E #\\N #\\A #\\B #\\L...). (WATERFALL1 "(APPLY-TOP-HINTS-CLAUSE PREPROCESS-CLAUSE SIMPLIFY-CLAUSE SETTLED-D "((0) NIL. 1)" "((NOT #) (NOT #) (EQUAL Y #) (EQUAL # #))" "((PREPROCESS-CLAUSE # #. HIT))" "((# NIL) (#) (NIL # # NIL) (IMPLIES # #) (IMPLIES # #)...)" 14

"((3665 # # # #...) (ENABLED-ARRAY-0. 4000) (#\\E #\\N #\\A #\\B # "((COMMAND-LANDMARK GLOBAL-VALUE 6335 # \"/v/filer4b/v8q002/hvg/rage (WATERFALL1-LST "((0) NIL. 0)" "((# # # #))" "((PREPROCESS-CLAUSE # #. HIT))" "((# NIL) (#) (NIL # # NIL) (IMPLIES # #) (IMPLIES # #)...)" "((3665 # # # #...) (ENABLED-ARRAY-0. 4000) (#\\E #\\N #\\A #\\B #\\L...). (WATERFALL1 "(APPLY-TOP-HINTS-CLAUSE PREPROCESS-CLAUSE SIMPLIFY-CLAUSE SETTLED-D "((0) NIL. 0)" "((IMPLIES # #))" "((# NIL) (NIL) (NIL # # NIL) (IMPLIES # #) (IMPLIES # #)...)" "T" "((3665 # # # #...) (ENABLED-ARRAY-0. 4000) (#\\E #\\N #\\A #\\B # "((COMMAND-LANDMARK GLOBAL-VALUE 6335 # \"/v/filer4b/v8q002/hvg/rage (WATERFALL1-LST "SETTLED-DOWN-CLAUSE" "((0) NIL. 0)" "((#))" "((# NIL) (NIL) (NIL # # NIL) (IMPLIES # #) (IMPLIES # #)...)" "T" "((3665 # # # #...) (ENABLED-ARRAY-0. 4000) (#\\E #\\N #\\A #\\B #\\L...). (WATERFALL "0" "((#))" "((# NIL) (NIL) (NIL # # NIL) (IMPLIES # #) (IMPLIES # #)...)" 15

"((3665 # # # #...) (ENABLED-ARRAY-0. 4000) (#\\E #\\N #\\A #\\B #\ "((COMMAND-LANDMARK GLOBAL-VALUE 6335 # \"/v/filer4b/v8q002/hvg/rager (PROVE-LOOP1 "0" "((#))" "((# NIL) (NIL) (NIL # # NIL) (IMPLIES # #) (IMPLIES # #)...)" "((3665 # # # #...) (ENABLED-ARRAY-0. 4000) (#\\E #\\N #\\A #\\B "((COMMAND-LANDMARK GLOBAL-VALUE 6335 # \"/v/filer4b/v8q002/hvg/rag (PROVE-LOOP0 "((#))" "((# NIL) (NIL) (NIL # # NIL) (IMPLIES # #) (IMPLIES # #)...)" "((3665 # # # #...) (ENABLED-ARRAY-0. 4000) (#\\E #\\N #\\A #\\B "((COMMAND-LANDMARK GLOBAL-VALUE 6335 # \"/v/filer4b/v8q002/hvg/rag (PROVE-LOOP "((#))" "((# NIL) (NIL) (NIL # # NIL) (IMPLIES # #) (IMPLIES # #)...)" "((3665 # # # #...) (ENABLED-ARRAY-0. 4000) (#\\E #\\N #\\A #\\B # "((COMMAND-LANDMARK GLOBAL-VALUE 6335 # \"/v/filer4b/v8q002/hvg/rage (PROVE "(IMPLIES (IF # # #) (EQUAL # #))" "((# NIL) (NIL) (NIL # # NIL) T (IMPLIES # #)...)" "((3665 # # # #...) (ENABLED-ARRAY-0. 4000) (#\\E #\\N #\\A #\\B #\\L. "((COMMAND-LANDMARK GLOBAL-VALUE 6335 # \"/v/filer4b/v8q002/hvg/ragerdl/r (DEFTHM-FN1 "MOD-BOUNDS-3" "(IMPLIES (AND # # #) (EQUAL # 0))" "ACL2_INVISIBLE:: The Live State Itself " "((:GENERALIZE) (:LINEAR))" "(DEFTHM MOD-BOUNDS-3 (IMPLIES # #) :RULE-CLASSES (# #))") (RAW-EV-FNCALL "DEFTHM-FN" "(MOD-BOUNDS-3 (IMPLIES # #) ACL2_INVISIBLE:: The Live State Itself (# #) NIL "((STATE. ACL2_INVISIBLE:: The Live State Itself ))" 16

"T") (EV "(DEFTHM-FN MOD-BOUNDS-3 # STATE #...)" "((STATE. ACL2_INVISIBLE:: The Live State Itself ))" "ACL2_INVISIBLE:: The Live State Itself " "((STATE. ACL2_INVISIBLE:: The Live State Itself ))" "T") (EV-FOR-TRANS-EVAL "(DEFTHM-FN MOD-BOUNDS-3 # STATE #...)" "(STATE)" "(NIL NIL STATE)" "TOP-LEVEL" "ACL2_INVISIBLE:: The Live State Itself " "T") (LD-READ-EVAL-PRINT (LD-LOOP (LD-FN-BODY "\"books/arithmetic-5/lib/floor-mod/floor-mod-basic.lisp\"" "((LD-ERROR-ACTION. :RETURN!) (STANDARD-OI. ACL2-INPUT-CHANNEL:: / (LD-FN0 "((STANDARD-OI. \"books/arithmetic-5/lib/floor-mod/floor-mod-basic.lisp "ACL2_INVISIBLE:: The Live State Itself " "T") (RAW-EV-FNCALL "LD-FN" "((# #) ACL2_INVISIBLE:: The Live State Itself T)" "((STATE. ACL2_INVISIBLE:: The Live State Itself ))" "T") (EV "(LD-FN (CONS # #) STATE T)" "((STATE. ACL2_INVISIBLE:: The Live State Itself ))" "ACL2_INVISIBLE:: The Live State Itself " "((STATE. ACL2_INVISIBLE:: The Live State Itself ))" "T") (EV-FOR-TRANS-EVAL "(LD-FN (CONS # #) STATE T)" "(STATE)" "(NIL NIL STATE)" "TOP-LEVEL" "ACL2_INVISIBLE:: The Live State Itself " "T") (LD-READ-EVAL-PRINT (LD-LOOP (LD-FN-BODY "ACL2-INPUT-CHANNEL::STANDARD-OBJECT-INPUT-0" "((LD-VERBOSE. \"~sv. Level ~Fl. Cbd ~xc.~ Distributed books ~ directory ~xb.~ Type :help for help.~%type (good-bye) to ~ 17

quit completely out of ACL2.~ ~%\") (LD-QUERY-CONTROL-ALIST) ( (LD-FN0 "((STANDARD-OI. ACL2-INPUT-CHANNEL::STANDARD-OBJECT-INPUT-0) (STANDARD- "ACL2_INVISIBLE:: The Live State Itself " ) (LD-FN "((STANDARD-OI. ACL2-INPUT-CHANNEL::STANDARD-OBJECT-INPUT-0) (STANDARD-C "ACL2_INVISIBLE:: The Live State Itself " ) (LP) (CCL::CALL-CHECK-REGS "LP") (CCL::CHEAP-EVAL "(LP)") (ACL2-DEFAULT-RESTART) (CCL::CALL-CHECK-REGS "ACL2-DEFAULT-RESTART") (CCL::CHEAP-EVAL "(ACL2-DEFAULT-RESTART)") (FUNCALL "(:INTERNAL CCL::EVAL-STRING CCL::STARTUP-CCL)" "\"(acl2::acl2-default-restart)\"") (CCL::STARTUP-CCL "(\"home:ccl-init\" \"home:\\\\.ccl-init\")") (FUNCALL "(:INTERNAL (CCL:TOPLEVEL-FUNCTION (CCL::LISP-DEVELOPMENT-SYSTEM T)))") (FUNCALL "(:INTERNAL CCL::MAKE-MCL-LISTENER-PROCESS)") (CCL::RUN-PROCESS-INITIAL-FORM "#<TTY-LISTENER listener(1) [Active] #x30200051b92d>" "(#<CCL:COMPILED-LEXICAL-CLOSURE # #x302003c253cf>)") (FUNCALL "(:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (CCL:PROCESS)))" "#<TTY-LISTENER listener(1) [Active] #x30200051b92d>" "(#<CCL:COMPILED-LEXICAL-CLOSURE # #x302003c253cf>)") (FUNCALL "(:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION)")) 1 > [RAW LISP] 18