]> Repositorios git - scryer-prolog.git/log
scryer-prolog.git
12 months agoMerge pull request #2965 from rotu/zygomorphic-puma
Mark Thom [Wed, 28 May 2025 05:18:47 +0000 (22:18 -0700)]
Merge pull request #2965 from rotu/zygomorphic-puma

Remove obsolete compatibility for Rust<1.80

12 months agoRemove obsolete compatibility for Rust<1.80
Dan Rose [Thu, 22 May 2025 18:57:55 +0000 (13:57 -0500)]
Remove obsolete compatibility for Rust<1.80

12 months agoMerge pull request #2955 from rotu/radical-cockroach
Mark Thom [Tue, 20 May 2025 05:47:41 +0000 (22:47 -0700)]
Merge pull request #2955 from rotu/radical-cockroach

Remove xor as a builtin infix operator

12 months agoMerge pull request #2956 from bakaq/update_arcu_libffi
Mark Thom [Wed, 14 May 2025 04:26:29 +0000 (21:26 -0700)]
Merge pull request #2956 from bakaq/update_arcu_libffi

Update dependencies and fix breaking changes in libffi-sys and arcu

12 months agoxor is not a standard operator
Dan Rose [Tue, 13 May 2025 20:00:00 +0000 (15:00 -0500)]
xor is not a standard operator

12 months agoUpdate dependencies and fix breaking changes in libffi-sys and arcu
bakaq [Tue, 13 May 2025 22:53:13 +0000 (19:53 -0300)]
Update dependencies and fix breaking changes in libffi-sys and arcu

13 months agoMerge pull request #2950 from triska/meetups
Mark Thom [Fri, 9 May 2025 05:53:04 +0000 (22:53 -0700)]
Merge pull request #2950 from triska/meetups

link to Scryer Prolog Meetup 2025 page and its announcement

13 months agolink to Scryer Prolog Meetup 2025 page and its announcement
Markus Triska [Fri, 9 May 2025 05:38:13 +0000 (07:38 +0200)]
link to Scryer Prolog Meetup 2025 page and its announcement

13 months agoMerge pull request #2802 from adri326/null-stream-safety
Mark Thom [Fri, 2 May 2025 00:35:30 +0000 (17:35 -0700)]
Merge pull request #2802 from adri326/null-stream-safety

Fix UB when interacting with Stream::Null(_)

13 months agoMerge pull request #2930 from triska/meetups
Mark Thom [Thu, 1 May 2025 01:51:43 +0000 (18:51 -0700)]
Merge pull request #2930 from triska/meetups

ADDED: Section about Scryer Prolog Meetups.

13 months agocorrect grammar
Markus Triska [Wed, 30 Apr 2025 17:53:33 +0000 (19:53 +0200)]
correct grammar

13 months agoADDED: Section about Scryer Prolog Meetups.
Markus Triska [Wed, 30 Apr 2025 17:53:10 +0000 (19:53 +0200)]
ADDED: Section about Scryer Prolog Meetups.

13 months agoMerge branch 'null-stream-safety' of https://github.com/adri326/scryer-prolog into... adri326-null-stream-safety origin/adri326-null-stream-safety
Mark Thom [Wed, 30 Apr 2025 06:32:48 +0000 (23:32 -0700)]
Merge branch 'null-stream-safety' of https://github.com/adri326/scryer-prolog into adri326-null-stream-safety

13 months agoMerge pull request #2901 from matteob8/patch-1
Mark Thom [Wed, 30 Apr 2025 04:41:07 +0000 (21:41 -0700)]
Merge pull request #2901 from matteob8/patch-1

Update http_server.pl

