Skip to content

An Emas Major Mode for editing Answer Set Programs

Notifications You must be signed in to change notification settings

santifa/pasp-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

License GPL 3 MELPA

pasp-mode

A major mode for editing Potassco Answer Set Programs files (.lp).

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.

Features

  • Syntax highlighting
  • Commenting functionality
  • Run clingo from emacs

Keybindings

Not so many at the moment:

  • C-c C-b Call clingo with the current buffer
  • C-c C-x Call clingo with the current buffer as encoding and some user provided instance

Installation

Melpa

The Potassco ASP mode is available through the MELPA repository. This is the recommended way to install the pasp-mode.

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))

Manually

Download the pasp-mode.el file from this repository. Either put it into your emacs load path and call (require 'pasp-mode) in your init file or load it directly with (load "~/path/to/pasp-mode.el")

Afterwards opening an .lp file triggers pasp-mode or call M-x pasp-mode within an open asp file.

Todo

  • 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

Contributions, via issues, ideas and pull requests, are highly welcome!

License

Copyright (c) 2017 by Henrik Jürges

Distributed under the GNU General Public License; type C-h C-c to view it.

About

An Emas Major Mode for editing Answer Set Programs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published