Re: [julia-users] Horn clauses

2016-09-20 Thread Kevin Liu
Thanks a lot Cedric. I am just getting to know about Russell and Norvig's importance thanks to you. I came across articles of theirs some time ago but didn't know they were pretty much the holy grail. I just came out of a 330 page book from Domingos (even though not mathy) so am catching some a

Re: [julia-users] Horn clauses

2016-09-20 Thread Cedric St-Jean
It depends what you want to do. Julia's base language doesn't include logical reasoning. If you want to translate a Prolog program into Julia, you can get away with `if x then y`, but if you want to implement logical reasoning, then you need to build some machinery yourself. I would use types immu

Re: [julia-users] Horn clauses

2016-09-20 Thread Kevin Liu
The negation I'm guessing would be x = false, iff an equivalence of type and value (but in Julia?), implication a combination of if x = true then y = false? Is it as simple as this? On Tuesday, September 20, 2016 at 11:56:46 AM UTC-3, Kevin Liu wrote: > > Would anyone know how to represent logi

Re: [julia-users] Horn clauses

2016-09-20 Thread Kevin Liu
Would anyone know how to represent logical connectives (e.g. negation ¬, conjunction ∧, disjunction ∨, material implication ⇒, biconditional iff ⇔) and quantifiers (e.g. all ∀, exists ∃) in Julia? I understand 'all' can be a for loop. Is the conjunction a comma like in Prolog? Disjunction the

Re: [julia-users] Horn clauses

2016-09-19 Thread Cedric St-Jean
You might want to roll your own, too. It's instructive, and not particularly hard. Russell and Norvig's textbook has a good section on it. On Monday, September 19, 2016 at 5:44:04 PM UTC-4, Kevin Liu wrote: > > Thanks for the direction, Stefan. > > On Monday, September 19, 2016 at 3:10:19 PM UTC-

Re: [julia-users] Horn clauses

2016-09-19 Thread Kevin Liu
Thanks for the direction, Stefan. On Monday, September 19, 2016 at 3:10:19 PM UTC-3, Stefan Karpinski wrote: > > You might try LilKanren.jl . > > On Mon, Sep 19, 2016 at 10:21 AM, Kevin Liu > wrote: > >> Hello. What would be the long-term solution for usin

Re: [julia-users] Horn clauses

2016-09-19 Thread Stefan Karpinski
You might try LilKanren.jl . On Mon, Sep 19, 2016 at 10:21 AM, Kevin Liu wrote: > Hello. What would be the long-term solution for using Horn clauses in > Julia? Is the present solution to call Prolog from C and C from Julia? > Thanks >

[julia-users] Horn clauses

2016-09-19 Thread Kevin Liu
Hello. What would be the long-term solution for using Horn clauses in Julia? Is the present solution to call Prolog from C and C from Julia? Thanks