]> Repositorios git - scryer-prolog.git/log
scryer-prolog.git
22 months agocheck whether (re-)allocation succeeded
Bennet Bleßmann [Sun, 11 Aug 2024 17:19:00 +0000 (19:19 +0200)]
check whether (re-)allocation succeeded

fixes mthom/scryer-prolog#2449

22 months agoadd detail to comment
Bennet Bleßmann [Sun, 11 Aug 2024 17:18:35 +0000 (19:18 +0200)]
add detail to comment

22 months agoMerge pull request #2463 from Skgland/split-up-inconsitent-entry-error
Mark Thom [Mon, 5 Aug 2024 20:25:33 +0000 (14:25 -0600)]
Merge pull request #2463 from Skgland/split-up-inconsitent-entry-error

Split up inconsistent entry error

22 months agoswitch invalid term from type to domain error
Bennet Bleßmann [Sun, 4 Aug 2024 13:16:37 +0000 (15:16 +0200)]
switch invalid term from type to domain error

22 months agofix remaining use of declaration instead of directive
Bennet Bleßmann [Sun, 4 Aug 2024 10:24:44 +0000 (12:24 +0200)]
fix remaining use of declaration instead of directive

22 months agoremove obsolete ExistenceError::Declaration
Bennet Bleßmann [Sun, 4 Aug 2024 10:23:31 +0000 (12:23 +0200)]
remove obsolete ExistenceError::Declaration

22 months agochange declaration to directive
Bennet Bleßmann [Sun, 4 Aug 2024 10:10:15 +0000 (12:10 +0200)]
change declaration to directive

22 months agoajust/add devlaration errors to be more standard compliant
Bennet Bleßmann [Sat, 3 Aug 2024 20:59:29 +0000 (22:59 +0200)]
ajust/add devlaration errors to be more standard compliant

22 months agoimpl PartialEq<str> and PartialEq<&str> for Atom
Bennet Bleßmann [Sat, 3 Aug 2024 20:41:02 +0000 (22:41 +0200)]
impl PartialEq<str> and PartialEq<&str> for Atom

22 months agoadjust errors to be more standard compliant
Bennet Bleßmann [Sat, 3 Aug 2024 20:07:48 +0000 (22:07 +0200)]
adjust errors to be more standard compliant

22 months agofix compilation for 1.77
Bennet Bleßmann [Sat, 3 Aug 2024 18:04:16 +0000 (20:04 +0200)]
fix compilation for 1.77

22 months agosplit up CompilationError::InconsistentEntry
Bennet Bleßmann [Wed, 31 Jul 2024 21:49:42 +0000 (23:49 +0200)]
split up CompilationError::InconsistentEntry

22 months agoadd test for declaration errors
Bennet Bleßmann [Sat, 3 Aug 2024 16:34:34 +0000 (18:34 +0200)]
add test for declaration errors

22 months agouse an enum for OpDesc spec
Bennet Bleßmann [Wed, 31 Jul 2024 21:48:27 +0000 (23:48 +0200)]
use an enum for OpDesc spec

22 months agoMerge pull request #2466 from Skgland/upgrade-deps
Mark Thom [Mon, 5 Aug 2024 18:59:42 +0000 (12:59 -0600)]
Merge pull request #2466 from Skgland/upgrade-deps

Upgrade dependencies

22 months agoreplace derive_deref with derive_more
Bennet Bleßmann [Sun, 4 Aug 2024 00:40:26 +0000 (02:40 +0200)]
replace derive_deref with derive_more

- the latter already used in our transitive dependencies
- derive_more appears better maintained

22 months agoreplace select by scrape
Bennet Bleßmann [Sun, 4 Aug 2024 00:35:36 +0000 (02:35 +0200)]
replace select by scrape

- the latter appears better maintained and more up to date
- removes some dupplicate/outdated transitive deps

22 months agoresolve problems from deps upgrade
Bennet Bleßmann [Sat, 3 Aug 2024 23:39:31 +0000 (01:39 +0200)]
resolve problems from deps upgrade

- downgrade reqwest to 0.11.27
  - fixes problems with missmatched transitive dependencies between it and warp, mainly http
- replace deprecated ripemd160 with ripemd (as specified in the formers readme)
- indexmap: replace deprecated remove with functionally identical swap_remove

22 months agoupdate/upgrade dependencies
Bennet Bleßmann [Sat, 3 Aug 2024 22:01:45 +0000 (00:01 +0200)]
update/upgrade dependencies

22 months agoMerge pull request #2462 from Skgland/fix-segfault
Mark Thom [Sat, 3 Aug 2024 20:05:13 +0000 (14:05 -0600)]
Merge pull request #2462 from Skgland/fix-segfault

fix segfault by dropping loader state payload after resetting machine

22 months agoprevent accidental double free by checking tag before drop
Bennet Bleßmann [Sat, 3 Aug 2024 17:36:05 +0000 (19:36 +0200)]
prevent accidental double free by checking tag before drop

22 months agodrop payload after resetting machine
Bennet Bleßmann [Sat, 3 Aug 2024 17:27:32 +0000 (19:27 +0200)]
drop payload after resetting machine

- under some circumstances the payload is accessed durring reset which would cause a segfault if we drop the payload too early

22 months agoMerge pull request #2457 from Skgland/library
Mark Thom [Fri, 26 Jul 2024 17:29:12 +0000 (11:29 -0600)]
Merge pull request #2457 from Skgland/library

simplify generated libraries map by using `include_str!`

22 months agoFix build on WASM after #2442
Adrián Arroyo Calle [Mon, 8 Jul 2024 14:12:10 +0000 (16:12 +0200)]
Fix build on WASM after #2442

(cherry-pick of 3acf4c637b6f8b17bb0230edeaaae0507d9030d1 from PR
mthom/scryer-prolog#2446)

22 months agofix copy-past error
Bennet Bleßmann [Thu, 25 Jul 2024 22:13:49 +0000 (00:13 +0200)]
fix copy-past error

22 months agoadd a features for gating things we can use once 1.80 is msrv
Bennet Bleßmann [Thu, 25 Jul 2024 21:09:17 +0000 (23:09 +0200)]
add a features for gating things we can use once 1.80 is msrv

22 months agouse a OnceLock static for LIBRARIES instead of thread_local! static
Bennet Bleßmann [Thu, 25 Jul 2024 16:58:29 +0000 (18:58 +0200)]
use a OnceLock static for LIBRARIES instead of thread_local! static

22 months agomove the creation of the LIBRARIES IndexMap out of the generated file
Bennet Bleßmann [Thu, 25 Jul 2024 16:53:36 +0000 (18:53 +0200)]
move the creation of the LIBRARIES IndexMap out of the generated file

- only leave the filling of the map in the generated code

22 months agorun rustfmt
Bennet Bleßmann [Mon, 22 Jul 2024 22:01:58 +0000 (00:01 +0200)]
run rustfmt

22 months agouse include_str! for the build in libraries
Bennet Bleßmann [Mon, 22 Jul 2024 22:01:29 +0000 (00:01 +0200)]
use include_str! for the build in libraries

instead of "copy-paste-ing" the prolog source into rust string literals in the generated files

22 months agoMerge pull request #2439 from Skgland/miri
Mark Thom [Mon, 22 Jul 2024 19:40:57 +0000 (13:40 -0600)]
Merge pull request #2439 from Skgland/miri

Some cleanup and miri fixes

23 months agoMerge pull request #2442 from aarroyoc/fix-http-at-end-of-stream
Mark Thom [Sun, 7 Jul 2024 22:02:51 +0000 (16:02 -0600)]
Merge pull request #2442 from aarroyoc/fix-http-at-end-of-stream

Fix at_end_of_stream/1 for http read stream

23 months agoMerge pull request #2440 from triska/statistics
Mark Thom [Sun, 7 Jul 2024 21:59:44 +0000 (15:59 -0600)]
Merge pull request #2440 from triska/statistics

ADDED: Preliminary support for statistics/2.

23 months agofix leak of slaps with dropped payload
Bennet Bleßmann [Sun, 7 Jul 2024 13:51:22 +0000 (15:51 +0200)]
fix leak of slaps with dropped payload

23 months agocleanup the slab types
Bennet Bleßmann [Sun, 7 Jul 2024 13:47:50 +0000 (15:47 +0200)]
cleanup the slab types

- get rid of HeaderOrIdxPtr
- add IndexPtrSlab
- add UntypedArenaSlab
- add to_untyped for converting a typed slab into an unsyped slab
- remove TypedArenaPtr::new, as they shouldn't be created outside of this module

23 months agowrap Payloads that are dropped eraly in ManuallyDrop
Bennet Bleßmann [Sun, 7 Jul 2024 13:21:08 +0000 (15:21 +0200)]
wrap Payloads that are dropped eraly in ManuallyDrop

23 months agocheck that we don't attempt to un-drop while evacuating
Bennet Bleßmann [Sun, 7 Jul 2024 12:37:28 +0000 (14:37 +0200)]
check that we don't attempt to un-drop while evacuating

23 months agoadd `AllocateInArena` as a Pivot for `arena_alloc!`
Bennet Bleßmann [Sun, 7 Jul 2024 12:36:53 +0000 (14:36 +0200)]
add `AllocateInArena` as a Pivot for  `arena_alloc!`

so that the value type passed to `arena_alloc!` can differ from the `ArenaAllocated::Payload` type

23 months agoremove unsafe `impl From<UntypedArenaPtr> for CodeIndex`
Bennet Bleßmann [Sun, 7 Jul 2024 12:18:50 +0000 (14:18 +0200)]
remove unsafe `impl From<UntypedArenaPtr> for CodeIndex`

23 months agoignore `pstr_iter_tests` test in miri as it takes too long
Skgland [Sun, 7 Jul 2024 09:06:11 +0000 (11:06 +0200)]
ignore `pstr_iter_tests` test in miri as it takes too long

23 months agofix clippy again
Bennet Bleßmann [Sat, 6 Jul 2024 21:18:35 +0000 (23:18 +0200)]
fix clippy again

23 months agofix leak of ArenaAllocated IndexPtr
Bennet Bleßmann [Sat, 6 Jul 2024 21:08:21 +0000 (23:08 +0200)]
fix leak of ArenaAllocated IndexPtr

23 months agoreplace static Once and two mut statics with one static OnceLock
Bennet Bleßmann [Sat, 6 Jul 2024 20:48:04 +0000 (22:48 +0200)]
replace static Once and two mut statics with one static OnceLock

23 months agoreduce span of unsafe block
Bennet Bleßmann [Sat, 6 Jul 2024 20:47:22 +0000 (22:47 +0200)]
reduce span of unsafe block

23 months agoswitch macos to latest as macos-11 has been removed
Bennet Bleßmann [Sat, 6 Jul 2024 16:47:35 +0000 (18:47 +0200)]
switch macos to latest as macos-11 has been removed

See https://github.com/actions/runner-images/issues/9255

23 months agofix clippy
Bennet Bleßmann [Sat, 6 Jul 2024 16:26:34 +0000 (18:26 +0200)]
fix clippy

23 months agoadjust ignore reason
Bennet Bleßmann [Sat, 6 Jul 2024 16:24:16 +0000 (18:24 +0200)]
adjust ignore reason

23 months agoif UB un IndexPtr ArenaAllocated impl
Bennet Bleßmann [Sat, 6 Jul 2024 15:43:13 +0000 (17:43 +0200)]
if UB un IndexPtr ArenaAllocated impl

23 months agoreplace `ref_thread_local::ref_thread_local!` with `std::thread_local!`
Bennet Bleßmann [Sat, 6 Jul 2024 14:56:41 +0000 (16:56 +0200)]
replace `ref_thread_local::ref_thread_local!` with `std::thread_local!`

removes `ref_thread_local` which was still at 0.0.0 released October 2018 while latest 0.1.1 was released mid November 2021

fixes libraries.rs UB

23 months agofix stack alignement
Bennet Bleßmann [Sat, 6 Jul 2024 14:21:20 +0000 (16:21 +0200)]
fix stack alignement

- adjust align() in RawBlockTraits impl for Stack
- ensure ptr is always aligned in RawBlock::allock

23 months agomake components a comma seperated string instead of a list
Bennet Bleßmann [Sat, 6 Jul 2024 14:01:52 +0000 (16:01 +0200)]
make components a comma seperated string instead of a list

23 months agoFix at_end_of_stream/1 for http read stream
Adrián Arroyo Calle [Sat, 6 Jul 2024 14:00:50 +0000 (16:00 +0200)]
Fix at_end_of_stream/1 for http read stream

23 months agoadd miri to CI
Bennet Bleßmann [Sat, 6 Jul 2024 13:46:04 +0000 (15:46 +0200)]
add miri to CI

23 months agoadd associated Payload type to ArenaAllocated
Bennet Bleßmann [Sat, 6 Jul 2024 13:37:08 +0000 (15:37 +0200)]
add associated Payload type to ArenaAllocated

23 months agoswitch Rcu to the arcu crate
Bennet Bleßmann [Sat, 6 Jul 2024 12:49:19 +0000 (14:49 +0200)]
switch Rcu to the arcu crate

The arcu crate is a more general implementation of the Rcu I implemented in here in scryer. It contains some bug-fixes regarding race-conditions in the Rcu update function, which could cause leaks and uses after free.

Source of the problem was the Relaxed load/strore/update of the reference count in side the Arc not being properly ordered with other load/stores.

23 months agofix stream.rs UB
Bennet Bleßmann [Sat, 6 Jul 2024 12:01:51 +0000 (14:01 +0200)]
fix stream.rs UB

23 months agosomehow this was never marked as bad
Bennet Bleßmann [Sat, 6 Jul 2024 11:41:35 +0000 (13:41 +0200)]
somehow this was never marked as bad

23 months agoclippy: change ToString impl to Display
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

23 months agoclippy: use type associated constants
Bennet Bleßmann [Sat, 6 Jul 2024 11:08:59 +0000 (13:08 +0200)]
clippy: use type associated constants

23 months agoclippy: ptr dereference in safe function
Bennet Bleßmann [Sat, 6 Jul 2024 11:07:26 +0000 (13:07 +0200)]
clippy: ptr dereference in safe function

23 months agoclippy: identity conversion
Bennet Bleßmann [Sat, 6 Jul 2024 11:06:50 +0000 (13:06 +0200)]
clippy: identity conversion

23 months agofix saftey comment
Bennet Bleßmann [Sat, 6 Jul 2024 11:06:24 +0000 (13:06 +0200)]
fix saftey comment

23 months agoclippy: explicit ptr addrs comparision
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

23 months agoclippy: allow new without default
Bennet Bleßmann [Sat, 6 Jul 2024 11:04:55 +0000 (13:04 +0200)]
clippy: allow new without default

23 months agoclippy: use clone_from rather than clone
Bennet Bleßmann [Sat, 6 Jul 2024 11:03:14 +0000 (13:03 +0200)]
clippy: use clone_from rather than clone

23 months agoclippy: ignore unused fields on PrologBenchmark struct
Bennet Bleßmann [Sat, 6 Jul 2024 11:01:19 +0000 (13:01 +0200)]
clippy: ignore unused fields on PrologBenchmark struct

23 months agoADDED: Preliminary support for statistics/2.
Markus Triska [Sat, 6 Jul 2024 09:15:30 +0000 (11:15 +0200)]
ADDED: Preliminary support for statistics/2.

This is needed for benchmarking library(reif) and its newly provided
goal expansion (#2433).

It partly addresses #321.

23 months agorun rustfmt
Bennet Bleßmann [Sat, 6 Jul 2024 02:18:02 +0000 (04:18 +0200)]
run rustfmt

23 months agoupdate ignore reason
Bennet Bleßmann [Sat, 6 Jul 2024 02:01:41 +0000 (04:01 +0200)]
update ignore reason

23 months agoadjust the generation of the LIBRARIES map
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

23 months agodon't use env::current_dir() in miri
Bennet Bleßmann [Sat, 6 Jul 2024 01:42:13 +0000 (03:42 +0200)]
don't use env::current_dir() in miri

23 months agofix some more miri errors
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

23 months agosome test pass miri
Bennet Bleßmann [Sat, 6 Jul 2024 00:25:58 +0000 (02:25 +0200)]
some test pass miri

23 months agoremove rust_beta_channel feature
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

23 months agounify pointer width
Bennet Bleßmann [Fri, 5 Jul 2024 23:41:05 +0000 (01:41 +0200)]
unify pointer width

23 months agoreplace transmut with pointer cast calls
Bennet Bleßmann [Fri, 5 Jul 2024 23:38:13 +0000 (01:38 +0200)]
replace transmut with pointer cast calls

23 months agoresolve miri error for pstr_iter_tests in atom_table
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

23 months agoadjust alignment calculation
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

23 months agorework some unsafe parts
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`

23 months agoremove remains of num feature
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

23 months agoMerge pull request #2436 from triska/arxivlink
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

23 months agolink 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

2 years agoMerge pull request #2417 from aarroyoc/fix-2416
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

2 years agoManage 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

2 years agoMerge pull request #2413 from Skgland/master
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

2 years agocreate swap file for wasm32 build
Bennet Bleßmann [Wed, 29 May 2024 17:50:27 +0000 (19:50 +0200)]
create swap file for wasm32 build

2 years agofix two clippy lints
Bennet Bleßmann [Tue, 28 May 2024 17:59:32 +0000 (19:59 +0200)]
fix two clippy lints

2 years agore-add CI job to test Cargo.toml rust-version
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

2 years agoMerge pull request #2410 from aarroyoc/fix-warn-dead-code-elimination
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

2 years agoFix warnings of dead code
Adrián Arroyo Calle [Mon, 27 May 2024 17:52:02 +0000 (19:52 +0200)]
Fix warnings of dead code

2 years agomore generally consider NEGATIVE_SIGN a non-op term (#2401)
Mark Thom [Mon, 13 May 2024 20:37:32 +0000 (14:37 -0600)]
more generally consider NEGATIVE_SIGN a non-op term (#2401)

2 years agoMerge pull request #2393 from mthom/unsafe_improvements
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)

2 years agoremove 1.70 version CI job unsafe_improvements origin/unsafe_improvements
Mark Thom [Mon, 29 Apr 2024 21:40:05 +0000 (15:40 -0600)]
remove 1.70 version CI job

2 years agodelay instantiation errors on lists in phrase/3 until runtime (#1665, #2396)
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)

2 years agodetect External indices more generally in internalize_constant (#2395)
Mark Thom [Mon, 29 Apr 2024 20:23:14 +0000 (14:23 -0600)]
detect External indices more generally in internalize_constant (#2395)

2 years agofix failing clippy checks, remove unnecessary code
Mark Thom [Fri, 26 Apr 2024 02:05:22 +0000 (20:05 -0600)]
fix failing clippy checks, remove unnecessary code

2 years agofix wasm tests in unsafe_improvements branch
Mark Thom [Thu, 25 Apr 2024 03:21:25 +0000 (21:21 -0600)]
fix wasm tests in unsafe_improvements branch

2 years agobump required rust version for use of newly introduced macros
Mark Thom [Thu, 25 Apr 2024 02:33:42 +0000 (20:33 -0600)]
bump required rust version for use of newly introduced macros

2 years agoimprove use of unsafe Rust in arena.rs (#2391)
Mark Thom [Thu, 25 Apr 2024 02:28:06 +0000 (20:28 -0600)]
improve use of unsafe Rust in arena.rs (#2391)

2 years agoadd nth_partial_strings_tests for bugs raised in #1827, #2381
Mark Thom [Wed, 10 Apr 2024 21:47:49 +0000 (15:47 -0600)]
add nth_partial_strings_tests for bugs raised in #1827, #2381