λProlog: Logic programming in higher-order logic

(lix.polytechnique.fr)

84 points | by ux266478 3 days ago

6 comments

  • boxfire 10 minutes ago
    I am a huge fan of the work towards putting this in kanren as λKanren:

    https://www.proquest.com/openview/2a5f2e00e8df7ea3f1fd3e8619...

    A few of my own experiments in this time with unification over the binders as variables themselves shows there’s almost always a post HM inference sitting there but likely not one that works in total generality.

    To me that spot of trying to binding unification in higher order logic constraint equations is the most challenging and interesting problem since it’s almost always decidable or decidably undecidable in specific instances, but provably undecidable in general.

    So what gives? Where is this boundary and does it give a clue to bigger gains in higher order unification? Is a more topological approach sitting just behind the veil for a much wider class of higher order inference?

    And what of optimal sharing in the presence of backtracking? Lampings algorithm when the unification variables is in the binder has to have purely binding attached path contexts like closures. How does that get shared?

    Fun to poke at, maybe just enough modern interest in logic programming to get there too…

  • Antibabelic 2 hours ago
    There is a great overview of λProlog from 1988: https://repository.upenn.edu/bitstreams/e91f803b-8e75-4f3c-9...
  • polairscience 1 hour ago
    I think that might be my favorite department/lab website I've ever come across. Really fun. Doesn't at all align with the contemporary design status quo and it shows just how good a rich website can be on a large screen. Big fan.

    https://www.lix.polytechnique.fr/

  • upghost 2 hours ago
    I'm surprised how hard I had to dig for an actual example of syntax[1], so here you go.

    [1]: https://www.lix.polytechnique.fr/~dale/lProlog/proghol/extra...

  • TheRoque 3 hours ago
    I remember learning it in univerisity. It's a really weird language to reason with IMO. But really fun. However I've heard the performances are not that good if you wanna make e.g. game AIs with it.
    • pjmlp 2 hours ago
      First of all, it helps to actually use a proper compiled Prolog implementation like SWI Prolog.

      Second you really need to understand and fine tune cuts, and other search optimization primitives.

      Finally in what concerns Game AIs, it is a mixture of algorithms and heuristics, a single paradigm language (first order logic) like Prolog, can't be a tool for all nails.

    • laksjhdlka 2 hours ago
      With λProlog in particular I think it probably finds most of its use in specifying and reasoning about systems/languages/logics, e.g. with Abella. I don't think many people are running it in production as an implementation language.
      • OneDeuxTriSeiGo 19 minutes ago
        Yeah the main use of it is probably in ELPI which is a higher order structural reasoning and AST transform tool for Coq/Rocq.
    • ux266478 1 hour ago
      > It's a really weird language to reason with IMO

      I know you likely mean regular Prolog, but that's actually fairly easy and intuitive to reason with (code dependent). Lambda Prolog is much, much harder to reason about IMO and there's a certain intractability to it because of just how complex the language is.

    • anonzzzies 2 hours ago
      λProlog or Prolog? Probably Prolog I guess?
      • TheRoque 5 minutes ago
        My bad. Was regular prolog yeah
      • wbolt 1 hour ago
        No. It is actually λProlog which seems to be an extension of Prolog.
        • anonzzzies 1 hour ago
          I was responding to @TheRoque GP; I know λProlog quite well and I would be pleasantly surprised if they saw that in university, but I think they got taught Prolog. If you mean to say that they saw Lambda Prolog and it is therefor a lot more popular than I believed it to be, then excellent and ignore this reply.
        • ux266478 1 hour ago
          Not at all, it's a completely different language with a very different computational foundation. It's an SML-Haskell type situation.
  • yodsanklai 2 hours ago
    I'm curious to see how AI is going to reshape research in programming languages. Statically typed languages with expressive type systems should be even more relevant for instance.