Re: [racket-users] Datalog Question

2018-01-31 Thread Jay McCarthy
Something like

kevin(Y) :- foo(x, Y), Y != 3.
kevin(Y)?





On Wed, Jan 31, 2018 at 5:13 PM, Kevin Forchione  wrote:
> Can anyone tell me how I would use the datalog = and != tokens? The 
> documentation says they can separate terms, such as  != . In the 
> program below, how would I create a query for foo(x, ?) where ? is not 3?
>
> #lang datalog
>
> foo(bil, 1).
> foo(bob, 3).
> foo(joe, 2).
>
> I imagine I’d have to create a rule of some sort.
>
> -Kevin
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
-=[ Jay McCarthy   http://jeapostrophe.github.io]=-
-=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=-
-=[ Moses 1:33: And worlds without number have I created; ]=-

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Datalog Question

2018-01-31 Thread Kevin Forchione
Can anyone tell me how I would use the datalog = and != tokens? The 
documentation says they can separate terms, such as  != . In the 
program below, how would I create a query for foo(x, ?) where ? is not 3?

#lang datalog

foo(bil, 1).
foo(bob, 3).
foo(joe, 2).

I imagine I’d have to create a rule of some sort. 

-Kevin

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.