What language are you working with?
# of-logic-programming
u
What language are you working with?
j
This community generally uses threads when replying, see the member handbook for more info (https://futureofcoding.org/member-handbook#how-we-slack).
j
I'm not using one. I'm looking for examples to use as inspiration. But I'm familiar with SWIPL, if that's convenient?
u
Logic languages come in all shapes and sizes, so it's mostly down to how you format the data you're searching over.
If you're using a function/term-style format, like
X(Y, Z, W, ...)
, you could introduce variables for the term, and do some variadic-like syntax.
Something like
X(..., socrates, ...) :- ...
That's for term-structured data.
j
Yeah, that's what I'm looking at.
Term-structured. That ellipsis syntax could be built, but isn't?
u
It could. Depends on how you do resolution.
Also depends on the limits you want to impose.
X(..., socrates, ..., plato, ...)
And how deep you want to nest these terms.
j
Arbitrary depth. I'm not really looking for ideas, I'm looking for examples of where it has been implemented already, if anywhere. Just because I need an LLM to be able to reliably use it, so it will help a lot if it's in the training data already.
I sort of feel like it's not likely to exist as semantic sugar anywhere, because it would be semantic sugar for a really inefficient sort of search. And most Prologs are usually being used for programming, not KR. Just hoping against hope.
I wonder if in ErgoAI you would do something like this...
?x[?y->term];term[?x->?y];?x[term->?y].