Documentation
¶
Overview ¶
This package implements the SLG resolution.
Index ¶
- type AST
- type ASTRule
- type ASTTerm
- type ASTValue
- type ASTVar
- type Context
- type Rule
- type Server
- type Signature
- type Snapshot
- type Term
- type Theory
- func (th *Theory) AddRule(rule *Rule)
- func (th *Theory) AddRules(rules []*Rule)
- func (th *Theory) AddRulesFromSource(code string) error
- func (th *Theory) Infer(context *Context, goal *Value, cb func(*Context) bool)
- func (th *Theory) InferTabled(context *Context, goal *Value, cb func(*Context) bool)
- func (th *Theory) Rollback(ss *Snapshot)
- func (th *Theory) Snapshot() *Snapshot
- func (th *Theory) String() string
- type Value
- func (p *Value) CtxString(context *Context) string
- func (v *Value) Ground(context *Context) *Value
- func (p *Value) InstantiateVariables(vars map[string]*Variable) *Value
- func (v *Value) Signature() Signature
- func (v *Value) TableSignature(context *Context) string
- func (p1 *Value) Unify(context *Context, p2 Term, cb func(*Context))
- type Variable
- func (v *Variable) Bind(context *Context, t Term)
- func (v *Variable) CtxString(context *Context) string
- func (v *Variable) Ground(context *Context) *Value
- func (v *Variable) Pointee(context *Context) Term
- func (v *Variable) SetPointee(context *Context, t Term)
- func (v *Variable) Unify(context *Context, t Term, cb func(*Context))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ASTRule ¶
type ASTRule struct {
// contains filtered or unexported fields
}
A syntactic rule.
func (*ASTRule) Description ¶
A textual representation of the rule.
type ASTValue ¶
type ASTValue struct {
// contains filtered or unexported fields
}
func (*ASTValue) Description ¶
type ASTVar ¶
type ASTVar struct {
// contains filtered or unexported fields
}
func (*ASTVar) Description ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func NewContext() *Context
type Rule ¶
func (*Rule) InstantiateVariables ¶
func (*Rule) RelinquishUse ¶
func (r *Rule) RelinquishUse()
type Theory ¶
func NewTheoryFromSource ¶
Creates a new theory from the provided source code.
func (*Theory) AddRulesFromSource ¶
Adds rules from the provided source code.
func (*Theory) InferTabled ¶
type Variable ¶
type Variable struct {
// contains filtered or unexported fields
}
func (*Variable) SetPointee ¶
Click to show internal directories.
Click to hide internal directories.