We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
lib_machine::Machine::run_query
There seems to be a bug in lib_machine::Machine::run_query that results in wrong resolutions. To reproduce:
let mut machine = Machine::new_lib(); machine.load_module_string( "facts", String::from( r#" male(stephen). parent(albert,edward). father(F,C):-parent(F,C),male(F). "#, ), ); let query = String::from(r#"father(F,C)."#); let output = machine.run_query(query);
Expected output: QueryResolution::False Actual output: Matches([QueryMatch { bindings: {"C": String("edward"), "F": String("albert")} }])
QueryResolution::False
Matches([QueryMatch { bindings: {"C": String("edward"), "F": String("albert")} }])
Note: running the same program in scryer-prolog:
$ scryer-prolog ?- [user]. male(stephen). parent(albert,edward). father(F,C):-parent(F,C),male(F). ?- father(F,C). false.
The text was updated successfully, but these errors were encountered:
@lucksus, could you please help with this issue? Is this maybe even addressed with the recently merged #2309?
Sorry, something went wrong.
add #2341 test to lib_machine.rs
f2d3779
This appears already to be solved! I added a test case for it to lib_machine.rs in f2d3779.
Confirming this is working as expected in v0.9.4 and closing the issue. Thanks!
No branches or pull requests
There seems to be a bug in
lib_machine::Machine::run_query
that results in wrong resolutions. To reproduce:Expected output:
QueryResolution::False
Actual output:
Matches([QueryMatch { bindings: {"C": String("edward"), "F": String("albert")} }])
Note: running the same program in scryer-prolog:
The text was updated successfully, but these errors were encountered: