]> Repositorios git - scryer-prolog.git/log
scryer-prolog.git
2 years agoFix parsing of floats
Nicolas Luck [Thu, 24 Aug 2023 16:10:47 +0000 (18:10 +0200)]
Fix parsing of floats

2 years ago32-bit system support, addressing all (at most) 4GB addresses of RAM.
Rujia Liu [Thu, 24 Aug 2023 12:05:40 +0000 (20:05 +0800)]
32-bit system support, addressing all (at most) 4GB addresses of RAM.

2 years agoEnable multiple Machines per process by having ATOM_TABLE_BUF_BASE always be thread_l...
Nicolas Luck [Wed, 23 Aug 2023 12:36:07 +0000 (14:36 +0200)]
Enable multiple Machines per process by having ATOM_TABLE_BUF_BASE always be thread_local, not only in cfg(test) mode.

2 years agoMerge pull request #1973 from triska/clpz
Mark Thom [Tue, 22 Aug 2023 21:04:33 +0000 (15:04 -0600)]
Merge pull request #1973 from triska/clpz

CLP(ℤ) improvements, notably related to queue handling

2 years agoFix list result parsing
Nicolas Luck [Tue, 22 Aug 2023 20:46:00 +0000 (22:46 +0200)]
Fix list result parsing

2 years agoattach more propagators before starting propagation
Markus Triska [Mon, 21 Aug 2023 19:52:28 +0000 (21:52 +0200)]
attach more propagators before starting propagation

This prevents repeated triggering of already attached propagators
while new propagators are being attached to involved variables.

2 years agoremove optional (+)/1 prefix in get_atts/2 and put_atts/2 calls
Markus Triska [Sun, 20 Aug 2023 19:38:33 +0000 (21:38 +0200)]
remove optional (+)/1 prefix in get_atts/2 and put_atts/2 calls

The (+)/1 prefix in get_atts/2 at line 4219 by itself already causes a
greater than 15% slowdown for the benchmark shown in #1730:

    ?- N #= 2^14,
       time(((between(1, N, _),
              X #\= Y,
              false)
            ; true)).

