mangle icon indicating copy to clipboard operation
mangle copied to clipboard

bug in type checking

Open burakemir opened this issue 1 year ago • 0 comments

This program does not work:

path(Src, Dst, W) :- edge(Src, Dst, W).
path(Src, Dst, W) :- path(Src, X1, W1), edge(X1, Dst, W2),  W = fn:plus(W1, W2).

Error message:

type mismatch: cannot find assignment that works for premise path(Src,X1,W1)

Expected: no error.

The following program works fine:

path(Src, Dst, W) :- edge(Src, Dst, W).
path(Src, Dst, W) :- path(Src, X1, W1), edge(X1, Dst, W2) |> let W = fn:plus(W1, W2).

burakemir avatar May 04 '24 01:05 burakemir