8000 Add family relationships example by cmungall · Pull Request #3 · py-typedlogic/py-typedlogic · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add family relationships example #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 11, 2025

Conversation

cmungall
Copy link
Collaborator

Summary

  • Add a new example demonstrating class hierarchies and logical constraints for family relationships
  • Create a test that verifies the model works correctly with the Z3Solver
  • Add CLAUDE.md with command and style reference for the project

Test plan

  • Run poetry run pytest tests/test_integrations/test_family_relationships.py -v to verify the test passes

🤖 Generated with Claude Code

…onstraints

This commit adds a new example in tests/theorems/family_relationships.py that demonstrates:
- Class hierarchies (Person as base class with Male/Female subclasses)
- Various relationship classes (ParentOf, Sibling, Ancestor)
- Logical constraints using implications (>>), conjunctions (&) and negation (~)
- Transitivity and symmetry rules for relationships

Also adds tests that verify the model works correctly with Z3Solver.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
8000
@cmungall cmungall requested a review from Copilot March 10, 2025 22:38
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR introduces an example for modeling family relationships using class hierarchies and logical constraints, along with tests to verify the model using the Z3Solver, and adds a developer guide file.

  • New integration test for family relationships
  • New module defining family relationship facts and axioms
  • Addition of CLAUDE.md as a development guide

Reviewed Changes

File Description
tests/test_integrations/test_family_relationships.py Contains tests that load the family relationships module and verify proofs
tests/theorems/family_relationships.py Defines dataclasses and axioms for family relationships and logical constraints
CLAUDE.md Provides development commands and style guidelines

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

tests/test_integrations/test_family_relationships.py:36

  • [nitpick] The comment 'Test negative assertions (parent relationships)' is misleading, as the assertions check that the ParentOf relationships exist rather than testing negative cases. Consider revising the comment to accurately describe what is being tested.
# Test negative assertions (parent relationships)

Chris Mungall and others added 5 commits March 10, 2025 15:44
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
@cmungall cmungall merged commit 1464341 into main Mar 11, 2025
1 check failed
@cmungall cmungall deleted the feature/family-relationships-example branch March 11, 2025 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0