diff --git a/Cargo.toml b/Cargo.toml index fa4be82..77ae717 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "babel_nar_cli" -version = "0.2.0" +version = "0.2.1" edition = "2021" description = """ Command Line Interface (CLI) of BabelNAR.rs diff --git a/README.md b/README.md index 9748c1d..f44d915 100644 --- a/README.md +++ b/README.md @@ -39,9 +39,11 @@ | 语句输入 | ` B>.` + ` C>.` | `< B> ==> D>>.` + ` B>.` | `< $1> ==> <$1 --> C>>.` + ` B>.` | ` B>. :\|:` + ` D>. :\|:` | `<(*, ...) --> ^left>! :\|:` | `A. :\|:` + `<(*, {SELF}) --> ^left>. :\|:` + `G. :\|:` + `<(&/, A, <(*, ...) --> ^left>) ==> G>?` + `G! :\|:` | | 预期输出 | ` C>.` | ` D>.` | ` C>.` | `< B> =/> D>>.` | EXE `<(*, ...) --> ^left> :\|:` | EXE `<(&/, A, <(*, ...) --> ^left>) ==> G>` | | OpenNARS(3.0.4) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| OpenNARS(1.5.8) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | | ONA | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | | PyNARS | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | | CXinNARS | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| NARust-158 | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ## 参考 diff --git a/src/tests/cli/config/cin_narust_158.hjson b/src/tests/cli/config/cin_narust_158.hjson new file mode 100644 index 0000000..1bce8d3 --- /dev/null +++ b/src/tests/cli/config/cin_narust_158.hjson @@ -0,0 +1,16 @@ +#hjson +// * 🎯用于测试NARust-158 +// * ✨纯Rust编写的完整OpenNARS 1.5.8复刻版本 +{ + // 使用「原生」输入输出转译器 + translators: native + command: { + // * ⚠️必须前缀`./`以指定是「启动当前工作目录下的exe文件」 + cmd: ./narust_158_batch.exe + cmdArgs: [] + // * 🚩现在基于「固定位置的CIN程序包」运行测试 + // * 回溯路径:config(`./`) => cli => tests => src => BabelNAR.rs / executables + currentDir: ./../../../../executables + } + autoRestart: true +} \ No newline at end of file diff --git a/src/tests/config_paths.rs b/src/tests/config_paths.rs index d443358..5e7f2d7 100644 --- a/src/tests/config_paths.rs +++ b/src/tests/config_paths.rs @@ -29,6 +29,8 @@ nar_dev_utils::macro_once! { CXIN_JS = "./src/tests/cli/config/cin_cxin_js.hjson" /// 原生IL-1 NATIVE_IL_1 = "./src/tests/cli/config/cin_native_il_1.hjson" + /// NARust-158 + NARUST_158 = "./src/tests/cli/config/cin_narust_158.hjson" /// 预引入/NAL测试环境 PRELUDE_TEST = "./src/tests/cli/config/prelude_test.hjson" diff --git a/src/tests/mod.rs b/src/tests/mod.rs index cdc7750..9f909e5 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -344,6 +344,44 @@ mod native_il_1 { } } +/// 测试/NARust-158 +mod narust_158 { + use super::*; + + cin_tests! { + NARUST_158; + // TODO: 彻查「推理测试」无响应的bug + + /// 真值通配 + /// * ✅【2024-09-13 01:31:29】成功 + nal_tw => NAL_TRUTH_WILDCARD + + /// 简单演绎 + /// * ✅【2024-09-13 01:31:34】成功 + nal_de => NAL_SIMPLE_DEDUCTION + + /// 高阶演绎 + /// * ✅【2024-09-13 01:31:39】成功 + nal_hi => NAL_HIGHER_DEDUCTION + + /// 自变量消除 + /// * ✅【2024-09-13 01:31:44】成功 + nal_ie => NAL_I_VAR_ELIMINATION + + /// 时间归纳 + /// * ❌【2024-09-13 01:31:49】不支持 + nal_te => NAL_TEMPORAL_INDUCTION + + /// 简单操作 + /// * ❌【2024-09-13 01:31:56】不支持 + nal_so => NAL_SIMPLE_OPERATION + + /// 操作 + /// * ❌【2024-09-13 01:32:02】不支持 + nal_op => NAL_OPERATION + } +} + // ! ❌【2024-04-07 14:39:20】接口完成度不高的NARS-Python、OpenJunars暂不进行测试 /// 测试入口/带Websocket Shell