Revisión actual |
Tu texto |
Línea 1: |
Línea 1: |
| # Para cada afirmación decidir si es verdadera o falsa y justificar:
| | 1. Para cada afirmación decidir si es verdadera o falsa y justificar: |
| ## <math> \forall </math> término M <math> \in \lambda^{bn} </math>, si <math> \emptyset \vdash M : \sigma </math> es derivable, entonces existe un valor <math>V</math> tal que <math> fix \ M \twoheadrightarrow V </math>
| | |
| ## <math> \exists M \in \lambda^{bn}, \ \emptyset \vdash M : \sigma </math> es derivable, y hay un valor <math> V </math> tal que <math> fix \ fix \ M \twoheadrightarrow V </math> y <math> fix \ M \twoheadrightarrow V </math>
| | a) <math> \forall </math> término M <math> \in \lambda^{bn} </math>, si <math> \emptyset \vdash M : \sigma </math> es derivable, entonces existe un valor <math>V</math> tal que <math> fix \ M \twoheadrightarrow V </math> |
| # Sea M un término tal que <math> \emptyset \vdash M : \sigma </math>, sea <math> W(ERASE(M)) = \Gamma \vdash M' : \rho </math>, decidir si es posible que:
| | |
| ## <math> \sigma \neq \rho </math>
| | b) <math> \exists M \in \lambda^{bn}, \ \emptyset \vdash M : \sigma </math> es derivable, y hay un valor <math> V </math> tal que <math> fix \ fix \ M \twoheadrightarrow V </math> y <math> fix \ M \twoheadrightarrow V </math> |
| ## <math> \sigma = \rho, \ M \neq M' </math>
| | |
| # Sea un lenguaje orientado a objetos donde no se permite sobrecarga, decidir si las siguientes situaciones son admitidas por el sistema de tipos o no. Justificar.
| | 3. Sea un lenguaje orientado a objetos donde no se permite sobrecarga, decidir si las siguientes situaciones son admitidas por el sistema de tipos o no. Justificar. |
| ## Se sobrescribe el método de una clase y se reemplaza el tipo del argumento por un subtipo del tipo que tenía en la superclase.
| | a) Se sobrescribe el método de una clase y se reemplaza el tipo del argumento por un subtipo del tipo que tenía en la superclase. |
| ## Se tiene un atributo de tipo ref t (es un atributo mutable), se lo sobrescribe en una subclase por un tipo ref s, donde s es subtipo de t.
| | b) Se tiene un atributo de tipo ref t (es un atributo mutable), se lo sobrescribe en una subclase por un tipo ref s, donde s es subtipo de t. |
| # Decidir si es verdadero o falso:
| |
| ## {P(x, y)} y {P(y, f(y)} no unifican.
| |
| ## <math> \forall x. \forall y. P(x, f(x)) \ \wedge \ \lnot P(y, f(y)) </math> es una forma normal de Skolem de <math> \forall x. \forall y. \exists z. P(x, z) \ \wedge \ \lnot P(y, z) </math>.
| |
| ## Sea un programa de Prolog con unicas clausulas: "P(X,Y) :- q(X). P(X,Y) :- q(Y)", la expresion "q(X), ~q(Y)" aparece en el arbol de busqueda de Prolog de "P(X,X), ~P(Y,Y)".
| |
| 5. Sea un programa en Prolog que redefine el "not" como:
| |
| not(G) :- call(G), fail, !.
| |
| not(G).
| |
| : Comparar el resultado de evaluar not(P) si el arbol de resolucion SLD de P es:
| |
| : a) finito y sin solución
| |
| : b) finito y con solución
| |
| : c) infinito y con solución
| |
| 6. Seguimiento en Smalltalk
| |