A major mode for editing Potassco Answer Set Programs files (
From the Potassco website:
Answer Set Programming (ASP) offers a simple and powerful modeling language to solve combinatorial problems. With our tools you can concentrate on an actual problem, rather than a smart way of implementing it.
- Syntax highlighting
- Commenting functionality
- Run clingo from emacs
Not so many at the moment:
C-c C-bCall clingo with the current buffer
C-c C-xCall clingo with the current buffer as encoding and some user provided instance
The Potassco ASP mode is available through the MELPA repository.
This is the recommended way to install the
You can either install
pasp-mode by hand with:
M-x package-install [RET] pasp-mode [RET]
or place the following snippet into your Emacs init file:
(unless (package-installed-p 'pasp-mode) (package-refresh-contents) (package-install 'pasp-mode))
pasp-mode.el file from this repository.
Either put it into your emacs load path and call
in your init file or load it directly with
Afterwards opening an
.lp file triggers
call M-x pasp-mode within an open asp file.
- Smart indentation based on nesting deepth
- Refactoring of predicates/variables (complete buffer and #program parts)
- Color compilation output
- Smart rearrange of compilation output (predicates separated, table...)
- yas-snippet for rules; constraints; soft constraints; generation?
Contributions, via issues, ideas and pull requests, are highly welcome!
Copyright (c) 2017 by Henrik Jürges
Distributed under the GNU General Public License; type C-h C-c to view it.