Documentation ¶
Index ¶
- Variables
- func Arity(t Term) int
- func AtomicFormula(t Term) bool
- func Equal(t1, t2 Term) bool
- func Err(s *sc.Scanner, str string)
- func Functor(t Term) (result string, ok bool)
- func Ground(t Term, b Bindings) bool
- func Normalize(s string) string
- func Predicate(t Term) (string, bool)
- func Tok2str(tok rune) string
- type Atom
- type BindEle
- type Bindings
- type Bool
- type Compound
- type EnvMap
- type Float
- type Int
- type List
- type String
- type Term
- func Assignexpr(s *sc.Scanner, tok1 rune) (t Term, tok rune, ok bool)
- func Factor_name(name string, s *sc.Scanner, tok1 rune) (t Term, tok rune, ok bool)
- func GetBinding(v Variable, b Bindings) (t Term, ok bool)
- func NewCompound(f string, args []Term) Term
- func Object(t Term) (result Term, ok bool)
- func ReadString(src string) (result Term, ok bool)
- func RenameAndSubstitute(t Term, idx *big.Int, env Bindings) Term
- func Subject(t Term) (result Term, ok bool)
- func Substitute(t Term, env Bindings) Term
- func SubstituteBiEnv(t Term, biEnv Bindings) (Term, bool)
- type Type
- type Variable
- type Vars
Constants ¶
This section is empty.
Variables ¶
var Counter <-chan *big.Int
stream of pointers to big integers for renaming variables
Functions ¶
func AtomicFormula ¶
Types ¶
type Compound ¶
type Compound struct { Functor string Id *big.Int Prio int EMap *EnvMap IsActive bool Args []Term // contains filtered or unexported fields }
func CopyCompound ¶
type Term ¶
func Assignexpr ¶
<expression> | <variable> ':=' <exspression>
func Factor_name ¶
<bi_0 name> | <name>'(”)' | <name> '(' <expression> [',' <expression>]0..n ')'
func NewCompound ¶
func ReadString ¶
func RenameAndSubstitute ¶
Substitute: replace variables in the term t with their bindings in the env or in the Build-In environment (BIVarEqTerm), if they are bound. If their are not bound rename the body-varaible of the rule (very late renaming). Follows variable chains, so that if a variable is bound to a variable, the second variable is also substituted if it is bound in env, recursively.
func Substitute ¶
Substitute: replace variables in the term t with their bindings in the env, if they are bound. Follows variable chains, so that if a variable is bound to a variable, the second variable is also substituted if it is bound in env, recursively.
func SubstituteBiEnv ¶
Substitute: replace variables in the term t with their bindings in the Build-In environment (BIVarEqTerm), if they are bound. Follows variable chains, so that if a variable is bound to a variable, the second variable is also substituted if it is bound in env, recursively.
type Variable ¶
type Variable struct { Name string // contains filtered or unexported fields }