ure icon indicating copy to clipboard operation
ure copied to clipboard

Bogus always-false clauses

Open linas opened this issue 4 years ago • 1 comments

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")))))
  ))

linas avatar Jun 12 '20 17:06 linas