{"id":29020376,"url":"https://github.com/onepointert/libtruth","last_synced_at":"2025-09-06T00:44:09.780Z","repository":{"id":300861527,"uuid":"1006038265","full_name":"onepointerT/libtruth","owner":"onepointerT","description":"Basic and general concepts for truth evaluation of algebraic-logic terms","archived":false,"fork":false,"pushed_at":"2025-07-01T11:24:53.000Z","size":8928,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"dev","last_synced_at":"2025-07-01T12:29:36.086Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onepointerT.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,"zenodo":null}},"created_at":"2025-06-21T10:56:29.000Z","updated_at":"2025-07-01T11:24:57.000Z","dependencies_parsed_at":"2025-06-24T01:32:47.116Z","dependency_job_id":"6142fc3d-2654-449a-ba6e-9db2c7d22913","html_url":"https://github.com/onepointerT/libtruth","commit_stats":null,"previous_names":["onepointert/libtruth"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/onepointerT/libtruth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onepointerT%2Flibtruth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onepointerT%2Flibtruth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onepointerT%2Flibtruth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onepointerT%2Flibtruth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onepointerT","download_url":"https://codeload.github.com/onepointerT/libtruth/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onepointerT%2Flibtruth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273842867,"owners_count":25177921,"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-05T02:00:09.113Z","response_time":402,"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":[],"created_at":"2025-06-26T01:05:29.317Z","updated_at":"2025-09-06T00:44:09.769Z","avatar_url":"https://github.com/onepointerT.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"### OnePointer C++ LibTruth\r\n##### v0.1.2\r\n###### Basic and general concepts for truth evaluation with C++ from OnePointer UG\r\n\r\n\r\nThis library helps evaluating truth values of algebraic truth terms corresponding to\r\ntheir real value of coherent variables. Under development.\r\n\r\nThe documentation can be found in the folder `doc/`.\r\n\r\n#### Usage\r\n\r\nYou may easily create your own logical expressions and evaluate its substantial parts down\r\nuntil atomic logical terms and algebraic operands consisting of only two variables and and a operator\r\nor even two logical terms and a operator.\r\n\r\n```C++\r\n#include \u003ctruth/boolexpr.hpp\u003e\r\n#include \u003ctruth/bool_base.hpp\u003e\r\n#include \u003ctruth/bool_atomic_term.hpp\u003e\r\n#include \u003ctruth/bool_value_dict.hpp\u003e\r\n\r\nusing namespace truth;\r\n\r\nBoolExpr expr = \"(a \u0026\u0026 b) \u003e\u003e c\";\r\nBoolType* type = new BoolType( expr );\r\nBoolDict\u003cBoolValue\u003e* bd = new BoolDict\u003cBoolValue\u003e();\r\n(*bd)[\"a\"] = True;\r\n(*bd)[\"b\"] = True;\r\n(*bd)[\"c\"] = False;\r\nBoolValue value = BoolType::evaluate_bool( expr, *bd );\r\ntype-\u003eresults[expr] = value;\r\n```\r\n\r\nAlso you may inspect terms and their result in shape of a b-tree.\r\n\r\n```C++\r\n#include \u003ctruth/booltree.hpp\u003e\r\n\r\ntruth::Tree* btree = Tree::get_new( expr );\r\nbtree-\u003eeval( *bd );\r\n```\r\n\r\nLastly you may get an evaluation pair for inspection and evaluate it later.\r\n\r\n```C++\r\n#include \u003ctruth/bool_lazy.hpp\u003e\r\n\r\ntruth_pair_t\u0026 tp = truth::get_new( new AtomicBoolTerm(expr) );\r\ntp.second-\u003eset(\"a\", false);\r\ntp.second-\u003eset(\"c\", true);\r\ntp.second-\u003eset(\"b\", []() { return btree-\u003eeval(*bd) } );\r\ntruth::eval( tp );\r\n```\r\n\r\n* Numeric comparison operators in logical expressions will be implemented\r\n* Interaction for getting the realistic values of bool dicts is under development as well as logging functionality.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonepointert%2Flibtruth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonepointert%2Flibtruth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonepointert%2Flibtruth/lists"}