A Logical Theory of Localization