C# Class WellFormedNames.SimpleWFN

This is an experiment to try and reproduce the same functionality of the WFN project but without using objects that have behavior.
Mostra file Open project: GAIPS-INESC-ID/FAtiMA-Toolkit Class Usage Examples

Public Methods

Method Description
AddVariableTag ( SimpleName name, string tag ) : SimpleName
BuildNameFromContainedLiteral ( SimpleName name, Literal literal ) : SimpleName
BuildNameFromNLiteral ( SimpleName name, int n ) : SimpleName
ContainsUniversal ( SimpleName name ) : bool
ContainsVariable ( SimpleName name, string variable ) : bool

Verifies if a specific variable is contained inside this Name.

GetAllComposedNames ( SimpleName name ) : List
GetNumberOfTerms ( SimpleName name ) : int
GetVariables ( SimpleName name ) : IEnumerable
HasSelf ( SimpleName name ) : bool
IsGrounded ( SimpleName name ) : bool
IsVariable ( Literal literal ) : bool
MakeGround ( SimpleName n, SimpleName>.Dictionary bindings ) : SimpleName
Match ( SimpleName n1, SimpleName n2 ) : bool
MatchDescription ( Literal n1, Literal n2 ) : bool
RemoveVariableTag ( SimpleName name, string tag ) : SimpleName
ReplaceLiterals ( SimpleName name, string oldLit, string newLit ) : SimpleName

Private Methods

Method Description
FindJumpUntilDepthN ( IList list, int currentPos, int depthN ) : int

Method Details

AddVariableTag() public static method

public static AddVariableTag ( SimpleName name, string tag ) : SimpleName
name SimpleName
tag string
return SimpleName

BuildNameFromContainedLiteral() public static method

public static BuildNameFromContainedLiteral ( SimpleName name, Literal literal ) : SimpleName
name SimpleName
literal Literal
return SimpleName

BuildNameFromNLiteral() public static method

public static BuildNameFromNLiteral ( SimpleName name, int n ) : SimpleName
name SimpleName
n int
return SimpleName

ContainsUniversal() public static method

public static ContainsUniversal ( SimpleName name ) : bool
name SimpleName
return bool

ContainsVariable() public static method

Verifies if a specific variable is contained inside this Name.
Thrown if the given argument is not a variable definition.
public static ContainsVariable ( SimpleName name, string variable ) : bool
name SimpleName
variable string The variable Name we want to verify
return bool

GetAllComposedNames() public static method

public static GetAllComposedNames ( SimpleName name ) : List
name SimpleName
return List

GetNumberOfTerms() public static method

public static GetNumberOfTerms ( SimpleName name ) : int
name SimpleName
return int

GetVariables() public static method

public static GetVariables ( SimpleName name ) : IEnumerable
name SimpleName
return IEnumerable

HasSelf() public static method

public static HasSelf ( SimpleName name ) : bool
name SimpleName
return bool

IsGrounded() public static method

public static IsGrounded ( SimpleName name ) : bool
name SimpleName
return bool

IsVariable() public static method

public static IsVariable ( Literal literal ) : bool
literal Literal
return bool

MakeGround() public static method

public static MakeGround ( SimpleName n, SimpleName>.Dictionary bindings ) : SimpleName
n SimpleName
bindings SimpleName>.Dictionary
return SimpleName

Match() public static method

public static Match ( SimpleName n1, SimpleName n2 ) : bool
n1 SimpleName
n2 SimpleName
return bool

MatchDescription() public static method

public static MatchDescription ( Literal n1, Literal n2 ) : bool
n1 Literal
n2 Literal
return bool

RemoveVariableTag() public static method

public static RemoveVariableTag ( SimpleName name, string tag ) : SimpleName
name SimpleName
tag string
return SimpleName

ReplaceLiterals() public static method

public static ReplaceLiterals ( SimpleName name, string oldLit, string newLit ) : SimpleName
name SimpleName
oldLit string
newLit string
return SimpleName