snu-sf-class / pl2015spring

SNU 4190.310, 2015 Spring
11 stars 6 forks source link

Typechecker, A11_10 #146

Closed AdamBJ closed 9 years ago

AdamBJ commented 9 years ago

For question A11_10: (\ Write a type checking function [tyeq: tm -> ty -> bool].**)

Do we need to take into account the possibility of the typechecker function being passed badly typed input, eg tsucc ( ttrue)?

jaewooklee93 commented 9 years ago

Yes, otherwise, for example, if t=tsucc (ttrue) can satisfy tycheck t T=true with some T, the first correctness theorem below will imply |- t \in T, so that the theorem becomes unprovable. You should return false for every badly typed term.

AdamBJ commented 9 years ago

That makes sense, thanks