From windley@cheetah  Sat Apr 14 14:46:44 1990
Received: by iris.ucdavis.edu (5.57/UCD.EECS.2.0)
        id AA26176; Sat, 14 Apr 90 14:46:44 PDT
Received: from cheetah.ucdavis.edu by clover.ucdavis.edu (5.59/UCD.EECS.1.11)
        id AA02751; Sat, 14 Apr 90 14:51:09 PDT
Received: by cheetah.ucdavis.edu (AIX  2.1.2/3.14)
        id AA07612; Sat, 14 Apr 90 14:46:50 PDT
Message-Id: <9004142146.AA07612@cheetah.ucdavis.edu>
To: info-hol@clover
Subject: HOL Error Interpretations
Date: Sat, 14 Apr 90 14:46:49 -0800
From: Phil Windley <windley@cheetah>


I think that everyone familiar with the pre HOL88 version of HOL is VERY
happy about the big improvements in eror messages that HOL88 provides.
Even so, some error messages in HOL aren't that helpful, some are downright
misleading.  This, of course, is to be expected in a development system;
but as HOL matures, we need to find and correct them.  I have been
collecting these for sometime now and have 6 or 7 of them.  These bugs
happen infrequently enough that I don't remember them from time to time.
I'm soliciting your additions to my file of error messages, real causes,
and fixes.  In return, I'll post these from time to time.

Here is the first installment to give you an idea what I'm after.  Note
that the causes I list are not all-inclusive.  There may be other, more
legitiment, circumstances where the message arises.  These are simply the
ones I've observed.  They are listed in no particular order.


--------------------------------------------------------------------------
Error:

"bad variable structure in term"

Cause:

Usually caused by having a variable in a definition that has been
previously defined as a constant (in a parent perhaps).  To find out which,
try typing the name of each variable followed by ";;" into HOL.  If it has
been defined as a constant, you'll get the definition.

Fix:

Change the name of the variable.


--------------------------------------------------------------------------
Error:

Indeterminate types:  "$!:((num -> ?) -> bool) -> bool"

evaluation failed     types indeterminate in quotation

Cause:

Frequently caused by unbound variables.  The unbound variable message will
not appear until all type clashes are fixed and type values resolved.  Thus
if you get this error and you're pretty sure that all the types should be
resolvable from the information given, you might have an unbound variable.

Fix:

Two routes:

a.) Look for misspelled constant names that are being interpreted as
variables.  If you find one, you're in luck.  When you fix it, the problem
will probably correct itself.

b.) Start explicitly typing things until you get a clash, or HOL tells you
which variables are unbound.

--------------------------------------------------------------------------
Error:

Error in HOL system, please report it.
(Diagnostic: mk_comb -- while reading theory file)

Cause:

This error can occur when an ancestor has been updated and you are loading
a file which depends on it that has not been updated.

Fix:

Remake the file that failed to load.


--------------------------------------------------------------------------
Error:

evaluation failed     definition not an equation

Cause:

This message has been mistakenly reported when the declaration for
universally quantified variables had the form

   "! (b1,b2,b3,b4:bool) ...

Of course, this should have been

   "! (b1 b2 b3 b4:bool) ...

I don't know why HOL didn't complain about the mistaken declaration and
chose to say that the term wasn't an equation instead.

Fix:

Correct the declaration of the universally quantified variables.

--------------------------------------------------------------------------
Error:

evaluation failed     mk_type in quotation

Cause:

Can be caused by a type name that is not a type constant.  For example

   "b:int"

would give this error if ":int" were not a valid type constant.

Fix:

Either declare the type constant or use a valid one.


--------------------------------------------------------------------------
Error:

non top level decln must have IN clause
skipping: ) ) ;; parse failed


Cause:

Sometimes caused by too many closing parens.

Fix:

Make sure parens balance.

--------------------------------------------------------------------------
Error:

Error in HOL system, please report it.
(Diagnostic: term-match)
FUN%8643%73(lambda (%e) <**>)

Cause:

Infinite rewriting.  For example, ASM_REWRITE_TAC[] applied to

   b
   [ b = a ]
   [ a = P b ]

Fix:

Use ONCE_ASM_REWRITE_TAC.





