The structure-mapping engine: Algorithm and examples