Some refactor in the code to allow LogoSemanticVisitor to be more efficient