13 months agouse loader:strip_subst_module/4 in second module check of retract/1 (#2891, #2893)
Mark Thom [Wed, 23 Apr 2025 06:28:19 +0000 (23:28 -0700)]
use loader:strip_subst_module/4 in second module check of retract/1 (#2891, #2893)

13 months agoMerge pull request #2905 from bakaq/bump-msrv
Mark Thom [Wed, 23 Apr 2025 05:28:02 +0000 (22:28 -0700)]
Merge pull request #2905 from bakaq/bump-msrv

Bump MSRV and update flake.lock

13 months agoRemove Ubuntu 20.04 runner
bakaq [Tue, 22 Apr 2025 20:32:36 +0000 (17:32 -0300)]
Remove Ubuntu 20.04 runner

13 months agoBump MSRV and update flake.lock
bakaq [Tue, 22 Apr 2025 20:10:29 +0000 (17:10 -0300)]
Bump MSRV and update flake.lock

13 months agoMerge pull request #2895 from hakujin/master
Mark Thom [Tue, 22 Apr 2025 05:11:43 +0000 (22:11 -0700)]
Merge pull request #2895 from hakujin/master

Update `libffi` and `libffi-sys` dependencies to fix aarch64 macOS build

13 months agoUpdate http_server.pl
matteob8 [Mon, 21 Apr 2025 18:54:43 +0000 (20:54 +0200)]
Update http_server.pl

changed top/0 to the more meaningful run/0 name.

13 months agoUpdate http_server.pl
matteob8 [Mon, 21 Apr 2025 17:13:20 +0000 (19:13 +0200)]
Update http_server.pl

Avoid overwriting of predicate and made explicit reference to the loading of library(http/http_server).

13 months agoUpdate `libffi` and `libffi-sys` dependencies to fix aarch64 macOS build
Colin King [Sat, 19 Apr 2025 02:40:29 +0000 (21:40 -0500)]
Update `libffi` and `libffi-sys` dependencies to fix aarch64 macOS build

Pulls in latest `libffi` and `libffi-sys` dependencies to fix a
compilation error on aarch64 macOS builds.

13 months agoMerge pull request #2873 from constraintAutomaton/doc/update-readme-wasm-example
Mark Thom [Sun, 13 Apr 2025 04:09:40 +0000 (21:09 -0700)]
Merge pull request #2873 from constraintAutomaton/doc/update-readme-wasm-example

update of the WebAssembly example in README

13 months agoMerge pull request #2879 from triska/ad4m
Mark Thom [Sun, 13 Apr 2025 04:09:20 +0000 (21:09 -0700)]
Merge pull request #2879 from triska/ad4m

enumerate applications, add AD4M by @coasys

14 months agoenumerate applications, add AD4M by @coasys
Markus Triska [Sat, 12 Apr 2025 07:05:28 +0000 (09:05 +0200)]
enumerate applications, add AD4M by @coasys

14 months agoExample update to use iterable.
constraintAutomaton [Sat, 12 Apr 2025 05:18:00 +0000 (07:18 +0200)]
Example update to use iterable.

14 months agoMerge branch 'master' into doc/update-readme-wasm-example
constraintAutomaton [Sat, 12 Apr 2025 05:00:14 +0000 (07:00 +0200)]
Merge branch 'master' into doc/update-readme-wasm-example

14 months agoMerge pull request #2875 from constraintAutomaton/feature/wasm-result-iterator
Mark Thom [Sat, 12 Apr 2025 03:52:45 +0000 (20:52 -0700)]
Merge pull request #2875 from constraintAutomaton/feature/wasm-result-iterator

Make `WasmQueryState` Iterable in JavaScript

14 months agomark cyclic lists with ellipses at the head (#2635)
Mark Thom [Fri, 11 Apr 2025 05:39:35 +0000 (22:39 -0700)]
mark cyclic lists with ellipses at the head (#2635)

14 months agoMade WasmQueryState an iterable.
constraintAutomaton [Thu, 10 Apr 2025 17:02:04 +0000 (19:02 +0200)]
Made WasmQueryState an iterable.

14 months agoMerge pull request #2874 from triska/read_from_chars_instantiated
Mark Thom [Thu, 10 Apr 2025 15:47:21 +0000 (08:47 -0700)]
Merge pull request #2874 from triska/read_from_chars_instantiated

generalize read_from_chars/2 and read_term_from_chars/3 to allow instantiated Term

14 months agogeneralize read_from_chars/2 and read_term_from_chars/3 to allow instantiated Term
Markus Triska [Wed, 9 Apr 2025 20:23:12 +0000 (22:23 +0200)]
generalize read_from_chars/2 and read_term_from_chars/3 to allow instantiated Term

This addresses part of #2871, raised by @haijinSk. Many thanks!

14 months agoFix DOM manipulation to avoid deprecated functions in Sudoku solver example.
constraintAutomaton [Tue, 8 Apr 2025 18:13:02 +0000 (20:13 +0200)]
Fix DOM manipulation to avoid deprecated functions in Sudoku solver example.

14 months agobetter identation of the knowledge base.
constraintAutomaton [Tue, 8 Apr 2025 17:29:34 +0000 (19:29 +0200)]
better identation of the knowledge base.

14 months agoUseless console.log in the example deleted.
constraintAutomaton [Tue, 8 Apr 2025 17:17:20 +0000 (19:17 +0200)]
Useless console.log in the example deleted.

14 months agoUpdate README with working WebAssembly usage example.
constraintAutomaton [Tue, 8 Apr 2025 17:12:27 +0000 (19:12 +0200)]
Update README with working WebAssembly usage example.

14 months agoMerge pull request #2869 from triska/format_w
Mark Thom [Sun, 6 Apr 2025 22:31:59 +0000 (15:31 -0700)]
Merge pull request #2869 from triska/format_w

ENHANCED: format specifier ~w more faithfully emulates write/1

14 months agomove ~w to least prominent position, point to more suitable specifiers
Markus Triska [Sat, 5 Apr 2025 08:01:22 +0000 (10:01 +0200)]
move ~w to least prominent position, point to more suitable specifiers

In particular, "~q" is a safe better choice.

14 months agoENHANCED: format specifier ~w more faithfully emulates write/1
Markus Triska [Sat, 5 Apr 2025 07:47:29 +0000 (09:47 +0200)]
ENHANCED: format specifier ~w more faithfully emulates write/1

In particular, variables now start with "_".

Example:

    ?- format("~w", [X]).
    %@ _A   true.

Found thanks to a discussion initiated by @haijinSk:

    https://github.com/mthom/scryer-prolog/discussions/2863

14 months agoMerge pull request #2861 from averms-forks/update-deps
Mark Thom [Tue, 1 Apr 2025 02:49:54 +0000 (19:49 -0700)]
Merge pull request #2861 from averms-forks/update-deps

Update and clean up dependencies.

14 months agoMerge pull request #2860 from averms-forks/push-spzqsznlnlnm
Mark Thom [Tue, 1 Apr 2025 02:49:46 +0000 (19:49 -0700)]
Merge pull request #2860 from averms-forks/push-spzqsznlnlnm

Use backticks when referencing predicate in docs.

14 months agoInstall correct locked version of iai-callgrind-runner in CI.
Aman Verma [Mon, 31 Mar 2025 09:03:31 +0000 (04:03 -0500)]
Install correct locked version of iai-callgrind-runner in CI.

14 months agoUpdate lexical.
Aman Verma [Fri, 28 Mar 2025 19:05:45 +0000 (14:05 -0500)]
Update lexical.

The previous versions of lexical and lexical-core we were using were
subject to the following security advisories:

- https://rustsec.org/advisories/RUSTSEC-2023-0086
- https://rustsec.org/advisories/RUSTSEC-2023-0055

14 months agoRemove unused deps: regex, assert_cmd, predicates-core.
Aman Verma [Fri, 28 Mar 2025 02:11:21 +0000 (21:11 -0500)]
Remove unused deps: regex, assert_cmd, predicates-core.

regex was introduced in commit 9e85be11fecd00b3d0be8b828eb0dd5cfb57e60a
but isn't used anymore.

assert_cmd and predicates-core were introduced in
e1c681fffead4d63caa0d0b902196224b651f465 for tests but aren't used
anymore.

Dependency count in Cargo.lock drops from 428 to 421.

14 months agoUpdate ordered-float to 5.0.0.
Aman Verma [Fri, 28 Mar 2025 02:02:14 +0000 (21:02 -0500)]
Update ordered-float to 5.0.0.

14 months agoUpdate scraper and ego-tree.
Aman Verma [Fri, 28 Mar 2025 01:35:01 +0000 (20:35 -0500)]
Update scraper and ego-tree.

This gets rid of 4 dependencies, as verified by the output of

    yj -tj < Cargo.lock | jq -c '.package | length'

Previously it was 432, now it is 428.

14 months agoBump dependencies except for arcu v0.1.1 and half 2.4.1.
Aman Verma [Fri, 28 Mar 2025 01:20:46 +0000 (20:20 -0500)]
Bump dependencies except for arcu v0.1.1 and half 2.4.1.

arcu is not updated for reasons laid out in issue #2749.
half is not updated because going to 2.5.0 would require an MSRV bump 1.81.

Previous versions of idna, openssl, and ring were subject to the
following security advisories:

- https://rustsec.org/advisories/RUSTSEC-2025-0009
- https://rustsec.org/advisories/RUSTSEC-2025-0004
- https://rustsec.org/advisories/RUSTSEC-2024-0421

14 months agoUse backticks when referencing predicate in docs.
Aman Verma [Thu, 27 Mar 2025 23:49:03 +0000 (18:49 -0500)]
Use backticks when referencing predicate in docs.

Trivial change but this prevents the HTML output from being erroneously italicized.

15 months agoMerge pull request #2847 from triska/call_with_error_context
Mark Thom [Sun, 9 Mar 2025 20:21:25 +0000 (13:21 -0700)]
Merge pull request #2847 from triska/call_with_error_context

ADDED: type pair

15 months agoADDED: type pair
Markus Triska [Sat, 8 Mar 2025 13:42:48 +0000 (14:42 +0100)]
ADDED: type pair

15 months agoMerge pull request #2846 from triska/call_with_error_context
Mark Thom [Sat, 8 Mar 2025 08:39:03 +0000 (00:39 -0800)]
Merge pull request #2846 from triska/call_with_error_context

ADDED: call_with_error_context/2

15 months agoADDED: call_with_error_context/2
Markus Triska [Sat, 8 Mar 2025 08:12:17 +0000 (09:12 +0100)]
ADDED: call_with_error_context/2

See https://github.com/mthom/scryer-prolog/discussions/2839 for more information.

15 months agoMerge pull request #2837 from notoria/next
Mark Thom [Sat, 1 Mar 2025 21:40:09 +0000 (13:40 -0800)]
Merge pull request #2837 from notoria/next

Fix conversion from float to rational

15 months agoMerge pull request #2836 from triska/format_floats
Mark Thom [Sat, 1 Mar 2025 09:45:55 +0000 (01:45 -0800)]
Merge pull request #2836 from triska/format_floats

Correct handling of floats in format/2 and portray_clause/1

15 months agoFIXED: portray_clause/1 for numbers
Markus Triska [Fri, 28 Feb 2025 07:22:54 +0000 (08:22 +0100)]
FIXED: portray_clause/1 for numbers

15 months agocorrect handling of floats with N digits (~f and ~Nf)
Markus Triska [Fri, 28 Feb 2025 07:14:34 +0000 (08:14 +0100)]
correct handling of floats with N digits (~f and ~Nf)

This addresses #2771. Many thanks to @tmerr for reporting the issue!

The code was posted by @UWN in:

    https://github.com/mthom/scryer-prolog/discussions/2805

Many thanks! With additional inputs by @adri326 and @notoria, who also
posted interesting approaches which could help to increase precision
in cases that are currently not ideally handled. Thank you all!

Please see the issue and discussion for more information.

15 months agoFix conversion from float to rational
notoria [Fri, 28 Feb 2025 07:00:00 +0000 (08:00 +0100)]
Fix conversion from float to rational

15 months agoMerge pull request #2835 from thierrymarianne/fix-http_open-hanging-on-top-of-main...
Mark Thom [Fri, 28 Feb 2025 05:38:58 +0000 (21:38 -0800)]
Merge pull request #2835 from thierrymarianne/fix-http_open-hanging-on-top-of-main-branch

Prevent http_open/3 from hanging

15 months agoMerge pull request #2792 from triska/must_be_chars
Mark Thom [Fri, 28 Feb 2025 05:26:40 +0000 (21:26 -0800)]
Merge pull request #2792 from triska/must_be_chars

FIXED: instantiation and type check for string arguments

15 months agoMerge pull request #2825 from bakaq/wasm_rework
Mark Thom [Fri, 28 Feb 2025 05:26:20 +0000 (21:26 -0800)]
Merge pull request #2825 from bakaq/wasm_rework

Wasm rework

15 months agoReplace futures::executor::block_on with tokio::block_in_place
revue_2_presse [Tue, 25 Feb 2025 19:19:14 +0000 (20:19 +0100)]
Replace futures::executor::block_on with tokio::block_in_place

15 months agoDocumentation
bakaq [Thu, 20 Feb 2025 03:48:51 +0000 (00:48 -0300)]
Documentation

15 months agoConsult modules
bakaq [Thu, 20 Feb 2025 03:33:11 +0000 (00:33 -0300)]
Consult modules

15 months agoSend pure objects instead of classes
bakaq [Thu, 20 Feb 2025 03:12:30 +0000 (00:12 -0300)]
Send pure objects instead of classes

15 months agoMachineBuilder constructor
bakaq [Thu, 20 Feb 2025 01:50:41 +0000 (22:50 -0300)]
MachineBuilder constructor

15 months agoRework Wasm interface
bakaq [Fri, 31 Jan 2025 12:24:39 +0000 (09:24 -0300)]
Rework Wasm interface

15 months agoMake Wasm compilable
bakaq [Fri, 31 Jan 2025 12:24:39 +0000 (09:24 -0300)]
Make Wasm compilable

15 months agoMerge pull request #2817 from adri326/fix-2815-run_module_predicate-backtrack
Mark Thom [Mon, 17 Feb 2025 06:47:49 +0000 (22:47 -0800)]
Merge pull request #2817 from adri326/fix-2815-run_module_predicate-backtrack

Fix backtracking on the topmost predicate triggering UB in run_module_predicate

15 months agoMerge pull request #2799 from bakaq/callback_streams
Mark Thom [Mon, 17 Feb 2025 06:47:34 +0000 (22:47 -0800)]
Merge pull request #2799 from bakaq/callback_streams

Callback streams for use as library

15 months agoAdd builder style configuration of user input, output and error
bakaq [Wed, 5 Feb 2025 15:07:28 +0000 (12:07 -0300)]
Add builder style configuration of user input, output and error

15 months agoMore stream tests
bakaq [Fri, 31 Jan 2025 16:14:45 +0000 (13:14 -0300)]
More stream tests

15 months agoDisallow null streams in output
bakaq [Fri, 31 Jan 2025 10:45:13 +0000 (07:45 -0300)]
Disallow null streams in output

15 months agoMake input and output stream configuration public
bakaq [Fri, 31 Jan 2025 10:23:39 +0000 (07:23 -0300)]
Make input and output stream configuration public

15 months agoConfigure streams separately
bakaq [Thu, 30 Jan 2025 12:20:28 +0000 (09:20 -0300)]
Configure streams separately

15 months agoRefactor UserInput to use channels
bakaq [Thu, 30 Jan 2025 09:14:38 +0000 (06:14 -0300)]
Refactor UserInput to use channels

15 months agoTest for callback streams
bakaq [Wed, 29 Jan 2025 20:09:48 +0000 (17:09 -0300)]
Test for callback streams

15 months agoAdd input stream channel
bakaq [Wed, 29 Jan 2025 14:35:04 +0000 (11:35 -0300)]
Add input stream channel

15 months agoAdd callback streams
bakaq [Tue, 28 Jan 2025 20:58:40 +0000 (17:58 -0300)]
Add callback streams

15 months agoMerge pull request #2791 from Skgland/patch-1
Mark Thom [Thu, 13 Feb 2025 07:25:21 +0000 (23:25 -0800)]
Merge pull request #2791 from Skgland/patch-1

Expand the build/install section of the readme

15 months agoMerge pull request #2804 from dnmfarrell/line-count-off-by-one
Mark Thom [Thu, 13 Feb 2025 07:23:44 +0000 (23:23 -0800)]
Merge pull request #2804 from dnmfarrell/line-count-off-by-one

Line numbers start at 1

15 months agoMerge pull request #2818 from adri326/stream-cleanup
Mark Thom [Thu, 13 Feb 2025 07:23:11 +0000 (23:23 -0800)]
Merge pull request #2818 from adri326/stream-cleanup

Fix various issues around close/1 and stream realiasing

15 months agoMerge pull request #2812 from bakaq/attr_vars_arity_fix
Mark Thom [Thu, 13 Feb 2025 07:19:34 +0000 (23:19 -0800)]
Merge pull request #2812 from bakaq/attr_vars_arity_fix

Fix bug in finding arity for verify attributes

16 months agoRemove redundant alias resolution in at_end_of_stream/1, add corresponding tests...
Emilie Burgun [Fri, 7 Feb 2025 13:59:32 +0000 (14:59 +0100)]
Remove redundant alias resolution in at_end_of_stream/1, add corresponding tests for null streams

Also fixed at_end_of_stream/0 leaving a choicepoint.

16 months ago[fixup] return that reading from a null stream wrote 0 bytes to the buffer
Emilie Burgun [Fri, 7 Feb 2025 13:35:27 +0000 (14:35 +0100)]
[fixup] return that reading from a null stream wrote 0 bytes to the buffer

16 months agoTest corner cases of stream aliasing
Emilie Burgun [Thu, 6 Feb 2025 22:47:22 +0000 (23:47 +0100)]
Test corner cases of stream aliasing

16 months agoFix set_output/1 and set_input/1 not updating the alias
Emilie Burgun [Thu, 6 Feb 2025 21:55:40 +0000 (22:55 +0100)]
Fix set_output/1 and set_input/1 not updating the alias

Before this change, the following set of queries would behave incorrectly:

```
?- open("/tmp/out.log", write, S), set_output(S).
   prints(""), write("/tmp/out.log", "S = stream(...)").
?- write(user_output, hello).
   prints("hello"), unexpected.
   prints(""), write("/tmp/out.log", "hello"). % Expected, but not found.
```

Now, `set_output/1` and `set_input/1` properly bind the `user_output` and
`user_input` aliases, making the queries above behave as expected.

16 months agoFix stream realiasing possibly shadowing other streams.
Emilie Burgun [Mon, 3 Feb 2025 13:58:04 +0000 (14:58 +0100)]
Fix stream realiasing possibly shadowing other streams.

16 months agoFix realiased streams causing close/1 to leave a dangling stream
Emilie Burgun [Mon, 3 Feb 2025 13:26:33 +0000 (14:26 +0100)]
Fix realiased streams causing close/1 to leave a dangling stream

16 months agoEncapsulate accesses to IndexStore::streams and ::stream_aliases
Emilie Burgun [Mon, 3 Feb 2025 13:00:37 +0000 (14:00 +0100)]
Encapsulate accesses to IndexStore::streams and ::stream_aliases

These two fields are able to hold `Stream` instances, which predicates like `close/1`
expect to be managed properly for their correctness. To ensure that this is the case,
I have removed direct accesses to those two fields, so that they can be properly managed
in one place.

16 months agoDocument run_module_predicate and handle critical failure in toplevel.pl
Emilie Burgun [Thu, 6 Feb 2025 12:26:16 +0000 (13:26 +0100)]
Document run_module_predicate and handle critical failure in toplevel.pl

16 months agoDisable test_run_module_predicate_throw under miri and support rustc < 1.83
Emilie Burgun [Thu, 6 Feb 2025 09:37:54 +0000 (10:37 +0100)]
Disable test_run_module_predicate_throw under miri and support rustc < 1.83

16 months agoFix backtracking on the topmost predicate triggering UB in run_module_predicate
Emilie Burgun [Wed, 5 Feb 2025 23:16:20 +0000 (00:16 +0100)]
Fix backtracking on the topmost predicate triggering UB in run_module_predicate

Fixes #2815, see that issue for my investigation.

This is a one-line fix that I'm quite proud of :)

If the topmost query for `run_module_predicate` needs to backtrack,
then before this commit, one of the following two things may happen:
- A dangling OrFrame is read at stack offset 0
- An AndFrame was at stack offset 0 would be read as an OrFrame

This can be seen by either calling `run_module_predicate` with a
throwing predicate (encountering the second scenario) or a failing
predicate (encountering the first scenario), or by running the following
in the REPL, which triggers a `throw/1` within the error handler, propagating
it all the way up (and encountering the second scenario):

```prolog
?- current_output(S), open(stream(S), write, S0, [type(binary)]).
```

Currently, `Stack` is not equipped with tools to detect this incorrect
behavior, so it would instead try to read an OrFrame at offset 0, which
triggers UB, since transmuting between AndFramePrelude and OrFramePrelude
isn't legal.

In practice, since `AndFramePrelude` is smaller, the later fields of
`OrFramePrelude` would read from the cells following the `AndFramePrelude`,
and would contain nonsensical data, triggering the panic that led to
my investigation in #2815 and that is fairly reliable to witness.

Surprisingly, this wouldn't happen with `run_query`, which led me to
look at how they operate differently. It turns out that `run_query`
inserts an OrFrame at offset 0, which covers both problematic scenarios.

The fix is thus to simply add a call to `Machine::allocate_stub_choice_point`
in `run_module_predicate` :)

16 months agoScan entire predicate in InstallVerifyAttr
bakaq [Wed, 5 Feb 2025 05:22:59 +0000 (02:22 -0300)]
Scan entire predicate in InstallVerifyAttr

16 months agoFix bug in finding arity for verify attributes
bakaq [Sat, 1 Feb 2025 18:53:15 +0000 (15:53 -0300)]
Fix bug in finding arity for verify attributes

16 months agoMake Stream::Null behave like /dev/null
Emilie Burgun [Sun, 2 Feb 2025 16:38:59 +0000 (17:38 +0100)]
Make Stream::Null behave like /dev/null

16 months agoFix UB caused by interactions with null streams
Emilie Burgun [Fri, 31 Jan 2025 16:26:40 +0000 (17:26 +0100)]
Fix UB caused by interactions with null streams

16 months agoFix close/1 messing up stream_aliases when user_input or user_output aren't set to...
Emilie Burgun [Sun, 2 Feb 2025 23:07:39 +0000 (00:07 +0100)]
Fix close/1 messing up stream_aliases when user_input or user_output aren't set to Stdin and Stdout

16 months agoLine numbers start at 1
David Farrell [Sat, 1 Feb 2025 19:02:34 +0000 (14:02 -0500)]
Line numbers start at 1

Bumps the line number for the singleton warning. When the singleton
occurs on the same line at the term starts, the line number is correct:

    foo(X).

However it stills mis-reports this line number as 1 instead of 5:

    foo(1) :-
        true,
        true,
        true,
        Y.

See issue #1356.

16 months agoAdd debug asserts to UntypedArenaPtr::build_with, ::get_tag and raw_ptr_as_cell!
Emilie Burgun [Fri, 31 Jan 2025 14:12:54 +0000 (15:12 +0100)]
Add debug asserts to UntypedArenaPtr::build_with, ::get_tag and raw_ptr_as_cell!

These two functions are pretty unsafe, but having these assertions makes
it easier to catch UB in testing.

16 months agoMerge pull request #2798 from bakaq/clippy_warnings
Mark Thom [Wed, 29 Jan 2025 06:24:17 +0000 (23:24 -0700)]
Merge pull request #2798 from bakaq/clippy_warnings

Fix clippy warnings