]> Repositorios git - scryer-prolog.git/log
scryer-prolog.git
2 years agocontinue-on-error if target=wasm32 or rust=nightly
Nicolas Luck [Fri, 9 Feb 2024 12:48:45 +0000 (13:48 +0100)]
continue-on-error if target=wasm32 or rust=nightly

2 years agoReactivate nightly test job with continue-on-error set
Nicolas Luck [Fri, 9 Feb 2024 12:44:37 +0000 (13:44 +0100)]
Reactivate nightly test job with continue-on-error set

2 years agoUse stable Rust for style/report and deactivate nightly x86_64 target in CI
Nicolas Luck [Fri, 9 Feb 2024 12:14:06 +0000 (13:14 +0100)]
Use stable Rust for style/report and deactivate nightly x86_64 target in CI

2 years agoMerge branch 'master' into library-use-case
Nicolas Luck [Fri, 9 Feb 2024 11:41:01 +0000 (12:41 +0100)]
Merge branch 'master' into library-use-case

2 years agoUpdate src/machine/parsed_results.rs
Mark Thom [Fri, 9 Feb 2024 00:38:01 +0000 (17:38 -0700)]
Update src/machine/parsed_results.rs

Co-authored-by: Bennet Bleßmann <[email protected]>
2 years agofix tests broken by singleton
Mark [Thu, 8 Feb 2024 04:46:32 +0000 (21:46 -0700)]
fix tests broken by singleton

2 years agoMerge pull request #2322 from triska/char_code
Mark Thom [Thu, 8 Feb 2024 01:49:13 +0000 (18:49 -0700)]
Merge pull request #2322 from triska/char_code

ENHANCED: Bi-directional char_code/2, addressing #2321.

2 years agoENHANCED: Bidirectional char_type/2, addressing #2321.
Markus Triska [Wed, 7 Feb 2024 19:05:07 +0000 (20:05 +0100)]
ENHANCED: Bidirectional char_type/2, addressing #2321.

Suggested by @librarianmage, many thanks!

2 years agoMerge pull request #2319 from triska/clpz_t
Mark Thom [Wed, 7 Feb 2024 01:11:40 +0000 (18:11 -0700)]
Merge pull request #2319 from triska/clpz_t

ADDED: clpz_t/2, generalizing support for use with library(reif)

2 years agoADDED: clpz_t/2, generalizing support for use with library(reif)
Markus Triska [Tue, 6 Feb 2024 18:05:29 +0000 (19:05 +0100)]
ADDED: clpz_t/2, generalizing support for use with library(reif)

This was suggested and contributed by @librarianmage in:

    https://github.com/mthom/scryer-prolog/issues/2225#issuecomment-1890801923

Many thanks!

If anyone can find a better predicate name, please let us know any time!

2 years agofmt
Mark [Thu, 1 Feb 2024 16:31:04 +0000 (09:31 -0700)]
fmt

2 years agoMerge pull request #2317 from aarroyoc/all-modules-test
Mark Thom [Sun, 4 Feb 2024 22:09:13 +0000 (15:09 -0700)]
Merge pull request #2317 from aarroyoc/all-modules-test

Add all_mdoules test and fix library(csv)

2 years agoAdd all_mdoules test and fix library(csv)
Adrián Arroyo Calle [Sun, 4 Feb 2024 20:04:02 +0000 (21:04 +0100)]
Add all_mdoules test and fix library(csv)

