Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provenance gives Tuple not found result for imported facts with symbol type. #2441

Open
zweiyi21 opened this issue Nov 21, 2023 · 0 comments

Comments

@zweiyi21
Copy link

.decl edge(x:symbol, y:symbol)
.input edge

.decl path(x:symbol, y:symbol)
.output path

path(x, y) :- edge(x, y).
path(x, y) :- path(x, z), edge(z, y).

I slightly modified the tutorial example to change the data type from number to symbol, if the base fact edge is imported from a file, the explain will give a Tuple not found result.

souffle -F. -D. -t explain example.dl
Explain is invoked.
Enter command > explain path("2","3")
Tuple not found
Enter command > 

I am sure that the edge.facts file is in the correct path and the contents of the edge.facts are

"1"	"2"
"2"	"3"

Note that, if the base fact is contained in the example.dl, it works fine. And for the number type, no such problem for the imported facts.

.decl edge(x:symbol, y:symbol)
edge("1", "2").
edge("2", "3").

.decl path(x:symbol, y:symbol)
.output path

path(x, y) :- edge(x, y).
path(x, y) :- path(x, z), edge(z, y).
souffle -D. -t explain example.dl
Explain is invoked.
Enter command > explain path("2","3")
edge("2", "3") 
-----------(R1)
path("2", "3") 

The version info

souffle --version
----------------------------------------------------------------------------
Version: 2.4
Word size: 64 bits
Options enabled: ffi openmp ncurses sqlite zlib
----------------------------------------------------------------------------
Copyright (c) 2016-22 The Souffle Developers.
Copyright (c) 2013-16 Oracle and/or its affiliates.
All rights reserved.
============================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant