DPA denotes “Deterministic Pushdown Automata”.
Is the following (*) true regarding DPA:
After all symbols of the input sequence are consumed, the input sequence is accepted either (1) if the stack is empty or (2) if the current state of the DPA is an accepting one, or both.
My book is fairly vague on the subject (it doesn't mention it) and Wikipedia, in my opinion, doesn't offer a better explanation either:
There are two possible acceptance criteria: acceptance by empty stack and acceptance by final state. The two are not equivalent for the deterministic pushdown automaton (although they are for the non-deterministic pushdown automaton). The languages accepted by empty stack are the languages that are accepted by final state, as well as have no word in the language that is the prefix of another word in the language.
(What I don't understand is the equivalence they mention, and how does that influence the acceptance of a word.)
If my statement (*) doesn't hold, how would I determine, given the definition of a DPA, which condition are input sequences supposed to fulfill? Would I assume one or the other as the preferred one?