Markus Triska
a8da2b6a99
ISO: remove nonstandard operator meta_predicate.
...
Use functional notation instead for declarations.
This addresses #2822 .
2025-08-02 10:22:50 +02:00
Markus Triska
073ec4c1d0
FIXED: invoke correct predicate
...
Noted by Oleg Finkelstein. Many thanks!
2025-07-07 22:38:12 -07:00
Markus Triska
e9bb41f0d6
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 .
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
3dee07f648
some fixes in response to miri
2025-07-07 22:02:27 -07:00
Mark Thom
ae4d12a123
remove pstr_vec
2025-07-07 22:02:27 -07:00
Mark Thom
c0f72704ec
introduce bespoke Heap type for in-heap partial strings
2025-07-07 21:59:50 -07:00
Mark Thom
1ef681bd21
remove Term
2025-07-07 21:54:08 -07:00
Mark Thom
90f4716cc3
Merge branch 'null-stream-safety' of https://github.com/adri326/scryer-prolog into adri326-null-stream-safety
2025-04-29 23:32:48 -07:00
Mark Thom
f496abbbef
use loader:strip_subst_module/4 in second module check of retract/1 ( #2891 , #2893 )
2025-04-22 23:28:19 -07:00
Emilie Burgun
f45b0bcfe8
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.
2025-02-07 15:05:01 +01:00
Emilie Burgun
b76bdd75e4
Fix #2725 by calling load_context/1 in the unspecified branch of strip_module/3
...
This fixes #2725 , by making it so that `strip_module(Pred, M, P), call(M:P)`
doesn't throw an `instanciation_error` when `Pred` isn't in the form `module:predicate`.
Now, `strip_module(hello, M, P)` will call `load_context(M)`, which unifies `M`
with the topmost module (or `user`).
Two new test cases are added: issue2725.pl, which tests the minimal case id(X) --> X.
and the strip_module(P, M, _), call(M:P) scenario, and module_resolution,
which tests the behavior of strip_module in a few scenarios.
2025-01-12 14:08:28 +01:00
Mark Thom
555dff5bad
leave variable modules uninstantiated ( #2685 )
2024-12-19 20:20:29 -08:00
Mark Thom
ce6a0a1541
Merge pull request #2698 from jasonhemann/patch-5
...
Documentation for read/2
2024-12-13 20:02:50 -07:00
Mark Thom
b919a39b96
Merge pull request #2703 from jasonhemann/patch-6
...
s/avaibale/available/
2024-12-13 20:02:21 -07:00
Jason Hemann
a15b2789e2
s/avaibale/available/
...
Quick typo fix to docs.
2024-12-13 13:41:05 -05:00
Jason Hemann
2ff50f06bc
Update builtins.pl
...
s/compund/compound/
2024-12-11 08:05:03 -05:00
Jason Hemann
e219e1c483
Update builtins.pl
...
Simplifying docstring.
2024-12-11 05:46:28 -05:00
Jason Hemann
eef9f74a68
Documentation for read/2
...
Mirrored the wording in the docstrings for `read/1` and `read_term/3`.
2024-12-10 21:18:09 -05:00
Jason Hemann
eae1f53846
"bound to an atom"
...
Quick typo.
2024-12-10 21:07:48 -05:00
Jason Hemann
d7bf7445f1
s/red/read/ typo in documentation.
...
Small quick fix.
2024-12-05 01:19:51 -05:00
Mark
46e432c4d9
restore [o|i]ip zeroing to trust and fix '$get_clause_p'/3 ( #2238 )
2023-12-20 20:45:15 -07:00
Mark
e5ea95db8d
Revert "improve performance of lower_bound_of_target_clause ( #1598 )"
...
This reverts commit 8938331915 .
2023-12-15 00:42:58 -07:00
Mark
8938331915
improve performance of lower_bound_of_target_clause ( #1598 )
2023-12-15 00:39:36 -07:00
Mark
b8ef367824
bind missing module atom in retract/1 ( #2182 )
2023-11-25 20:59:04 -07:00
Mark
2811660fa7
remove assert(a,z)/2 ( #1975 )
2023-11-22 09:24:07 -07:00
Mark
1163d14ea1
fix control construct bugs, iter indentation ( #947 )
2023-10-11 12:41:45 -06:00
Mark
4a8aa0acbd
throw instantiation_error from error/2 if Error_term uninstantiated ( #2060 )
2023-09-30 22:35:46 -06:00
Mark
40d3345cd5
revert throwing domain errors for unexpected forms of read-options ( #2015 )
2023-09-27 18:58:45 -06:00
Mark
39934208c3
throw instantiation_error when appropriate from parse_write_options_ (5.5.12 of the standard, #1965 )
2023-09-26 12:08:51 -06:00
Mark
de440a8c92
get rid of OssifiedOpDir, DBRef, simplify current_op/3
2023-09-11 15:36:15 -06:00
Mark
5585e83fd6
correct inference counting over index backtracking, built-ins ( #1977 , #1987 )
2023-09-04 17:15:16 -06:00
Markus Triska
aca0de06cd
FIXED: make occurs_check and answer_write_options flags discoverable
...
Quoting from 7.11 Flags:
NOTE - A built-in predicate current_prolog_flag(Flag, Value)
(8.17.2) enables a program to discover all the flags supported
by a processor and their current values.
2023-09-04 00:56:09 +02:00
Markus Triska
c934e06171
ADDED: New Prolog flag, answer_write_options.
...
This lets us specify additional write options used by the top level
for writing answers.
2023-09-03 10:49:07 +02:00
Mark
e529e7ba21
improve goal expansion and (',') interpretation error handling
2023-07-20 14:27:10 -06:00
Mark
14646074be
remove failing append choicepoint in atom_concat/3 special case ( #1893 )
2023-07-18 14:44:02 -06:00
Mark Thom
1ba040c24d
Merge pull request #1885 from mthom/setof_bagof_fixes
...
Fix group_by_variants/4 and keysort in setof/3
2023-07-18 12:35:10 -06:00
Mark
42a50474da
remove read/{1,2} as a builtin, write read options upon EOF, throw better domain errors in parse_read_term_options/2
2023-07-17 16:45:03 -06:00
Mark
ff5e9a793b
add unknown flag to set_prolog_flag and current_prolog_flag
2023-07-14 19:10:10 -06:00
Mark
101d0548db
fix group_by_variants/4 and keysort in setof/3 ( #1440 , #1856 )
2023-07-14 18:52:29 -06:00
Mark
5ffdd2d91a
shrink scope of control_entry_point catch, add CutPoint tag to printer
2023-07-05 14:50:49 -06:00
Mark
9cdad087ef
add double_quotes write option for printing to strings, enable it at toplevel
2023-07-03 12:09:05 -06:00
Mark
58af615dd4
correct and generalize current_predicate/1
2023-06-28 17:31:43 -06:00
Mark
b593fffc7d
support module resolution in current_predicate/1 ( #1817 )
2023-06-27 11:08:29 -06:00
Mark
0e583d620a
implement new disjunction compilation
2023-06-23 14:11:31 -06:00
Mark
c5a3ec3ba8
fix current_predicate/1 ( #1761 )
2023-04-24 23:23:27 -06:00
Adrián Arroyo Calle
4c44859132
Fixes #1756
2023-03-12 16:47:20 +01:00
Adrián Arroyo Calle
e8408ca93f
Minor fixes to docs
2023-02-02 21:35:35 +01:00
Mark Thom
1118b37c92
Merge pull request #1674 from aarroyoc/docs-builtins
...
Compatible Doclog docs for builtins
2023-01-26 05:10:20 +01:00
Adrián Arroyo Calle
d755bb7e12
Apply feedback on builtins
2023-01-25 21:04:10 +01:00