Automatic Generation of Procedural Knowledge Using Program Synthesis