-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add Answer Set Programming and Linear Programming #7184
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
Conversation
Pulled from clingo (MIT) and from Draco (BSD 3 Clause)
Linear programs must have an objective
Exactly match the object line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
Important
The changes in this PR will not appear on GitHub until the next release has been made and deployed. See here for more details.
This reverts a change made in #20639 to have GitHub recognize our ASP files as Prolog, the closest langauge supported by [Linguist](https://github.com/github-linguist/linguist) at the time. Linguist has since [added support for ASP](github-linguist/linguist#7184), so we no longer need to force Prolog detection -- our `.lp` files should be auto-detected as ASP. Signed-off-by: Todd Gamblin <[email protected]>
This reverts a change made in #20639 to have GitHub recognize our ASP files as Prolog, the closest langauge supported by [Linguist](https://github.com/github-linguist/linguist) at the time. Linguist has since [added support for ASP](github-linguist/linguist#7184), so we no longer need to force Prolog detection -- our `.lp` files should be auto-detected as ASP. Signed-off-by: Todd Gamblin <[email protected]>
This reverts a change made in #20639 to have GitHub recognize our ASP files as Prolog, the closest langauge supported by [Linguist](https://github.com/github-linguist/linguist) at the time. Linguist has since [added support for ASP](github-linguist/linguist#7184), so we no longer need to force Prolog detection -- our `.lp` files should be auto-detected as ASP. Signed-off-by: Todd Gamblin <[email protected]>
@tgamblin see the last sentence in the troubleshooting doc. |
Thanks! For others:
|
) This reverts a change made in spack#20639 to have GitHub recognize our ASP files as Prolog, the closest langauge supported by [Linguist](https://github.com/github-linguist/linguist) at the time. Linguist has since [added support for ASP](github-linguist/linguist#7184), so we no longer need to force Prolog detection -- our `.lp` files should be auto-detected as ASP. Signed-off-by: Todd Gamblin <[email protected]>
) This reverts a change made in spack#20639 to have GitHub recognize our ASP files as Prolog, the closest langauge supported by [Linguist](https://github.com/github-linguist/linguist) at the time. Linguist has since [added support for ASP](github-linguist/linguist#7184), so we no longer need to force Prolog detection -- our `.lp` files should be auto-detected as ASP. Signed-off-by: Todd Gamblin <[email protected]>
This PR adds language entries for the two types of programs that use the
.lp
extension; answer set programs and linear programs. They're both common, and they shouldn't be added independently to avoid widespread misclassification.Description
Adding Answer Set Programming was first suggested in #3867, but it was difficult to assess popularity at the time because GitHub code search didn't support special characters. #3867 (comment) points out that
.lp
isn't necessarily exclusive to ASP, but fortunately Prolog (the most similar commonly used logic programming language) has coalesced on.pl
.#4860 discussed adding a language group for ASP (the language varies slightly across different solvers). The included grammar is quite generic, so I don't believe there's a need for specific sub-grammars/languages.
#4860 also points at the
.lp
is also used for "linear programs" (common human-readable input format for LP solvers). These can be told apart by looking for the required objective statement. Gurobi docs:Answer Set Programming
Answer Set Programming is a logic programming paradigm which dates back to the 1990s. The
.lp
(logic program) file extension has been used for ASP programs since at least 1998, when it was used by lparse and the smodels solver.Today, there are many ASP-focused repos on GitHub. Here are more than a hundred that opted into the
#answer-set-programming
topic.Checklist:
.lp
with:-
: https://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.lp+%3A-#A9CC29
Linear Programming
Linear programs are mathematical models of linearly related variables. The
lp
file format goes back at least 20 years as part of CPLEX.Checklist
.lp
withSubject To
https://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.lp+%22Subject+To%22#DD2113