Add some framework for PathAlgorithm.