Commit Graph
100 Commits
Author SHA1 Message Date
Mark Thom 9b483d381f Merge pull request #928 from panasenco/permutation
Ported permutation/2 from SWI library(lists)
2021-05-08 15:09:01 -06:00
Mark Thom 4e25337779 Merge pull request #933 from pmoura/add_epsilon_arithmetic_constant
Add epsilon/0 arithmetic constant
2021-05-08 15:08:13 -06:00
Mark Thom 56eaf883dc Merge pull request #932 from pmoura/fix_abolish_bug_with_no_existing_predicates
Fix abolish/1 to succeed on non-existing predicates as per standard
2021-05-08 12:39:28 -06:00
Mark Thom b968b2c438 add missing default RevJmpBy arm to thread_choice_instr_at_to (prompted by #922) 2021-05-05 11:16:39 -06:00
Mark Thom 533d1ea9ab set self.dynamic_mode to FirstOrNext::Next independently of succeed or failure in dynamic indexing instructions (prompted by #922) 2021-05-04 20:56:25 -06:00
Mark Thom c9e32c449a correct assertz/1 bugs (#922) 2021-05-04 17:53:02 -06:00
Mark Thom d9e42bfcba fix incremental compilation and multifile bugs 2021-05-03 16:59:12 -06:00
Mark Thom f552564fc1 import builtins to dynamically generated modules unless builtins is being defined 2021-05-02 11:01:17 -06:00
Mark Thom b21a096516 add read/2 and nl/1 (#896) 2021-05-01 16:12:00 -06:00
Mark Thom d0b25de554 add user_error stream (#917) 2021-04-30 21:58:03 -06:00
Mark Thom bba836dc31 fail on undefined multifile/discontiguous/dynamic predicates (#915) 2021-04-30 21:46:50 -06:00
Mark Thom 14fc8e2efa support full paths in load_context_path/2 (#916) 2021-04-30 20:38:26 -06:00
Mark Thom d8bd4fbea6 fail when retracting undefined dynamic predicates (#918) 2021-04-30 20:36:56 -06:00
Mark Thom 7cc89da879 Merge pull request #920 from panasenco/serialize
Character logic cleanup and extension
2021-04-29 13:11:13 -06:00
Mark Thom 7e4cfede7d fix use of local skeletons to reload predicates (#919) 2021-04-27 02:01:00 -06:00
Mark Thom 48225c3c0a Merge pull request #913 from panasenco/json
Another thorough rewrite of library(json) to better preserve the complete set of answers as much as possible
2021-04-26 13:34:04 -06:00
Mark Thom 7bec37bfd8 Merge pull request #912 from panasenco/json
library(json) beta
2021-04-22 17:44:44 -06:00
Mark Thom e71afa63b0 Merge pull request #909 from triska/master
add a new section about support and discussions
2021-04-17 10:34:48 -06:00
Mark Thom a9ef15cdfa Merge pull request #900 from triska/master
remove rectractall/1 (built-in since 8188e3d0cf).
2021-04-14 15:28:59 -06:00
Mark Thom b08442b46f assertz/1, asserta/1, retract/1, retractall/1 are meta-predicates (#902, #903) 2021-04-14 15:28:16 -06:00
Mark Thom 5452b55e38 Merge pull request #897 from panasenco/master
Switched to cargo-chef for preparing the Docker image
2021-04-12 21:55:58 -06:00
Mark Thom 8188e3d0cf add missing standard predicates (#896) 2021-04-12 17:26:11 -06:00
Mark Thom 10e92eec32 call '$erase_ball' before running cleanup code in setup_call_cleanup (#886) 2021-03-24 16:56:53 -06:00
Mark Thom 37f2336eee stop unifying ! to free variables in control_functor/1 (#887) 2021-03-24 15:05:59 -06:00
Mark Thom 290cb1b517 make retract_local_clauses safe, remove warning about overwriting warning in do_not_duplicate_path_components test 2021-03-23 12:37:43 -06:00
Mark Thom 7520fe7000 use occurs check when enabled in UnifyValue (#885) 2021-03-22 22:05:03 -06:00
Mark Thom 9f861dfe89 reorder declaration matching in loader.pl 2021-03-22 18:13:01 -06:00
Mark Thom fffb87d013 flush loader term queue before compiling declarations, declare '/1' as dynamic before asserting 2021-03-22 16:53:23 -06:00
Mark Thom 0cb731c584 remove redundant retraction records for incremental compilation 2021-03-22 15:27:45 -06:00
Mark Thom 233faea200 compare the tails of partial string prefixes in compare_pstr_prefixes (#883) 2021-03-22 12:44:58 -06:00
Mark Thom 1b9015a049 copies only those attributes planted by the calling module 2021-03-21 13:00:29 -06:00
Mark Thom 111de1462c remove vestigial attribute goals struct field and related predicates 2021-03-21 12:06:53 -06:00
Mark Thom 7fb0b4a8df rename issue841-occure-check.pl to issue841-occurs-check.pl 2021-03-19 21:39:28 -06:00
Mark Thom 627c49c5db recognize cuts in (->)/(,)/(;) calling contexts (#878) 2021-03-19 16:34:55 -06:00
Mark Thom 665b1ad58a Merge pull request #872 from notoria/charsio
Extend alnum, add forgotten graphic_token
2021-03-18 14:51:36 -06:00
Mark Thom 4623e9d7fc fix findall/4 (#873) 2021-03-18 12:50:12 -06:00
Mark Thom a3f0290432 restore deleted parts of number_chars/2 and number_codes/2 (#721) 2021-03-17 20:23:58 -06:00
Mark Thom 69b1798af7 print floating point zero as 0.0 (#859) 2021-03-17 20:17:08 -06:00
Mark Thom 10af206024 make chars callable (#713) 2021-03-17 19:50:41 -06:00
Mark Thom 6c23d7aec8 always print variable bindings before names (#865) 2021-03-17 19:27:53 -06:00
Mark Thom 7937ccee30 check that a load context path is a filename before potentially returning it as a string 2021-03-17 18:58:33 -06:00
Mark Thom b98e8c34eb findall/4 should be declared as a meta-predicate (#873) 2021-03-17 18:13:06 -06:00
Mark Thom 5c2059b4e8 issue an imcomplete reduction error if stream ends with tokens remaining to be parsed (#871) 2021-03-17 14:23:34 -06:00
Mark Thom 5f7abda22d remove operators declared at user-level from files when reloading 2021-03-16 18:30:34 -06:00
Mark Thom 51424aed32 clear user-level definitions when reloading a file (#455) 2021-03-16 02:30:09 -06:00
Mark Thom 914fb09ed0 don't warn about overwriting a clause asserted to a dynamic predicate whose clauses have all been retracted (#870) 2021-03-15 14:22:54 -06:00
Mark Thom 7ea7e5c951 remove intra-module predicates from module code directory when module is being re-defined (#848) 2021-03-13 23:22:24 -07:00
Mark Thom c69807b416 Merge pull request #866 from Skgland/add_tests
Add tests for some recently closed Issues
2021-03-13 00:39:01 -07:00
Mark Thom d4d47182b4 fix is_cyclic_term (#864) 2021-03-10 16:11:48 -07:00
Mark Thom bc2d0191ff Merge pull request #861 from notoria/mod
Small improvement for mod in CLP(Z)
2021-03-10 13:52:48 -07:00
Mark Thom ceac824e2b Merge pull request #862 from notoria/xor
Implemented a propagator for xor in CLP(Z)
2021-03-09 12:33:06 -07:00
Mark Thom fa025bcf39 Merge pull request #858 from triska/master
CLP(B) correction
2021-03-05 12:57:20 -07:00
Mark Thom 0a71e40030 qualify '$print_project_attributes_exception' call (#857) 2021-03-05 01:14:56 -07:00
Mark Thom 1b9db035ba call project_attributes from top-level (#846) 2021-03-04 16:05:06 -07:00
Mark Thom 34c3035c2b Merge pull request #856 from triska/master
Improvements for library(format)
2021-03-04 13:53:25 -07:00
Mark Thom a2e5bcc137 Merge pull request #854 from triska/master
Better indentation for nested ( If -> Then ; Else ) constructs
2021-03-03 16:11:03 -07:00
Mark Thom d3612e956e catch exceptions thrown from initialization goals (#852) 2021-03-03 13:56:13 -07:00
Mark Thom 5a3ee3a46e has_tail must be false for use as a filename from open/{3,4} 2021-03-03 12:16:47 -07:00
Mark Thom 23cb743ce2 Merge pull request #851 from Skgland/fix_num_test2
Workaround to make num tests work
2021-03-02 23:36:59 -07:00
Mark Thom 73eb4079ef Merge pull request #849 from triska/master
Remove duplicated definitions
2021-03-02 11:59:22 -07:00
Mark Thom 7ea9706c94 warn when overwriting a predicate (#848) 2021-03-02 11:43:47 -07:00
Mark Thom 5976e2d873 do not check for non-unifiability in dif:attribute_goals, which is sure to succeed, resulting in no goals being printed at top-level (#844) 2021-03-02 10:34:25 -07:00
Mark Thom d32d452583 Merge pull request #845 from triska/master
explain the new occurs_check flag
2021-03-01 11:45:53 -07:00
Mark Thom e8971e0d8b use atom_chars to convert .scryerrc path string to atom 2021-02-28 23:26:22 -07:00
Mark Thom 498c4660d0 use plain ! while interpreting control functors in metacalls (#724) 2021-02-28 19:12:35 -07:00
Mark Thom 54c142fc0d apply expand_module_names to call(A) goals 2021-02-28 19:01:36 -07:00
Mark Thom 6079402dc4 suppress tabled/2 existence errors in tabling library, do not print evaluation errors generated by term and goal expansion in loader.pl 2021-02-28 18:56:24 -07:00
Mark Thom 3d4a7f97e1 Merge pull request #843 from mthom/rebis-dev
Merge rebis-dev into master
2021-02-28 18:33:24 -07:00
Mark Thom d6e04beb95 check that Module is an atom before calling Module:goal_expansion/2 2021-02-28 18:28:12 -07:00
Mark Thom 9a225e6244 wrap variable goals in module-expanded call/1 2021-02-28 18:15:33 -07:00
Mark Thom a03f00628b do not print error messages if .scryerrc[.pl] does not exist (#842) 2021-02-28 17:57:35 -07:00
Mark Thom 360485d830 print errors arising from term and goal expansion calls from loader.pl 2021-02-28 16:19:37 -07:00
Mark Thom 3f1cfd2995 introduce bind_fn, use in applicable Fact/Query instructions (#841) 2021-02-28 16:19:06 -07:00
Mark Thom 08e2b601f1 pop non-composite terms from iter stack in is_cyclic_term 2021-02-28 12:28:19 -07:00
Mark Thom 101ed9a633 add error value to occurs_check prolog flag (#783) 2021-02-28 11:44:23 -07:00
Mark Thom 81ecd17b93 Merge pull request #838 from Skgland/librarify
Split main.rs into lib.rs and bin/scryer-prolog.rs
2021-02-28 11:39:24 -07:00
Mark Thom f935060b2b restore .scryerrc loading 2021-02-28 11:03:55 -07:00
Mark Thom a367812348 add occurs_check flag (#309) 2021-02-28 10:41:32 -07:00
Mark Thom 8e6a89b279 enable op declarations with lists of operands using term expansion (#839) 2021-02-28 09:15:03 -07:00
Mark Thom 0747697d10 add lines read from devour_whitespace (#836) 2021-02-28 02:09:53 -07:00
Mark Thom 8c7494885f set compilation_target of assert loader to match that of predicate qualifier 2021-02-28 00:27:50 -07:00
Mark Thom 590a0b8077 update the parser with the number of lines already read by the underlying stream (#836) 2021-02-27 23:56:58 -07:00
Mark Thom 064d261357 implement logical update semantics for dynamic database predicates 2021-02-27 23:33:10 -07:00
Mark Thom adb96710bf Merge pull request #837 from triska/rebis-dev
Small improvements for Rebis
2021-02-25 15:17:16 -07:00
Mark Thom 3eb6357892 Merge pull request #835 from triska/lambda
ADDED: library(lambda) by Ulrich Neumerkel
2021-02-25 14:26:41 -07:00
Mark Thom 4d72845c58 add copy_term_nat/2 (#795) 2021-02-22 22:39:34 -07:00
Mark Thom 9067f76bd6 no longer delay verify_attributes for cut instructions (#807) 2021-02-22 18:33:35 -07:00
Mark Thom 6c447da730 no longer generate a choice point in bb_b_put/2 (#742) 2021-02-22 18:27:30 -07:00
Mark Thom 1a9f6f06df consume whitespace before reading a term in loader.pl, modify prolog_load_context at file key to better reflect loading context, use it when reporting singleton variables (#812) 2021-02-22 13:23:22 -07:00
Mark Thom 5f8bdc564b extend existing local predicate skeletons in LoadState::compile 2021-02-22 02:00:25 -07:00
Mark Thom f6498f2a7b anonymize singleton variables in iso_ext.pl, charsio.pl 2021-02-21 19:20:42 -07:00
Mark Thom 0ef5f7f9b1 issue singleton variable warnings from loader.pl (#812) 2021-02-21 19:20:42 -07:00
Mark Thom a323a4dd8e wrap stream instances in one Rc<RefCell<..>>, use Ref/RefMut to access stream options 2021-02-21 19:20:42 -07:00
Mark Thom d5581ffd05 Merge pull request #834 from aarroyoc/rebis-http
Fix HTTP server in rebis
2021-02-21 13:32:09 -07:00
Mark Thom 465ab2fa34 Merge pull request #830 from aarroyoc/rebis-http
Fix HTTP server on Rebis. Breaking change
2021-02-21 12:10:09 -07:00
Mark Thom d60bfef924 tweak bimetatrans_tests.pl 2021-02-21 12:08:36 -07:00
Mark Thom 5225587ff5 add set_prolog_flag to declarations recognized by loader.pl 2021-02-21 12:08:14 -07:00
Mark Thom fec790e108 correct comment before call meta_predicate declarations 2021-02-20 19:10:34 -07:00
Mark Thom eb5ea28bcd add 'e' as evaluable functor for Euler's constant (#832) 2021-02-20 18:32:04 -07:00
Mark Thom a9fe2ab5c4 use env::current_dir in Machine::current_dir (#833) 2021-02-20 18:25:34 -07:00