Commit Graph

4152 Commits

Author SHA1 Message Date
Mark Thom
4644ea2404 repair cyclic PStrLoc handling in heap_print.rs 2025-07-07 22:38:12 -07:00
Mark Thom
f3cd6326a3 remove compare_pstr_to_string and related result type 2025-07-07 22:38:12 -07:00
Markus Triska
bf31d3f9a9 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!
2025-07-07 22:38:12 -07:00
Mark Thom
4c46f0e54d correct GetPartialString (#2887) 2025-07-07 22:38:12 -07:00
Mark Thom
e563fd8e4f generalize compare_pstr_segments 2025-07-07 22:38:12 -07:00
Mark Thom
1297a24469 ensure '\0' atom is static & never inlined (#2880) 2025-07-07 22:38:12 -07:00
Mark Thom
907e64e185 fix root reading of complete strings (#2882) 2025-07-07 22:38:12 -07:00
Mark Thom
46f259bf7d some cosmetic tweaks 2025-07-07 22:38:12 -07:00
Markus Triska
634ccf22aa mark done item 2025-07-07 22:38:12 -07:00
Mark Thom
16b3bea48e correct and simplify compute_pstr_size 2025-07-07 22:38:12 -07:00
Mark Thom
e20363b462 correct create_partial_string (#2593) 2025-07-07 22:38:12 -07:00
Mark Thom
549a26dd03 restore more tabu_list use to compare_term_tests (#2633) 2025-07-07 22:38:12 -07:00
Mark Thom
8981ab72d1 restore tabu_list insertions to PStr-Lis comparisons (#2636) 2025-07-07 22:38:12 -07:00
Mark Thom
98dae9aecc do not allow strings containing null characters to be inlined (#2848) 2025-07-07 22:38:12 -07:00
Mark Thom
22080f3787 move CodeIndex to F64Table-like table 2025-07-07 22:38:12 -07:00
Mark Thom
9e1e99f961 Revert "remove Term"
This reverts commit 3b5879841aedecba5057c70c71da0ba23e5cd84a.
2025-07-07 22:38:10 -07:00
Mark Thom
eef7b06919 make write_with forward return values, use it to correct partial string handling 2025-07-07 22:02:27 -07:00
Mark Thom
2ad870c740 read Str focus properly in build_meta_predicate_clause 2025-07-07 22:02:27 -07:00
Mark Thom
3dee07f648 some fixes in response to miri 2025-07-07 22:02:27 -07:00
bakaq
9daf016d63 Fix parsing of \x0\ in partial strings 2025-07-07 22:02:27 -07:00
Mark Thom
fadcfb966e copy partial string blocks properly in all solutions predicates 2025-07-07 22:02:27 -07:00
Mark Thom
57f76169fd run cargo fmt 2025-07-07 22:02:27 -07:00
Mark Thom
ae4d12a123 remove pstr_vec 2025-07-07 22:02:27 -07:00
Mark Thom
3c85ef2724 globalize ALIGN_CELL/ALIGN, fix compute_pstr_size 2025-07-07 21:59:50 -07:00
Emilie Burgun
15f1320d05 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.
2025-07-07 21:59:50 -07:00
Emilie Burgun
7b357ba84d Fix Heap::drop not accounting for null-initialized HeapInner 2025-07-07 21:59:50 -07:00
Mark Thom
c0cd371056 dereference clause_clause value, reserve more parser space (#2579) 2025-07-07 21:59:50 -07:00
Mark Thom
79be0c0625 unmark_cell_bits! in push_literal (#2645) 2025-07-07 21:59:50 -07:00
Mark Thom
c0f72704ec introduce bespoke Heap type for in-heap partial strings 2025-07-07 21:59:50 -07:00
Mark Thom
f7bbdfe73a variable revision 2025-07-07 21:54:08 -07:00
Mark Thom
1ef681bd21 remove Term 2025-07-07 21:54:08 -07:00
Mark Thom
34ac85bb6d restore ubuntu testing to ci.yml with rust version 1.77 2025-07-07 21:40:36 -07:00
Mark Thom
a69303dc93 throw syntax error after parsing infinite floats (#2998) 2025-07-07 21:30:04 -07:00
Mark Thom
778068129f don't skip '.' char in parse_number_from_string (#2997) 2025-07-07 21:28:07 -07:00
Mark Thom
ce56b5ed6b modify number_token to produce partial lexing results (#2986) 2025-07-05 00:58:28 -07:00
Mark Thom
8e01eea440 be more careful about concatenating '.' in parse_number_from_string (#2986) 2025-07-01 18:40:49 -07:00
Mark Thom
1cf5de8f5c Merge pull request #2970 from notoria/clpz
Make `(mod)/2` stronger in CLP(Z)
2025-06-16 21:02:38 -07:00
Mark Thom
686f20db74 Merge pull request #2980 from triska/hophrase
use nonterminal indicators, correct meta_predicate/1 for higher-order phrase//N
2025-06-16 21:02:20 -07:00
Markus Triska
17377064cf use nonterminal indicators, correct meta_predicate/1 for higher-order phrase//N
Noted by @UWN in https://github.com/mthom/scryer-prolog/discussions/2872.

Many thanks!
2025-06-14 22:47:29 +02:00
Mark Thom
f49a0ae79b Merge pull request #2965 from rotu/zygomorphic-puma
Remove obsolete compatibility for Rust<1.80
2025-05-27 22:18:47 -07:00
notoria
4b480a7eab Strengthened (mod)/2 in CLP(Z)
?- 8 #= -1 mod #Y.
   clpz:(Y in 9..sup), clpz:(-1 mod#Y#=8). % unexpected
Expected: Y = 9
?- 8 #= -12 mod #Y.
   clpz:(Y in 9..sup), clpz:(-12 mod#Y#=8). % unexpected
Expected `Y` with finite domain
2025-05-25 13:39:31 +02:00
notoria
4a6f86591c Strengthened (mod)/2 in CLP(Z)
?- 0 #= 2 mod #Y.
   clpz:(Y in inf.. -1\/1..sup), clpz:(2 mod#Y#=0). % unexpected
Expected: clpz:(Y in-2.. -1\/1..2), clpz:(2 mod Y#=0)
2025-05-25 13:38:56 +02:00
notoria
37ac5bb3c1 Strengthened (mod)/2 in CLP(Z)
?- Z = 8, X = 9, #Z #= #X mod #Y.
   Z = 8, X = 9, clpz:(Y in 9..sup), clpz:(9 mod#Y#=8). % unexpected
Expected: false
2025-05-25 13:37:28 +02:00
Dan Rose
9456517bed Remove obsolete compatibility for Rust<1.80 2025-05-22 14:00:42 -05:00
Mark Thom
8f514ce419 Merge pull request #2955 from rotu/radical-cockroach
Remove xor as a builtin infix operator
2025-05-19 22:47:41 -07:00
Mark Thom
c790bbfce9 Merge pull request #2956 from bakaq/update_arcu_libffi
Update dependencies and fix breaking changes in libffi-sys and arcu
2025-05-13 21:26:29 -07:00
Dan Rose
b767e4de25 xor is not a standard operator 2025-05-13 20:32:59 -05:00
bakaq
ca173873af Update dependencies and fix breaking changes in libffi-sys and arcu 2025-05-13 19:53:13 -03:00
Mark Thom
036c59e5fa Merge pull request #2950 from triska/meetups
link to Scryer Prolog Meetup 2025 page and its announcement
2025-05-08 22:53:04 -07:00
Markus Triska
7809edca19 link to Scryer Prolog Meetup 2025 page and its announcement 2025-05-09 07:42:48 +02:00