A critical analysis of structural realism