DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Boolean — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
B

dsh-boolean

Boolean

DeepSeek Harness (dsh) 的布尔代数工具箱:解析逻辑表达式(NOT/AND/OR/XOR/IMPLIES/IFF,支持符号或单词)、生成带最小项/最大项摘要的完整真值表、单次赋值求值、带反例的等价性检查,以及规范形式转换(NNF/DNF/CNF/仅 NAND/仅 NOR-onl)

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:TYEclipse/dsh-boolean#d697f861c26a47ac3c6a5e8a4577b83c3f33e029
README兼容性版本

说明

DeepSeek Harness (dsh) 的布尔代数工具箱:解析逻辑表达式(NOT/AND/OR/XOR/IMPLIES/IFF,支持符号或单词)、生成带最小项/最大项摘要的完整真值表、单次赋值求值、带反例的等价性检查,以及规范形式转换(NNF/DNF/CNF/仅 NAND/仅 NOR-only)——零运行时依赖

兼容性与来源证明

Boolean 以 dsh-boolean 发布,当前版本为 0.1.3。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/9/10

版本

0.1.3stable
2026/9/10
0.1.0stable
2026/9/9
最新版
0.1.3
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

README

dsh-boolean

Boolean algebra toolbox for DeepSeek Harness (dsh). Parse propositional-logic expressions and get full truth tables with minterm/maxterm summaries, canonical DNF/CNF, NNF, and NAND-only / NOR-only gate networks — no hand-drawn 16-row tables, no De Morgan slips.

Zero runtime dependencies, pure local math.

Why

Modeled reasoning often derails on small logic chores: expanding ¬(a∧b), listing the satisfying rows of a 3-variable expression, or checking whether two formulas say the same thing. These tools do the bookkeeping exactly, one expression at a time.

Install

dsh plugin --profile web add github:TYEclipse/dsh-boolean

Restart the profile session (or start a new one) and the four tools are registered under tools for every agent. Requires pnpm on PATH (the plugin host resolves it).

Tools

ToolWhat it does
truth_tableEnumerates every assignment row (up to 8 variables / 256 rows) with the result, minterm & maxterm indices, tautology / contradiction / satisfiability flags, and canonical DNF and CNF strings.
logic_evalEvaluates an expression under one complete assignment (trueVars / falseVars); missing variables are reported, never silently defaulted.
logic_equivCompares two expressions over all rows of the combined table; reports how many rows differ and one concrete counterexample when they are not equivalent.
logic_convertConverts an expression to nnf, dnf, cnf, nand, or nor canonical form. DNF/CNF come from the truth table (8-variable cap); nnf/nand/nor are structural rewrites without a cap.

Expression syntax

MeaningSymbolsWordsUnicode
NOT (prefix)!not¬
AND&and∧
XOR^xor⊕
OR|or∨
IMPLIES-> =>implies→
IFF<-> <=>iff↔
  • Variables are single letters a–z (upper case is normalized); parentheses () group.
  • Precedence, high to low: NOT → AND → XOR → OR → IMPLIES → IFF.
  • Binary operators are left-associative; parenthesize chains of -> / <-> when in doubt.
  • XOR, IMPLIES and IFF are desugared at parse time to NOT/AND/OR with the textbook identities (a^b ≡ (a&!b)|(!a&b), a->b ≡ !a|b, a<->b ≡ (a&b)|(!a&!b)).
  • Expressions are limited to 512 characters; truth-table enumeration to 8 variables.

Examples

All outputs below are real tool output (v0.1.0).

Truth table of XOR — every row plus the canonical forms:

truth_table { expr: "a ^ b" }
→ rows: m0(00)=0, m1(01)=1, m2(10)=1, m3(11)=0
  minterms [1,2]  DNF = (!a & b) | (a & !b)
  maxterms [0,3]  CNF = (a | b) & (!a | !b)

Check one row instead of the whole table:

logic_eval { expr: "a -> (b | c)", trueVars: ["a"], falseVars: ["b","c"] }
→ a -> (b | c) with a=true, b=false, c=false = false

Verify a rewrite identity (De Morgan):

logic_equiv { exprA: "!(a | b)", exprB: "!a & !b" }
→ equivalent: !(a | b) == !a & !b (all 4 rows agree)

Push negations down or build single-gate networks:

logic_convert { expr: "!(a & b)", operation: "nnf" } → !a | !b
logic_convert { expr: "a & b",   operation: "nand" } → NAND(NAND(a,b),NAND(a,b))
logic_convert { expr: "a | b",   operation: "nor"  } → NOR(NOR(a,b),NOR(a,b))
logic_convert { expr: "a -> b",  operation: "dnf"  } → (!a & !b) | (!a & b) | (a & b)

Invalid input is reported with a position and a reason instead of a wrong answer: a & → unexpected end of expression (at position 3); foo & a → variables must be single letters a–z.

Notes & limits

  • Truth-table tools cap at 8 variables (256 rows); nnf/nand/nor conversions are structural and unlimited.
  • logic_eval needs every expression variable in exactly one of trueVars / falseVars; listing a variable in both, or a variable name outside a–z, is an error.
  • Gate outputs use function-call syntax: NAND(a,b) / NOR(a,b), with NOT(x) written as NAND(x,x) or NOR(x,x). Input grammar does not accept gate names — convert, don't write gates.
  • Canonical DNF of a contradiction and canonical CNF of a tautology are the empty string, with an explanatory note.

Development

pnpm install
pnpm build      # tsc -> dist/ (committed: git installs do not build)
pnpm test       # 99 tests: parser semantics, oracle-anchored tables (independent Python
                # enumeration), gate networks, schema guards, lossless-JSON discipline
pnpm lint       # oxlint src test

Test anchors are generated by an independent Python oracle (itertools brute-force truth enumeration + textbook canonical-form construction); every DNF/CNF string and every truth row in the fixture is cross-checked against the TypeScript implementation.

License

MIT — see LICENSE.