General-purpose reasoning system