doc-src/Ref/defining.tex
changeset 866 2d3d020eef11
parent 864 d63b111b917a
child 867 e1a654c29b05
equal deleted inserted replaced
865:b38c67991122 866:2d3d020eef11
   686 {\out ...}
   686 {\out ...}
   687 {\out Error: More than one term is type correct:}
   687 {\out Error: More than one term is type correct:}
   688 {\out ...}
   688 {\out ...}
   689 \end{ttbox}
   689 \end{ttbox}
   690 
   690 
   691 On the other hand it's also possible that none of the parse trees can be
   691 Ambiguities occuring in syntax translation rules cannot be resolved by
   692 typed correctly although the user did not make a mistake.
   692 type inference because it is not necessary for these rules to be type
   693 
   693 correct. Therefore Isabelle always generates an error message and the
   694 %% FIXME remove?
   694 ambiguity should be eliminated by changing the grammar or the rule.
   695 %By default Isabelle
       
   696 %assumes that the type of a syntax translation rule is {\tt logic} but does
       
   697 %not look at the type unless parsing the rule produces more than one parse
       
   698 %tree. In that case this message is output if the rule's type is different
       
   699 %from {\tt logic}:
       
   700 %
       
   701 %\begin{ttbox}
       
   702 %{\out Warning: Ambiguous input "..."}
       
   703 %{\out produces the following parse trees:}
       
   704 %{\out ...}
       
   705 %{\out This occured in syntax translation rule: "..."  ->  "..."}
       
   706 %{\out Type checking error: Term does not have expected type}
       
   707 %{\out ...}
       
   708 %\end{ttbox}
       
   709 %
       
   710 %To circumvent this the rule's type has to be stated.
       
   711 
   695 
   712 
   696 
   713 \section{Example: some minimal logics} \label{sec:min_logics}
   697 \section{Example: some minimal logics} \label{sec:min_logics}
   714 \index{examples!of logic definitions}
   698 \index{examples!of logic definitions}
   715 
   699