{"id":22859911,"url":"https://github.com/harmim/vut-flp-project1","last_synced_at":"2026-05-15T22:01:35.567Z","repository":{"id":74891428,"uuid":"246444370","full_name":"harmim/vut-flp-project1","owner":"harmim","description":"Functional and Logic Programming - Functional Project - SIMPLIFY-BKG","archived":false,"fork":false,"pushed_at":"2020-03-14T21:50:15.000Z","size":335,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T08:23:42.978Z","etag":null,"topics":["context-free-grammar","flp","functional-programming","ghc","haskell","theoretical-computer-science","vut","vut-fit"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/harmim.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-11T01:16:48.000Z","updated_at":"2021-09-06T15:41:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"20cfee95-d92a-4bad-9cb3-a415b0429564","html_url":"https://github.com/harmim/vut-flp-project1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/harmim/vut-flp-project1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harmim%2Fvut-flp-project1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harmim%2Fvut-flp-project1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harmim%2Fvut-flp-project1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harmim%2Fvut-flp-project1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harmim","download_url":"https://codeload.github.com/harmim/vut-flp-project1/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harmim%2Fvut-flp-project1/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267312283,"owners_count":24067777,"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-07-27T02:00:11.917Z","response_time":82,"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":["context-free-grammar","flp","functional-programming","ghc","haskell","theoretical-computer-science","vut","vut-fit"],"created_at":"2024-12-13T09:08:25.352Z","updated_at":"2025-10-20T01:27:54.053Z","avatar_url":"https://github.com/harmim.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Functional and Logic Programming - Functional Project\n## SIMPLIFY-BKG\n\n##### Author: Dominik Harmim \u003cxharmi00@stud.fit.vutbr.cz\u003e\n\n## Build\nUsing the command `make`, the project is compiled using the `ghc` compiler\nand a program `simplify-bkg` is created.\n\n## Run\nAfter the compilation (see the section above), it can be run as follows:\n```bash\n$ ./simplify-bkg (-i|-1|-2) [input-file]\n```\n`input-file` is the name of an input file. If it is not specified, the program\nreads the standard input. With the option `-i`, the program prints the loaded\ncontext-free grammar. With the option `-1`, the program prints the\ncontext-free grammar without nonterminal symbols that generate nonterminal\nstrings. With the option `-2`, the program prints the context-free grammar\nwithout nonterminal symbols that generate nonterminal strings and without\nunreachable symbols.\n\n## Description\nThe program removes unnecessary symbols from the context-free grammar. An\ninput grammar is first validated and in case of invalid format or invalid\ngrammar, an error message is printed to the standard error output and the\nprogram is terminated with an error code. Otherwise, the unnecessary symbols\nare removed and the grammar is printed to the standard output. The source\ncodes are located in the following files:\n- `Types.hs` - Definitions of data types. The internal representation of the\n  context-free grammar.\n  * The grammar is represented as a structure where nonterminal symbols are\n    a list of characters, terminal symbols are a list of characters, the\n    starting symbol is a character, and production rules are a list of pairs\n    where the left side of the rule is a character and the right side is\n    a list of characters.\n- `Parser.hs` - An input parser. Parsing and validating an input grammar and\n  converting it to the internal representation.\n  * The library `Text.Parsec` is used for parsing the input grammar.\n- `Simplification.hs` - An implementation of the simplification of the\n  context-free grammar algorithm.\n- `Main.hs` - The main program. Performs input and output operations. Initiates\n  the computation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharmim%2Fvut-flp-project1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharmim%2Fvut-flp-project1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharmim%2Fvut-flp-project1/lists"}