Here is a problem that I've been thinking about for some time: suppose I express using some type of logic that I want the shortest path between two vertices of a graph. Given this logical description of the problem, is it possible for a computer program to emit Dijkstra's algorithm or some other efficient algorithm? One of the things that have interested me lately is logic programming, but I'm wondering if there has been any research done on using logic programming as a means of algorithmic discovery? What are the theoretical limitations of doing this? It took bright minds to come up with the various graph algorithms that we use today, and so I'm assuming there's a fundamental limitation that makes it difficult to convert declarative expressions of a problem into specific efficient algorithms.