Skip to content

Question about @demand("bf") #19

@bertram-gil

Description

@bertram-gil

Hi,
Consider the following program:

rel path(a, c) = edge(a, c) \/ path(a, b) /\ edge(b, c)
rel a__(a) = path(a, b), not path(a, b)
rel f__(c, e) = path(c, b), d__(c, e), a__(f)
query f__

The above program runs without any problems. But if I add @demand("bf") before path then i get:

@demand("bf")
rel path(a, c) = edge(a, c) \/ path(a, b) /\ edge(b, c)
rel a__(a) = path(a, b), not path(a, b)
rel f__(c, e) = path(c, b), d__(c, e), a__(f)
query f__

[Error] Cannot stratify program: negative cycle detected between predicate `a__` and `path`

But there is no negative path between a__ and path.
Am I doing something wrong? Is this not a valid program if we enable magic transformation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions