Versions in this module Expand all Collapse all v0 v0.1.0 Dec 15, 2023 Changes in this version + const ArgModeInput + const ArgModeInputOutput + const ArgModeOutput + const DescrArg + const DescrDesugared + const DescrDoc + const DescrExtensional + const DescrMode + const DescrName + const DescrPrivate + const DescrReflects + const DescrSynthetic + const InputOutputString + const InputString + const InternalPredicateSuffix + const OutputString + var FalsePredicate = PredicateSym + var ListNil = Constant + var MapNil = Constant + var StructNil = Constant + var TruePredicate = PredicateSym + func AddVars(term Term, m map[Variable]bool) + func AddVarsFromClause(clause Clause, m map[Variable]bool) + func FormatFloat64(floatNum float64) string + func FormatNumber(num int64) string + func SortIndexInto(keys []*Constant, index []int) + type ApplyFn struct + Args []BaseTerm + Function FunctionSym + func (a ApplyFn) ApplySubst(s Subst) Term + func (a ApplyFn) ApplySubstBase(s Subst) BaseTerm + func (a ApplyFn) Equals(t Term) bool + func (a ApplyFn) Hash() uint64 + func (a ApplyFn) String() string + type ArgMode int + type Atom struct + Args []BaseTerm + Predicate PredicateSym + func NewAtom(predicateSym string, args ...BaseTerm) Atom + func NewQuery(predicate PredicateSym) Atom + func (a Atom) ApplySubst(s Subst) Term + func (a Atom) Equals(u Term) bool + func (a Atom) Hash() uint64 + func (a Atom) IsGround() bool + func (a Atom) String() string + type BaseTerm interface + ApplySubstBase func(s Subst) BaseTerm + Hash func() uint64 + type BoundDecl struct + Bounds []BaseTerm + func NewBoundDecl(bounds ...BaseTerm) BoundDecl + type Clause struct + Head Atom + Premises []Term + Transform *Transform + func NewClause(head Atom, premises []Term) Clause + func (c Clause) ReplaceWildcards() Clause + func (c Clause) String() string + type ConstSubstList []ConstSubstPair + func (c ConstSubstList) Extend(v Variable, con Constant) ConstSubstList + func (c ConstSubstList) Get(v Variable) BaseTerm + type ConstSubstMap map[Variable]Constant + func (m ConstSubstMap) Get(v Variable) BaseTerm + type ConstSubstPair struct + type Constant struct + NumValue int64 + Symbol string + Type ConstantType + var AnyBound Constant + var BotBound Constant + var FalseConstant Constant + var Float64Bound Constant + var NameBound Constant + var NumberBound Constant + var StringBound Constant + var TrueConstant Constant + func Float64(floatNum float64) Constant + func List(constants []Constant) Constant + func ListCons(fst, snd *Constant) Constant + func Map(kvMap map[*Constant]*Constant) *Constant + func MapCons(key, val, rest *Constant) Constant + func Name(symbol string) (Constant, error) + func Number(num int64) Constant + func Pair(fst, snd *Constant) Constant + func String(str string) Constant + func Struct(kvMap map[*Constant]*Constant) *Constant + func StructCons(label, val, rest *Constant) Constant + func (c Constant) ApplySubst(s Subst) Term + func (c Constant) ApplySubstBase(s Subst) BaseTerm + func (c Constant) ConsValue() (Constant, Constant, error) + func (c Constant) Equals(u Term) bool + func (c Constant) Float64Value() (float64, error) + func (c Constant) Hash() uint64 + func (c Constant) IsListNil() bool + func (c Constant) IsMapNil() bool + func (c Constant) IsStructNil() bool + func (c Constant) ListValues(cbCons func(Constant) error, cbNil func() error) (error, error) + func (c Constant) MapValues(cbCons func(Constant, Constant) error, cbNil func() error) (error, error) + func (c Constant) NameValue() (string, error) + func (c Constant) NumberValue() (int64, error) + func (c Constant) PairValue() (Constant, Constant, error) + func (c Constant) String() string + func (c Constant) StringValue() (string, error) + func (c Constant) StructValues(cbCons func(Constant, Constant) error, cbNil func() error) (error, error) + type ConstantType int + const Float64Type + const ListShape + const MapShape + const NameType + const NumberType + const PairShape + const StringType + const StructShape + type Decl struct + Bounds []BoundDecl + Constraints *InclusionConstraint + DeclaredAtom Atom + Descr []Atom + func NewDecl(atom Atom, descrAtoms []Atom, bounds []BoundDecl, ...) (Decl, error) + func NewSyntheticDecl(declaredAtom Atom) (Decl, error) + func NewSyntheticDeclFromSym(sym PredicateSym) Decl + func (d Decl) Doc() []string + func (d Decl) IsDesugared() bool + func (d Decl) IsExtensional() bool + func (d Decl) IsSynthetic() bool + func (d Decl) Modes() []Mode + func (d Decl) PackageID() string + func (d Decl) Reflects() (Constant, bool) + func (d Decl) Visible() bool + type Eq struct + Left BaseTerm + Right BaseTerm + func (e Eq) ApplySubst(s Subst) Term + func (e Eq) Equals(u Term) bool + func (e Eq) String() string + type FunctionSym struct + Arity int + Symbol string + func (f FunctionSym) String() string + type InclusionConstraint struct + Alternatives [][]Atom + Consequences []Atom + func NewInclusionConstraint(consequences []Atom) InclusionConstraint + type Ineq struct + Left BaseTerm + Right BaseTerm + func (e Ineq) ApplySubst(s Subst) Term + func (e Ineq) Equals(u Term) bool + func (e Ineq) String() string + type Mode []ArgMode + func (m Mode) Check(goal Atom, boundVars map[Variable]bool) error + type NegAtom struct + Atom Atom + func NewNegAtom(predicateSym string, args ...BaseTerm) NegAtom + func (a NegAtom) ApplySubst(s Subst) Term + func (a NegAtom) Equals(u Term) bool + func (a NegAtom) IsGround() bool + func (a NegAtom) String() string + type PredicateSym struct + Arity int + Symbol string + func (p PredicateSym) IsBuiltin() bool + func (p PredicateSym) IsInternalPredicate() bool + func (p PredicateSym) String() string + type Subst interface + Get func(Variable) BaseTerm + type SubstMap map[Variable]BaseTerm + func (m SubstMap) Get(v Variable) BaseTerm + type Term interface + ApplySubst func(s Subst) Term + Equals func(Term) bool + String func() string + func ReplaceWildcards(used map[Variable]bool, term Term) Term + type Transform struct + Statements []TransformStmt + func (t Transform) IsLetTransform() bool + func (t Transform) String() string + type TransformStmt struct + Fn ApplyFn + Var *Variable + type Variable struct + Symbol string + func FreshVariable(used map[Variable]bool) Variable + func (v Variable) ApplySubst(s Subst) Term + func (v Variable) ApplySubstBase(s Subst) BaseTerm + func (v Variable) Equals(u Term) bool + func (v Variable) Hash() uint64 + func (v Variable) String() string