deepdive icon indicating copy to clipboard operation
deepdive copied to clipboard

Complex condition in DDLog

Open rudaoshi opened this issue 8 years ago • 1 comments

I used a complex condition in ddlog, but it would not compile. I also noticed that there is no logical operator for condition in current document. How can I express and relationship for conditions?

example:

age_older(p1_id, p2_id) = if birthdate1 != 0 and birthdate2 != 0 and birthdate1 < birthdate2 then TRUE else if birthdate1 != 0 and birthdate2 != 0 and birthdate1 > birthdate2 then FALSE else NULL end :- person(p1_id, _, birthdate1, _, _, _, _, _), person(p2_id, _, birthdate2, _, _, _, _, _).

The rules cannot compile.

rudaoshi avatar Dec 20 '16 09:12 rudaoshi

@rudaoshi Could you try building DD from git (see https://github.com/HazyResearch/deepdive/issues/607#issuecomment-268308601) and rerunning this program? If the compilation problem persists, could you post the error messages? Thanks!

alldefector avatar Dec 20 '16 17:12 alldefector