I'm new to Clingo.
I want to know how to express an OR condition inside a count aggregate.
I'm writing this rule.
countPreviousSlots(C1, C2, TotalCount) :-
firstLecture(C2, S2, G2, I2),
TotalCount = #count{S1,G1,I1 : slot(S1, G1, I1, C1), (S1 < S2; (S1==S2, G1 < G2); (S1==S2, G1==G2, I1 < I2))},
slot(_, _, _, _, C1).
But the round brackets aren't admitted by clingo. How do I have to to formulate this condition in clingo?
And what's the difference if I move the condition and I write:
countPreviousSlots(C1, C2, TotalCount) :-
firstLecture(C2, S2, G2, I2),
TotalCount = #count{S1,G1,I1 : slot(S1, G1, I1, C1)},
slot(_, _, _, _, C1), (S1 < S2; (S1==S2, G1 < G2); (S1==S2, G1==G2, I1 < I2)).