General purpose reasoning system