2 years agofix reverted tests, ensure files are loaded before goals (#2315)
Mark [Sat, 3 Feb 2024 18:49:26 +0000 (11:49 -0700)]
fix reverted tests, ensure files are loaded before goals (#2315)

2 years agofix broken tests
Mark [Sat, 3 Feb 2024 00:04:47 +0000 (17:04 -0700)]
fix broken tests

2 years agotreat consultation of command line modules as regular goals (#2314)
Mark [Fri, 2 Feb 2024 22:35:00 +0000 (15:35 -0700)]
treat consultation of command line modules as regular goals (#2314)

2 years agofmt
Mark [Fri, 2 Feb 2024 18:49:02 +0000 (11:49 -0700)]
fmt

2 years agoload .scryerrc before files and goals (#1775, #2313)
Mark [Fri, 2 Feb 2024 17:54:28 +0000 (10:54 -0700)]
load .scryerrc before files and goals (#1775, #2313)

2 years agorecord stub choice point as block
Mark [Thu, 1 Feb 2024 16:26:58 +0000 (09:26 -0700)]
record stub choice point as block

2 years agoTest show problem with nonexistent predicate
Nicolas Luck [Thu, 1 Feb 2024 13:14:50 +0000 (14:14 +0100)]
Test show problem with nonexistent predicate

2 years agofmt
Nicolas Luck [Thu, 1 Feb 2024 12:53:21 +0000 (13:53 +0100)]
fmt

2 years agoclippy
Nicolas Luck [Thu, 1 Feb 2024 12:51:37 +0000 (13:51 +0100)]
clippy

2 years agoFix all orderings in integration assertions
Nicolas Luck [Thu, 1 Feb 2024 12:43:51 +0000 (13:43 +0100)]
Fix all orderings in integration assertions

2 years agoRemove test with long program literals, not needed
Nicolas Luck [Thu, 1 Feb 2024 12:00:49 +0000 (13:00 +0100)]
Remove test with long program literals, not needed

2 years agoMore ordering adjustments
Nicolas Luck [Thu, 1 Feb 2024 11:59:10 +0000 (12:59 +0100)]
More ordering adjustments

2 years agofix style errors
Mark [Thu, 1 Feb 2024 00:32:32 +0000 (17:32 -0700)]
fix style errors

2 years agoindex stub choice point correctly
Mark [Thu, 1 Feb 2024 00:30:13 +0000 (17:30 -0700)]
index stub choice point correctly

2 years agoExtract failing assertion as single test case
Nicolas Luck [Wed, 31 Jan 2024 14:03:28 +0000 (15:03 +0100)]
Extract failing assertion as single test case

2 years agoAdjust some first result orderings in integration assertions
Nicolas Luck [Tue, 30 Jan 2024 11:54:12 +0000 (12:54 +0100)]
Adjust some first result orderings in integration assertions

2 years agocheck for True or False Query Resolution unconditionally
Mark [Mon, 29 Jan 2024 22:06:56 +0000 (15:06 -0700)]
check for True or False Query Resolution unconditionally

2 years agofmt
Nicolas Luck [Mon, 29 Jan 2024 17:44:20 +0000 (18:44 +0100)]
fmt

2 years agoAdd more test cases to differentiate usage of discontiguous
Nicolas Luck [Mon, 29 Jan 2024 15:49:03 +0000 (16:49 +0100)]
Add more test cases to differentiate usage of discontiguous

2 years agoMinimal reproduction of faulty behaviour seen in integration tests
Nicolas Luck [Mon, 29 Jan 2024 14:26:06 +0000 (15:26 +0100)]
Minimal reproduction of faulty behaviour seen in integration tests

2 years agoMerge branch 'master' into library-use-case
Nicolas Luck [Fri, 26 Jan 2024 16:21:47 +0000 (17:21 +0100)]
Merge branch 'master' into library-use-case

2 years agoAdd expected results to integration test
Nicolas Luck [Fri, 26 Jan 2024 16:18:57 +0000 (17:18 +0100)]
Add expected results to integration test

Results are logs of what we get with old toplevel-based version of lib_machine. These are also congruent with what our tests logged out based on SWI.

2 years agoscan registers of instructions leading to verify_attributes interrupt to find the...
Mark [Fri, 26 Jan 2024 06:59:54 +0000 (23:59 -0700)]
scan registers of instructions leading to verify_attributes interrupt to find the number of registers to save (#2307)

2 years agoadd non chunk traversing cut family instructions to is_head_instr (#2307)
Mark [Fri, 26 Jan 2024 06:25:06 +0000 (23:25 -0700)]
add non chunk traversing cut family instructions to is_head_instr (#2307)

2 years agoMerge pull request #2308 from triska/small_format_improvements
Mark Thom [Thu, 25 Jan 2024 21:17:18 +0000 (14:17 -0700)]
Merge pull request #2308 from triska/small_format_improvements

Small format improvements

2 years agoupdate answers using latest toplevel output
Markus Triska [Thu, 25 Jan 2024 20:33:27 +0000 (21:33 +0100)]
update answers using latest toplevel output

2 years agorely on recently improved argument indexing for determinism
Markus Triska [Thu, 25 Jan 2024 20:31:08 +0000 (21:31 +0100)]
rely on recently improved argument indexing for determinism

This is possible as of 4fd37335f576240c25dfbfe6e70441aff166c60e.

2 years agomove call_residue_vars/2 from atts.pl to iso_ext.pl
Mark [Thu, 25 Jan 2024 19:37:46 +0000 (12:37 -0700)]
move call_residue_vars/2 from atts.pl to iso_ext.pl

2 years agodon't mark temp variables as safe through argument_to_value (#2307)
Mark [Thu, 25 Jan 2024 19:34:21 +0000 (12:34 -0700)]
don't mark temp variables as safe through argument_to_value (#2307)

2 years agoMerge pull request #2306 from triska/dcg_representation
Mark Thom [Tue, 23 Jan 2024 22:22:17 +0000 (15:22 -0700)]
Merge pull request #2306 from triska/dcg_representation

No longer use (->)//2 in library(clpb)

2 years agoMerge pull request #2305 from mthom/dependabot/cargo/h2-0.3.24
Mark Thom [Tue, 23 Jan 2024 20:50:17 +0000 (13:50 -0700)]
Merge pull request #2305 from mthom/dependabot/cargo/h2-0.3.24

Bump h2 from 0.3.22 to 0.3.24

2 years agoimprove error context
Markus Triska [Tue, 23 Jan 2024 20:43:34 +0000 (21:43 +0100)]
improve error context

Source: https://github.com/mthom/scryer-prolog/issues/2304#issuecomment-1906434756

2 years agono longer use (->)//2, since it is implementation defined
Markus Triska [Tue, 23 Jan 2024 20:40:50 +0000 (21:40 +0100)]
no longer use (->)//2, since it is implementation defined

This addresses #2304.

2 years agoBump h2 from 0.3.22 to 0.3.24
dependabot[bot] [Tue, 23 Jan 2024 18:20:39 +0000 (18:20 +0000)]
Bump h2 from 0.3.22 to 0.3.24

Bumps [h2](https://github.com/hyperium/h2) from 0.3.22 to 0.3.24.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/v0.3.24/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.22...v0.3.24)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2 years agoMerge pull request #2303 from mthom/dependabot/cargo/shlex-1.3.0
Mark Thom [Tue, 23 Jan 2024 18:19:53 +0000 (11:19 -0700)]
Merge pull request #2303 from mthom/dependabot/cargo/shlex-1.3.0

Bump shlex from 1.2.0 to 1.3.0

2 years agoBump shlex from 1.2.0 to 1.3.0
dependabot[bot] [Mon, 22 Jan 2024 21:53:43 +0000 (21:53 +0000)]
Bump shlex from 1.2.0 to 1.3.0

Bumps [shlex](https://github.com/comex/rust-shlex) from 1.2.0 to 1.3.0.
- [Changelog](https://github.com/comex/rust-shlex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/comex/rust-shlex/commits)

---
updated-dependencies:
- dependency-name: shlex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
2 years agoMerge pull request #2302 from triska/dcg_representation
Mark Thom [Mon, 22 Jan 2024 07:26:23 +0000 (00:26 -0700)]
Merge pull request #2302 from triska/dcg_representation

Throw representation errors for unsupported DCG grammar control constructs

2 years agouse newly available false//0
Markus Triska [Sun, 21 Jan 2024 21:53:22 +0000 (22:53 +0100)]
use newly available false//0

2 years agono longer use (->)//2, since it is implementation dependent
Markus Triska [Sun, 21 Jan 2024 21:50:36 +0000 (22:50 +0100)]
no longer use (->)//2, since it is implementation dependent

2 years agoremove checks that are now no longer needed due to representation errors
Markus Triska [Sat, 20 Jan 2024 10:02:54 +0000 (11:02 +0100)]
remove checks that are now no longer needed due to representation errors

2 years agoENHANCED: Throw representation errors for DCG bodies that use unsupported constructs.
Markus Triska [Sat, 20 Jan 2024 09:33:24 +0000 (10:33 +0100)]
ENHANCED: Throw representation errors for DCG bodies that use unsupported constructs.

This addresses #2285.

2 years agoMODIFIED: (->)/2 in DCGs is now only supported in the context of if-then-else.
Markus Triska [Sat, 20 Jan 2024 09:24:57 +0000 (10:24 +0100)]
MODIFIED: (->)/2 in DCGs is now only supported in the context of if-then-else.

That is, ( If -> Then ; Else ) is still supported, but ( If -> Then ) not.

2 years agoMerge pull request #2301 from aarroyoc/docs-copy-term-3
Mark Thom [Fri, 19 Jan 2024 17:18:59 +0000 (10:18 -0700)]
Merge pull request #2301 from aarroyoc/docs-copy-term-3

Move copy_term/3 to library(iso_ext)

2 years agoMerge pull request #2300 from aarroyoc/fix-2298
Mark Thom [Fri, 19 Jan 2024 17:15:35 +0000 (10:15 -0700)]
Merge pull request #2300 from aarroyoc/fix-2298

Throw error in call_residue_vars/2

2 years agoMove copy_term/3 to library(iso_ext)
Adrián Arroyo Calle [Fri, 19 Jan 2024 16:33:45 +0000 (17:33 +0100)]
Move copy_term/3 to library(iso_ext)

2 years agoThrow error in call_residue_vars/2
Adrián Arroyo Calle [Fri, 19 Jan 2024 15:58:26 +0000 (16:58 +0100)]
Throw error in call_residue_vars/2

2 years agoadd better no op detection in char_reader.rs (#2297)
Mark [Wed, 17 Jan 2024 04:50:53 +0000 (21:50 -0700)]
add better no op detection in char_reader.rs (#2297)

2 years agoadd #2293 tests, advance continuable HeapPStrIters away from unpacked compounds ...
Mark [Sun, 14 Jan 2024 22:07:33 +0000 (15:07 -0700)]
add #2293 tests, advance continuable HeapPStrIters away from unpacked compounds (#2293)

2 years agofix additional tests, make better use of existing code (#2293)
Mark [Sat, 13 Jan 2024 19:01:20 +0000 (12:01 -0700)]
fix additional tests, make better use of existing code (#2293)

2 years agofix additional tests (#2293)
Mark [Sat, 13 Jan 2024 05:01:01 +0000 (22:01 -0700)]
fix additional tests (#2293)

2 years agoadd missing CStr branch to unify_partial_string (#2293)
Mark [Fri, 12 Jan 2024 20:58:46 +0000 (13:58 -0700)]
add missing CStr branch to unify_partial_string (#2293)

2 years agoMerge pull request #2276 from triska/hophrase
Mark Thom [Thu, 11 Jan 2024 18:56:10 +0000 (11:56 -0700)]
Merge pull request #2276 from triska/hophrase

ADDED: Support for higher-order non-terminals phrase//[2,3]

2 years agoMerge pull request #2281 from bakaq/miri
Mark Thom [Wed, 10 Jan 2024 19:13:14 +0000 (12:13 -0700)]
Merge pull request #2281 from bakaq/miri

Initial Miri support

2 years agoMake "cargo miri test" actually run
bakaq [Tue, 9 Jan 2024 05:37:38 +0000 (02:37 -0300)]
Make "cargo miri test" actually run

2 years agofix cargo fmt --check
Mark [Tue, 9 Jan 2024 01:12:19 +0000 (18:12 -0700)]
fix cargo fmt --check

2 years agoMerge pull request #2280 from notoria/clpz
Mark Thom [Tue, 9 Jan 2024 00:39:18 +0000 (17:39 -0700)]
Merge pull request #2280 from notoria/clpz

Special case for `(^)/2`

2 years agocheck for PStr in eager stackful preorder iterator before adding tail of PStrOffset...
Mark [Tue, 9 Jan 2024 00:36:41 +0000 (17:36 -0700)]
check for PStr in eager stackful preorder iterator before adding tail of PStrOffset (#2272)

2 years agoSpecial case for `(^)/2`
notoria [Mon, 8 Jan 2024 20:50:02 +0000 (21:50 +0100)]
Special case for `(^)/2`

The only solutions for `Z #= X^Z` are `X = Z, X in -1\/1`. Also helps
avoid big numbers.

2 years agoMerge pull request #2278 from notoria/clpz
Mark Thom [Mon, 8 Jan 2024 01:59:38 +0000 (18:59 -0700)]
Merge pull request #2278 from notoria/clpz

Small fixes for `CLP(ℤ)`

2 years agoMerge pull request #2277 from triska/master
Mark Thom [Mon, 8 Jan 2024 01:59:18 +0000 (18:59 -0700)]
Merge pull request #2277 from triska/master

Correct arithmetic disequalities accidentally broken in f5d9a67f3688ec9bb08dd3add05614552e082555

2 years agoFix bound computation in `(^)/2`
notoria [Sun, 7 Jan 2024 19:19:40 +0000 (20:19 +0100)]
Fix bound computation in `(^)/2`

?- A in 0..1, B in-1..0, A^2 #= B.
   false. % unexpected.
?- A^2 #= B, A in 0..1, B in-1..0.
   A = 0, B = 0.

2 years agoRemove `min/2` and `max/2` when possible
notoria [Sun, 7 Jan 2024 19:15:28 +0000 (20:15 +0100)]
Remove `min/2` and `max/2` when possible

?- A #= min(A,B).
   clpz:(B#>=A), clpz:(A#=min(A,B)). % unexpected.
?- A #= min(A,0).
   clpz:(A in inf..0), clpz:(A#=min(A,0)). % unexpected.

2 years agoFix `min/2` and `max/2`
notoria [Sun, 7 Jan 2024 19:14:32 +0000 (20:14 +0100)]
Fix `min/2` and `max/2`

?- X in 0..1, Y in 2..4, Z #= max(X,Y).
   clpz:(X in 0..1), clpz:(Z#=max(X,Y)), clpz:(Z in 2..4), clpz:(Z#>=Y), clpz:(Y in 2..4). % unexpected.
?- X in 0..1, Y in 2..4, Z #= max(Y,X).
   Y = Z, clpz:(X in 0..1), clpz:(Y in 2..4).

2 years agoCorrect arithmetic inequalities accidentally broken in f5d9a67f3688ec9bb08dd3add05614...
Markus Triska [Sun, 7 Jan 2024 08:31:33 +0000 (09:31 +0100)]
Correct arithmetic inequalities accidentally broken in f5d9a67f3688ec9bb08dd3add05614552e082555.

Example:

    ?- X #>= Y.
    %@    clpz:(X#>=Y).

2 years agoMerge pull request #2264 from Skgland/fix-os-argv-1
Mark Thom [Sat, 6 Jan 2024 22:52:53 +0000 (15:52 -0700)]
Merge pull request #2264 from Skgland/fix-os-argv-1

Fix os:argv/1 in case the raw args contain multiple `--`

2 years agoADDED: Support for higher-order non-terminals phrase//[2,3]
Markus Triska [Sat, 6 Jan 2024 08:21:22 +0000 (09:21 +0100)]
ADDED: Support for higher-order non-terminals phrase//[2,3]

These non-terminals take a grammar rule body and additional arguments
as arguments. These arguments are appended to the first argument.

A key motivation for the introduction of these non-terminals is found
in the discussion and sample code provided by @bakaq in:

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

In this way, portable higher-order DCG programming is possible while
keeping the logical grammar rule expansion implementation dependent.

Example:

    ?- phrase(phrase('.', a, []), Cs).
       Cs = "a".

2 years agoMerge pull request #2275 from triska/master
Mark Thom [Fri, 5 Jan 2024 19:33:05 +0000 (12:33 -0700)]
Merge pull request #2275 from triska/master

Prevent assertion of clauses for (-->)/2 when DCGs are enabled.

2 years agoPrevent assertion of clauses for (-->)/2 when DCGs are enabled.
Markus Triska [Fri, 5 Jan 2024 17:50:08 +0000 (18:50 +0100)]
Prevent assertion of clauses for (-->)/2 when DCGs are enabled.

This addresses #1508.

2 years agofix cargo --fmt check error
Mark [Thu, 4 Jan 2024 20:56:57 +0000 (13:56 -0700)]
fix cargo --fmt check error

2 years agoadd missing permission error in compile_assert (#2271)
Mark [Thu, 4 Jan 2024 20:53:46 +0000 (13:53 -0700)]
add missing permission error in compile_assert (#2271)

2 years agofix acceptance of invalid syntax, update iso_conformity_tests.pl (#2270)
Mark [Thu, 4 Jan 2024 20:14:50 +0000 (13:14 -0700)]
fix acceptance of invalid syntax, update iso_conformity_tests.pl (#2270)

2 years agosimplify os:argv/1 fix
Skgland [Thu, 4 Jan 2024 18:26:10 +0000 (19:26 +0100)]
simplify os:argv/1 fix

2 years agouse once to limit solutions instead of cut
Skgland [Thu, 4 Jan 2024 17:14:32 +0000 (18:14 +0100)]
use once to limit solutions instead of cut

2 years agoadd another test case for os:argv/1
Skgland [Thu, 4 Jan 2024 17:12:38 +0000 (18:12 +0100)]
add another test case for os:argv/1

2 years agoMerge pull request #2269 from aarroyoc/fix-2267
Mark Thom [Wed, 3 Jan 2024 22:40:48 +0000 (15:40 -0700)]
Merge pull request #2269 from aarroyoc/fix-2267

Use reqwest async and use futures::executor

2 years agoMerge pull request #2268 from aarroyoc/docs-toplevel
Mark Thom [Wed, 3 Jan 2024 21:52:34 +0000 (14:52 -0700)]
Merge pull request #2268 from aarroyoc/docs-toplevel

Small fixes in documentation and toplevel.pl

2 years agoUse reqwest async and use futures::executor
Adrián Arroyo Calle [Wed, 3 Jan 2024 21:43:22 +0000 (22:43 +0100)]
Use reqwest async and use futures::executor

2 years agoSmall fixes in documentation and toplevel.pl
Adrián Arroyo Calle [Wed, 3 Jan 2024 18:52:50 +0000 (19:52 +0100)]
Small fixes in documentation and toplevel.pl

2 years agofix `os:argv(V)` not completing
Skgland [Tue, 2 Jan 2024 20:43:38 +0000 (21:43 +0100)]
fix `os:argv(V)` not completing

2 years agofix os:argv
Skgland [Tue, 2 Jan 2024 19:54:37 +0000 (20:54 +0100)]
fix os:argv

2 years agocover both args ending in `--` and args not ending in `--` for `os:argv/1` test
Skgland [Tue, 2 Jan 2024 19:48:38 +0000 (20:48 +0100)]
cover both args ending in `--` and args not ending in `--` for `os:argv/1` test

2 years agoremove unnecessary `true`
Skgland [Tue, 2 Jan 2024 19:27:14 +0000 (20:27 +0100)]
remove unnecessary `true`

2 years agocover trailing `--` and `os:argv([])` in os_argv test
Skgland [Tue, 2 Jan 2024 19:23:53 +0000 (20:23 +0100)]
cover trailing `--` and `os:argv([])` in os_argv test

2 years agofix os:argv/1
Skgland [Tue, 2 Jan 2024 18:55:27 +0000 (19:55 +0100)]
fix os:argv/1

2 years agoadd failing test for os:argv issue
Skgland [Tue, 2 Jan 2024 18:51:09 +0000 (19:51 +0100)]
add failing test for os:argv issue

See https://github.com/mthom/scryer-prolog/pull/2263#issuecomment-1874400820

2 years agoexpand module names in transitive goals (#2255)
Mark [Tue, 2 Jan 2024 18:34:38 +0000 (11:34 -0700)]
expand module names in transitive goals (#2255)

2 years agofix cargo fmt --check
Mark [Tue, 2 Jan 2024 17:08:00 +0000 (10:08 -0700)]
fix cargo fmt --check