Commit Graph
94 Commits
Author SHA1 Message Date
Nicolas Luck 7092e278d7 Relax constraint on version of reqwest dependency (Cargo will pick the latest patch that's possible, but not fail if another dep. has it pinned to something below patch 27) 2024-08-15 22:40:35 +02:00
Nicolas Luck ce34ca8f1f continue-on-error if target=wasm32 or rust=nightly 2024-02-09 13:48:45 +01:00
Nicolas Luck 7c632cf165 Reactivate nightly test job with continue-on-error set 2024-02-09 13:44:37 +01:00
Nicolas Luck b3c5a8db80 Use stable Rust for style/report and deactivate nightly x86_64 target in CI 2024-02-09 13:14:06 +01:00
Nicolas Luck 1d2961e047 Merge branch 'master' into library-use-case 2024-02-09 12:41:01 +01:00
Nicolas Luck 06f198bc57 Test show problem with nonexistent predicate 2024-02-01 14:14:50 +01:00
Nicolas Luck 6586657658 fmt 2024-02-01 13:53:21 +01:00
Nicolas Luck a0e598b97e clippy 2024-02-01 13:51:37 +01:00
Nicolas Luck 8a6ea29c45 Fix all orderings in integration assertions 2024-02-01 13:43:51 +01:00
Nicolas Luck e1b0ba466b Remove test with long program literals, not needed 2024-02-01 13:00:49 +01:00
Nicolas Luck f35d6287ab More ordering adjustments 2024-02-01 12:59:10 +01:00
Nicolas Luck bc02fb3754 Extract failing assertion as single test case 2024-01-31 15:03:28 +01:00
Nicolas Luck 48b2379fe5 Adjust some first result orderings in integration assertions 2024-01-30 12:54:12 +01:00
Nicolas Luck 7bb9c00356 fmt 2024-01-29 18:44:20 +01:00
Nicolas Luck 9aacfff35d Add more test cases to differentiate usage of discontiguous 2024-01-29 16:49:03 +01:00
Nicolas Luck 2e728c7051 Minimal reproduction of faulty behaviour seen in integration tests 2024-01-29 15:26:06 +01:00
Nicolas Luck 7e973a6da6 Merge branch 'master' into library-use-case 2024-01-26 17:21:47 +01:00
Nicolas Luck cb014095ad Add expected results to integration test
Results are logs of what we get with old toplevel-based version of lib_machine. These are also congruent with what our tests logged out based on SWI.
2024-01-26 17:18:57 +01:00
Nicolas Luck 77ce5a9586 Result with one empty match should be false 2023-12-05 15:00:07 +01:00
Nicolas Luck 24e3e1794e cargo fmt 2023-12-04 20:18:41 +01:00
Nicolas Luck 99055b553a Don’t include unbound variables in results returned from run_query 2023-12-04 20:10:06 +01:00
Nicolas Luck 576f13df60 Merge branch 'master' into library-use-case 2023-12-04 20:06:14 +01:00
Nicolas Luck 0ad479498c Activate run_query() integration test 2023-11-07 10:28:36 +01:00
Nicolas Luck 59264c0aa5 Check for target_arch = “wasm32”
instead of target_os = “wasi”
2023-11-02 19:07:55 +01:00
Nicolas Luck ee1bd9e006 Merge branch 'master' into library-use-case 2023-11-02 11:12:54 +01:00
Nicolas Luck 69a0725c30 Cleanup Cargo.toml 2023-10-17 22:09:34 +02:00
Nicolas Luck 0c9740fe52 Fix wasm warnings 2023-10-17 22:07:38 +02:00
Nicolas Luck 2776beb842 Use std::sync::RwLock instead of tokio::sync::RwLock (by @aarroyoc) 2023-10-16 14:59:06 +02:00
Nicolas Luck d7fa6c0ade Fix signalling of success/failure (by @mthom) 2023-10-16 14:56:17 +02:00
Nicolas Luck 025412aac0 Revert "Remove unuse import"
This reverts commit bfa7d3cf41.
2023-10-16 14:55:38 +02:00
Nicolas Luck bfa7d3cf41 Remove unuse import 2023-10-16 13:44:51 +02:00
Nicolas Luck 9990780b82 Merge branch 'master' into library-use-case 2023-10-16 13:43:26 +02:00
Nicolas Luck 69cf2c36bc Deactivate tokio runtime respawning on interrupt 2023-10-05 12:11:28 +02:00
Nicolas Luck 640c637ca8 Merge branch 'master' into library-use-case
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	src/http.rs
#	src/machine/mock_wam.rs
#	src/machine/mod.rs
#	src/machine/system_calls.rs
2023-10-05 12:06:47 +02:00
Nicolas Luck fab5ca9440 Fix nested List parsing 2023-10-03 20:19:57 +02:00
Nicolas Luck 7b128a9f00 Handle stub_b = b as false 2023-10-03 20:12:11 +02:00
Nicolas Luck 4968fa0024 Remove debugging println! 2023-09-18 19:31:56 +02:00
Nicolas Luck 5e55625733 Remove some debug println!s 2023-09-18 19:12:50 +02:00
Nicolas Luck 65f64e428e Construct and return exception string 2023-09-18 13:25:27 +02:00
Nicolas Luck d2f5291412 mthom's changes fixing the panic 2023-09-18 13:01:27 +02:00
Nicolas Luck c86304b18e Remove lib_toplevel.pl 2023-09-15 11:01:16 +02:00
Nicolas Luck 7c83a1fb8e Cleanup code that's not needed anymore 2023-09-15 10:48:41 +02:00
Nicolas Luck f02728aab3 Construct QueryResult from printer output 2023-09-15 10:44:59 +02:00
Nicolas Luck 48283c4dbc mthom's changes to run_query with backtracking 2023-09-15 10:04:11 +02:00
Nicolas Luck 6bdd7f3a3f mthom's revised run_query with manually created printer and some cleanup 2023-09-14 22:00:50 +02:00
Nicolas Luck 5fa68e253c lib_machine tests should not be tokio/async 2023-09-13 19:51:57 +02:00
Nicolas Luck 136463c92e Merge branch 'master' into library-use-case
# Conflicts:
#	Cargo.toml
#	src/atom_table.rs
#	src/bin/scryer-prolog.rs
#	src/http.rs
#	src/machine/mock_wam.rs
#	src/machine/mod.rs
#	src/machine/system_calls.rs
2023-09-13 18:13:14 +02:00
Nicolas Luck ef56193c44 Use write_term_to_heap as suggest, clean up, and include error in comment 2023-09-13 17:17:02 +02:00
Nicolas Luck 8a0685a3e9 Debug print value of register 6 which leads to failing heap dereference 2023-08-30 20:01:56 +02:00
Nicolas Luck 2b018be392 Add back needed dep. hyper-util and upgrade hyper to rc4 2023-08-30 20:00:56 +02:00
Nicolas Luck 4d19c437e0 Merge branch 'master' into library-use-case
# Conflicts:
#	Cargo.toml
#	src/machine/mock_wam.rs
#	src/machine/mod.rs
2023-08-30 18:12:26 +02:00
Nicolas Luck 44c274b9e9 WIP: Pure Rust impl. of run_query 2023-08-30 17:35:36 +02:00
Nicolas Luck 77394ba914 Remove debug println!s 2023-08-24 19:15:41 +02:00
Nicolas Luck d13173942d Cargo feature "multi_thread" for thread-local ATOM_TABLE_BUF_BASE 2023-08-24 19:13:11 +02:00
Nicolas Luck afbadd9ea2 Revert "Enable multiple Machines per process by having ATOM_TABLE_BUF_BASE always be thread_local, not only in cfg(test) mode."
This reverts commit bfb3164a0d.
2023-08-24 19:13:11 +02:00
Nicolas Luck c25888288a Fix parsing of floats 2023-08-24 18:10:47 +02:00
Nicolas Luck bfb3164a0d Enable multiple Machines per process by having ATOM_TABLE_BUF_BASE always be thread_local, not only in cfg(test) mode. 2023-08-23 14:36:07 +02:00
Nicolas Luck 7e97f16f41 Fix list result parsing 2023-08-22 22:46:00 +02:00
Nicolas Luck cf63b588bc Ignore stress test because it fails on windows 2023-08-07 18:41:08 +02:00
Nicolas Luck 4e8f7f0a1b Remove unused toplevel predicate 2023-08-07 18:38:34 +02:00
Nicolas Luck 579816a04f Use new double_quotes write-option 2023-08-07 18:29:05 +02:00
Nicolas Luck cc04872933 Merge branch 'master' into library-use-case 2023-08-07 16:42:48 +02:00
Nicolas Luck 48a4835819 Merge branch 'master' into library-use-case
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	src/bin/scryer-prolog.rs
#	src/loader.pl
#	src/machine/mock_wam.rs
#	src/machine/mod.rs
#	src/machine/system_calls.rs
2023-08-03 20:16:32 +02:00
Nicolas Luck 3cf3c0ea99 Integration stress test showing Machine blocking on query 2023-08-03 19:51:12 +02:00
Nicolas Luck ac61055d43 Remove some unused code from lib_toplevel.pl 2023-08-03 17:41:20 +02:00
Nicolas Luck 3ff02da314 Deactivate some debugging outputs 2023-08-02 16:25:53 +02:00
Nicolas Luck df048a4f42 Switch back to run_input_once and use duplicated write_eqs/2 without any input handling 2023-08-02 14:52:49 +02:00
Nicolas Luck 21c36880f1 Fix build 2023-08-02 14:51:41 +02:00
Nicolas Luck c2658dc6da Try triska's toplevel and add some debugging println!s. 2023-07-27 14:46:00 +02:00
Nicolas Luck 30dac8ea41 HashSet -> BTreeSet: Make parsing or results and thus tests deterministic. Add comments. 2023-07-27 12:06:03 +02:00
Nicolas Luck 0d28404aad Add special case when parsing 2023-07-27 11:50:38 +02:00
Nicolas Luck 2f99bb025c Add consult that works with streams / strings in library use-case 2023-07-27 11:41:52 +02:00
Nicolas Luck 9fd6e18d59 Dedupe machine results 2023-07-22 00:32:24 +02:00
Nicolas Luck d8a9475460 Add missing list_last_item to lib_toplevel.pl and increase MaxDepth of write_eq to avoid truncation of results 2023-07-22 00:31:49 +02:00
Nicolas Luck b1963864d2 Explicitly dereference pointer to avoid calling neg() on reference 2023-07-21 17:07:40 +02:00
Nicolas Luck 9e85be11fe Fix result parsing for complex string results 2023-07-21 14:35:44 +02:00
Nicolas Luck 0b833bd2f3 Add missing write_goal/3 to lib_toplevel.pl 2023-07-21 00:23:35 +02:00
Nicolas Luck 7c93450aa7 type QueryResult = Result<QueryResolution, String> 2023-07-20 22:31:20 +02:00
Nicolas Luck cae32d6a00 Error handling 2023-07-20 22:23:51 +02:00
Nicolas Luck 836f6c1d5b Don't panic when parsing results fails 2023-07-20 21:34:43 +02:00
Nicolas Luck 644559b7f7 Add back newline at end of toplevel.pl 2023-07-17 21:52:17 +02:00
Nicolas Luck bb95ed3ad0 Add back all needed predicates to lib_toplevel.pl 2023-07-17 21:48:05 +02:00
Nicolas Luck 3947390877 Use lib constructor in lib tests 2023-07-17 21:47:43 +02:00
Nicolas Luck e7f1e32ee3 fmt machine/parsed_results.rs 2023-07-17 21:35:00 +02:00
Nicolas Luck 5f8cc3c64b WIP: refactor to generalize Machine::run_top_level() 2023-07-17 21:34:26 +02:00
Nicolas Luck c0dd94c8a3 Add test for programatic queries 2023-07-12 11:57:53 +02:00
Nicolas Luck f65675836c Fix build warnings 2023-07-12 11:38:53 +02:00
Nicolas Luck f324c9591d Refactor result parsing to idiomatic Rust and extract into parsed_results.rs 2023-07-12 10:34:07 +02:00
Nicolas Luck 3347f830c7 Remove debug println!s 2023-07-12 01:26:54 +02:00
Nicolas Luck 568abef5b8 Parsed QueryResult 2023-07-12 01:24:39 +02:00
Nicolas Luck 703efdb22d Make run_input_once/0 match and print all results 2023-07-12 00:03:47 +02:00
Nicolas Luck 2f45f0cfed Add convenience methods Machine::load_module_string() and Machine::run_query() 2023-07-11 14:51:58 +02:00
Nicolas Luck 112d398175 Add Machine::run_input_once() which reads one goal from user input and runs it 2023-07-11 14:24:30 +02:00
Nicolas Luck 95b31146b5 Add Machine::set_user_input(&mut self, input: String) and get_user_output() -> String. Make read_term_from_user_input() handle Stream::Byte. 2023-07-11 14:22:27 +02:00