Planning with a language for extended goals