Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter module for Specifications #92

Open
robblanco opened this issue May 21, 2017 · 1 comment
Open

Linter module for Specifications #92

robblanco opened this issue May 21, 2017 · 1 comment

Comments

@robblanco
Copy link
Contributor

As I give thought to some forms of static analysis for λProlog code, I realize it could be interesting to run some such checks when we import a specification in Abella (beyond the usual syntactic checks that are already in place). These need not result in hard errors, but warnings about unused variables or constructors, possibly nonterminating behavior, etc., would be useful to have.

I am already working on this, because Abella gives me a convenient framework to experiment. If there is no interest whatsoever in seeing this in master, I can dismantle this in a branch for my purposes, but otherwise I would be happy to argue for it and submit a set of checks of interest to the mainline.

@lambdacalculator
Copy link

One useful model to keep in mind here might be Twelf. There, you can put certain stylized comments in your source that initiate certain checks on the specification as it is being read, in particular %mode, %terminates, %reduces, and %total. That way, the user has complete control over the extra checks that are run, and in a localized way. In Abella, each one of these checks corresponds to a particular theorem, so another intriguing possibility here would be to add such checks as Abella commands that, if they succeed, add the corresponding new theorems (whose proofs always follow a standard template) to the session and print them out for future reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants