Commit Graph
1010 Commits
Author SHA1 Message Date
Mark Thom a4d15bfb88 move to a predicate-based module system, move to loader.[rs|pl]-based compilation, add support for incremental clause compilation 2021-01-30 21:07:51 -07:00
Adrián Arroyo Calle 1d538ee70c Fix Beta 2021-01-16 22:32:50 +01:00
Mark Thom 01f73b11d8 fix bug in code walker causing entire clauses to be skipped (#736) 2020-12-26 22:35:28 -07:00
notoria 657e4f12bb Implemented a different way to index clauses 2020-12-19 14:52:38 +01:00
brightly-salty 4854da4805 Replace dirs with dirs-next 2020-12-15 06:59:26 -06:00
Mark Thom b9a53e441e support number/1 2020-11-03 23:38:55 -07:00
Mark Thom 323e9c3eb3 refactor SystemClauseType::Open in anticipation of #614 2020-09-05 18:57:03 -06:00
Markus Triska 78656d220b FIXED: reliably write all characters when using format/3
This addresses #693.

Many thanks to @notoria for a brilliant test case, and the
suggestion of this correction!
2020-09-02 19:29:04 +02:00
Markus Triska 099d9aaca6 library(sgml): Correctly parse XML leaf nodes that are not text nodes.
Example:

    ?- load_xml("<schemaRef type=\"simple\"/>", Node, []).
       Node = [element(schemaRef,[type="simple"],[])].

This is necessary for example to parse XBRL files. See #665.
2020-08-11 21:20:33 +02:00
Mark Thom ad333047d9 Merge branch 'master' of https://github.com/mthom/scryer-prolog 2020-08-08 13:12:09 -06:00
Mark Thom 6e5d2d6a36 fix bugs in PausedPrologStream (#661) 2020-08-08 13:11:09 -06:00
Mark Thom 4b610b6293 Merge pull request #656 from notoria/try_from_number
Fixed some conversion issues
2020-08-08 12:24:29 -03:00
Markus Triska a16f84560d use self.deref(...) (see #653) 2020-08-06 20:12:57 +02:00
Markus Triska 1b4500339e use atom_argument_to_string 2020-08-06 20:12:23 +02:00
notoria 3143468751 Fixed some conversion issues 2020-08-06 11:39:55 +02:00
Mark Thom f627b32355 fix crash in CryptoPasswordHash (#653), conversion of Rational integers in number_chars/2 (#655) 2020-08-06 00:17:55 -06:00
Mark Thom 10ba6fb773 Merge pull request #654 from triska/aad
ADDED: library(crypto): Support for additional authenticated data (AAD).
2020-08-06 02:40:51 -03:00
Markus Triska 2d3f1e51ec shorten, and increase readability 2020-08-05 21:49:46 +02:00
Markus Triska 1c23336cff use "octet" as a string literal, reducing the number of arguments 2020-08-05 20:21:46 +02:00
Markus Triska a622ffddfe ADDED: library(crypto): Support for additional authenticated data (AAD).
Additional authenticated data can now be specified with the new
aad(Chars) option for encryption and decryption. It is authenticated,
but not encrypted.
2020-08-05 20:09:07 +02:00
Mark Thom d57a592273 unify '[]' with proper [] in atom_chars/2 (#569) 2020-08-03 19:29:53 -06:00
Mark Thom 4f15802fbc reconcile '[]' and [] (#644), solve remaining conformity issues (#648), move (-->) from dcgs.pl to builtins.pl (#649) 2020-08-02 23:35:53 -06:00
Markus Triska 32c612b747 ADDED: library(crypto): ECDH key exchange over Curve25519 (X25519) 2020-07-29 23:51:11 +02:00
Mark Thom 386f7cf65d the indexer now categorizes partial strings only as lists (#623, #642) 2020-07-27 16:43:43 -06:00
Markus Triska 928c9c9aad throw an error if a character cannot be encoded 2020-07-23 00:35:23 +02:00
Markus Triska 4c510001ce ADDED: chars_base64/3 for efficient bidirectional Base64 conversion. 2020-07-22 20:35:48 +02:00
Markus Triska 2768beec4c ADDED: path_segments/2 for portable reasoning about path components.
The platform-specific directory separator is taken into account.
The clean representation of segments as a list simplifies reasoning.
2020-07-19 12:32:01 +02:00
Markus Triska 17dd9239b6 ADDED: file_creation_time/2 and file_access_time/2.
The code can be simplified once if- and while-let-chains are available:

    https://github.com/rust-lang/rust/issues/53667
2020-07-17 18:48:39 +02:00
Mark Thom f0c8056334 look up operator precedence when arity does not match what the atom records, don't print brackets around outermost '+' (#629) 2020-07-17 11:02:58 -06:00
Markus Triska 8668aee7fd ENHANCED: Reorder fields in time stamps so that (@<)/2 is meaningful. 2020-07-16 23:40:03 +02:00
Markus Triska 4f386b3e5e ADDED: file_modification_time/2, obtaining a time stamp.
This addresses a remaining aspect of #511.
2020-07-16 23:40:03 +02:00
Markus Triska 0f4667d942 ADDED: path_canonical/2, obtaining the canonical absolute path.
This addresses a remaining aspect of #511.
2020-07-15 20:43:34 +02:00
Markus Triska 94e9e17c79 ADDED: working_directory/2, addressing a remaining aspect of #511 2020-07-14 23:05:29 +02:00
Markus Triska 5134e64cae ADDED: delete_file/1, addressing a remaining aspect of #511 2020-07-14 22:21:46 +02:00
Markus Triska 88a2b82f7e ENHANCED: library(crypto): Retain the compact representation of strings.
This avoids the costly (in terms of space requirements!) conversion of
compact lists of characters to lists of integers, making hashing, HKDF,
encryption, decryption, signing and signature verification an order of
magnitude more efficient (primarily in terms of space, also in time).

This makes library(crypto) suitable to process also very large files.
2020-07-12 11:54:37 +02:00
Markus Triska eb872f8fca ADDED: library(os), reasoning about environment variables.
Together with library(files), this addresses #511.
2020-07-11 21:00:25 +02:00
notoria bf13700a95 Enhanced the implementation
The restriction has been removed by using read_library_path from
cfd15f4e02.
2020-07-01 13:14:12 +02:00
notoria 83268f5ff6 Allowing paths in use_module(library(..)) (#604)
In a module, the path is restricted in being an atom.
2020-07-01 10:22:17 +02:00
notoria 1eb42654e0 Revert "allow paths in use_module(library(..)) (#604)"
This reverts commit cfd15f4e02.
2020-07-01 10:07:26 +02:00
notoria e05c34d1ee Revert "build.rs recursively delves into directories during library bake stage, correct misnamed file at machine/mod.rs:455 (#617)"
This reverts commit c1b577f2c7.
2020-07-01 10:06:20 +02:00
Mark Thom 8325bb11e2 Merge pull request #606 from triska/files
ADDED: library(files), for reasoning about files and directories.
2020-06-30 13:34:39 -03:00
Mark Thom c1b577f2c7 build.rs recursively delves into directories during library bake stage, correct misnamed file at machine/mod.rs:455 (#617) 2020-06-29 00:58:10 -06:00
Markus Triska 65f200e02c directory_files/2: throw representation error if into_string() fails
Suggested by @notoria in #606. Many thanks!
2020-06-24 23:30:40 +02:00
Markus Triska 30d1585468 ADDED: library(files), for reasoning about files and directories. 2020-06-24 22:29:34 +02:00
Markus Triska 32eb896c56 ADDED: load_xml/3 to load XML files from streams, files and strings. 2020-06-21 09:45:37 +02:00
Markus Triska 79829cb6d2 ADDED: library(sgml), providing load_html/3 to parse HTML documents 2020-06-19 16:40:01 +02:00
Mark Thom 3ede5ea28f Merge branch 'master' of https://github.com/mthom/rusty-wam 2020-06-19 00:58:43 -06:00
Mark Thom cfd15f4e02 allow paths in use_module(library(..)) (#604) 2020-06-19 00:57:56 -06:00
Markus Triska 5eda2dfe0e put_char/[1,2]: throw type errors for atoms that are not characters
Example:

    ?- put_char(hello).
    %@ caught: error(type_error(character,hello),put_char/2)
2020-06-18 00:15:00 +02:00
Mark Thom 1509c6a471 Merge pull request #597 from triska/faster_format
ENHANCED: much faster format/3 for text streams
2020-06-17 18:48:49 -03:00