An Introduction to SNePS

Stuart C. Shapiro Department of Computer Science and Engineering and Center for Cognitive Science 201 Bell Hall University at Buffalo, The State University of New York Buffalo, NY 14260-2000

                  shapiro@cse.buffalo.edu

February 11, 2005

Contents

1 SNePS 2.6 2 1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Atomic Formulas in SNePSLOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.2.1 Simple Assertions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2.2 Simple Queries: ? and askwh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2.3 Functional Terms and Conjunctive Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2.4 Reified Propositions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2.5 expert and normal Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2.6 Unique Names Assumption and Uniqueness Principle . . . . . . . . . . . . . . . . . . . . . 3

1.3 Reduction Inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.4 Symmetric Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.5 Negation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.5.1 Negated Formulas as Assertions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.5.2 Querying: ?, ask, askifnot, askwh, askwhnot . . . . . . . . . . . . . . . . . . . . . . 3

1.6 Nodes, Case Frames, and Cablesets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.6.1 show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.6.2 Atomic and Molecular Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.6.3 Case Frames and Cablesets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.7 Handling Contradictions, Part I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.8 Mode 3 and Path-Based Inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.8.1 Mode 3 and define-frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.8.2 Path-Based Inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.9 Node-Based Inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.9.1 Simple Implication, Forward and Backward Inference . . . . . . . . . . . . . . . . . . . . . 4 1.9.2 Universal Quantification, ? vs. ?? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.9.3 Bi-Directional Inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.9.4 Lemmas: Retaining Derived Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.9.5 AndOr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.9.6 Thresh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.9.7 Or-Entailment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.9.8 And-Entailment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.9.9 Numerical Entailment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.9.10 The Numerical Quantifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.9.11 Hypotheses vs. Derived Propositions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.10 Contexts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.11 SNeBR: Handling Contradictions, Part II . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.12 SNeRE: The SNePS Acting Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 SNePS 3 5 2.1 Syntactic Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Semantic Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.3 Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.4 Case Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.5 Arbitrary and Indefinite Entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.6 Categorizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.7 Wire-Based Inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.8 Path-Based Inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.9 Subsumption Inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.10 Node-Based Inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1 SNePS 2.6

1.1 Overview

• A knowledge representation, reasoning, and acting system.

• Approximately 30 years of development.

• 64 people involved in its development.

• Academic, not “productized”, system.

• Constantly being improved: suggestions and help appreciated.

• Implementation language: ANSI Common Lisp.

• Logic-based and Network-based.

• Interfaces: SNePSUL; SNePSLOG; Fragments of English.

1.2 Atomic Formulas in SNePSLOG

1.2.1 Simple Assertions

Demo: assertions.snepslog

1.2.2 Simple Queries: ? and askwh

Demo: queries.snepslog

1.2.3 Functional Terms and Conjunctive Queries

Demo: functions.snepslog

1.2.4 Reified Propositions

Demo: reified.snepslog

1.2.5 expert and normal Modes

Demo: expert.snepslog

1.2.6 Unique Names Assumption and Uniqueness Principle

Demo: unique.snepslog

1.3 Reduction Inference

Demo: reduction.snepslog

1.4 Symmetric Arguments

Demo: symmetric.snepslog

1.5 Negation

1.5.1 Negated Formulas as Assertions

Demo: negation.snepslog
1.5.2 Querying: ?, ask, askifnot, askwh, askwhnot
Demo: asknegation.snepslog

1.6 Nodes, Case Frames, and Cablesets

1.6.1 show

Demo: nodes.snepslog

1.6.2 Atomic and Molecular Nodes See the examples in the diagrams produced by show.

1.6.3 Case Frames and Cablesets See the examples in the diagrams produced by show.

1.7 Handling Contradictions, Part I

Demo: contradictions1.snepslog

1.8 Mode 3 and Path-Based Inference

1.8.1 Mode 3 and define-frame

Demo: mode3.snepslog

1.8.2 Path-Based Inference

Demo: pb-inf.snepslog

1.9 Node-Based Inference

1.9.1 Simple Implication, Forward and Backward Inference

Demo: implication.snepslog

1.9.2 Universal Quantification, ? vs. ??

Demo: quantify.snepslog

1.9.3 Bi-Directional Inference

Demo: bidir.snepslog

1.9.4 Lemmas: Retaining Derived Information

Demo: lemmas.snepslog

1.9.5 AndOr

Demo: andor.snepslog

1.9.6 Thresh

Demo: thresh.snepslog

1.9.7 Or-Entailment

Demo: orEntailment.snepslog

1.9.8 And-Entailment

Demo: andEntailment.snepslog illustrates:

• three ways of expressing conjoined antecedents;

• deleting a wff from the current context;

• the ATMS disbelieving implications derived from disbelieved hypotheses;

• the triggering of backward inference from forward inference;

• and the Unique Variable Binding Rule (UVBR).

1.9.9 Numerical Entailment 1.9.10 The Numerical Quantifier

Demo: numQuant.snepslog

1.9.11 Hypotheses vs. Derived Propositions

1.10 Contexts 1.11 SNeBR: Handling Contradictions, Part II 1.12 SNeRE: The SNePS Acting Language

2 SNePS 3

Demo: #3, Contexts and #7, Chng

2.1 Syntactic Types 2.2 Semantic Types 2.3 Relations 2.4 Case Frames 2.5 Arbitrary and Indefinite Entities 2.6 Categorizations 2.7 Wire-Based Inference 2.8 Path-Based Inference 2.9 Subsumption Inference 2.10 Node-Based Inference

References