Mark Thom
d55d5f15ae
compare '[]' in pstr_comparator of compare_term_test ( #1299 )
2022-02-25 23:57:27 -07:00
Mark Thom
775bd3a08b
unify '' to [] in unify_complete_string ( #1292 , #1288 )
2022-02-25 23:01:08 -07:00
Mark Thom
d92d8bce89
recognize [] as equivalent to "" in unify_atom ( #1288 )
2022-02-22 23:45:58 -07:00
Mark Thom
5b829636cb
build CStr's to vars in write_literal_to_var ( #1284 )
2022-02-15 22:33:29 -07:00
Mark Thom
4ddacc707d
add range check to arg/3 ( #1250 )
2022-01-29 12:50:09 -07:00
Mark Thom
a562793fce
don't read into the heap while incrementing self.s ( #1233 , #1245 )
2022-01-25 20:37:29 -07:00
Mark Thom
955e1799c8
flatten the instruction dispatch loop
2022-01-06 22:09:36 -07:00
Mark Thom
3db86f1e25
relocate most instruction routines from MachineState to Machine
2022-01-06 21:46:23 -07:00
Mark Thom
6f9b6a29c4
remove LocalCodePtr::IndexingBuf
2022-01-06 21:44:41 -07:00
Mark Thom
4211151fe6
fix unify_float
2022-01-06 21:44:41 -07:00
Mark Thom
48c1d05151
use heap_loc to refer to 0-arity atom instead of str_loc
2022-01-06 21:44:41 -07:00
Mark Thom
cd129e32a7
fix bugs revealed by src/tests/builtins.pl
2022-01-06 21:44:41 -07:00
Mark Thom
fb4e627e62
fix various partial string bugs (copying using them in arg/3)
2022-01-06 21:44:41 -07:00
Mark Thom
bc613eeff9
fix number not recognizing floats
2022-01-06 21:44:41 -07:00
Mark Thom
073f281f1e
fix arg/3 bug
2022-01-06 21:44:41 -07:00
Mark Thom
a0a86d0f62
unmark cell bits in occurs check
2022-01-06 21:44:41 -07:00
Mark Thom
b24e7cce38
support comparison and unification of cyclic partial strings
2022-01-06 21:44:41 -07:00
Mark Thom
ffd1b7069f
greatly reduce the number of goal expansions done in callable if/then/else
2022-01-06 21:44:41 -07:00
Mark Thom
0404c3bd94
use new heap term representation
2022-01-06 21:44:38 -07:00
Mark Thom
5d2b0377d8
reset attributed variables queue when backtracking ( #678 , etc.)
2021-09-27 19:12:24 -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
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
7520fe7000
use occurs check when enabled in UnifyValue ( #885 )
2021-03-22 22:05:03 -06:00
Mark Thom
10af206024
make chars callable ( #713 )
2021-03-17 19:50:41 -06:00
Mark Thom
d4d47182b4
fix is_cyclic_term ( #864 )
2021-03-10 16:11:48 -07:00
Mark Thom
1b9db035ba
call project_attributes from top-level ( #846 )
2021-03-04 16:05:06 -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
Skgland
2f428b7261
split into lib and bin
...
* makes most pub things in src/ pub(crate) as not to expose things accidentally
* only those things needed by src/bin/scryer-prolog.rs and tests/scryer.rs
should be pub
* split src/main.rs into src/lib.rs and src/bin/scryer-prolog.rs
* add tests folder and run most of the files in src/tests with cargo test
added bytes method to Stream in src/machine/streams.rs to check if stdout is as expected
2021-02-28 19:21:30 +01:00
Mark Thom
a367812348
add occurs_check flag ( #309 )
2021-02-28 10:41:32 -07:00
Mark Thom
064d261357
implement logical update semantics for dynamic database predicates
2021-02-27 23:33:10 -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
1dabe95899
remove tidy_trail
2021-02-07 15:39:48 -07:00
Skgland
5041042925
rename prolog_parser_rebis to prolog_parser
...
also remove remaining extern crate statements that slipped through earlier
2021-02-06 22:13:34 +01:00
Skgland
8e5954f36f
remove use statements from main.rs that temporary replaced extern crate and fixed paths that previously used them
2021-02-06 22:13:04 +01:00
Skgland
b53ef148a0
remove extern crate declaration and fix outfall (macros now need to be imported into scope)
...
using use declarations in main.rs so that use paths don't need to be updated as well, this will be done in a later commit
2021-02-06 22:12:31 +01:00
Mark Thom
f3ab17a3c0
Merge branch 'master' into rebis-dev
2021-02-03 12:00:00 -07:00
Mark Thom
f5d808e68f
do not traverse data structures when binding to local variables in unify_with_occurs_check ( #781 )
2021-02-03 11:11:22 -07:00
Mark Thom
a239007db0
target prolog_parser_rebis on crates.io
2021-01-30 22:03:07 -07:00
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
notoria
657e4f12bb
Implemented a different way to index clauses
2020-12-19 14:52:38 +01:00
Mark Thom
b9a53e441e
support number/1
2020-11-03 23:38:55 -07: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
Mark Thom
33325f1574
remove vestigial prolog/ directory ( #444 )
2020-06-12 18:26:38 -06:00