Analysis of algorithms for the recognition of rational and context-free trace languages