{"id":16374977,"url":"https://github.com/moderocky/logos","last_synced_at":"2026-03-31T16:30:17.810Z","repository":{"id":234212970,"uuid":"788444048","full_name":"Moderocky/Logos","owner":"Moderocky","description":"A library for defining and evaluating logic frameworks.","archived":false,"fork":false,"pushed_at":"2024-04-19T10:51:47.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-01T04:15:03.254Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Moderocky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-18T12:33:30.000Z","updated_at":"2024-04-18T12:33:37.000Z","dependencies_parsed_at":"2024-04-18T14:28:20.591Z","dependency_job_id":"5ece15d9-620e-4acf-b94c-e5d26986e269","html_url":"https://github.com/Moderocky/Logos","commit_stats":null,"previous_names":["moderocky/logos"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moderocky%2FLogos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moderocky%2FLogos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moderocky%2FLogos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moderocky%2FLogos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Moderocky","download_url":"https://codeload.github.com/Moderocky/Logos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239954698,"owners_count":19724286,"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":[],"created_at":"2024-10-11T03:19:01.841Z","updated_at":"2026-03-31T16:30:17.734Z","avatar_url":"https://github.com/Moderocky.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Logos\n=====\n\nA library for defining and evaluating logic frameworks.\n\n## Terminology \u0026 Connectives\n\nThis project uses specific terminology and iconography in explanation and documentation.\n\nSince these terms (or associated symbols) might be unfamiliar to users of different backgrounds\n(classical logic, set notation and computing terminology often use different words or symbols\nto mean the same thing), it is recommended that all users familiarise themselves with the versions\nused in this library, to avoid confusion.\n\n### Fundamental Logic Operators\n\n| Instruction | Symbol           | Alternative Names                     |\n|:------------|------------------|---------------------------------------|\n| TRUE        | `⊤`, `true`      |                                       |\n| FALSE       | `⊥`, `false`     |                                       |\n| NOT         | `¬`, `!`         | Negation.                             |\n| IMPLICATION | `→`, `-\u003e`        | Material conditional/implication.     |\n| EQUIVALENCE | `=`, `==`, `\u003c-\u003e` | Bi-conditional. Also known as 'XNOR'. |\n| AND         | `∧`, `\u0026`         | Conjunction.                          |\n| OR          | `∨`, `\\|`        | Inclusive disjunction.                |\n| XOR         | `⊻`, `^`         | Exclusive disjunction.                |\n\n**Note**: do not confuse Java's XOR symbol `^` (circumflex) with the logical AND `∧`.\n\nThe following are not strictly used but may be referenced.\n\n| Instruction | Symbol |\n|:------------|--------|\n| NAND        | `⊼`    | \n| NOR         | `⊽`    |\n\n### Predicate Logic Operators\n\n| Instruction | Symbol | Alternative Names                              |\n|:------------|--------|------------------------------------------------|\n| FOR ALL     | `∀`    | Universal quantifier. 'For all x...'           |\n| EXISTS      | `∃`    | Existential quantifier. 'There is an x...'     |\n| NONE        | `∄`    | Non-existential quantifier. 'There is no x...' |\n| UNIQUE      | `∃!`   | Unique quantifier. 'There is exactly one x...' |\n\n### Modal Logic Operators\n\n| Instruction | Symbol | Alternative Names |\n|:------------|--------|-------------------|\n| NECESSARY   | `□`    | Necessity.        |\n| POSSIBLe    | `◇`    | Possibility.      |\n\n## Order of Operations\n\nThe programmatic structure should prevent any confusion about order of operations.\n\nAny operator method acting _on_ a thing (`a.and(b)`) will take its subject as its first argument,\nand its object as its second argument (`a \u0026 b`).\n\nOperator methods return the **combined** instruction, so `a.and(b).and(c)` will be evaluated in order:\n- `a \u0026 b`\n- `... \u0026 c`\nThis is equivalent to `(a \u0026 b) \u0026 c`.\n\nIf the alternative is desired, the combination should be the operator's object rather than its subject:\n`a.and(b.and(c))`, which will produce `a \u0026 (b \u0026 c)`.\n\n\u003e **Note**: \n\u003e For those who are unfamiliar, chained methods (`first().second().third()`) evaluate from left to right.\n\u003e\n\u003e Arguments evaluate before their method call (`third(second(first()))`).\n\u003e \n\u003e Multiple arguments in the same method effectively evaluate simultaneously.\n\n## Supplied Frameworks\n\n### George Boole's Boolean Logic\n\nA [logic](https://en.wikipedia.org/wiki/Boolean_algebra) with two values; TRUE (1) and FALSE (0).\n\nThis is functionally equivalent to Java's primitive booleans, expressed through the framework for conversion.\n\n### Jan Łukasiewicz's Three-Valued 'Ł3' Logic\n\nA [logic](https://en.wikipedia.org/wiki/Three-valued_logic) with three values; TRUE (1), UNKNOWN (0.5) and FALSE (0).\n\n### Jan Łukasiewicz's Many-Valued Logic\n\nA [logic](https://en.wikipedia.org/wiki/%C5%81ukasiewicz_logic) with a range of values; TRUE (1), FALSE (0), and\nPOTENTIAL TRUTH in a range (0 -\u003e 1).\n\nTwo atoms are provided: constant FALSE `0` and binary conjunction IMPLICATION `min(1, 1 - x + y)`.\nEverything is derived from this:\n\n| Operation   | Derivation          | Calculation         |\n|-------------|---------------------|---------------------|\n| IMPLICATION |                     | `min(1, 1 - X + Y)` |\n| FALSE       |                     | `0`                 |\n| TRUE        | `FALSE → FALSE`     | `1`                 |\n| NEGATION    | `X → FALSE`         | `1 - X`             |\n| OR          | `(X → Y) → Y`       | `max(X, Y)`         |\n| AND         | `¬(¬X ∨ ¬Y)`        | `min(X, Y)`         |\n| EQUIVALENCY | `(X → Y) ∧ (Y → X)` | `1 - abs(X - Y)`    |\n\n### Stephen Cole Kleene's Strong Logic of Indeterminacy\n\nA [logic](https://en.wikipedia.org/wiki/Three-valued_logic) with three values; TRUE (1), UNKNOWN (0) and FALSE (-1).\n\n## Extension Frameworks\n\nThis library supplies the possibility of extension frameworks: things that are not real logics but behave like one,\ne.g. when wrapped around an existing logic.\n\nThese could be logic categories (e.g. substructural, predicates, modality) which supply new base operators,\nor tamper with semantics of existing ones, but _only_ to other logics.\n\n### Operator Logic\n\nFunctional, deferred evaluation operators are supplied as a 'logic'.\n\nThis is not a real 'logic' in itself: it constructs chains of operators and instructions with placeholder values.\nThese can then be evaluated later by feeding real values into them, e.g. feeding `true` and `false` into `a \u0026 ¬b`.\n\n#### Construction\n\nOperator logic can be used on its own (with partial functionality) or wrapped around a real logic in order to use its\nfeatures, e.g. true/false states and numeric calculation.\n\nOperation chains are constructed in the usual way (e.g. `falsity().implies(falsity())`, `input(0).and(input(1))`)\nand can then be evaluated with `operator.evaluate(inputs[0..n])` to produce a value of the same form as the input.\n\n#### Printing\n\nOperators are designed to be printed out.\nPrinting an operator will display its variable tokens and connectives (e.g. `input(0).implies(input(1)).not()` is `¬(a → b)`).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoderocky%2Flogos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoderocky%2Flogos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoderocky%2Flogos/lists"}