]> Repositorios git - scryer-prolog.git/log
scryer-prolog.git
10 months agofurther cleanup
Bennet Bleßmann [Tue, 18 Feb 2025 20:24:27 +0000 (21:24 +0100)]
further cleanup

- replace macros with functions
- stop abusing allocation error

10 months agofurther ffi cleanup
Bennet Bleßmann [Mon, 17 Feb 2025 20:23:08 +0000 (21:23 +0100)]
further ffi cleanup

10 months agodon't panic on unexpected/invalid value
Bennet Bleßmann [Mon, 17 Feb 2025 19:19:36 +0000 (20:19 +0100)]
don't panic on unexpected/invalid value

10 months agoalso accept rust type name
Bennet Bleßmann [Mon, 17 Feb 2025 19:18:47 +0000 (20:18 +0100)]
also accept rust type name

10 months agouse libffi::middle instead of libffi::low were possible
Bennet Bleßmann [Tue, 21 Jan 2025 21:23:50 +0000 (22:23 +0100)]
use libffi::middle instead of libffi::low were possible

10 months agoadd a simple ffi test using structs
Bennet Bleßmann [Mon, 17 Feb 2025 18:58:46 +0000 (19:58 +0100)]
add a simple ffi test using structs

10 months agofix UB in ffi tests
Bennet Bleßmann [Mon, 27 Jan 2025 20:55:34 +0000 (21:55 +0100)]
fix UB in ffi tests

10 months agoadd new test helper
Bennet Bleßmann [Mon, 27 Jan 2025 20:27:29 +0000 (21:27 +0100)]
add new test helper

10 months agomake ffi support full {i,u}64 range
Bennet Bleßmann [Wed, 22 Jan 2025 23:40:31 +0000 (00:40 +0100)]
make ffi support full {i,u}64 range

10 months agofix {i,u}64 in ffi
Bennet Bleßmann [Wed, 22 Jan 2025 19:32:44 +0000 (20:32 +0100)]
fix {i,u}64 in ffi

10 months agofix all but {i,u}64
Bennet Bleßmann [Tue, 21 Jan 2025 23:03:18 +0000 (00:03 +0100)]
fix all but {i,u}64

10 months agofix crash when trying to load and ffi library with an invalid type specification
Bennet Bleßmann [Tue, 21 Jan 2025 22:37:47 +0000 (23:37 +0100)]
fix crash when trying to load and ffi library with an invalid type specification

10 months agoadd more ffi tests
Bennet Bleßmann [Tue, 21 Jan 2025 22:36:14 +0000 (23:36 +0100)]
add more ffi tests

10 months agocleanup and fix miri & cross-compile
Bennet Bleßmann [Tue, 21 Jan 2025 18:20:33 +0000 (19:20 +0100)]
cleanup and fix miri & cross-compile

10 months agoadd ffi tests using f64
Bennet Bleßmann [Mon, 20 Jan 2025 22:00:03 +0000 (23:00 +0100)]
add ffi tests using f64

10 months agoMerge pull request #3019 from Skgland/rebis-dev_fix-clippy
Mark Thom [Fri, 1 Aug 2025 05:09:41 +0000 (22:09 -0700)]
Merge pull request #3019 from Skgland/rebis-dev_fix-clippy

fix clippy

10 months agoreplace .skip(n).next() with .nth(n)
Bennet Bleßmann [Thu, 31 Jul 2025 19:46:21 +0000 (21:46 +0200)]
replace .skip(n).next() with .nth(n)

10 months agoremove unecessary cast
Bennet Bleßmann [Thu, 31 Jul 2025 19:45:57 +0000 (21:45 +0200)]
remove unecessary cast

10 months agoremove unecessary into_iter
Bennet Bleßmann [Thu, 31 Jul 2025 19:45:44 +0000 (21:45 +0200)]
remove unecessary into_iter

