]>
Repositorios git - scryer-prolog.git/log
Bennet Bleßmann [Sat, 6 Jul 2024 12:01:51 +0000 (14:01 +0200)]
fix stream.rs UB
Bennet Bleßmann [Sat, 6 Jul 2024 11:41:35 +0000 (13:41 +0200)]
somehow this was never marked as bad
Bennet Bleßmann [Sat, 6 Jul 2024 11:28:44 +0000 (13:28 +0200)]
clippy: change ToString impl to Display
- write directly to formatter, eliminating intermediate String allocations
- take Value by reference eliminating clones
- remove trim() called on the result of QueryResolution::to_string
- we only emit "true", "false", or "[<resolutions>]"
neither of which contains trailing or leading withespace,
so the calls was effectively a noop
Bennet Bleßmann [Sat, 6 Jul 2024 11:08:59 +0000 (13:08 +0200)]
clippy: use type associated constants
Bennet Bleßmann [Sat, 6 Jul 2024 11:07:26 +0000 (13:07 +0200)]
clippy: ptr dereference in safe function
Bennet Bleßmann [Sat, 6 Jul 2024 11:06:50 +0000 (13:06 +0200)]
clippy: identity conversion
Bennet Bleßmann [Sat, 6 Jul 2024 11:06:24 +0000 (13:06 +0200)]
fix saftey comment
Bennet Bleßmann [Sat, 6 Jul 2024 11:06:13 +0000 (13:06 +0200)]
clippy: explicit ptr addrs comparision
relevant for wide pointers i.e. pointers with metadata
Bennet Bleßmann [Sat, 6 Jul 2024 11:04:55 +0000 (13:04 +0200)]
clippy: allow new without default
Bennet Bleßmann [Sat, 6 Jul 2024 11:03:14 +0000 (13:03 +0200)]
clippy: use clone_from rather than clone
Bennet Bleßmann [Sat, 6 Jul 2024 11:01:19 +0000 (13:01 +0200)]
clippy: ignore unused fields on PrologBenchmark struct
Bennet Bleßmann [Sat, 6 Jul 2024 02:18:02 +0000 (04:18 +0200)]
run rustfmt
Bennet Bleßmann [Sat, 6 Jul 2024 02:01:41 +0000 (04:01 +0200)]
update ignore reason
Bennet Bleßmann [Sat, 6 Jul 2024 01:44:53 +0000 (03:44 +0200)]
adjust the generation of the LIBRARIES map
pre-genrate constants instaed of driectly genrating the literal for the insert
Bennet Bleßmann [Sat, 6 Jul 2024 01:42:13 +0000 (03:42 +0200)]
don't use env::current_dir() in miri
Bennet Bleßmann [Sat, 6 Jul 2024 01:41:12 +0000 (03:41 +0200)]
fix some more miri errors
probably relevant to mthom/scryer-prolog#2438
Bennet Bleßmann [Sat, 6 Jul 2024 00:25:58 +0000 (02:25 +0200)]
some test pass miri
Bennet Bleßmann [Sat, 6 Jul 2024 00:24:26 +0000 (02:24 +0200)]
remove rust_beta_channel feature
- the msrv (i.e. rust-version in Cargo.toml) is high enough that all gated code can now be used on stabe
Bennet Bleßmann [Fri, 5 Jul 2024 23:41:05 +0000 (01:41 +0200)]
unify pointer width
Bennet Bleßmann [Fri, 5 Jul 2024 23:38:13 +0000 (01:38 +0200)]
replace transmut with pointer cast calls
Bennet Bleßmann [Fri, 5 Jul 2024 23:21:03 +0000 (01:21 +0200)]
resolve miri error for pstr_iter_tests in atom_table
relevant to mthom/scryer-prolog#2438
Bennet Bleßmann [Fri, 5 Jul 2024 22:13:46 +0000 (00:13 +0200)]
adjust alignment calculation
- I think this used to overallocate when the alignment was already met
Bennet Bleßmann [Fri, 5 Jul 2024 21:45:02 +0000 (23:45 +0200)]
rework some unsafe parts
- removed some unsafe
- added some safety comments
- add explicit types to transmute calls
- reworked UntypedArenaPtr -> TypedArenaPtr conversion
might help with mthom/scryer-prolog#2438, I noticed fewer complains from miri after changing the default impl for `ArenaAllocated::alloc`
Bennet Bleßmann [Fri, 5 Jul 2024 19:29:38 +0000 (21:29 +0200)]
remove remains of num feature
commit
c41aba6b90d2b29f893394d34a80c774b4506d7a removed the num feature but a few cfgs remained
Mark Thom [Thu, 4 Jul 2024 22:30:00 +0000 (16:30 -0600)]
Merge pull request #2436 from triska/arxivlink
link to newly available paper about Grants4Companies
Markus Triska [Wed, 3 Jul 2024 20:31:53 +0000 (22:31 +0200)]
link to newly available paper about Grants4Companies
Mark Thom [Fri, 7 Jun 2024 04:33:46 +0000 (22:33 -0600)]
Merge pull request #2417 from aarroyoc/fix-2416
Manage Float and Double FFI types in structs
Adrián Arroyo Calle [Thu, 6 Jun 2024 20:18:17 +0000 (22:18 +0200)]
Manage Float and Double FFI types in structs
Mark Thom [Wed, 29 May 2024 18:28:25 +0000 (12:28 -0600)]
Merge pull request #2413 from Skgland/master
re-add CI job to test Cargo.toml rust-version
Bennet Bleßmann [Wed, 29 May 2024 17:50:27 +0000 (19:50 +0200)]
create swap file for wasm32 build
Bennet Bleßmann [Tue, 28 May 2024 17:59:32 +0000 (19:59 +0200)]
fix two clippy lints
Bennet Bleßmann [Tue, 28 May 2024 17:34:26 +0000 (19:34 +0200)]
re-add CI job to test Cargo.toml rust-version
was removed in #2393 instead of being updated, see
- https://github.com/mthom/scryer-prolog/pull/2393#discussion_r1585963855 and
- https://github.com/mthom/scryer-prolog/commit/
79bc2d9c68da2257a94eb22ef8717a304173e344 #commitcomment-
141790142
Mark Thom [Mon, 27 May 2024 18:07:27 +0000 (12:07 -0600)]
Merge pull request #2410 from aarroyoc/fix-warn-dead-code-elimination
Fix warnings of dead code
Adrián Arroyo Calle [Mon, 27 May 2024 17:52:02 +0000 (19:52 +0200)]
Fix warnings of dead code
Mark Thom [Mon, 13 May 2024 20:37:32 +0000 (14:37 -0600)]
more generally consider NEGATIVE_SIGN a non-op term (#2401)
Mark Thom [Mon, 29 Apr 2024 22:17:14 +0000 (16:17 -0600)]
Merge pull request #2393 from mthom/unsafe_improvements
Improve use of unsafe Rust in arena.rs (#2391)
Mark Thom [Mon, 29 Apr 2024 21:40:05 +0000 (15:40 -0600)]
remove 1.70 version CI job
Mark Thom [Mon, 29 Apr 2024 21:28:17 +0000 (15:28 -0600)]
delay instantiation errors on lists in phrase/3 until runtime (#1665, #2396)
Mark Thom [Mon, 29 Apr 2024 20:23:14 +0000 (14:23 -0600)]
detect External indices more generally in internalize_constant (#2395)
Mark Thom [Fri, 26 Apr 2024 02:05:22 +0000 (20:05 -0600)]
fix failing clippy checks, remove unnecessary code
Mark Thom [Thu, 25 Apr 2024 03:21:25 +0000 (21:21 -0600)]
fix wasm tests in unsafe_improvements branch
Mark Thom [Thu, 25 Apr 2024 02:33:42 +0000 (20:33 -0600)]
bump required rust version for use of newly introduced macros
Mark Thom [Thu, 25 Apr 2024 02:28:06 +0000 (20:28 -0600)]
improve use of unsafe Rust in arena.rs (#2391)
Mark Thom [Wed, 10 Apr 2024 21:47:49 +0000 (15:47 -0600)]
add nth_partial_strings_tests for bugs raised in #1827, #2381
Mark Thom [Wed, 10 Apr 2024 21:46:52 +0000 (15:46 -0600)]
use common test_framework module for several test suites
Mark Thom [Wed, 10 Apr 2024 21:46:11 +0000 (15:46 -0600)]
fix char_offset values in add_pstr_offset_chars (#2381)
Mark Thom [Wed, 10 Apr 2024 00:57:53 +0000 (18:57 -0600)]
fix skip_max_list crash on bigint max_steps (#2382)
Mark Thom [Wed, 10 Apr 2024 00:40:08 +0000 (18:40 -0600)]
add max_steps to PStr offset (#2381)
Mark Thom [Tue, 9 Apr 2024 21:58:17 +0000 (15:58 -0600)]
correct offsets around max_steps in skip_max_list (#2381)
Mark Thom [Mon, 8 Apr 2024 00:10:54 +0000 (18:10 -0600)]
Merge pull request #2379 from aarroyoc/scryer-prolog-meetup-2024
website: add Scryer Prolog Meetup 2024 banner
Adrián Arroyo Calle [Sun, 7 Apr 2024 17:44:13 +0000 (19:44 +0200)]
website: add Scryer Prolog Meetup 2024 banner
Mark Thom [Fri, 5 Apr 2024 18:27:15 +0000 (12:27 -0600)]
add Scryer Prolog Meetup 2024 to README
Mark Thom [Fri, 5 Apr 2024 17:19:50 +0000 (11:19 -0600)]
Merge pull request #2376 from mthom/dependabot/cargo/h2-0.3.26
Bump h2 from 0.3.24 to 0.3.26
dependabot[bot] [Fri, 5 Apr 2024 16:18:08 +0000 (16:18 +0000)]
Bump h2 from 0.3.24 to 0.3.26
Bumps [h2](https://github.com/hyperium/h2) from 0.3.24 to 0.3.26.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/v0.3.26/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.24...v0.3.26)
---
updated-dependencies:
- dependency-name: h2
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <[email protected] >
Mark Thom [Wed, 3 Apr 2024 21:29:29 +0000 (15:29 -0600)]
treat Utf8Error::valid_up_to as an offset form self.pos, which it is (#2374)
Mark Thom [Tue, 26 Mar 2024 21:21:37 +0000 (15:21 -0600)]
Merge pull request #2367 from triska/dcg_meta_predicates
ADDED: meta_predicate/1 declarations for (',')//2 and (;)//2
Mark [Mon, 25 Mar 2024 18:46:24 +0000 (12:46 -0600)]
correct offset retrieval in add_pstr_chars_and_step (#2370)
Markus Triska [Thu, 21 Mar 2024 21:14:23 +0000 (22:14 +0100)]
ADDED: meta_predicate/1 declarations for (',')//2 and (;)//2
This addresses #2366.
Mark Thom [Thu, 21 Mar 2024 00:52:08 +0000 (18:52 -0600)]
Merge pull request #2363 from triska/compile_format
ENHANCED: Partial evaluation of format_//2 and related constructs
Markus Triska [Wed, 20 Mar 2024 19:26:01 +0000 (20:26 +0100)]
ENHANCED: further partial evaluation for the common control sequence ~d
Markus Triska [Wed, 20 Mar 2024 18:48:33 +0000 (19:48 +0100)]
extend partial evaluation to computing lengths when statically possible
Markus Triska [Mon, 18 Mar 2024 20:43:30 +0000 (21:43 +0100)]
goal expansion for format/2 and format/3
In this way, we benefit from partial evaluation of format strings.
Markus Triska [Mon, 18 Mar 2024 20:35:12 +0000 (21:35 +0100)]
strengthen type check
Markus Triska [Mon, 18 Mar 2024 20:34:13 +0000 (21:34 +0100)]
ENHANCED: Partial evaluation of format_//2.
This moves analysis of the format string to compilation time when
possible, so that parsing it at run time is no longer necessary.
Mark [Tue, 19 Mar 2024 23:12:26 +0000 (17:12 -0600)]
expand_call_goals/3 should expand meta-predicate subgoals (#2361)
Mark Thom [Sun, 17 Mar 2024 01:56:49 +0000 (19:56 -0600)]
Merge pull request #2358 from triska/octet_documentation
Documentation improvements for encoding(octet) option in several predicates
Markus Triska [Sat, 16 Mar 2024 20:23:12 +0000 (21:23 +0100)]
indicate deprecated functionality
Markus Triska [Sat, 16 Mar 2024 19:30:46 +0000 (20:30 +0100)]
DOC: Un-document the ability to use bytes with encoding(octet).
This usage is now considered deprecated. Use strings instead for
greater efficiency and type consistency in your applications.
This functionality is a candidate for removal in a future commit.
Markus Triska [Sat, 16 Mar 2024 19:24:44 +0000 (20:24 +0100)]
DOC: Improve descriptions to make clear what encoding(octet) means.
In particular, octet does *not* mean that the input is a list of
Prolog bytes in the sense of "integers between 0..255", but that the
character codes are used directly as byte values.
Mark [Wed, 13 Mar 2024 00:36:53 +0000 (18:36 -0600)]
don't skip to end of pstr in CommaSeparatedCharList token variant (#2356)
Mark Thom [Tue, 12 Mar 2024 22:46:31 +0000 (16:46 -0600)]
Merge pull request #2357 from aarroyoc/update-website-0.9.4
Website: link release v0.9.4
Adrián Arroyo Calle [Tue, 12 Mar 2024 21:23:12 +0000 (22:23 +0100)]
Website: link release v0.9.4
Mark [Sat, 2 Mar 2024 01:56:52 +0000 (18:56 -0700)]
recompile original terms from compile_clause for term to term expansions (#2236)
Mark Thom [Fri, 1 Mar 2024 23:11:22 +0000 (16:11 -0700)]
Merge pull request #2354 from triska/side_channel
explain potential side-channel attacks due to compact string representation
Markus Triska [Sun, 25 Feb 2024 10:13:38 +0000 (11:13 +0100)]
explain potential side-channel attacks due to compact string representation
This legitimate concern was already raised by @infogulch in:
https://github.com/mthom/scryer-prolog/issues/1309#issuecomment-
1080028854
Thank you a lot!
Mark Thom [Fri, 1 Mar 2024 19:09:16 +0000 (12:09 -0700)]
Merge pull request #2353 from triska/hmac_verification
ENHANCED: Safe HMAC verification, using constant time string comparison.
Markus Triska [Sat, 24 Feb 2024 07:18:38 +0000 (08:18 +0100)]
ENHANCED: Safe HMAC verification, using constant time string comparison.
Without this provision, the expected HMAC can be gathered from timing
differences depending on the position where the strings first diverge,
and hence an attacker can forge an authenticated message by supplying
the gathered HMAC.
Test case, using exp(E) to succeed exactly 2^E times:
exp(E) :-
N is 2^E,
between(1, N, _).
yielding:
?- Options = [algorithm(sha512),hmac([1,2,3])],
Ds = "test",
crypto_data_hash(Ds, H, Options),
phrase((seq(As),seq(Bs)), H),
same_length(Bs, Cs),
maplist(=(a), Cs),
append(As, Cs, H1),
time((exp(10),crypto_data_hash(Ds, H1, Options),false)).
%@ % CPU time: 0.710s, 7_942_187 inferences
%@ % CPU time: 0.713s, 7_942_187 inferences
%@ % CPU time: 0.712s, 7_942_187 inferences
%@ % CPU time: 0.711s, 7_942_187 inferences
%@ % CPU time: 0.710s, 7_942_187 inferences
%@ % CPU time: 0.711s, 7_942_187 inferences
%@ % CPU time: 0.710s, 7_942_187 inferences
?- length(_, L), time((exp(10),crypto_data_hash("test", "3caebd1a0a2647930319a660b7d3642eb380fbd43202f9f6d08aabaa9ba50c39522a12ead10f0423f0af613cbc6fea74ad682ee11f563cc2e735722004fda2ba", [algorithm(sha512),hmac([0,L])]),false)).
%@ % CPU time: 0.733s, 7_878_699 inferences
%@ % CPU time: 0.734s, 7_878_699 inferences
%@ % CPU time: 0.732s, 7_878_699 inferences
%@ % CPU time: 0.733s, 7_878_699 inferences
%@ % CPU time: 0.733s, 7_878_699 inferences
%@ % CPU time: 0.733s, 7_878_699 inferences
%@ % CPU time: 0.733s, 7_878_699 inferences
%@ % CPU time: 0.733s, 7_878_699 inferences
%@ % CPU time: 0.733s, 7_878_699 inferences
%@ % CPU time: 0.733s, 7_878_699 inferences
%@ % CPU time: 0.733s, 7_878_699 inferences
%@ % CPU time: 0.515s, 5_525_404 inferences
%@ error('$interrupt_thrown',repl/0).
Mark Thom [Fri, 1 Mar 2024 00:09:47 +0000 (17:09 -0700)]
Merge pull request #2351 from infogulch/install-current-iai
Install version of iai-callgrind set in Cargo.toml
infogulch [Thu, 29 Feb 2024 23:20:01 +0000 (17:20 -0600)]
Install version of iai-callgrind set in Cargo.toml
Mark [Thu, 29 Feb 2024 23:15:28 +0000 (16:15 -0700)]
make indexer downcast Integers to Fixnums when possible, be slightly more judicious about allocating Integers instead of Fixnums (#2340)
Mark [Thu, 29 Feb 2024 22:12:58 +0000 (15:12 -0700)]
add #2341 test to lib_machine.rs
Mark [Thu, 29 Feb 2024 17:08:08 +0000 (10:08 -0700)]
use scryer-modular-bitfield on github, version bump
Mark [Thu, 29 Feb 2024 03:47:36 +0000 (20:47 -0700)]
fix misuse of TypeError trait while fixing #2345
Mark [Thu, 29 Feb 2024 03:35:38 +0000 (20:35 -0700)]
issue callable type error from dynamic_module_resolution if module is not an atom (#2345)
Mark Thom [Wed, 28 Feb 2024 21:34:54 +0000 (14:34 -0700)]
Merge pull request #2309 from coasys/library-use-case
Iron-out edge cases for library use-case, adding extensive real-world test assertions
Mark Thom [Sat, 24 Feb 2024 21:53:18 +0000 (14:53 -0700)]
Merge pull request #2342 from triska/curve_doc
DOC: Add DocLog comments for reasoning about elliptic curves.
Markus Triska [Sat, 24 Feb 2024 19:30:48 +0000 (20:30 +0100)]
DOC: Add DocLog comments for reasoning about elliptic curves.
Mark Thom [Thu, 22 Feb 2024 21:48:12 +0000 (14:48 -0700)]
Merge pull request #2338 from triska/hmac
ADDED: Hash-based message authentication code (HMAC), using hmac(Key).
Markus Triska [Thu, 22 Feb 2024 19:17:20 +0000 (20:17 +0100)]
ADDED: Hash-based message authentication code (HMAC), using hmac(Key).
Mark Thom [Sun, 18 Feb 2024 17:05:09 +0000 (10:05 -0700)]
Merge pull request #2337 from triska/master
link to newly available paper on analysis of dose-escalation protocols
Markus Triska [Sun, 18 Feb 2024 08:18:41 +0000 (09:18 +0100)]
link to newly available paper on analysis of dose-escalation protocols
Many thanks to @dcnorris for this great application and cooperation!
Bennet Bleßmann [Fri, 16 Feb 2024 23:15:03 +0000 (00:15 +0100)]
fix build of run_iai bench for wasm32
Bennet Bleßmann [Fri, 16 Feb 2024 23:01:10 +0000 (00:01 +0100)]
fix benchmarks being broken for every target except wam32
Bennet Bleßmann [Fri, 16 Feb 2024 22:43:22 +0000 (23:43 +0100)]
cfg out benches for wasm32
Bennet Bleßmann [Fri, 16 Feb 2024 22:18:21 +0000 (23:18 +0100)]
fix compilation of wasm32 test and skip to run wasm32 tests
Bennet Bleßmann [Fri, 16 Feb 2024 21:23:22 +0000 (22:23 +0100)]
undo `continue-on-error`
- currently `continue-on-error` is not shown in a usefull way on failiure see <https://github.com/orgs/community/discussions/15452>
Bennet Bleßmann [Fri, 16 Feb 2024 21:15:32 +0000 (22:15 +0100)]
bump ahash lock to 0.8.7
- fix nightly build
- not bumping to latest aka. 0.8.8 as that has a msrv of 1.72.0 and we are only at 1.70.0
Mark Thom [Mon, 12 Feb 2024 00:33:07 +0000 (17:33 -0700)]
Merge pull request #2327 from triska/char_type
FIXED: char_type/2 for unbound first argument.
Markus Triska [Sun, 11 Feb 2024 21:19:19 +0000 (22:19 +0100)]
FIXED: char_type/2 for unbound first argument.
Surrogate pairs form a gap in valid character codes, see:
https://github.com/mthom/scryer-prolog/issues/2326#issuecomment-
1937864665
Many thanks to @Skgland for the pointer, and to @librarianmage for the
question that spawned this!
This addresses #2326.
Nicolas Luck [Fri, 9 Feb 2024 12:48:45 +0000 (13:48 +0100)]
continue-on-error if target=wasm32 or rust=nightly