René's URL Explorer Experiment


Title: fiind_unit_clause function used by dpll_satisfiable in logic.py has a missing case · Issue #35 · ivan133/aima-python · GitHub

Open Graph Title: fiind_unit_clause function used by dpll_satisfiable in logic.py has a missing case · Issue #35 · ivan133/aima-python

X Title: fiind_unit_clause function used by dpll_satisfiable in logic.py has a missing case · Issue #35 · ivan133/aima-python

Description: To reproduce the problem try running the following script: import logic print logic.dpll_satisfiable(logic.expr("A & ~B & C & (A | ~D) & (~E | ~D) & (C | ~D) & (~A | ~F) & (E | ~F) & (~D | ~F) & (B | ~C | D) & (A | ~E | F) & (~A | E | D)...

Open Graph Description: To reproduce the problem try running the following script: import logic print logic.dpll_satisfiable(logic.expr("A & ~B & C & (A | ~D) & (~E | ~D) & (C | ~D) & (~A | ~F) & (E | ~F) & (~D | ~F) & (B...

X Description: To reproduce the problem try running the following script: import logic print logic.dpll_satisfiable(logic.expr("A & ~B & C & (A | ~D) & (~E | ~D) & (C | ~D) & (~A | ~F...

Opengraph URL: https://github.com/ivan133/aima-python/issues/35

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fiind_unit_clause function used by dpll_satisfiable in logic.py has a missing case","articleBody":"```\n\nTo reproduce the problem try running the following script:\n\nimport logic\n\nprint logic.dpll_satisfiable(logic.expr(\"A & ~B & C & (A | ~D) & (~E | ~D) & (C \n| ~D) & (~A | ~F) & (E | ~F) & (~D | ~F) & (B | ~C | D) & (A | ~E | F) & (~A | \nE | D)\"))\n\nIt will produce \"False\" as an answer while there actually exists a model i.e. \nthe expected output should be:\n\n{B: False, C: True, A: True, F: False, D: True, E: False}\n\n\nThe problem occurs in v193 of logic.py from SVN that arrives with v201 of the \noverall package.\n\nThe problem is due to a missed case in find_unit_clause function in logic.py. \nWhen searching for new unit clauses after assigning True to A, False to B, True \nto C and False to F, the algorithm mistakenly assigns False to D due to clause \n(A | ~D). The problem is due to missing check on whether the clause is already \ntrue or not. A possible fixed version of the find_unit_clause function is below:\n\ndef find_unit_clause(clauses, model):\n    \"\"\"A unit clause has only 1 variable that is not bound in the model.\n    >>> find_unit_clause([A|B|C, B|~C, A|~B], {A:True})\n    (B, False)\n    \"\"\"\n    for clause in clauses:\n        num_not_in_model = 0\n        clause_true=False\n        for literal in disjuncts(clause):\n            sym = literal_symbol(literal)\n            if sym not in model:\n                num_not_in_model += 1\n                P, value = sym, (literal.op != '~')\n            else:\n                clause_true = clause_true | (model[sym] == (literal.op != '~' ))\n        if ((num_not_in_model == 1) and not(clause_true)):\n            return P, value\n    return None, None\n\n```\n\nOriginal issue reported on code.google.com by `juhan.er...@gmail.com` on 10 Dec 2012 at 10:34\n","author":{"url":"https://github.com/GoogleCodeExporter","@type":"Person","name":"GoogleCodeExporter"},"datePublished":"2015-03-25T03:15:49Z","url":"https://github.com/ivan133/aima-python/issues/35"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:63abe7aa-bc40-e428-9c75-5f9bc060dfc5
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCF62:A2006:A74DF4:E419D2:6AFE7DD7
html-safe-nonce969a939abd04bd4fb6dcad64978df067df237c545233a2c0343f82feb3727a3e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjYyOkEyMDA2OkE3NERGNDpFNDE5RDI6NkFGRTdERDciLCJ2aXNpdG9yX2lkIjoiMzc5ODYzMTg3MDUyMjg4MzU0MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac67e5ba8acd7cbd3e3b2772444b7d24f15cb4431568353c1f6a47d4a96fd6873a
hovercard-subject-tagissue:64160906
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ivan133/aima-python/35/issue_layout
twitter:imagehttps://opengraph.githubassets.com/75b3d406f00e3c0cd7d57f161cb8474fce1336f803f54b6ba785cb25f77cea88/ivan133/aima-python/issues/35
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/75b3d406f00e3c0cd7d57f161cb8474fce1336f803f54b6ba785cb25f77cea88/ivan133/aima-python/issues/35
og:image:altTo reproduce the problem try running the following script: import logic print logic.dpll_satisfiable(logic.expr("A & ~B & C & (A | ~D) & (~E | ~D) & (C | ~D) & (~A | ~F) & (E | ~F) & (~D | ~F) & (B...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameGoogleCodeExporter
hostnamegithub.com
expected-hostnamegithub.com
Noneb3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86
turbo-cache-controlno-preview
go-importgithub.com/ivan133/aima-python git https://github.com/ivan133/aima-python.git
octolytics-dimension-user_id4018236
octolytics-dimension-user_loginivan133
octolytics-dimension-repository_id32839887
octolytics-dimension-repository_nwoivan133/aima-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id32839887
octolytics-dimension-repository_network_root_nwoivan133/aima-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4a10310af51a1bfffbedc4fd81cb582acf0cb0ff
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/ivan133/aima-python/issues/35#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fivan133%2Faima-python%2Fissues%2F35
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fivan133%2Faima-python%2Fissues%2F35
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=ivan133%2Faima-python
Reloadhttps://github.com/ivan133/aima-python/issues/35
Reloadhttps://github.com/ivan133/aima-python/issues/35
Reloadhttps://github.com/ivan133/aima-python/issues/35
ivan133https://github.com/ivan133
aima-pythonhttps://github.com/ivan133/aima-python
Codehttps://github.com/ivan133/aima-python
Issues15 (15)https://github.com/ivan133/aima-python/issues
Pull requestshttps://github.com/ivan133/aima-python/pulls
Actionshttps://github.com/ivan133/aima-python/actions
Projectshttps://github.com/ivan133/aima-python/projects
Security and qualityhttps://github.com/ivan133/aima-python/security
Insightshttps://github.com/ivan133/aima-python/pulse
https://github.com/ivan133/aima-python
New issuehttps://github.com/login?return_to=https://github.com/ivan133/aima-python/issues/35
New issuehttps://github.com/login?return_to=https://github.com/ivan133/aima-python/issues/35
fiind_unit_clause function used by dpll_satisfiable in logic.py has a missing casehttps://github.com/ivan133/aima-python/issues/35#top
Priority-Mediumhttps://github.com/ivan133/aima-python/issues?q=state%3Aopen%20label%3A%22Priority-Medium%22
Type-Defecthttps://github.com/ivan133/aima-python/issues?q=state%3Aopen%20label%3A%22Type-Defect%22
auto-migratedhttps://github.com/ivan133/aima-python/issues?q=state%3Aopen%20label%3A%22auto-migrated%22
https://github.com/GoogleCodeExporter
GoogleCodeExporterhttps://github.com/GoogleCodeExporter
on Mar 25, 2015https://github.com/ivan133/aima-python/issues/35#issue-64160906
GoogleCodeExporterhttps://github.com/GoogleCodeExporter
Priority-Mediumhttps://github.com/ivan133/aima-python/issues?q=state%3Aopen%20label%3A%22Priority-Medium%22
auto-migratedhttps://github.com/ivan133/aima-python/issues?q=state%3Aopen%20label%3A%22auto-migrated%22
Type-Defecthttps://github.com/ivan133/aima-python/issues?q=state%3Aopen%20label%3A%22Type-Defect%22
on Mar 25, 2015https://github.com/ivan133/aima-python/issues/35#event-264261142
Sign up for freehttps://github.com/signup?return_to=https://github.com/ivan133/aima-python/issues/35
Sign in to commenthttps://github.com/login?return_to=https://github.com/ivan133/aima-python/issues/35
Priority-Mediumhttps://github.com/ivan133/aima-python/issues?q=state%3Aopen%20label%3A%22Priority-Medium%22
Type-Defecthttps://github.com/ivan133/aima-python/issues?q=state%3Aopen%20label%3A%22Type-Defect%22
auto-migratedhttps://github.com/ivan133/aima-python/issues?q=state%3Aopen%20label%3A%22auto-migrated%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.