10 months agoprefere for loop
Bennet Bleßmann [Thu, 31 Jul 2025 19:45:26 +0000 (21:45 +0200)]
prefere for loop

10 months agoreplace always erroring of_else with map_err
Bennet Bleßmann [Thu, 31 Jul 2025 19:44:52 +0000 (21:44 +0200)]
replace always erroring of_else with map_err

10 months agoreplace single non-wildcard pattern match with if let
Bennet Bleßmann [Thu, 31 Jul 2025 19:43:59 +0000 (21:43 +0200)]
replace single non-wildcard pattern match with if let

10 months agoremove already implied must_use
Bennet Bleßmann [Thu, 31 Jul 2025 19:41:51 +0000 (21:41 +0200)]
remove already implied must_use

10 months agocollaps els-if / if-if
Bennet Bleßmann [Thu, 31 Jul 2025 19:41:23 +0000 (21:41 +0200)]
collaps els-if / if-if

10 months agoingore nerver looping loop, but add a todo
Bennet Bleßmann [Thu, 31 Jul 2025 19:40:38 +0000 (21:40 +0200)]
ingore nerver looping loop, but add a todo

10 months agofix clippy::unit_arg
Bennet Bleßmann [Thu, 31 Jul 2025 19:40:05 +0000 (21:40 +0200)]
fix clippy::unit_arg

10 months agocheck not empty instead of len > 0
Bennet Bleßmann [Thu, 31 Jul 2025 19:38:48 +0000 (21:38 +0200)]
check not empty instead of len > 0

10 months agoimpl From rather than Into
Bennet Bleßmann [Thu, 31 Jul 2025 19:38:26 +0000 (21:38 +0200)]
impl From rather than Into

10 months agofix unecessary mut
Bennet Bleßmann [Thu, 31 Jul 2025 19:37:23 +0000 (21:37 +0200)]
fix unecessary mut

10 months agoignore clippy::unbuffered_bytes in test helper functions
Bennet Bleßmann [Thu, 31 Jul 2025 19:36:53 +0000 (21:36 +0200)]
ignore clippy::unbuffered_bytes in test helper functions

10 months agofix legacy int constants
Bennet Bleßmann [Thu, 31 Jul 2025 19:35:55 +0000 (21:35 +0200)]
fix legacy int constants

10 months agoignore wrong self convention
Bennet Bleßmann [Thu, 31 Jul 2025 19:35:40 +0000 (21:35 +0200)]
ignore wrong self convention

10 months agofix match/if-let can be simplified to ?
Bennet Bleßmann [Thu, 31 Jul 2025 19:34:15 +0000 (21:34 +0200)]
fix match/if-let can be simplified to ?

10 months agofix unecessary return
Bennet Bleßmann [Thu, 31 Jul 2025 19:33:13 +0000 (21:33 +0200)]
fix unecessary return

10 months agofix unecessary reference/dereference
Bennet Bleßmann [Thu, 31 Jul 2025 19:31:34 +0000 (21:31 +0200)]
fix unecessary reference/dereference

10 months agofix clone on copy values
Bennet Bleßmann [Thu, 31 Jul 2025 19:28:30 +0000 (21:28 +0200)]
fix clone on copy values

10 months agofix clippy::uninlined_format_args
Bennet Bleßmann [Thu, 31 Jul 2025 19:26:08 +0000 (21:26 +0200)]
fix clippy::uninlined_format_args

10 months agoremove outdated comment
Bennet Bleßmann [Thu, 31 Jul 2025 18:07:57 +0000 (20:07 +0200)]
remove outdated comment

10 months agoalso run CI on rebis-dev
Bennet Bleßmann [Thu, 31 Jul 2025 18:07:07 +0000 (20:07 +0200)]
also run CI on rebis-dev

