You are viewing archived messages.
Go here to search the history.

Jason Morris 2024-06-27 22:49:59

What would the syntax be for searching any statement that includes the atom socrates ?

(wryl) 2024-06-28 05:54:08

Depends on the language.

(wryl) 2024-06-28 05:55:24

What language are you working with?

J. Ryan Stinnett 2024-06-28 11:42:07

This community generally uses threads when replying, see the member handbook for more info (

Jason Morris 2024-06-28 14:16:16

I'm not using one. I'm looking for examples to use as inspiration. But I'm familiar with SWIPL, if that's convenient?

(wryl) 2024-06-28 16:12:58

Logic languages come in all shapes and sizes, so it's mostly down to how you format the data you're searching over.

(wryl) 2024-06-28 16:13:48

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.

(wryl) 2024-06-28 16:14:08

Something like X(..., socrates, ...) :- ...

(wryl) 2024-06-28 16:14:18

That's for term-structured data.

Jason Morris 2024-06-28 16:14:33

Yeah, that's what I'm looking at.

Jason Morris 2024-06-28 16:15:34

Term-structured. That ellipsis syntax could be built, but isn't?

(wryl) 2024-06-28 16:15:51

It could. Depends on how you do resolution.

(wryl) 2024-06-28 16:16:35

Also depends on the limits you want to impose.

(wryl) 2024-06-28 16:16:49

X(..., socrates, ..., plato, ...)

(wryl) 2024-06-28 16:17:01

And how deep you want to nest these terms.

Jason Morris 2024-06-28 16:19:00

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.

Jason Morris 2024-06-28 16:22:30

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.

Jason Morris 2024-06-28 16:28:59

I wonder if in ErgoAI you would do something like this... _?x[?y->term];term[?x->?y];?x[term->?y]._