Package | Description |
---|---|
org.opennars.inference |
The inference rules and control functions
|
org.opennars.language |
Term hierarchy in Narsese
Open-NARS implements the following formal language, Narsese.
|
org.opennars.operator |
Modifier and Type | Method | Description |
---|---|---|
private static void |
RuleTables.componentAndStatement(CompoundTerm compound,
short index,
Statement statement,
short side,
DerivationContext nal) |
Inference between a component term (of the current term) and a statement
|
private static void |
RuleTables.compoundAndCompound(CompoundTerm taskTerm,
CompoundTerm beliefTerm,
int tindex,
int bindex,
DerivationContext nal) |
Inference between two compound terms
|
private static void |
RuleTables.compoundAndSelf(CompoundTerm compound,
Term component,
boolean compoundTask,
int index,
DerivationContext nal) |
Inference between a compound term and a component of it
|
private static void |
RuleTables.compoundAndStatement(CompoundTerm compound,
short index,
Statement statement,
short side,
Term beliefTerm,
DerivationContext nal) |
Inference between a compound term and a statement
|
private static void |
CompositionalRules.decomposeCompound(CompoundTerm compound,
Term component,
Term term1,
int index,
boolean compoundTask,
int order,
DerivationContext nal) |
{<(S|P) ==> M>, <P ==> M>} |- <S ==> M>
|
(package private) static void |
CompositionalRules.decomposeStatement(CompoundTerm compound,
Term component,
boolean compoundTask,
int index,
DerivationContext nal) |
{(||, S, P), P} |- S {(&&, S, P), P} |- S
|
private static void |
CompositionalRules.eliminateVariableOfConditionAbductiveInner1(Sentence sentence,
Sentence belief,
DerivationContext nal,
CompoundTerm s1,
Map<Term,Term> res3,
Term s12) |
|
private static void |
CompositionalRules.eliminateVariableOfConditionAbductiveTryUnification1(Sentence sentence,
Sentence belief,
DerivationContext nal,
Term p1,
CompoundTerm p2,
Map<Term,Term> res3,
Map<Term,Term> res4) |
|
(package private) static void |
SyllogisticRules.elimiVarDep(CompoundTerm compound,
Term component,
boolean compoundTask,
DerivationContext nal) |
{(&&, <#x() --> S>, <#x() --> P>>, <M --> P>} |- <M --> S>
|
(package private) static void |
StructuralRules.flattenSequence(CompoundTerm compound,
Term component,
boolean compoundTask,
int index,
DerivationContext nal) |
{(#,(#,A,B),C), (#,A,B)@(#,(#,A,B), C)} |- (#,A,B,C)
(same for &/)
|
(package private) static void |
StructuralRules.groupSequence(CompoundTerm compound,
Term component,
boolean compoundTask,
int index,
DerivationContext nal) |
{(#,A,B,C,D,E), C@(#,A,B,C,D,E)} |- (#,(#,A,B),C,D,E), (#,A,B,C,(#,D,E))
Group sequence left and right
Works for all conjunctions
|
(package private) static boolean |
CompositionalRules.introVarInner(Statement premise1,
Statement premise2,
CompoundTerm oldCompound,
DerivationContext nal) |
{<M --> S>, <C ==> <M --> P>>} |- <(&&, <#x --> S>, C) ==> <#x --> P>>
{<M --> S>, (&&, C, <M --> P>)} |- (&&, C, <<#x --> S> ==> <#x --> P>>) |
(package private) static void |
StructuralRules.splitConjunctionApart(CompoundTerm compound,
Term component,
boolean compoundTask,
int index,
DerivationContext nal) |
{(#,A,B,C,D,E), C@(#,A,B,C,D,E)} |- (#,A,B,C), (#,C,D,E)
Works for all conjunctions
|
(package private) static void |
StructuralRules.structuralCompose1(CompoundTerm compound,
short index,
Statement statement,
DerivationContext nal) |
{<S --> P>, P@(P|Q)} |- <S --> (P|Q)>
|
(package private) static void |
StructuralRules.structuralCompose2(CompoundTerm compound,
short index,
Statement statement,
short side,
DerivationContext nal) |
{<S --> P>, S@(S&T)} |- <(S&T) --> (P&T)>
{<S --> P>, S@(M-S)} |- <(M-P) --> (M-S)> |
(package private) static boolean |
StructuralRules.structuralCompound(CompoundTerm compound,
Term component,
boolean compoundTask,
int index,
DerivationContext nal) |
{(&&, A, B), A@(&&, A, B)} |- A,
or answer (&&, A, B)? using A {(||, A, B), A@(||, A, B)} |- A, or answer (||, A, B)? using A |
(package private) static void |
StructuralRules.structuralDecompose1(CompoundTerm compound,
short index,
Statement statement,
DerivationContext nal) |
{<(S|T) --> P>, S@(S|T)} |- <S --> P>
{<S --> (P&T)>, P@(P&T)} |- <S --> P> |
private static boolean |
StructuralRules.switchOrder(CompoundTerm compound,
short index) |
List the cases where the direction of inheritance is revised in conclusion
|
(package private) static void |
StructuralRules.takeOutFromConjunction(CompoundTerm compound,
Term component,
boolean compoundTask,
int index,
DerivationContext nal) |
{(&&,A,B,C), B@(&&,A,B,C)} |- (&&,A,C)
Works for all conjunctions
|
static void |
StructuralRules.transformNegation(CompoundTerm content,
DerivationContext nal) |
{A, A@(--, A)} |- (--, A)
|
private static void |
StructuralRules.transformPredicatePI(short index,
Term subject,
CompoundTerm predicate,
DerivationContext nal) |
Equivalent transformation between products and images when the predicate
is a compound
{<(*, S, M) --> P>, S@(*, S, M)} |- <S --> (/, P, _, M)>
{<S --> (/, P, _, M)>, P@(/, P, _, M)} |- <(*, S, M) --> P> {<S --> (/, P, _, M)>, M@(/, P, _, M)} |- <M --> (/, P, S, _)> |
(package private) static void |
StructuralRules.transformProductImage(Inheritance inh,
CompoundTerm oldContent,
short[] indices,
DerivationContext nal) |
Equivalent transformation between products and images
{<(*, S, M) --> P>, S@(*, S, M)} |- <S --> (/, P, _, M)>
{<S --> (/, P, _, M)>, P@(/, P, _, M)} |- <(*, S, M) --> P> {<S --> (/, P, _, M)>, M@(/, P, _, M)} |- <M --> (/, P, S, _)> |
(package private) static void |
StructuralRules.transformSetRelation(CompoundTerm compound,
Statement statement,
short side,
DerivationContext nal) |
{<S --> {P}>} |- <S <-> {P}>
|
private static void |
StructuralRules.transformSubjectPI(short index,
CompoundTerm subject,
Term predicate,
DerivationContext nal) |
Equivalent transformation between products and images when the subject is
a compound
{<(*, S, M) --> P>, S@(*, S, M)} |- <S --> (/, P, _, M)>
{<S --> (/, P, _, M)>, P@(/, P, _, M)} |- <(*, S, M) --> P> {<S --> (/, P, _, M)>, M@(/, P, _, M)} |- <M --> (/, P, S, _)> |
Modifier and Type | Class | Description |
---|---|---|
class |
Conjunction |
Conjunction of statements as defined in the NARS-theory
|
class |
DifferenceExt |
A compound term whose extension is the difference of the extensions of its term as defined in the NARS-theory
|
class |
DifferenceInt |
A compound term whose extension is the difference of the intensions of its term as defined in the NARS-theory
|
class |
Disjunction |
A disjunction of Statements as defined in the NARS-theory
|
class |
Equivalence |
A Statement about an Equivalence relation as defined in the NARS-theory
|
class |
Image |
Generalization of Images as defined in the NARS-theory
|
class |
ImageExt |
An extension image as defined in the NARS-theory
|
class |
ImageInt |
An intension image as defined in the NARS-theory
|
class |
Implication |
A Statement about an Inheritance copula as defined in the NARS-theory
|
class |
Inheritance |
A Statement about an Inheritance relation as defined in the NARS-theory
|
class |
IntersectionExt |
A compound term whose extension is the intersection of the extensions of its term as defined in the NARS-theory
|
class |
IntersectionInt |
A compound term whose intension is the intersection of the extensions of its term as defined in the NARS-theory
|
class |
Negation |
A negation of a statement as defined in the NARS-theory
|
class |
Product |
A Product is a sequence of 1 or more terms as defined in the NARS-theory
|
class |
SetExt |
An extensionally defined set, which contains one or more instances as defined in the NARS-theory
|
class |
SetInt |
An intensionally defined set, which contains one or more instances defining the Term.
|
class |
SetTensional |
Base class for SetInt (intensional set) and SetExt (extensional set)
|
class |
Similarity |
A Statement about a Similarity relation as defined in the NARS-theory
|
class |
Statement |
A statement is a compound term as defined in the NARS-theory, consisting of a subject, a predicate, and a
relation symbol in between.
|
Modifier and Type | Method | Description |
---|---|---|
CompoundTerm |
CompoundTerm.applySubstituteToCompound(Map<Term,Term> substitute) |
returns result of applySubstitute, if and only if it's a CompoundTerm.
|
abstract CompoundTerm |
CompoundTerm.clone() |
clone method
|
CompoundTerm |
Product.clone(Term[] replaced) |
|
CompoundTerm |
CompoundTerm.cloneDeep() |
|
CompoundTerm |
CompoundTerm.cloneDeepVariables() |
Modifier and Type | Method | Description |
---|---|---|
private static Term |
Variables.applySubstituteAndRenameVariables(CompoundTerm t,
Map<Term,Term> subs) |
appliesSubstitute and renameVariables, resulting in a cloned object,
will not change this instance
|
private static void |
CompoundTerm.ExtractIntervals(Memory mem,
List<Long> ivals,
CompoundTerm comp) |
|
static Term |
Product.make(CompoundTerm image,
Term component,
int index) |
Try to make a Product from an ImageExt/ImageInt and a component.
|
static List<TermLink> |
Terms.prepareComponentLinks(List<TermLink> componentLinks,
short type,
CompoundTerm term) |
Collect TermLink templates into a list, go down one level except in
special cases
|
static List<TermLink> |
Terms.prepareComponentLinks(List<TermLink> componentLinks,
CompoundTerm ct) |
|
static Term |
Terms.reduceComponentOneLayer(CompoundTerm compound,
Term component,
Memory memory) |
|
static Term |
Terms.reduceComponents(CompoundTerm compound,
Term component,
Memory memory) |
Try to remove a component from a compound
|
static Term |
Terms.reduceUntilLayer2(CompoundTerm _itself,
Term replacement,
Memory memory) |
|
private static void |
CompoundTerm.ReplaceIntervals(CompoundTerm comp) |
|
static Term |
Terms.term(CompoundTerm compound,
Collection<Term> components) |
|
static Term |
Terms.term(CompoundTerm compound,
Term[] components) |
Try to make a compound term from a template and a list of term
|
static void |
CompoundTerm.transformIndependentVariableToDependent(CompoundTerm T) |
Modifier and Type | Class | Description |
---|---|---|
class |
Operation |
An operation is interpreted as an Inheritance relation.
|
Copyright © 2020 OpenNARS. All rights reserved.