HazyResearch / deepdive

DeepDive
deepdive.stanford.edu
1.95k stars 539 forks source link

Complex condition in DDLog #609

Open rudaoshi opened 7 years ago

rudaoshi commented 7 years ago

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(p1id, , birthdate1, , , , , _), person(p2id, , birthdate2, , , , , _).

The rules cannot compile.

alldefector commented 7 years ago

@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!