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

Bogus always-false clauses #92

Open
linas opened this issue Jun 12, 2020 · 1 comment
Open

Bogus always-false clauses #92

linas opened this issue Jun 12, 2020 · 1 comment

Comments

@linas
Copy link
Member

linas commented Jun 12, 2020

While debugging a failure, I spotted the following in a BindLink:

(Not (Identical (Concept "criminal") (Concept "criminal")))

This is constant (so it probably gets removed, I think? Not sure, cause its evaluatable...) and its always false... I can have the pattern matcher trap this on static analysis, but thought I'd let you know... the full link is:

(Bind
  (VariableList
    (TypedVariable (Variable "$who") (Type "ConceptNode"))
    (TypedVariable (Variable "$B-7e054a97") (Type "ConceptNode"))
    (TypedVariable (Variable "$y-281a7166") (Type "ConceptNode"))
    (TypedVariable (Variable "$z-8b8dc93") (Type "ConceptNode"))
  )
  (And
    (Evaluation
      (GroundedPredicate "scm: true-enough")
      (Inheritance (Concept "criminal") (Variable "$B-7e054a97")))
    (Evaluation
      (GroundedPredicate "scm: true-enough")
      (And
        (Evaluation
          (Predicate "sell")
          (List
            (Variable "$who")
            (Variable "$y-281a7166")
            (Variable "$z-8b8dc93")))
        (Inheritance (Variable "$who") (Concept "American"))
        (Inheritance (Variable "$y-281a7166") (Concept "weapon"))
        (Inheritance (Variable "$z-8b8dc93") (Concept "hostile"))))
    (Not (Identical (Concept "criminal") (Variable "$who")))
    (And
      (Evaluation
        (Predicate "sell")
        (List
          (Variable "$who")
          (Variable "$y-281a7166")
          (Variable "$z-8b8dc93")))
      (Inheritance (Variable "$who") (Concept "American"))
      (Inheritance (Variable "$y-281a7166") (Concept "weapon"))
      (Inheritance (Variable "$z-8b8dc93") (Concept "hostile")))
    (Present
      (Inheritance (Variable "$B-7e054a97") (Concept "criminal"))
      (Inheritance (Concept "criminal") (Variable "$B-7e054a97")))
    (Evaluation
      (GroundedPredicate "scm: true-enough")
      (Inheritance (Variable "$B-7e054a97") (Concept "criminal")))
    (Not (Identical (Concept "criminal") (Concept "criminal")))
  )
  (ExecutionOutput
    (GroundedSchema "scm: bc-deduction-formula")
    (List
      (Inheritance (Variable "$who") (Concept "criminal"))
      (ExecutionOutput
        (GroundedSchema "scm: conditional-full-instantiation-formula")
        (List
          (Inheritance (Variable "$who") (Concept "criminal"))
          (ImplicationScope (stv 0.99 0.99)
            (VariableList
              (TypedVariable (Variable "$x") (Type "ConceptNode"))
              (TypedVariable (Variable "$y") (Type "ConceptNode"))
              (TypedVariable (Variable "$z") (Type "ConceptNode")))
            (And
              (Inheritance (Variable "$z") (Concept "hostile"))
              (Inheritance (Variable "$x") (Concept "American"))
              (Evaluation
                (Predicate "sell")
                (List (Variable "$x") (Variable "$y") (Variable "$z")))
              (Inheritance (Variable "$y") (Concept "weapon")))
            (Inheritance (Variable "$x") (Concept "criminal")))
          (And
            (Evaluation
              (Predicate "sell")
              (List
                (Variable "$who")
                (Variable "$y-281a7166")
                (Variable "$z-8b8dc93")))
            (Inheritance (Variable "$who") (Concept "American"))
            (Inheritance (Variable "$y-281a7166") (Concept "weapon"))
            (Inheritance (Variable "$z-8b8dc93") (Concept "hostile")))))
      (ExecutionOutput
        (GroundedSchema "scm: bc-deduction-formula")
        (List
          (Inheritance (Concept "criminal") (Concept "criminal"))
          (Inheritance (Concept "criminal") (Variable "$B-7e054a97"))
          (Inheritance (Variable "$B-7e054a97") (Concept "criminal")))))
  ))
@ngeiswei
Copy link
Member

ngeiswei commented Jun 16, 2020

Yeah, I suppose to be handled in general requires to tell whether an Evaluatable is functional (as opposed to non-functional, i.e. state-sensitive). For instance IdenticalLink is functional and its outgoings are constant, thus the output of IdenticalLink is constant.

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

No branches or pull requests

2 participants