diff --git a/RapportStage.tex b/RapportStage.tex index 661914b..c2a4a95 100644 --- a/RapportStage.tex +++ b/RapportStage.tex @@ -340,7 +340,12 @@ \end{fjlisting} \end{tabular} \end{center} - %TODO Ajouter une courte explication de pourquoi + \underline{La première} parce que la relation de sous-typage et transitive est antisymétrique + + \underline{La seconde} parce que si \fj{B} a un attribut de type \fj{A}, alors \fj{C} en hérite, et ne peut pas être construit sans attributs. + + \underline{La troisième} comme la précédente, \fj{C} doit avoir par héritange un attribut nommé \fj{f} + \caption{Exemples de \textit{test interfaces} implémentés par aucune \textit{class table}} \label{fig:tiUnsolvable} \end{figure} @@ -707,10 +712,14 @@ \begin{fjlisting} \fjclass{Int}{}{ \fjmethod{Bool}{isZero}{}{true} + \fjmethod{Bool}{gt}{Int other}{false} + \fjmethod{Bool}{lt}{Int other}{other.isZero().ite(false,true)} }\\ \fjclass{SInt}{\fjattr[Int]{prec}}{ \fjmethod{Bool}{isZero}{}{false} - } + \fjmethod{Bool}{gt}{Int other}{other.isZero().ite(true,this.prec.gt(((SInt)other).prec))} + \fjmethod{Bool}{lt}{Int other}{other.isZero().ite(false,this.prec.lt(((SInt)other).prec))} + } \end{fjlisting} On ajoute aussi la notation des nombres :