Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| teaching:cc4101:tareas:2021-1:tarea1 [2021/04/20 15:33] – etanter | teaching:cc4101:tareas:2021-1:tarea1 [2021/05/10 14:34] (current) – P3, add '}' on first example bortiz | ||
|---|---|---|---|
| Line 76: | Line 76: | ||
| **Instrucciones importantes**: | **Instrucciones importantes**: | ||
| * Para implementar el lenguaje, tiene que [[https:// | * Para implementar el lenguaje, tiene que [[https:// | ||
| + | * Tienen que verificar que los argumentos de los operadores booleanos sean booleanos (eso para alinear la verificación dinámica con la verificación estática que harán en la parte 2) | ||
| * En caso de programas con errores dinámicos, su interprete tiene que reportarlos explícitamente. Por ejemplo: | * En caso de programas con errores dinámicos, su interprete tiene que reportarlos explícitamente. Por ejemplo: | ||
| Line 81: | Line 82: | ||
| debe caerse en tiempo de ejecución con un error (se levantan con '' | debe caerse en tiempo de ejecución con un error (se levantan con '' | ||
| <code scheme>" | <code scheme>" | ||
| + | Recuerde que puede testear estos errores con '' | ||
| Line 118: | Line 120: | ||
| {id 5}} | {id 5}} | ||
| - | {{define {add1 {x : Num}} {+ x 1}} | + | {{define {add2 {x : Num}} {+ x 2}} |
| {with {{oops #f}} | {with {{oops #f}} | ||
| - | {add1 oops}}} | + | {add2 oops}}} |
| </ | </ | ||
| Line 147: | Line 149: | ||
| > (typecheck ' | > (typecheck ' | ||
| {f {> 3 4}}}) | {f {> 3 4}}}) | ||
| - | 'Bool </ | + | 'Any </ |
| > (typecheck ' | > (typecheck ' | ||
| {one #t}}) | {one #t}}) | ||
| " | " | ||
| - | > (typecheck '{> 10 #t}) | + | > (typecheck '{{> 10 #t}}) |
| " | " | ||
| - | > (typecheck '{if 73 #t #t}) | + | > (typecheck '{{if 73 #t #t}}) |
| " | " | ||
| - | > (typecheck '{with {{x 5} {y : Num #t} {z 42}} | + | > (typecheck '{{with {{x 5} {y : Num #t} {z 42}} |
| - | z}) | + | z}}) |
| " | " | ||
| Line 203: | Line 205: | ||
| | | ||
| | | ||
| - | | + | |
| {/ {* y y} x}} | {/ {* y y} x}} | ||
| {calc 25 3}} | {calc 25 3}} | ||

