Formal Methods in Human-computer Interaction