nars.inference
Class SyllogisticRules

java.lang.Object
  extended by nars.inference.SyllogisticRules

public final class SyllogisticRules
extends java.lang.Object

Syllogisms: Inference rules based on the transitivity of the relation.


Constructor Summary
SyllogisticRules()
           
 
Method Summary
(package private) static void abdIndCom(Term term1, Term term2, Sentence taskSentence, Judgment belief, int figure)
          { S>, P>} |- { P>,

S>, P>}

(package private) static void analogy(Term term1, Term term2, Sentence asym, Sentence sym, int figure)
          { P>, P>} |- P>
(package private) static boolean conditionalAbd(Term cond1, Term cond2, Statement st1, Statement st2)
          {<(&&, S2, S3) ==> P>, <(&&, S1, S3) ==> P>} |- S2>
(package private) static void conditionalDedInd(Implication premise1, short index, Term premise2, int side)
          {<(&&, S1, S2, S3) ==> P>, S1} |- <(&&, S2, S3) ==> P> {<(&&, S2, S3) ==> P>, S2>} |- <(&&, S1, S3) ==> P> {<(&&, S1, S3) ==> P>, S2>} |- <(&&, S2, S3) ==> P>
(package private) static void dedExe(Term term1, Term term2, Sentence sentence, Judgment belief)
          { M>, P>} |- { P>,

S>}

(package private) static void detachment(Sentence mainSentence, Sentence subSentence, int s)
          {< S> ==> P>>, S>} |- P> {< S> ==> P>>, P>} |- S>
private static Statement introVarInd(Sentence sentence1, Sentence sentence2, int figure, boolean isImplication)
          { S>, P>} |- <<#x --> S> ==> <#x --> P>> { S>, P>} |- <<#x --> S> <=> <#x --> P>>
(package private) static void introVarIndInner(Statement premise1, Statement premise2, CompoundTerm oldCompound)
          { S>, P>>} |- <(&&, <#x --> S>, C) ==> <#x --> P>> { S>, (&&, C, P>)} |- (&&, C, <<#x --> S> ==> <#x --> P>>)
(package private) static void resemblance(Term term1, Term term2, Judgment belief, Sentence sentence, int figure)
          { M>, P>} |- P>
static void temporalIndCom(Task task1, Task task2, TemporalValue order)
          { S>, P>} |- { P>,

S>, P>}

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyllogisticRules

public SyllogisticRules()
Method Detail

dedExe

static void dedExe(Term term1,
                   Term term2,
                   Sentence sentence,
                   Judgment belief)
{ M>, P>} |- { P>,

S>}

Parameters:
term1 - Subject of the first new task
term2 - Predicate of the first new task
sentence - The first premise
belief - The second premise

abdIndCom

static void abdIndCom(Term term1,
                      Term term2,
                      Sentence taskSentence,
                      Judgment belief,
                      int figure)
{ S>, P>} |- { P>,

S>, P>}

Parameters:
term1 - Subject of the first new task
term2 - Predicate of the first new task
taskSentence - The first premise
belief - The second premise
figure - Locations of the shared term in premises

analogy

static void analogy(Term term1,
                    Term term2,
                    Sentence asym,
                    Sentence sym,
                    int figure)
{ P>, P>} |- P>

Parameters:
term1 - Subject of the new task
term2 - Predicate of the new task
asym - The asymmetric premise
sym - The symmetric premise
figure - Locations of the shared term in premises

resemblance

static void resemblance(Term term1,
                        Term term2,
                        Judgment belief,
                        Sentence sentence,
                        int figure)
{ M>, P>} |- P>

Parameters:
term1 - Subject of the new task
term2 - Predicate of the new task
belief - The first premise
sentence - The second premise
figure - Locations of the shared term in premises

detachment

static void detachment(Sentence mainSentence,
                       Sentence subSentence,
                       int s)
{< S> ==> P>>, S>} |- P> {< S> ==> P>>, P>} |- S>

Parameters:
mainSentence - The implication/equivalence premise
subSentence - The premise on part of s1
s - The location of s2 in s1

conditionalDedInd

static void conditionalDedInd(Implication premise1,
                              short index,
                              Term premise2,
                              int side)
{<(&&, S1, S2, S3) ==> P>, S1} |- <(&&, S2, S3) ==> P> {<(&&, S2, S3) ==> P>, S2>} |- <(&&, S1, S3) ==> P> {<(&&, S1, S3) ==> P>, S2>} |- <(&&, S2, S3) ==> P>

Parameters:
premise1 - The conditional premise
index - The location of the shared term in the condition of premise1
premise2 - The premise which, or part of which, appears in the condition of premise1
side - The location of the shared term in premise2: 0 for subject, 1 for predicate, -1 for the whole term

conditionalAbd

static boolean conditionalAbd(Term cond1,
                              Term cond2,
                              Statement st1,
                              Statement st2)
{<(&&, S2, S3) ==> P>, <(&&, S1, S3) ==> P>} |- S2>

Parameters:
cond1 - The condition of the first premise
cond2 - The condition of the second premise
st1 - The first premise
st2 - The second premise
Returns:
Whether there are derived tasks

introVarInd

private static Statement introVarInd(Sentence sentence1,
                                     Sentence sentence2,
                                     int figure,
                                     boolean isImplication)
{ S>, P>} |- <<#x --> S> ==> <#x --> P>> { S>, P>} |- <<#x --> S> <=> <#x --> P>>

Parameters:
sentence1 - The first premise S>
sentence2 - The second premise P>
figure - The figure indicating the location of the shared term
isImplication - The conclusion is Implication, not Equivalence

introVarIndInner

static void introVarIndInner(Statement premise1,
                             Statement premise2,
                             CompoundTerm oldCompound)
{ S>, P>>} |- <(&&, <#x --> S>, C) ==> <#x --> P>> { S>, (&&, C, P>)} |- (&&, C, <<#x --> S> ==> <#x --> P>>)

Parameters:
premise1 - The first premise directly used in internal induction, S>
premise2 - The component to be used as a premise in internal induction, P>
oldCompound - The whole content of the first premise, Implication or Conjunction

temporalIndCom

public static void temporalIndCom(Task task1,
                                  Task task2,
                                  TemporalValue order)
{ S>, P>} |- { P>,

S>, P>}

Parameters:
task1 - The first premise
task2 - The second premise
order - Temporal order of the terms in conclusion