{"id":29358171,"url":"https://github.com/average-user/lec","last_synced_at":"2025-09-07T03:33:34.374Z","repository":{"id":303191510,"uuid":"128555080","full_name":"Average-user/LEC","owner":"Average-user","description":"Transformer of propositional logic expressions to CNF and DNF","archived":false,"fork":false,"pushed_at":"2018-05-01T18:21:54.000Z","size":16,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-06T08:44:00.173Z","etag":null,"topics":["cnf","cnf-encoding","haskell","logic"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/Average-user.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-04-07T18:05:41.000Z","updated_at":"2020-12-22T17:29:41.000Z","dependencies_parsed_at":"2025-07-06T08:44:03.407Z","dependency_job_id":"46b48407-0ca7-44b5-b5cd-9178f3ab0f65","html_url":"https://github.com/Average-user/LEC","commit_stats":null,"previous_names":["average-user/lec"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Average-user/LEC","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Average-user%2FLEC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Average-user%2FLEC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Average-user%2FLEC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Average-user%2FLEC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Average-user","download_url":"https://codeload.github.com/Average-user/LEC/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Average-user%2FLEC/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273992761,"owners_count":25203790,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cnf","cnf-encoding","haskell","logic"],"created_at":"2025-07-09T06:08:53.137Z","updated_at":"2025-09-07T03:33:34.343Z","avatar_url":"https://github.com/Average-user.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logic Expressions Converter\n\nA program to transform logic expressions into their Conjunctive normal form (CNF) and\nDisjunctive Normal Form (DNF) representations.\n\nSo far the program works fine with any expression composed by:\n\n| Operators             | ASCII representation   | Also known as |\n|:----------------------|:----------------------:|:--------------|\n| Negation              | !                      | Not           |\n| Conjunction           | \u0026                      | And           |\n| Disjunction           | \\|                     | Or            |\n| Implication           | \u003e                      | Implies       |\n| Equality              | =                      | Iff           |\n| Exclusive Disjunction | +                      | Xor           |\n\n\n### To do list:\n\n- [x] Parser\n- [ ] Converter\n    - [x] De Morgan's Law\n    - [x] Distributivity\n    - [ ] Redundant clauses elimination\n- [x] Tests\n    - [x] Equality between a formula and his (CNF, DNF) conversion\n    - [x] Correctness of conversions (CNF, DNF)\n- [ ] Human readable error messages\n- [ ] Benchs\n\n\nSome examples of how does this work:\n```Text\n$ stack exec LEC-exe\n\nInsert Expression:\n!(A | B) \u0026 C\n\nParsed Expression:       !(A | B) \u0026 C\nConjunctive normal form: !A \u0026 !B \u0026 C\nDisjunctive normal form: !A \u0026 !B \u0026 C\n\n\nInsert Expression:\n!(A | B) | C\n\nParsed Expression:       !(A | B) | C\nConjunctive normal form: (!A | C) \u0026 (!B | C)\nDisjunctive normal form: (!A \u0026 !B) | C\n\n\nInsert Expression:\n(A = B)\n\nParsed Expression:       A = B\nConjunctive normal form: (A | !A) \u0026 (A | !B) \u0026 (B | !A) \u0026 (B | !B)\nDisjunctive normal form: (A \u0026 B) | (!A \u0026 !B)\n\n\nInsert Expression:\n(A = B) \u003e C\n\nParsed Expression:       (A = B) \u003e C\nConjunctive normal form: (!A | !B | C) \u0026 (A | B | C)\nDisjunctive normal form: (!A \u0026 A) | (!A \u0026 B) | (!B \u0026 A) | (!B \u0026 B) | C\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faverage-user%2Flec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faverage-user%2Flec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faverage-user%2Flec/lists"}