introduce is? method for logictype and use it.
fix logic.name pitfalls (by using to_s).