Classification of variables in a logic formula based on whether or not they are inside the scope of a quantifier