Hello, I'm a NNES who has just completed the AEC in ESL.

I recently did a bit of reading on unaccusative verbs, as I have been most confused by discussions around this recently and here).

I've read something about Direct Object Restriction. It says that "the surface subject of an unaccusative verb is the underlying direct object."

It gave these examples.

a. The pond froze solid.

b. The butter melted to a liquid.

c. The glass broke into little pieces.

d. The gate swung shut.

e. This time the curtain rolled open on the court of the Caesars . . .

So, as I understand it, subjects can sometimes be objects, but still remain in the subject position in the sentence. Is that right?

Above something swang the gate shut, didn't it. So the thing was the doer and the gate the object, right?

It's a bit complex, but I think I understand it.
Yes, it is the grammatical subject and the notional object of the verb.
Teachers: We supply a list of EFL job vacancies
Instead of saying that these be the 'underlying direct object', or making the distinction between D / S structure, or an 'unaccusative verb' (presumably defined as a Verb that cannot take an Object, which is, par excellence, of accusative case [abstract case]), I think it will be useful here to talk of the Subject being an 'Experiencer' --- the entity that experiences some (psychological) state expressed by the Predicate (the Verb) (p49, Haegeman, 1996). This may sound more palatable as a definition anyway.

BTW, it is an interesting thing to observe that most such verbs are actually ergative (ie. they are either transitive or intransitive: try with passives)
just wanna make it known that the previous post by an 'annonymous chap' is made by me