https://futureofcoding.org/ logo
Join Slack
Powered by
# of-logic-programming
  • e

    Emmanuel Oga

    04/29/2021, 9:56 PM
    Found out that PAIP's chapter 11 is a nice intro to implementing prolog https://github.com/norvig/paip-lisp/blob/master/docs/chapter11.md Although, yeah... had to undust my commonlisp environment to work through it šŸ˜› Chapter 12 is about compiling a prolog like dialect, haven't look at the chapter yet but looks interesting too. PAIP also recommends:
    Copy code
    Maier and Warren's Computing with Logic (1988) is the best reference for those interested in implementing Prolog. It starts with a simple interpreter for a variable-free version of Prolog, and then moves up to the full language, adding improvements to the interpreter along the way.
    ... seems to be a cool book but a bit archaic with example code in Pascal... but I guess Pascal is a simple enough language to port to something else without too much effort... hopefully šŸ˜› The bad thing is that I couldn't find the source code anywhere so I'm afraid it may be missing bits and pieces in the book.
    j
    • 2
    • 1
  • r

    Rob Haisfield

    05/19/2021, 1:21 PM
    With the addition of LAMBDA (a way to write reusable functions) in Excel, could logic programming translate well into a spreadsheet format? I found an old paper that talks about it but not many examples. https://dl.acm.org/doi/abs/10.1145/67449.67466
    j
    w
    • 3
    • 2
  • e

    Emmanuel Oga

    05/28/2021, 9:31 PM
    does anybody know if the ":-" from prolog has a name? I thought it was a textual form of "turnstile", but it seems the turnstile operator works on the "opposite direction"
    c
    d
    b
    • 4
    • 7
  • r

    Rob Haisfield

    06/03/2021, 10:30 PM
    So if I’m understanding logic programming right, it’s basically that I specify the conditions that need to be at some degree of truthiness, and it builds out from there? How does that relate to the actor model?
    k
    w
    c
    • 4
    • 5
  • e

    Emmanuel Oga

    06/16/2021, 4:13 AM
    Following some prolog tutorials, it looks like the data/terms always has sort of a "global scope". How do ppl manage the "database" on medium / big prolog programs? Can there be more than one database? Are there some sort of namespacing and/or modularity features? Sometimes the concept of relations is a bit mind-boggling because it seems difficult to distinguish between relations that act as "routines" or "procedures", or something alike, and terms that act more like pure data. It just feels like, if I was writing an imperative program in prolog style, it would be something akin to code interspersed with, say, embedded CSV data šŸ˜• Hope this makes a bit of sense šŸ™‚
    j
    d
    w
    • 4
    • 7
  • e

    Emmanuel Oga

    06/16/2021, 8:06 AM
    what are good examples of embedded logic programming into other languages? All I can think of are "prologs in lisp" • https://docs.racket-lang.org/racklog/ • https://github.com/clojure/core.logic • https://franz.com/support/documentation/current/doc/prolog.html
    m
    k
    +2
    • 5
    • 4
  • e

    Emmanuel Oga

    06/22/2021, 6:40 AM
    Been thinking a bit about "custom unification", or extensible unification. It seems it is a pretty common thing: • A library that implements unification / custom unification in JavaScript • Extending unification in clojure's core.logic • An unification library for Python • Also TIL SWI prolog supports maps/dictionaries Wondering how much it makes sense to use more complex data structures in prolog-like searches. Datalog seems to be an example that going "the other way", being more restrictive, may be more productive:
    Datalog disallows complex terms as arguments ofĀ predicates, e.g., p (1, 2) is admissible but not p (f (1), 2)
    Perhaps unification of complex/custom data structures is more productive for pattern matching than for general logic programming ... but not sure (SWI prolog's dict maybe contradicts this idea).
    n
    • 2
    • 4
  • e

    Emmanuel Oga

    07/15/2021, 12:42 AM
    I was wondering what, if any, was the connection between prolog and theorem provers: https://www.metalevel.at/prolog/theoremproving
    n
    w
    • 3
    • 3
  • g

    Gordon

    07/29/2021, 7:47 AM
    Hi, are there any open source databases on the level of postgres that use a prolog or datalog esque logic programming language for querying?
    m
    i
    +4
    • 7
    • 9
  • e

    Emmanuel Oga

    11/17/2021, 8:50 AM
    Trying to come up with a list of interesting logic programming systems to learn from and maybe try. Maybe someone here want to contribute to it? BTW, I'm sure there are other lists like this, maybe we can add links to them? For instance, I included a link to a Wikipedia's list of logic PL, but it lists a lot of defunct systems which are more difficult to learn from imho.
    šŸ‘ 2
    k
    n
    +2
    • 5
    • 6
  • j

    Jason Morris

    01/19/2022, 9:41 PM
    Paper showing how you can convert a logic program into a graph, translate it to three different varieties of ASP, and get your choice of stable model, well-founded, or co-stable answers, all with justifications built-in for free, on an open source ASP reasoner. So you can write logic code by drawing a graph. Not sure if it works for prepositional programs, though.
    šŸ‘ 2
    🤯 1
    d
    • 2
    • 5
  • d

    Drewverlee

    03/12/2022, 7:53 PM
    Does anyone know of any circles what help you understand the concepts in the paper jason linked? I google my way to victory in about a dedicated year, but actually talking to the people who know how to read between the lines would probably take that down to a month.
    i
    • 2
    • 1
  • j

    Jason Morris

    07/15/2022, 5:01 AM
    I just invited people in #CCL5VVBAN to test out Blawx. I will be presenting a paper and demoing at the ICLP-colocated GDE workshop soon. Interested in feedback from this channel.
  • c

    curious_reader

    08/19/2022, 11:17 AM
    Hey! I found some logic programming related stuff in the dev holochain discord which I found somehow relevant and wanted to share here: and here:
    šŸ‘€ 1
  • c

    curious_reader

    08/19/2022, 11:18 AM
    Link to prolog Code: https://github.com/perspect3vism/ad4m-executor/blob/main/src/tests/sdna/todo.pl Link to discord message https://discord.com/channels/919686143581253632/966000883391430696/1001443505492729907
  • c

    curious_reader

    08/19/2022, 11:23 AM
    Link to Github project: https://github.com/perspect3vism/ad4m-executor
  • j

    Jason Morris

    09/07/2022, 11:24 PM
    Is anyone aware of examples of people generating code from the results of an answer set programming query? I'm trying to figure out if this experiment I'm planning is sufficiently novel to propose a paper. Slack Conversation
    w
    • 2
    • 5
  • j

    Jason Morris

    10/04/2022, 10:30 PM
    Anyone here have some experience with answer set programming? I'm struggling to understand a negation issue, this week.
    n
    • 2
    • 2
  • j

    Jason Morris

    02/01/2023, 7:23 PM
    Working on a paper for the ICLP this week on Blawx as a visual interface for logic programming. Any tips for getting accepted at ICLP would be appreciated. šŸ™‚
    i
    • 2
    • 1
  • j

    Jason Morris

    04/01/2023, 10:09 PM
    Paper accepted! Blawx will have a peer-reviewed citation come summer. Anyone want to fund my trip to England for the conference, so I can actually meet my co-author? šŸ˜‰
    šŸ‘ 5
  • g

    guitarvydas

    04/11/2023, 9:22 AM
    I am trying to suss out what the significance-of/meaning is of ā€œdrop_amount...bwdā€ in the Dungeon Crawler source code (Ceptre). Line 50 https://github.com/guitarvydas/ceptre/blob/dev/dc/dc.cep. Comments? background: I’m building a Ceptre compiler - to Lisp (then ā€œthe worldā€). I think that I can handle most rules by treating them as 3 parts: (1) a pattern to be matched (using PROLOG backtracking), (2) retractions (3) assertions (PROLOG meaning, imperitivized). As it stands, the ā€œcompilerā€ transpiles Ceptre to RT (an intermediate language I created) then RT to Lisp. The significance of forward chaining vs backward chaining is blurring in my mind, esp. the significance of
    drop_amount
    . Then, I will need to figure out what
    z
    and
    none
    are ... Aside: I’m using Nils Holm’s ā€œProlog ... in 6 Slidesā€ (Scheme code ported to CL (and JS)).
    n
    • 2
    • 4
  • j

    Jason Morris

    08/15/2023, 4:01 PM
    Anyone ever played with Symboleo? I'm only now learning it is under development in Canada (University of Ottawa) for use in legal contracts. Logic based, uses event calculus, implemented in Prolog-inside-Java, looks like. Shares a lot of design objectives with what I'm doing with Blawx.
    c
    • 2
    • 2
  • d

    Devine Lu Linvega

    09/16/2023, 1:37 AM
    Excellent talk on meta-interpretation in Prolog

    https://www.youtube.com/watch?v=nmBkU-l1zycā–¾

    šŸ‘€ 2
    šŸ™ 1
    šŸ° 1
  • j

    Jason Morris

    10/02/2023, 9:21 PM
    Early rough prototype of the Prolog debugging interface I'm designing. Feedback welcome. https://www.figma.com/file/DKmfQz3MaRMZx1yyKqtbsU/Logic-Debug-Prototype?type=design&node-id=0%3A1&mode=design&t=GST1pxMYKJ1DWRPT-1
    šŸ‘ 2
    ā¤ļø 1
  • j

    Jason Morris

    06/27/2024, 10:49 PM
    What would the syntax be for searching any statement that includes the atom
    socrates
    ?
  • u

    (wryl)

    06/28/2024, 5:54 AM
    Depends on the language.
  • u

    (wryl)

    06/28/2024, 5:55 AM
    What language are you working with?
    j
    j
    • 3
    • 15
  • j

    Jason Morris

    08/12/2024, 3:58 PM
    Shot in the dark... anyone have any experience with SWIPL pengines? I'm having a module problem I don't grok.
  • g

    guitarvydas

    08/12/2024, 4:03 PM
    @Jason Morris I use swipl, but, in a very shallow manner. I have gotten useful help from the reddit group on swipl (or was it slashdot?) ...
  • j

    Jason Morris

    08/12/2024, 4:05 PM
    Likewise. I find the official forum quite responsive.