{"id":16891437,"url":"https://github.com/vadyushkins/yafolps","last_synced_at":"2025-03-20T08:22:04.443Z","repository":{"id":121404802,"uuid":"241616728","full_name":"vadyushkins/YAFOLPS","owner":"vadyushkins","description":"Yet Another First-Order Logic Problem Solver","archived":false,"fork":false,"pushed_at":"2020-03-22T20:50:13.000Z","size":311,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-25T09:25:56.707Z","etag":null,"topics":["first-order-logic","getopt","haskell","haskell-exercises","predicate-logic","theorem-proving"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vadyushkins.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}},"created_at":"2020-02-19T12:30:48.000Z","updated_at":"2020-03-25T19:16:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6430d55-8efb-4645-bc27-59b83aa578d3","html_url":"https://github.com/vadyushkins/YAFOLPS","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/vadyushkins%2FYAFOLPS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vadyushkins%2FYAFOLPS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vadyushkins%2FYAFOLPS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vadyushkins%2FYAFOLPS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vadyushkins","download_url":"https://codeload.github.com/vadyushkins/YAFOLPS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244575203,"owners_count":20474875,"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":["first-order-logic","getopt","haskell","haskell-exercises","predicate-logic","theorem-proving"],"created_at":"2024-10-13T17:07:00.202Z","updated_at":"2025-03-20T08:22:04.431Z","avatar_url":"https://github.com/vadyushkins.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YAFOLPS (Yet Another First-Order Logic Problem Solver)\n\n#### Semester project on mathematical logic of the fourth semester of Software Engineering, Department of System Programming, Faculty of Mathematics and Mechanics, St. Petersburg State University. \n\n## Goal\n\n#### We must determine whether the input formula in First-Order Logic is a tautology or not. For this to be done, we have implemented the resolution method.\n\n## EBNF (Extended Backus–Naur form)\n\n```\n\u003cForall\u003e ::= \"!\"\n\u003cExists\u003e ::= \"?\"\n\u003cLogicAnd\u003e ::= \"\u0026\"\n\u003cLogicOr\u003e ::= \"|\"\n\u003cLogicNegation\u003e ::= \"-\"\n\u003cLogicImplication\u003e ::= \"\u003e\"\n\u003cTop\u003e ::= \"^\"\n\u003cBottom\u003e ::= \"_\"\n\n\u003cChar\u003e ::= [a-z] | [A-Z] | [0-9] | \"_\"\n\u003cVar\u003e ::= [A-Z] (\u003cChar\u003e)*\n\u003cTerm\u003e ::= \u003cVar\u003e | [a-z] (\u003cChar\u003e)* \"(\" ((\u003cTerm\u003e \",\")* \u003cTerm\u003e) \")\"\n\n\u003cQuantifier\u003e ::= \u003cForall\u003e | \u003cExists\u003e\n\u003cLogicOperation\u003e ::= \u003cLogicAnd\u003e | \u003cLogicOr\u003e | \u003cLogicImplication\u003e\n\n\u003cPredicateSymbol\u003e ::= [a-z] (\u003cChar\u003e)* \"(\" ((\u003cTerm\u003e \",\")* \u003cTerm\u003e) \")\"\n\n\u003cSingleton\u003e ::= \u003cTop\u003e | \u003cBottom\u003e | \u003cPredicateSymbol\u003e\n\u003cFormula\u003e ::= \u003cSingleton\u003e | \"(\" \u003cFormula\u003e \")\"\n  | \u003cFormula\u003e \u003cLogicOperation\u003e \u003cFormula\u003e \n  | \u003cQuantifier\u003e \u003cVar\u003e \"(\" \u003cFormula\u003e \")\" \n```\n\n# Usage\n\n## ``stack build \u0026\u0026 stack exec -- YAFOLPS-exe \u003cargs\u003e``\n\n## Args\n\n* ``--input-file filename / --i filename -- Reads a formula from a file. Without specifying this option reads a formula from standard input.``\n* ``--print-formula / -f -- Prints the formula that have been read.``\n* ``--print-ast / -a -- Prints the AST of the formula.``\n* ``--print-ssf / -s -- Prints the SSF of the negated formula.``\n* ``--print-solution / -r -- Prints \"VALID\" if is the formula is a tautology, otherwise prints \"NOT VALID\".``\n  \n## Examples\n\n* ``stack build \u0026\u0026 stack exec -- YAFOLPS-exe --i examples/1.txt -fas`` -- ``Prints formula, AST and SSF``\n* ``stack build \u0026\u0026 stack exec -- YAFOLPS-exe --i examples/1.txt -r`` ``-- Prints \"NOT VALID\"``\n* ``stack build \u0026\u0026 stack exec -- YAFOLPS-exe --i examples/2.txt -r`` ``-- Prints \"NOT VALID\"``\n* ``stack build \u0026\u0026 stack exec -- YAFOLPS-exe --i examples/3.txt -r`` ``-- Prints \"NOT VALID\"``\n* ``stack build \u0026\u0026 stack exec -- YAFOLPS-exe --i examples/4.txt -r`` ``-- Prints \"VALID\"``\n* ``stack build \u0026\u0026 stack exec -- YAFOLPS-exe --i examples/Top.txt -r`` ``-- Prints \"VALID\"``\n* ``stack build \u0026\u0026 stack exec -- YAFOLPS-exe --i examples/Bottom.txt -r`` ``-- Prints \"VALID\"``\n\n## Tests\n\n* ``stack test`` -- ``Prints results on the Hilbert's axioms``\n\n![Test results](images/Test_results.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvadyushkins%2Fyafolps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvadyushkins%2Fyafolps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvadyushkins%2Fyafolps/lists"}