Skip to content
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

Add UnionLink, etc. to the Atom Types. See #2816. #2843

Merged
merged 1 commit into from
Sep 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions opencog/atoms/atom_types/atom_types.script
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,6 @@ MEMBER_LINK <- ORDERED_LINK
// the probability.
CONTEXT_LINK <- ORDERED_LINK

// Measure-theoretic (probabilistic) versions of AND_LINK, OR_LINK
// These use probabilistic formulas to compute truth values.
// UNION_LINK <- OR_LINK
// INTERSECTION_LINK <- AND_LINK

// Binary-valued (0/1, T/F) Boolean algebra operations and logical
// constants. These are used by the pattern matcher to compute
// crisp-logic boolean algebra combinations of predicates (that is,
Expand All @@ -188,6 +183,13 @@ NOT_LINK <- UNORDERED_LINK,CRISP_OUTPUT_LINK,BOOLEAN_LINK
SEQUENTIAL_AND_LINK <- ORDERED_LINK,CRISP_OUTPUT_LINK,BOOLEAN_LINK
SEQUENTIAL_OR_LINK <- ORDERED_LINK,CRISP_OUTPUT_LINK,BOOLEAN_LINK

// Measure-theoretic (probabilistic) versions of AND_LINK, OR_LINK
// These use probabilistic formulas to compute truth values.
// See issue opencog/atomspace#2814 for a discussion.
UNION_LINK <- OR_LINK
INTERSECTION_LINK <- AND_LINK
COMPLEMENT_LINK <- NOT_LINK
Copy link
Member

Choose a reason for hiding this comment

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

Cool! I'm not actually sure they should inherit OrLink, etc. But I guess we can revisit that later on.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, you are absolutely right... this was a rush job, I didn't give it any thought. The reason they should not is because ... the checkers.cc will notice that these inherit evaluatability, and thus will prevent you from saying (Union (Set (Concept "foo"))) Dohhh! So this needs to be patched! Which is what #2814 was all about...

It's past bedtime for me; you have any ideas of the correct inheritance for this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Seems like UnorderedLink is the most they should inherit from...!?

Copy link
Member Author

Choose a reason for hiding this comment

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

#2844 fixes this. Review and merge if it looks right.


// ====================================================================
// Pattern-engine links. These have a special meaning for the pattern
// engine; they are used to specify what is searched for.
Expand Down