[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: BUG
In article <9107171518.AA12834@gille.crin.fr>, Bernard.Ganne@loria.crin.fr (Bernard Ganne) writes:
=>
=> ...
=> end cdg_suivante ;
=>
=>
=> j'obtiens le message suivant :
=> Woups! There is a bug in the Typol type checker. Please report.
=> qui est du aux lignes :
=> |- cdg_list[CDG], e1, re, e2 :
=> cdg_list[cdg(rel_op(e2, re, e1),
=> rien(), STAT1, rien()).CDG] ;
=>
=>
=> Je n'ai plus le message si j'ecris :
=> |- cdg_list[CDG], e1, re, e2 :
=> cdg_list[CDG.cdg_list[cdg(rel_op(e2, re, e1),
=> ASS11, STAT1, ASS12).nil]] ;
Most of the time (I hope), the message "Woups! There is a bug..." is
emitted when there is a missing error-recovery rule in the Typol type-checker.
This means that there is a type error in your rule, but there is no rule
to emit the proper message and explain you want happened. This (of course!)
will be corrected in a next version.
In the first rule, two incompatible types may be infered for the variable "CDG".
From the first occurence we can deduce that "CDG" is of type "element of
cdg_list" (the phylum CDG I suppose?), from the second occurence we can deduce
that "CDG" is a "cdg_list".
In a list expression, the comma separates elements of the list, the dot
separates a list of elements from the tail of the list. So in
cdg_list[A,B.L], A and B are elements, L is a cdg_list. The expression
cdg_list[A] describes a list with only one element.
So, if the subject of your rule is really a list with one element, the correct
rule is:
|- cdg_list[CDG], e1, re, e2 :
cdg_list[cdg(rel_op(e2, re, e1),
rien(), STAT1, rien()),CDG] ;
(with a comma betwwen the two elements)
If you want to speak of any cdg_list, writes
|- CDG, e1, re, e2 :
cdg_list[cdg(rel_op(e2, re, e1),
rien(), STAT1, rien()).CDG] ;
(with a dot, as CDG is a list). "CDG" will be constrained to be a cdg_list
by the type-checker, due to its second occurence.
Notice that in your second rule, the expression
cdg_list[CDG.cdg_list[cdg(rel_op(e2, re, e1), ASS11, STAT1, ASS12).nil]]
is equivalent to cdg_list[CDG, cdg(rel_op(e2, re, e1), ASS11, STAT1, ASS12).nil]
and denotes a list with at least two elements, the first one is CDG,
the second one cdg(rel_op(e2, re, e1), ASS11, STAT1, ASS12, and nil
is a variable that denotes a (may be non-empty) list!
Thierry Despeyroux.
+----------------------------------------------------------------------------+
| Thierry Despeyroux | email: Thierry.Despeyroux@sophia.inria.fr |
| I.N.R.I.A. Sophia-Antipolis | phone: +33 93 65 77 07 |
| 2004, Route des Lucioles | fax: +33 93 65 77 66 |
| B.P. 109 | telex: INRIASA 970 050 F |
| F-06561 Valbonne Cedex, France | |
+----------------------------------------------------------------------------+
- Follow-Ups:
- Re: BUG
- From: boudot@tlaloc.inria.fr (Marianne Boudot)
- References:
- BUG
- From: Bernard.Ganne@loria.crin.fr (Bernard Ganne)