Gleitman (1991:304-307) provides a cognitive theory of humor which he calls ``cognitive restructuring''. According to Gleitman's theory, an expectation is built up, and then fails to be fulfilled, but the surprising outcome makes sense anyway. In other words one view of the situation is developed in the setup of certain kinds of humor, while the punchline reveals a simultaneous and consistent view of the situation which is violates the expectation. Gleitman's description of cognitive restructuring can be seen as a partial description of the phenomenon represented in the present theory, in that the two views, N and V, must be of the same situation, which is to say they are ways of making sense of the situation. It follows that ``the outcome makes sense anyway''. The ``expectation'' and its ``lack of fulfillment'' correspond simply to the two views, N and V (in either order).
To reiterate more precisely, Gleitman's theory is composed of at least four elements:
1. the expectation
2. its lack of fulfillment (in some other view of the situation)
3. implicitly, the fact that the expectation makes sense of the situation
4. explicitly, the fact that the violation of the expectation also makes sense of it.
These can be mapped onto the N and V views in a simple way. 1 and 2 correspond to the N and V views (either one can be N, the other is V). The fact that N and V are ``views of the situation'' according to the present theory is sufficient to give 3 and 4 as well.
What is lacking in the cognitive restructuring view, is, of course, the affective element, that in one of the views the situation is normal - whether neutral, unthreatening and safe, or positively valued, desirable, good - and the other view is a violation of something about which the perceiver cares that things ought to be a certain way. The affective picture of the present theory includes the cognitive picture developed by Gleitman.
More generally, it's important to understand that mere cognitive expectation is not necessary or sufficient in humor. We certainly expect the sun to come up in the morning, but if that were to be violated, it would not be funny, unless we had some emotional commitment to that expectation, and more. So a violated expectation is insufficient for humor. Things can be funny even after they are expected (e.g., socially inappropriate behavior patterns - a professor who spits when he talks - or episodes in Road Runner cartoons, which have an expected but still funny outcome), so violated expectations are not necessary either.