structured inference