10 months agodetect end_of_file before end_of_stream in get_char (#2990)
Mark Thom [Wed, 23 Jul 2025 03:16:24 +0000 (20:16 -0700)]
detect end_of_file before end_of_stream in get_char (#2990)

10 months agoallow abolish_clause to abolish empty dynamic clauses (#3010)
Mark Thom [Sun, 20 Jul 2025 23:55:07 +0000 (16:55 -0700)]
allow abolish_clause to abolish empty dynamic clauses (#3010)

10 months agofix variadic_functor
Mark Thom [Thu, 17 Jul 2025 04:52:40 +0000 (21:52 -0700)]
fix variadic_functor

10 months agofix parsing partial number tokens in other radixes (#3000)
Mark Thom [Tue, 15 Jul 2025 06:05:10 +0000 (23:05 -0700)]
fix parsing partial number tokens in other radixes (#3000)

11 months agofmt improvements
Mark Thom [Tue, 8 Jul 2025 20:47:08 +0000 (13:47 -0700)]
fmt improvements

11 months agocorrect number_chars (#2976)
Mark Thom [Tue, 1 Jul 2025 22:47:26 +0000 (15:47 -0700)]
correct number_chars (#2976)

11 months agouse granular hierarchical locks in offset_table.rs
Mark Thom [Wed, 25 Jun 2025 04:58:40 +0000 (21:58 -0700)]
use granular hierarchical locks in offset_table.rs

11 months agosynchronize offset table growth with the borrowing of offset pointers
Mark Thom [Sat, 21 Jun 2025 06:19:32 +0000 (23:19 -0700)]
synchronize offset table growth with the borrowing of offset pointers

11 months agouse OffsetTableImpl without synchronization by default
Mark Thom [Fri, 23 May 2025 06:49:57 +0000 (23:49 -0700)]
use OffsetTableImpl without synchronization by default

11 months agofix crash when loading html
Bennet Bleßmann [Fri, 9 May 2025 21:45:03 +0000 (23:45 +0200)]
fix crash when loading html

11 months agomake Fixnum::build_with harder to accidentally misuse
Bennet Bleßmann [Wed, 22 Jan 2025 20:10:44 +0000 (21:10 +0100)]
make Fixnum::build_with harder to accidentally misuse
change trait bound order for better

11 months agoAlign the heap to the size of heap cells
bakaq [Mon, 5 May 2025 03:15:14 +0000 (00:15 -0300)]
Align the heap to the size of heap cells

11 months agoAdd scan_slice_to_str_from_start
bakaq [Mon, 5 May 2025 00:01:50 +0000 (21:01 -0300)]
Add scan_slice_to_str_from_start

11 months agocorrect threshold marking in copy_structure (#2920)
Mark Thom [Sun, 4 May 2025 05:04:04 +0000 (22:04 -0700)]
correct threshold marking in copy_structure (#2920)

11 months agoFIXED: correct partial string tail calculation in arg/3
Markus Triska [Thu, 1 May 2025 07:18:00 +0000 (09:18 +0200)]
FIXED: correct partial string tail calculation in arg/3

This addresses another aspect of #2924, found by @haijinSk.
Thank you again!

Example:

    ?- "aaaaaaa" = [_,_,_,_,_,_|T], arg(2, T, 2).
       false.

11 months agoFIXED: arg/3 for partial strings
Markus Triska [Tue, 29 Apr 2025 20:48:13 +0000 (22:48 +0200)]
FIXED: arg/3 for partial strings

This address #2924, reported by @haijinSk. Thank you a lot!

Example:

    ?- arg(2, "a", A).
       A = [].

The fact that such a mistake in macro usage is even possible could be
a sign that the macro definition should be stricter.

11 months agofix cont function crashes (#2920)
Mark Thom [Tue, 29 Apr 2025 06:39:52 +0000 (23:39 -0700)]
fix cont function crashes (#2920)

11 months agoreplace deprecated unify_complete_string call with allocate_cstr
Mark Thom [Mon, 28 Apr 2025 05:27:12 +0000 (22:27 -0700)]
replace deprecated unify_complete_string call with allocate_cstr

11 months agoMigrate to strict and exposed provenance
bakaq [Sun, 27 Apr 2025 02:34:53 +0000 (23:34 -0300)]
Migrate to strict and exposed provenance

11 months agoallow unused_parens around let statement in functor! macro
Mark Thom [Sun, 27 Apr 2025 04:11:27 +0000 (21:11 -0700)]
allow unused_parens around let statement in functor! macro

11 months agoFIXED: invoke correct predicate
Markus Triska [Fri, 25 Apr 2025 16:39:21 +0000 (18:39 +0200)]
FIXED: invoke correct predicate

Noted by Oleg Finkelstein. Many thanks!

11 months agoENHANCED: partial_string/3 no longer creates atoms
Markus Triska [Fri, 25 Apr 2025 20:16:44 +0000 (22:16 +0200)]
ENHANCED: partial_string/3 no longer creates atoms

As a consequence, resulting strings are now quickly reclaimed on
backtracking.

This addresses #2912.

Test case:

    :- use_module(library(iso_ext)).
    :- use_module(library(lists)).

    ab(a).
    ab(b).

Sample query:

    ?- length(Ls, 1_000_000),
       maplist(ab, Ls),
       partial_string(Ls, Es0, []),
       Es0 == Ls.
       Ls = "aaaaaaaaaaaaaaaaaaa ...", Es0 = "aaaaaaaaaaaaaaaaaaa ..."
    ;  Ls = "aaaaaaaaaaaaaaaaaaa ...", Es0 = "aaaaaaaaaaaaaaaaaaa ..."
    ;  Ls = "aaaaaaaaaaaaaaaaaaa ...", Es0 = "aaaaaaaaaaaaaaaaaaa ..."
    ;  Ls = "aaaaaaaaaaaaaaaaaaa ...", Es0 = "aaaaaaaaaaaaaaaaaaa ..."
    ;  Ls = "aaaaaaaaaaaaaaaaaaa ...", Es0 = "aaaaaaaaaaaaaaaaaaa ..."
    ;  ... .

running in constant memory.

11 months agoENHANCED: use a fast test for the expected case of chars in atom_chars/2 etc.
Markus Triska [Thu, 24 Apr 2025 16:19:05 +0000 (18:19 +0200)]
ENHANCED: use a fast test for the expected case of chars in atom_chars/2 etc.

Suggested by Oleg Finkelstein, thank you a lot!

Example, before this change:

    ?- t+\(length(As, 1_000_000), maplist(=(a), As), time(atom_chars(A, As))).
       % CPU time: 0.693s, 7_000_041 inferences
       true.

Now:

    ?- t+\(length(As, 1_000_000), maplist(=(a), As), time(atom_chars(A, As))).
       % CPU time: 0.080s, 40 inferences
       true.

This also partially ameliorates #2907.

11 months agocorrect heap-to-cell-index comparison in copy_slice_to_end (#2906)
Mark Thom [Fri, 25 Apr 2025 05:20:40 +0000 (22:20 -0700)]
correct heap-to-cell-index comparison in copy_slice_to_end (#2906)

11 months agofix functor! size calculations around indexing_code_ptr
Mark Thom [Thu, 24 Apr 2025 05:49:03 +0000 (22:49 -0700)]
fix functor! size calculations around indexing_code_ptr

11 months agorestore tab completion to REPL (#2575)
Mark Thom [Thu, 24 Apr 2025 01:55:50 +0000 (18:55 -0700)]
restore tab completion to REPL (#2575)

11 months agomake self.s_offset use bytes in case of HeapPtr::PStr in UnifyVoid (#2897)
Mark Thom [Tue, 22 Apr 2025 03:25:50 +0000 (20:25 -0700)]
make self.s_offset use bytes in case of HeapPtr::PStr in UnifyVoid (#2897)

11 months agocorrect heap_print.rs for null characters being excluded from pstr regions of heap...
Mark Thom [Mon, 21 Apr 2025 00:14:13 +0000 (17:14 -0700)]
correct heap_print.rs for null characters being excluded from pstr regions of heap (#2890)

11 months agocorrectly increment s_offset for partial strings (#2897)
Mark Thom [Sun, 20 Apr 2025 23:53:36 +0000 (16:53 -0700)]
correctly increment s_offset for partial strings (#2897)

11 months agofix typo in try_from_partial_string
Mark Thom [Sun, 20 Apr 2025 07:07:55 +0000 (00:07 -0700)]
fix typo in try_from_partial_string

11 months agofix read_s logic around HeapPtr::PStrLoc (#2894)
Mark Thom [Sun, 20 Apr 2025 06:51:26 +0000 (23:51 -0700)]
fix read_s logic around HeapPtr::PStrLoc (#2894)

11 months agorepair cyclic PStrLoc handling in heap_print.rs
Mark Thom [Fri, 18 Apr 2025 07:03:33 +0000 (00:03 -0700)]
repair cyclic PStrLoc handling in heap_print.rs

11 months agoremove compare_pstr_to_string and related result type
Mark Thom [Fri, 18 Apr 2025 03:20:38 +0000 (20:20 -0700)]
remove compare_pstr_to_string and related result type

11 months agoENHANCED: dedicated faster branches for repositionable streams
Markus Triska [Thu, 17 Apr 2025 20:14:37 +0000 (22:14 +0200)]
ENHANCED: dedicated faster branches for repositionable streams

rebis-dev makes the speed difference especially apparent due to the
linear scan of strings on the heap in partial_string_tail/2 which is
now avoided for repositionable streams, notably files.

This addresses #2888 reported and analyzed by @haijinSk. Many thanks!

11 months agocorrect GetPartialString (#2887)
Mark Thom [Thu, 17 Apr 2025 05:20:31 +0000 (22:20 -0700)]
correct GetPartialString (#2887)

11 months agogeneralize compare_pstr_segments
Mark Thom [Wed, 16 Apr 2025 05:10:02 +0000 (22:10 -0700)]
generalize compare_pstr_segments

11 months agoensure '\0' atom is static & never inlined (#2880)
Mark Thom [Sun, 13 Apr 2025 01:48:47 +0000 (18:48 -0700)]
ensure '\0' atom is static & never inlined (#2880)

11 months agofix root reading of complete strings (#2882)
Mark Thom [Sun, 13 Apr 2025 00:32:11 +0000 (17:32 -0700)]
fix root reading of complete strings (#2882)

11 months agosome cosmetic tweaks
Mark Thom [Sat, 12 Apr 2025 23:43:51 +0000 (16:43 -0700)]
some cosmetic tweaks

11 months agomark done item
Markus Triska [Sat, 12 Apr 2025 20:54:04 +0000 (22:54 +0200)]
mark done item

11 months agocorrect and simplify compute_pstr_size
Mark Thom [Sat, 12 Apr 2025 07:22:29 +0000 (00:22 -0700)]
correct and simplify compute_pstr_size

11 months agocorrect create_partial_string (#2593)
Mark Thom [Sat, 12 Apr 2025 06:59:53 +0000 (23:59 -0700)]
correct create_partial_string (#2593)

11 months agorestore more tabu_list use to compare_term_tests (#2633)
Mark Thom [Fri, 11 Apr 2025 04:06:44 +0000 (21:06 -0700)]
restore more tabu_list use to compare_term_tests (#2633)

11 months agorestore tabu_list insertions to PStr-Lis comparisons (#2636)
Mark Thom [Fri, 11 Apr 2025 04:03:29 +0000 (21:03 -0700)]
restore tabu_list insertions to PStr-Lis comparisons (#2636)

11 months agodo not allow strings containing null characters to be inlined (#2848)
Mark Thom [Thu, 10 Apr 2025 06:03:28 +0000 (23:03 -0700)]
do not allow strings containing null characters to be inlined (#2848)

11 months agomove CodeIndex to F64Table-like table
Mark Thom [Sun, 6 Apr 2025 19:11:57 +0000 (12:11 -0700)]
move CodeIndex to F64Table-like table

11 months agoRevert "remove Term"
Mark Thom [Sat, 15 Mar 2025 20:19:26 +0000 (13:19 -0700)]
Revert "remove Term"

This reverts commit 3b5879841aedecba5057c70c71da0ba23e5cd84a.

11 months agomake write_with forward return values, use it to correct partial string handling
Mark Thom [Sat, 15 Mar 2025 09:10:56 +0000 (02:10 -0700)]
make write_with forward return values, use it to correct partial string handling

11 months agoread Str focus properly in build_meta_predicate_clause
Mark Thom [Sat, 15 Mar 2025 09:10:04 +0000 (02:10 -0700)]
read Str focus properly in build_meta_predicate_clause

11 months agosome fixes in response to miri
Mark Thom [Thu, 13 Mar 2025 19:33:37 +0000 (12:33 -0700)]
some fixes in response to miri

11 months agoFix parsing of \x0\ in partial strings
bakaq [Sun, 2 Mar 2025 21:51:57 +0000 (18:51 -0300)]
Fix parsing of \x0\ in partial strings

11 months agocopy partial string blocks properly in all solutions predicates
Mark Thom [Tue, 4 Mar 2025 08:17:20 +0000 (00:17 -0800)]
copy partial string blocks properly in all solutions predicates

11 months agorun cargo fmt
Mark Thom [Sat, 1 Mar 2025 21:58:50 +0000 (13:58 -0800)]
run cargo fmt

11 months agoremove pstr_vec
Mark Thom [Sat, 7 Dec 2024 05:47:36 +0000 (21:47 -0800)]
remove pstr_vec

11 months agoglobalize ALIGN_CELL/ALIGN, fix compute_pstr_size
Mark Thom [Tue, 25 Feb 2025 03:54:35 +0000 (19:54 -0800)]
globalize ALIGN_CELL/ALIGN, fix compute_pstr_size

11 months agoFix allocate_pstr randomly refusing to properly allocate memory
Emilie Burgun [Sun, 29 Dec 2024 22:54:03 +0000 (23:54 +0100)]
Fix allocate_pstr randomly refusing to properly allocate memory

This one was a toughie: it turns out that using `ptr::align_of()`` was
a bad idea, since the buffer in `Heap` itself is not aligned to
`Heap::heap_cell_alignment()`, so `ptr::align_of()` would sometimes
return lower values than expected.

That made for an heisenbug: if the alignment of the heap happened to be 4,
then the bug wouldn't trigger.

11 months agoFix Heap::drop not accounting for null-initialized HeapInner
Emilie Burgun [Sun, 29 Dec 2024 21:04:40 +0000 (22:04 +0100)]
Fix Heap::drop not accounting for null-initialized HeapInner

11 months agodereference clause_clause value, reserve more parser space (#2579)
Mark Thom [Fri, 15 Nov 2024 05:04:09 +0000 (22:04 -0700)]
dereference clause_clause value, reserve more parser space (#2579)

11 months agounmark_cell_bits! in push_literal (#2645)
Mark Thom [Fri, 1 Nov 2024 04:58:29 +0000 (22:58 -0600)]
unmark_cell_bits! in push_literal (#2645)

11 months agointroduce bespoke Heap type for in-heap partial strings
Mark Thom [Tue, 14 May 2024 00:00:56 +0000 (18:00 -0600)]
introduce bespoke Heap type for in-heap partial strings

11 months agovariable revision
Mark Thom [Wed, 31 Jul 2024 20:04:55 +0000 (14:04 -0600)]
variable revision