scryer-prolog
scryer-prolog copied to clipboard
A modern Prolog implementation written mostly in Rust.
In both rebis-dev and master: ``` ulrich@gupu:/tmp$ cat tmp 0.%.ulrich@gupu:/tmp$ od -c tmp 0000000 0 . % . 0000004 ulrich@gupu:/tmp$ /opt/gupu/rebis-dev/target/release/scryer-prolog -f ?- open(tmp,read,S),read(S,T),(Intermediary=true;get_char(S,end_of_file)). S = '$stream'(0x5e30f8d3f6a0), T = 0,...
``` ?- phrase_from_file([],"/dev/null"). error(existence_error(procedure,[]/2),[]/2), unexpected. true.
Version: `rebis-dev_opt-in-offset-tbl-concurrency`, https://github.com/mthom/scryer-prolog/tree/rebis-dev_opt-in-offset-tbl-concurrency https://github.com/mthom/scryer-prolog/tree/60695e8cf84be5a10cdec9f6c7333dc8aaadb0e6 Creating an auxiliary file and seeing that the file is empty: ``` $ touch text.txt $ cat text.txt $ ``` A file to consult: ``` :-...
In the hope to encourage interest and contributions towards the next release of Scryer Prolog, I collect here issues that were either mentioned in discussions as prerequisites for merging `rebis-dev`, or...
The global tables of `offset_table.rs` are removed in favour of a sum type, owned by `Arena`, that can be toggled between `Serial` and `Concurrent` variants. Offset table lookups must now...
On [this branch](https://github.com/mthom/scryer-prolog/issues/2983#issuecomment-2994028463) I get: ``` ulrich@gupu:/opt/gupu/rebis-dev$ git status On branch rebis-dev-pr-2967 Your branch is up to date with 'origin/rebis-dev_opt-in-offset-tbl-concurrency'. nothing to commit, working tree clean ulrich@gupu:/opt/gupu/rebis-dev$ target/release/scryer-prolog -v v0.9.4-468-g60695e8c...
For the following program: :- use_module(library(lists)). p(As) :- maplist(=(a), As). We have with `master`: ?- wam_instructions(p/1, Is), maplist(portray_clause, Is). get_variable(x(2),1). put_structure(=,1,x(1)). set_constant(a). set_constant('$index_ptr'(43)). execute(maplist,2). Whereas with `rebis-dev`: set_constant('$index_ptr'(43)). get_variable(x(2),1). put_structure(=,1,x(1))....
``` ulrich@gupu:/opt/gupu/rebis-dev$ rustup update stable info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu' stable-x86_64-unknown-linux-gnu unchanged - rustc 1.87.0 (17067e9ac 2025-05-09) info: checking for self-update ulrich@gupu:/opt/gupu/rebis-dev$ cargo build --release Compiling scryer-prolog v0.9.4 (/opt/gupu/rebis-dev)...
The motivation for this is #2898. However, throwing instantiation errors for variable module leads to Scryer crashing on startup. This must be addressed before merging. If anyone has any input...
Tests for https://github.com/mthom/scryer-prolog/pull/2777#discussion_r1922859879 and https://github.com/mthom/scryer-prolog/pull/2777#discussion_r1922793229 Draft as the tests technically contain UB as they modify the environment in a multi-threaded program.