The performance impact is not a good reason to remove the optional
(+)/1 prefix! Performance issues should be addressed at the root, in
this case get_atts/2 (#1962). We should never manually work around
performance issues in built-in predicates.

In contrast, readability is a good argument, and I find the calls
slightly easier to read without the optional (+)/1 prefix.

The prefix is now consistently omitted when possible.

2 years agouse pneq/2
Markus Triska [Tue, 15 Aug 2023 19:50:15 +0000 (21:50 +0200)]
use pneq/2

2 years agoenforce same queue in more constraints
Markus Triska [Tue, 15 Aug 2023 19:44:39 +0000 (21:44 +0200)]
enforce same queue in more constraints

2 years agoappend the entire queues instead of inserting each element individually
Markus Triska [Tue, 15 Aug 2023 19:43:19 +0000 (21:43 +0200)]
append the entire queues instead of inserting each element individually

2 years agoadapt query to Scryer Prolog
Markus Triska [Tue, 15 Aug 2023 19:39:32 +0000 (21:39 +0200)]
adapt query to Scryer Prolog

2 years agoupdate answers
Markus Triska [Tue, 15 Aug 2023 19:38:56 +0000 (21:38 +0200)]
update answers

2 years agouse can_be/2
Markus Triska [Tue, 15 Aug 2023 19:36:59 +0000 (21:36 +0200)]
use can_be/2

2 years agoMerge pull request #1967 from rujialiu/optional-features
Mark Thom [Mon, 21 Aug 2023 17:42:03 +0000 (11:42 -0600)]
Merge pull request #1967 from rujialiu/optional-features

Allow users to disable optional features

2 years agoAllow users to disable optional features. Needed for wasm32 support (see #615).
Rujia Liu [Mon, 21 Aug 2023 02:01:24 +0000 (10:01 +0800)]
Allow users to disable optional features. Needed for wasm32 support (see #615).

2 years agoMerge pull request #1968 from rujialiu/atom-64bit
Mark Thom [Sun, 20 Aug 2023 17:50:58 +0000 (11:50 -0600)]
Merge pull request #1968 from rujialiu/atom-64bit

Make Atom 64-bit regardless of architecture

2 years agoMerge pull request #1970 from triska/crrl
Mark Thom [Sun, 20 Aug 2023 17:24:37 +0000 (11:24 -0600)]
Merge pull request #1970 from triska/crrl

switch to using crrl for scalar multiplication on Curve25519

2 years agoENHANCED: more extensive type checking in curve25519_scalar_mult/3
Markus Triska [Sun, 20 Aug 2023 12:42:34 +0000 (14:42 +0200)]
ENHANCED: more extensive type checking in curve25519_scalar_mult/3

2 years agoswitch to using crrl for scalar multiplication on Curve25519
Markus Triska [Sun, 20 Aug 2023 11:40:30 +0000 (13:40 +0200)]
switch to using crrl for scalar multiplication on Curve25519

This is to facilitate WASM compilation as currently worked on
by @rujialiu in #615. Many thanks, and many thanks to @pornin
for crrl which makes this possible!

2 years agoMake Atom 64-bit regardless of architecture
Rujia Liu [Sun, 20 Aug 2023 11:43:13 +0000 (19:43 +0800)]
Make Atom 64-bit regardless of architecture

2 years agoMerge pull request #1964 from triska/master
Mark Thom [Thu, 17 Aug 2023 21:18:25 +0000 (15:18 -0600)]
Merge pull request #1964 from triska/master

use newly available double_quotes/1 write option in portray_clause_//1

2 years agouse newly available double_quotes/1 write option in portray_clause_//1
Markus Triska [Thu, 17 Aug 2023 21:05:21 +0000 (23:05 +0200)]
use newly available double_quotes/1 write option in portray_clause_//1

2 years agoMerge pull request #1963 from triska/master
Mark Thom [Mon, 14 Aug 2023 18:18:45 +0000 (12:18 -0600)]
Merge pull request #1963 from triska/master

ENHANCED: domain error in zcompare/3 (#1723)

2 years agoENHANCED: domain error in zcompare/3 (#1723)
Markus Triska [Mon, 14 Aug 2023 15:54:18 +0000 (17:54 +0200)]
ENHANCED: domain error in zcompare/3 (#1723)

2 years agoMerge pull request #1961 from triska/succ
Mark Thom [Sat, 12 Aug 2023 20:35:21 +0000 (14:35 -0600)]
Merge pull request #1961 from triska/succ

ADDED: succ/2, part of the Prologue for Prolog

2 years agoreorder tests, per https://github.com/mthom/scryer-prolog/pull/1961#pullrequestreview...
Markus Triska [Fri, 11 Aug 2023 21:41:54 +0000 (23:41 +0200)]
reorder tests, per https://github.com/mthom/scryer-prolog/pull/1961#pullrequestreview-1574380588

2 years agoADDED: succ/2, part of the Prologue for Prolog
Markus Triska [Fri, 11 Aug 2023 20:46:46 +0000 (22:46 +0200)]
ADDED: succ/2, part of the Prologue for Prolog

Specification:

   https://www.complang.tuwien.ac.at/ulrich/iso-prolog/prologue#succ

2 years agoFixed libffi dep
Fayeed Pawaskar [Tue, 8 Aug 2023 10:52:08 +0000 (16:22 +0530)]
Fixed libffi dep

2 years agoUpdated hyper to 1.0.0-rc.4
Fayeed Pawaskar [Tue, 8 Aug 2023 10:50:49 +0000 (16:20 +0530)]
Updated hyper to 1.0.0-rc.4

2 years agoIgnore stress test because it fails on windows
Nicolas Luck [Mon, 7 Aug 2023 16:41:08 +0000 (18:41 +0200)]
Ignore stress test because it fails on windows

2 years agoRemove unused toplevel predicate
Nicolas Luck [Mon, 7 Aug 2023 16:38:34 +0000 (18:38 +0200)]
Remove unused toplevel predicate

2 years agoUse new `double_quotes` write-option
Nicolas Luck [Mon, 7 Aug 2023 16:29:05 +0000 (18:29 +0200)]
Use new `double_quotes` write-option

2 years agoMerge branch 'master' into library-use-case
Nicolas Luck [Mon, 7 Aug 2023 14:42:48 +0000 (16:42 +0200)]
Merge branch 'master' into library-use-case

2 years agoshed CodeIndex for control predicates in disjuncts.rs (#1791)
Mark [Sun, 6 Aug 2023 07:26:01 +0000 (01:26 -0600)]
shed CodeIndex for control predicates in disjuncts.rs (#1791)

2 years agoretract discontiguous non-multifile predicates between consultations (#1202, #1058...
Mark [Sat, 5 Aug 2023 18:15:28 +0000 (12:15 -0600)]
retract discontiguous non-multifile predicates between consultations (#1202, #1058, #1585)

2 years agoMerge pull request #1950 from triska/chars_si
Mark Thom [Fri, 4 Aug 2023 21:25:42 +0000 (15:25 -0600)]
Merge pull request #1950 from triska/chars_si

ENHANCED: more efficient chars_si/1, using specialized predicates of Scryer

2 years agoENHANCED: more efficient chars_si/1, using specialized predicates of Scryer
Markus Triska [Fri, 4 Aug 2023 19:18:00 +0000 (21:18 +0200)]
ENHANCED: more efficient chars_si/1, using specialized predicates of Scryer

Source:

    https://github.com/mthom/scryer-prolog/issues/1947#issuecomment-1665113488

2 years agoMerge pull request #1948 from triska/chars_si
Mark Thom [Fri, 4 Aug 2023 00:34:19 +0000 (18:34 -0600)]
Merge pull request #1948 from triska/chars_si

add character_si/1 and use it to correct chars_si/1

2 years agoadd character_si/1 and use it to correct chars_si/1
Markus Triska [Thu, 3 Aug 2023 20:27:13 +0000 (22:27 +0200)]
add character_si/1 and use it to correct chars_si/1

This addresses #1947.

2 years agoMerge branch 'master' into library-use-case
Nicolas Luck [Thu, 3 Aug 2023 18:16:32 +0000 (20:16 +0200)]
Merge branch 'master' into library-use-case

# Conflicts:
# Cargo.lock
# Cargo.toml
# src/bin/scryer-prolog.rs
# src/loader.pl
# src/machine/mock_wam.rs
# src/machine/mod.rs
# src/machine/system_calls.rs

2 years agoIntegration stress test showing Machine blocking on query
Nicolas Luck [Thu, 3 Aug 2023 17:51:12 +0000 (19:51 +0200)]
Integration stress test showing Machine blocking on query

2 years agoRemove some unused code from lib_toplevel.pl
Nicolas Luck [Thu, 3 Aug 2023 15:41:20 +0000 (17:41 +0200)]
Remove some unused code from lib_toplevel.pl

2 years agodont spawn a runtime in machine; inherit from outside with runtime::handle::Current
Joshua Parkin [Thu, 3 Aug 2023 15:22:03 +0000 (16:22 +0100)]
dont spawn a runtime in machine; inherit from outside with runtime::handle::Current

2 years agoallocate negator results in arena (#1898)
Mark [Thu, 3 Aug 2023 01:50:27 +0000 (19:50 -0600)]
allocate negator results in arena (#1898)

2 years agoMerge pull request #1943 from triska/dead_skeleton
Mark Thom [Wed, 2 Aug 2023 22:32:27 +0000 (16:32 -0600)]
Merge pull request #1943 from triska/dead_skeleton

FIXED: do not attach constraint if the propagator is already entailed and killed

2 years agoFIXED: do not attach constraint if the propagator is already entailed and killed
Markus Triska [Wed, 2 Aug 2023 22:26:40 +0000 (00:26 +0200)]
FIXED: do not attach constraint if the propagator is already entailed and killed

Example:

    ?- A#=A//A#==>B,A-B=1-1.
       A = 1, B = 1.

This addresses #1941.

2 years agoDeactivate some debugging outputs
Nicolas Luck [Wed, 2 Aug 2023 14:25:53 +0000 (16:25 +0200)]
Deactivate some debugging outputs

2 years agoSwitch back to run_input_once and use duplicated write_eqs/2 without any input handling
Nicolas Luck [Wed, 2 Aug 2023 12:52:49 +0000 (14:52 +0200)]
Switch back to run_input_once and use duplicated write_eqs/2 without any input handling

2 years agoFix build
Nicolas Luck [Wed, 2 Aug 2023 12:51:41 +0000 (14:51 +0200)]
Fix build

2 years agoMerge pull request #1938 from triska/remove_auxiliary_constraints
Mark Thom [Mon, 31 Jul 2023 20:52:34 +0000 (14:52 -0600)]
Merge pull request #1938 from triska/remove_auxiliary_constraints

ENHANCED: forget auxiliary constraints set up by the propagator for multiplication

2 years agoMerge pull request #1939 from triska/oncology_trial_design
Mark Thom [Mon, 31 Jul 2023 20:52:21 +0000 (14:52 -0600)]
Merge pull request #1939 from triska/oncology_trial_design

better wording, applying the feedback of @dcnorris. Thank you a lot!

2 years agobetter wording, applying the feedback from @dcnorris. Thank you a lot!
Markus Triska [Mon, 31 Jul 2023 20:03:43 +0000 (22:03 +0200)]
better wording, applying the feedback from @dcnorris. Thank you a lot!

2 years agoENHANCED: forget auxiliary constraints set up by the propagator for multiplication
Markus Triska [Mon, 31 Jul 2023 19:57:25 +0000 (21:57 +0200)]
ENHANCED: forget auxiliary constraints set up by the propagator for multiplication

This addresses the issue raised in https://github.com/mthom/scryer-prolog/discussions/1937.

2 years agoMerge pull request #1929 from Skgland/master
Mark Thom [Sat, 29 Jul 2023 16:52:36 +0000 (10:52 -0600)]
Merge pull request #1929 from Skgland/master

detect and prevent concurrent AtomTable use

2 years agofix spelling
Bennet Bleßmann [Sat, 29 Jul 2023 11:11:00 +0000 (13:11 +0200)]
fix spelling

2 years agohandle atom table resize
Bennet Bleßmann [Sat, 29 Jul 2023 09:08:32 +0000 (11:08 +0200)]
handle atom table resize

* bumping serial_test dev-dependency due to broken should_panic handling in old version

2 years agodetect and prevent² concurrent AtomTable use
Bennet Bleßmann [Thu, 27 Jul 2023 21:35:57 +0000 (23:35 +0200)]
detect and prevent² concurrent AtomTable use

²in the case of `#[cfg(not(test))]` there is still a toctou race as I am not sufficently familiar with Atomics

2 years agoMerge pull request #1927 from triska/ascii_punctuation
Mark Thom [Thu, 27 Jul 2023 20:51:01 +0000 (14:51 -0600)]
Merge pull request #1927 from triska/ascii_punctuation

FIXED: correct handling of ascii_punctuation in char_type/2 (#1926)

2 years agoFIXED: correct handling of ascii_punctuation in char_type/2 (#1926)
Markus Triska [Thu, 27 Jul 2023 18:22:05 +0000 (20:22 +0200)]
FIXED: correct handling of ascii_punctuation in char_type/2 (#1926)

2 years agoTry triska's toplevel and add some debugging println!s.
Nicolas Luck [Thu, 27 Jul 2023 12:46:00 +0000 (14:46 +0200)]
Try triska's toplevel and add some debugging println!s.

2 years agoHashSet -> BTreeSet: Make parsing or results and thus tests deterministic. Add comments.
Nicolas Luck [Thu, 27 Jul 2023 10:06:03 +0000 (12:06 +0200)]
HashSet -> BTreeSet: Make parsing or results and thus tests deterministic. Add comments.

2 years agoAdd special case when parsing
Nicolas Luck [Thu, 27 Jul 2023 09:50:38 +0000 (11:50 +0200)]
Add special case when parsing

2 years agoAdd consult that works with streams / strings in library use-case
Nicolas Luck [Thu, 27 Jul 2023 09:41:52 +0000 (11:41 +0200)]
Add consult that works with streams / strings in library use-case

2 years agosimplify and correct prefix-bracket spacing in heap_print.rs (#1914, #1918)
Mark [Tue, 25 Jul 2023 21:03:35 +0000 (15:03 -0600)]
simplify and correct prefix-bracket spacing in heap_print.rs (#1914, #1918)

2 years agooverwrite code indices of dynamic_undefined predicates (dynamic, multifile, discontig...
Mark [Tue, 25 Jul 2023 19:48:34 +0000 (13:48 -0600)]
overwrite code indices of dynamic_undefined predicates (dynamic, multifile, discontiguous) on export

2 years agoMerge pull request #1907 from coasys/dashu
Mark Thom [Tue, 25 Jul 2023 17:35:10 +0000 (11:35 -0600)]
Merge pull request #1907 from coasys/dashu

Replace rug with dashu

2 years agotrack the parent operator of the current operator in heap_print to emit space if...
Mark [Tue, 25 Jul 2023 02:05:28 +0000 (20:05 -0600)]
track the parent operator of the current operator in heap_print to emit space if necessary (#1906)

2 years agoMerge branch 'dashu' of https://github.com/coasys/scryer-prolog into coasys-dashu coasys-dashu origin/coasys-dashu
Mark [Mon, 24 Jul 2023 17:47:57 +0000 (11:47 -0600)]
Merge branch 'dashu' of https://github.com/coasys/scryer-prolog into coasys-dashu

2 years agoupdated cargo to use git
Fayeed Pawaskar [Mon, 24 Jul 2023 13:41:41 +0000 (19:11 +0530)]
updated cargo to use git

2 years agoFixed warnings
Fayeed Pawaskar [Mon, 24 Jul 2023 07:11:56 +0000 (12:41 +0530)]
Fixed warnings

2 years agoFixed stackoverflow error
Fayeed Pawaskar [Mon, 24 Jul 2023 06:49:41 +0000 (12:19 +0530)]
Fixed stackoverflow error

2 years agoremove rug completely
Fayeed Pawaskar [Mon, 24 Jul 2023 04:42:22 +0000 (10:12 +0530)]
remove rug completely

2 years agofix all the move errors
Fayeed Pawaskar [Mon, 24 Jul 2023 04:42:14 +0000 (10:12 +0530)]
fix all the move errors

2 years agopop both pending redirections in format_bar_separator_op when max depth exceeded...
Mark [Sun, 23 Jul 2023 21:02:27 +0000 (15:02 -0600)]
pop both pending redirections in format_bar_separator_op when max depth exceeded (#1903)

2 years agofix list abbreviation (#1901)
Mark [Sun, 23 Jul 2023 20:43:13 +0000 (14:43 -0600)]
fix list abbreviation (#1901)

2 years agoremove EMIT_NEWLINE (#1900)
Mark [Sun, 23 Jul 2023 03:42:40 +0000 (21:42 -0600)]
remove EMIT_NEWLINE (#1900)

2 years agouse ExitCode when halting so Drop is called, close terminal stream in rustyline Drop
Mark [Sat, 22 Jul 2023 20:12:38 +0000 (14:12 -0600)]
use ExitCode when halting so Drop is called, close terminal stream in rustyline Drop

2 years agoMerge pull request #1050 from pmoura/add_float_integer_part_and_float_fractional_part...
Mark Thom [Sat, 22 Jul 2023 19:48:16 +0000 (13:48 -0600)]
Merge pull request #1050 from pmoura/add_float_integer_part_and_float_fractional_part_standard_functions

WIP: Add float_integer_part/1 and float_fractional_part/1 standard arithmetic functions

2 years agoadditional write fixes, use rustyline 12.0.0 (#1876, #1901)
Mark [Sat, 22 Jul 2023 17:53:09 +0000 (11:53 -0600)]
additional write fixes, use rustyline 12.0.0 (#1876, #1901)

2 years agocorrect max_depth option (#1876)
Mark [Fri, 21 Jul 2023 21:05:27 +0000 (15:05 -0600)]
correct max_depth option (#1876)

2 years agoMerge pull request #1899 from triska/master
Mark Thom [Sat, 22 Jul 2023 05:26:20 +0000 (23:26 -0600)]
Merge pull request #1899 from triska/master

remove another !/0 which is now no longer necessary due to improved indexing

2 years agoremove another !/0 which is now no longer necessary due to improved indexing
Markus Triska [Sat, 22 Jul 2023 04:52:29 +0000 (06:52 +0200)]
remove another !/0 which is now no longer necessary due to improved indexing

2 years agoDedupe machine results
Nicolas Luck [Fri, 21 Jul 2023 22:32:24 +0000 (00:32 +0200)]
Dedupe machine results

2 years agoAdd missing list_last_item to lib_toplevel.pl and increase MaxDepth of write_eq to...
Nicolas Luck [Fri, 21 Jul 2023 22:30:51 +0000 (00:30 +0200)]
Add missing list_last_item to lib_toplevel.pl and increase MaxDepth of write_eq to avoid truncation of results

2 years agoMerge branch 'add_float_integer_part_and_float_fractional_part_standard_functions... pmoura-add_float_integer_part_and_float_fractional_part_standard_functions origin/pmoura-add_float_integer_part_and_float_fractional_part_standard_functions
Mark [Fri, 21 Jul 2023 21:13:29 +0000 (15:13 -0600)]
Merge branch 'add_float_integer_part_and_float_fractional_part_standard_functions' of https://github.com/pmoura/scryer-prolog into pmoura-add_float_integer_part_and_float_fractional_part_standard_functions

2 years agocorrect max_depth option (#1876)
Mark [Fri, 21 Jul 2023 21:05:27 +0000 (15:05 -0600)]
correct max_depth option (#1876)

2 years agoremove now unnecessary cut in lists.pl
Mark [Fri, 21 Jul 2023 17:35:57 +0000 (11:35 -0600)]
remove now unnecessary cut in lists.pl

2 years agoExplicitly dereference pointer to avoid calling neg() on reference
Nicolas Luck [Fri, 21 Jul 2023 15:07:40 +0000 (17:07 +0200)]
Explicitly dereference pointer to avoid calling neg() on reference

2 years agoFix result parsing for complex string results
Nicolas Luck [Fri, 21 Jul 2023 12:35:44 +0000 (14:35 +0200)]
Fix result parsing for complex string results

2 years agoFixed missing functionality in dashu with their methods still has some issue with...
Fayeed Pawaskar [Fri, 21 Jul 2023 08:51:32 +0000 (14:21 +0530)]
Fixed missing functionality in dashu with their methods still has some issue with move

2 years agoAdd missing write_goal/3 to lib_toplevel.pl
Nicolas Luck [Thu, 20 Jul 2023 22:23:35 +0000 (00:23 +0200)]
Add missing write_goal/3 to lib_toplevel.pl

2 years agotype QueryResult = Result<QueryResolution, String>
Nicolas Luck [Thu, 20 Jul 2023 20:31:20 +0000 (22:31 +0200)]
type QueryResult = Result<QueryResolution, String>

2 years agoimprove goal expansion and (',') interpretation error handling
Mark [Thu, 20 Jul 2023 20:27:10 +0000 (14:27 -0600)]
improve goal expansion and (',') interpretation error handling

2 years agoError handling
Nicolas Luck [Thu, 20 Jul 2023 20:23:51 +0000 (22:23 +0200)]
Error handling

2 years agoDon't panic when parsing results fails
Nicolas Luck [Thu, 20 Jul 2023 19:34:43 +0000 (21:34 +0200)]
Don't panic when parsing results fails

2 years agoadd log10, hyperbolic tan and inverse hyperbolic tan functions (#1898)
Mark [Thu, 20 Jul 2023 18:33:23 +0000 (12:33 -0600)]
add log10, hyperbolic tan and inverse hyperbolic tan functions (#1898)

2 years agoadd EMIT_NEWLINE to add newlines to readline input only after query terms begin to...
Mark [Thu, 20 Jul 2023 15:39:06 +0000 (09:39 -0600)]
add EMIT_NEWLINE to add newlines to readline input only after query terms begin to be read (#1074, #1897)

2 years agocheck for unexpected EOF in get_to_eof (#1897)
Mark [Wed, 19 Jul 2023 23:13:47 +0000 (17:13 -0600)]
check for unexpected EOF in get_to_eof (#1897)

2 years agodereference TermWriteResult variables sooner in read_term_body (#1894)
Mark [Tue, 18 Jul 2023 21:39:51 +0000 (15:39 -0600)]
dereference TermWriteResult variables sooner in read_term_body (#1894)

2 years agoremove failing append choicepoint in atom_concat/3 special case (#1893)
Mark [Tue, 18 Jul 2023 20:44:02 +0000 (14:44 -0600)]
remove failing append choicepoint in atom_concat/3 special case (#1893)