I read this: http://www.smogon.com/dp/articles/pid_iv_creation#finding_ability_from_pid
and this: http://projectpokemon.org/forums/search.php?searchid=60203
However, I'd still like something explicitly clarified. If any pokemon has only one ability, it can fall under class 1 or 2, correct?
Furthermore, how does the game treat pokemon like giratina, which can have abilities that change?