{"id":20389188,"url":"https://github.com/daidr/truth-table","last_synced_at":"2025-12-02T17:03:05.274Z","repository":{"id":39914008,"uuid":"466404295","full_name":"daidr/truth-table","owner":"daidr","description":"根据逻辑表达式生成对应真值表 (Generate corresponding truth table from logical expression)","archived":false,"fork":false,"pushed_at":"2022-07-05T16:01:02.000Z","size":291,"stargazers_count":63,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-24T16:12:52.657Z","etag":null,"topics":["logic","math","truth-table","truth-table-generator"],"latest_commit_sha":null,"homepage":"https://tb.daidr.me","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daidr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-05T09:12:29.000Z","updated_at":"2024-10-21T13:55:43.000Z","dependencies_parsed_at":"2022-09-15T00:31:48.656Z","dependency_job_id":null,"html_url":"https://github.com/daidr/truth-table","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daidr%2Ftruth-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daidr%2Ftruth-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daidr%2Ftruth-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daidr%2Ftruth-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daidr","download_url":"https://codeload.github.com/daidr/truth-table/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241940541,"owners_count":20045878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["logic","math","truth-table","truth-table-generator"],"created_at":"2024-11-15T03:16:15.407Z","updated_at":"2025-12-02T17:03:00.239Z","avatar_url":"https://github.com/daidr.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align='center'\u003e\u003cimg width=\"100px\" style=\"display:block; margin:0 auto;\" src=\"https://cdn.jsdelivr.net/gh/daidr/truth-table@main/public/icons/android-chrome-192x192.png\" alt=\"Truth Table\"\u003e\n\u003c/p\u003e\n\n# 真值表\n\n\u003e 一个心血来潮的小项目\n\n示例地址：[https://tb.daidr.me](https://tb.daidr.me)\n\n## 功能\n\n通过给定的逻辑表达式来生成真值表，并且能够给出中间过程。lexer与parser的部分使用antlr编写。\n\n## 一些说明\n\n变元应由字母和数字组成，支持单个字符（如`p` `q`）或多个字符（如`ab` `ac` `a1` `a2`）\n大小写不一致的变元被视为不同的变元，如 `A` `a` 为两个不同的变元。\n必须由字母开头，如 `a5` `b6` 合法，而 `5a` `5` 不合法\n\n目前支持下面这些逻辑：\n\n* 合取 (∧) (conjunction)\n* 非 (¬) (negation)\n* 析取 (∨) (disjunction)\n* 蕴涵 (→) (implication)\n* 等值于 (⇔) (equivalence)\n\n由于这些符号普遍较难输入，所以提供了一些常见符号用于代换，使用的时候软件会自动帮你将下面这些符号替换为对应的逻辑符号：\n\n* 合取 `\u0026` `^`\n* 非 `！` `!`\n* 析取 `|`\n* 蕴涵 `\u003e` `》`\n* 等值于 `=`\n\n运算优先级(由高到低递减)： `¬` `∧` `∨` `→` `⇔`，其中连续的蕴涵运算由右向左合并（例如 `a→b→c` 等价于 `a→(b→c)`）\n\n可以使用括号修改运算的优先级。\n\n\u003e 由于这个小项目是一天时间糊出来的，代码写的非常乱，之后有时间再整理吧🥱\n\n\n## 开发\n\n### 安装依赖\n\n```\npnpm\n```\n\nor \n\n```\nyarn\n```\n\n### 启动项目\n\n```\npnpm dev\n```\n\nor\n\n```\nyarn dev\n```\n\nvite调试服务会在 [http://localhost:4000](http://localhost:4000) 启动\n\n### 构建\n\n```\npnpm build\n```\n\nor\n\n```\nyarn build\n```\n\n构建的结果会输出到 `dist` 目录下\n\n## 为我投票\n\n\u003ca href=\"https://www.producthunt.com/posts/truth-table?utm_source=badge-featured\u0026utm_medium=badge\u0026utm_souce=badge-truth\u0026#0045;table\" target=\"_blank\"\u003e\u003cimg src=\"https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=349421\u0026theme=light\" alt=\"Truth\u0026#0032;Table - Generate\u0026#0032;corresponding\u0026#0032;truth\u0026#0032;table\u0026#0032;from\u0026#0032;logical\u0026#0032;expression | Product Hunt\" style=\"width: 250px; height: 54px;\" width=\"250\" height=\"54\" /\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaidr%2Ftruth-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaidr%2Ftruth-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaidr%2Ftruth-table/lists"}