{"id":28196358,"url":"https://github.com/decision-driven-development/logic-checker","last_synced_at":"2026-02-18T02:04:57.094Z","repository":{"id":238057078,"uuid":"795780337","full_name":"Decision-Driven-Development/logic-checker","owner":"Decision-Driven-Development","description":"A tool to check the correctness of business-logic, described by decision tables and commands","archived":false,"fork":false,"pushed_at":"2024-10-14T06:04:05.000Z","size":223,"stargazers_count":3,"open_issues_count":16,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-16T15:14:15.864Z","etag":null,"topics":["decision-table","dsl","java"],"latest_commit_sha":null,"homepage":"","language":"Java","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/Decision-Driven-Development.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":"2024-05-04T03:28:24.000Z","updated_at":"2024-10-14T06:04:10.000Z","dependencies_parsed_at":"2024-07-24T06:22:29.398Z","dependency_job_id":"cb1160e2-25f4-476b-9bd8-958e0251e6d3","html_url":"https://github.com/Decision-Driven-Development/logic-checker","commit_stats":null,"previous_names":["decision-driven-development/logic-checker"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/Decision-Driven-Development/logic-checker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decision-Driven-Development%2Flogic-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decision-Driven-Development%2Flogic-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decision-Driven-Development%2Flogic-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decision-Driven-Development%2Flogic-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Decision-Driven-Development","download_url":"https://codeload.github.com/Decision-Driven-Development/logic-checker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decision-Driven-Development%2Flogic-checker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271745678,"owners_count":24813521,"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-08-23T02:00:09.327Z","response_time":69,"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":["decision-table","dsl","java"],"created_at":"2025-05-16T15:15:14.025Z","updated_at":"2025-10-16T08:01:52.376Z","avatar_url":"https://github.com/Decision-Driven-Development.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codeless business logic checker\n\n[![PDD status](https://www.0pdd.com/svg?name=Decision-Driven-Development/logic-checker)](https://www.0pdd.com/p?name=Decision-Driven-Development/logic-checker)\n[![Hits-of-Code](https://hitsofcode.com/github/Decision-Driven-Development/logic-checker)](https://hitsofcode.com/github/Decision-Driven-Development/logic-checker/view)\n\nA tool to check the correctness of business-logic, described by decision tables and commands\n\n## Source files format\n\n### Folder structure\n\nThe tool is able to run autotests for decision tables and state machines. The folder structure for \nevery project should consist of the following folders:\n\n- `commands` - folder with commands described in yaml format\n- `tables` - folder with decision tables\n- `states` - folder with initial state descriptions and test expectations\n\n### Commands\n\nCommands should be described like that:\n\n```yaml\noperations:\n  - \"cells::${request::move} -\u003e ${request::player}\"\n  - \"table::currentPlayer -\u003e ${table::nextPlayer}\"\n  - \"table::nextPlayer -\u003e ${request::player}\"\n```\n\nThe only required top-level section is `operations`. It should contain a list of operations, in a \nformat of `target -\u003e value`. The target must point to a valid Coordinate, i.e. a field of an entity\nin the system's state. The value can be a constant or a reference to another valid Coordinate. \n\nReferences are written in a format of `${source::field}`, they can be nested and point to any valid\nCoordinate.\n\n### Decision tables\n\nFor the decision table to be processed, it should be in CSV format with semicolon (`;`) as a separator.\nThe columns of the table represent rules, except for the first one, which contains the \"base\" of each\ncondition. The rows in the first section (before `---`) represent the conditions, and the rows in the second\nsection (after `---`) represent the outcomes.\n\nEvery value in the conditions section should refer to a specific data fragment, which can be located\nby its description, called `Coordinate`. Coordinates consist of two parts: `Locator` - that is the\nname of the data domain, and `Identifier` - that is the name of the data fragment. Those parts are separated\nby `::`. For example, value `ui_button_create::enabled` refers to the `enabled` fragment of the\n`ui_button_create` locator.\n\nFor the constant values, the `Locator` part can be omitted, so the value `5` refers to a constant value `5`.\nFor the sake of completeness, the `Locator` part for constant values is `constant`, so it is possible to\nwrite `constant::5` instead of just `5` (but it is not necessary).\n\nThe table cells in the conditions section should contain the condition description, consisting of\nthe logical operator (if any), followed by the comparison operator (if any), followed by the value.\n\nIf the comparison operator is omitted, it is assumed to be `==`, which means that the \"base\" value of\nthe condition should be equal to the cell value for the condition to be true. Other comparison operators\nare `\u003e` and `\u003c`.\n\nThe logical operators are used to modify the condition itself. The operator `~` means \"any\", so it is\neffectively means that the condition is always true. The operator `!` means \"not\", so it negates the\nspecified condition.\n\n### Tests\n\nThe tests are described in yaml format. The file should contain several sections, separated by `---`.\n\n1. Initial state - the description of the initial state of the system. It should contain the description\nof the data fragments, which are the Coordinates of the system's state. An example of the initial state\ndescription:\n\n```yaml\nrequest:\n  player: \"O\"\n  move: \"A1\"\ntable:\n  currentPlayer: \"X\"\ncells:\n  A1: \"empty\"\n...\n```\n\n2. Commands - the list of commands to be executed. The commands are described like that:\n\n```yaml\ncommands:\n  - name: \"computed_move\"\n    request:\n      player: \"X\"\n      move: \"A1\"\n```\n\nSo, every command should have a name and a description of the request. The request should contain the\ndescription of the data fragments, which are the Coordinates of the system's state.\n\n3. Expectations - the expected result of decision tables computation OR state of the entities after \nall the commands are executed. The expectations should be described in the following format:\n\n```yaml\ngame_state:\n  is_over: \"false\"\n  winner: \"none\"\n```\n\nIf it is the assertion on a decision table, then the upper-level key should be the name of the \ndecision table, and the lower-level keys are the names of the outcomes with their expected values.\nIf it is the assertion on a state, then it's the same format as in the initial state description.\n\n## Running the tests\n\nThe tests are run by:\n\n1. starting the web server and passing the absolute path to the project folder as an argument:\n    ```bash\n    java -jar logic-checker.jar \u003cabsolute-path-to-the-app-resources\u003e\n    ```\n2. and then heading to the `http://localhost:8080/test` in the browser.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecision-driven-development%2Flogic-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecision-driven-development%2Flogic-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecision-driven-development%2Flogic-checker/lists"}