Categorical semantics and topos theory