Documentation
¶
Index ¶
- Constants
- func CreateGenericCreators(o *Mel3Object, ep *mel.EvolutionParameters, ...) map[uint16]Mel3VisitorCreator
- func LibsCheckAndRequirements(libs []string) ([]string, error)
- func MatchSignature(s1 string, s2 string, mode uint8) bool
- func ProgDump(implementation map[uint16]*Mel3Implementation, program *Mel3Program) (string, error)
- func SameProg(p1 ProgType, p2 ProgType) bool
- func SameType(t1 ArgType, t2 ArgType) bool
- func Walk(v Mel3Visitor, in_prog *Mel3Program)
- type ArgType
- type ArgumentsTypes
- type BuiltInEvaluator
- func (ev *BuiltInEvaluator) GetError() error
- func (ev *BuiltInEvaluator) GetMel3Object() *Mel3Object
- func (ev *BuiltInEvaluator) GetName() string
- func (ev *BuiltInEvaluator) GetResult() *Mel3Program
- func (ev *BuiltInEvaluator) Inspect() string
- func (ev *BuiltInEvaluator) SetMel3Object(mel3o *Mel3Object)
- func (ev *BuiltInEvaluator) Visit(in_prog *Mel3Program) Mel3Visitor
- type DumpEvaluator
- func (ev *DumpEvaluator) GetError() error
- func (ev *DumpEvaluator) GetMel3Object() *Mel3Object
- func (ev *DumpEvaluator) GetName() string
- func (ev *DumpEvaluator) GetResult() *Mel3Program
- func (ev *DumpEvaluator) Inspect() string
- func (ev *DumpEvaluator) SetMel3Object(mel3o *Mel3Object)
- func (ev *DumpEvaluator) Visit(in_prog *Mel3Program) Mel3Visitor
- type GenerationMatrix
- type Mel3Implementation
- type Mel3Object
- func (mo *Mel3Object) Compute() error
- func (mo *Mel3Object) Inspect() string
- func (p *Mel3Object) LoadProgramFromFile(filename string) error
- func (obj *Mel3Object) Mel3Init(c *mel.MelConfig, implementation map[uint16]*Mel3Implementation, ...)
- func (prog *Mel3Object) MelDump(c *mel.DumpConfig)
- func (prog *Mel3Object) MelStringImport(input_string string) error
- func (prog *Mel3Object) String() string
- type Mel3Program
- type Mel3Visitor
- type Mel3VisitorCreator
- type Mux
- type ProgType
- type ProgramsTypes
- type TerminalGenerator
Constants ¶
View Source
const ( B_IN_INPUT = uint16(0) + iota B_IN_OUTPUT B_IN_GROUP B_IN_UNGROUP )
View Source
const ( BUILTINS = uint16(0) + iota LIB_M3STATEMENTS LIB_M3SYMBOLIC LIB_M3BOOL LIB_M3BOOLCMP LIB_M3UINT LIB_M3DATES LIB_M3REDMON LIB_M3UINTCMP LIB_M3NUMBER LIB_LISEVO LIB_ENVFLOAT LIB_M3MELBOND LIB_M3BMMATRIX )
View Source
const (
MAXARITY = 5
)
Variables ¶
This section is empty.
Functions ¶
func CreateGenericCreators ¶
func CreateGenericCreators(o *Mel3Object, ep *mel.EvolutionParameters, impls map[uint16]*Mel3Implementation) map[uint16]Mel3VisitorCreator
func ProgDump ¶
func ProgDump(implementation map[uint16]*Mel3Implementation, program *Mel3Program) (string, error)
Types ¶
type ArgType ¶
type ArgType struct { LibraryID uint16 TypeID uint16 // Return values are multitype TensorRapr []uint64 // 0 means that the dimension may be anything, !=0 the dimension is fixed (for example a 3 element vector is []uint64{3}, a generic vector is []uint64{0} }
func (ArgType) String ¶
func (a ArgType) String(impl *Mel3Implementation) string
type ArgumentsTypes ¶
type ArgumentsTypes []ArgType
func (ArgumentsTypes) String ¶
func (as ArgumentsTypes) String(impl *Mel3Implementation) string
type BuiltInEvaluator ¶
type BuiltInEvaluator struct { *Mel3Object Result *Mel3Program // contains filtered or unexported fields }
func (*BuiltInEvaluator) GetError ¶
func (ev *BuiltInEvaluator) GetError() error
func (*BuiltInEvaluator) GetMel3Object ¶
func (ev *BuiltInEvaluator) GetMel3Object() *Mel3Object
func (*BuiltInEvaluator) GetName ¶
func (ev *BuiltInEvaluator) GetName() string
func (*BuiltInEvaluator) GetResult ¶
func (ev *BuiltInEvaluator) GetResult() *Mel3Program
func (*BuiltInEvaluator) Inspect ¶
func (ev *BuiltInEvaluator) Inspect() string
func (*BuiltInEvaluator) SetMel3Object ¶
func (ev *BuiltInEvaluator) SetMel3Object(mel3o *Mel3Object)
func (*BuiltInEvaluator) Visit ¶
func (ev *BuiltInEvaluator) Visit(in_prog *Mel3Program) Mel3Visitor
type DumpEvaluator ¶
type DumpEvaluator struct { *Mel3Object Result *Mel3Program // contains filtered or unexported fields }
func (*DumpEvaluator) GetError ¶
func (ev *DumpEvaluator) GetError() error
func (*DumpEvaluator) GetMel3Object ¶
func (ev *DumpEvaluator) GetMel3Object() *Mel3Object
func (*DumpEvaluator) GetName ¶
func (ev *DumpEvaluator) GetName() string
func (*DumpEvaluator) GetResult ¶
func (ev *DumpEvaluator) GetResult() *Mel3Program
func (*DumpEvaluator) Inspect ¶
func (ev *DumpEvaluator) Inspect() string
func (*DumpEvaluator) SetMel3Object ¶
func (ev *DumpEvaluator) SetMel3Object(mel3o *Mel3Object)
func (*DumpEvaluator) Visit ¶
func (ev *DumpEvaluator) Visit(in_prog *Mel3Program) Mel3Visitor
type GenerationMatrix ¶
type GenerationMatrix struct { Impls map[uint16]*Mel3Implementation Types []ArgType // The list of types TerminalProgramTypes []ProgType // The list of programs that can be used as terminal Programs map[int]ProgramsTypes // The list of programs that can output a given type (the key is the Types index)) TerminalGenerators map[int]TerminalGenerator // The list of terminal generators for a given terminal program (the key is the TerminalProgramTypes index) }
func CreateGenerationMatrix ¶
func CreateGenerationMatrix(implementation map[uint16]*Mel3Implementation) *GenerationMatrix
func (*GenerationMatrix) AddTerminalGenerator ¶
func (gm *GenerationMatrix) AddTerminalGenerator(progType ProgType, generator TerminalGenerator)
func (*GenerationMatrix) GenerateTree ¶
func (gm *GenerationMatrix) GenerateTree(outType ArgType, inTypes []ArgType, levelNode *int64, targetNode int64, params *mel.EvolutionParameters) (*Mel3Program, error)
func (*GenerationMatrix) Init ¶
func (gm *GenerationMatrix) Init() error
type Mel3Implementation ¶
type Mel3Implementation struct { ProgramNames map[uint16]string TypeNames map[uint16]string ProgramTypes map[uint16]ArgumentsTypes NonVariadicArgs map[uint16]ArgumentsTypes // Non variadic arguments IsVariadic map[uint16]bool VariadicType map[uint16]ArgType // The type of the variadic argument (eventually) ImplName string Signatures map[uint16]string }
This is the language implementation.
type Mel3Object ¶
type Mel3Object struct { StartProgram *Mel3Program Config *mel.MelConfig Implementation map[uint16]*Mel3Implementation VisitorCreator map[uint16]Mel3VisitorCreator DefaultCreator Mel3VisitorCreator Result *Mel3Program Environment interface{} }
func (*Mel3Object) Compute ¶
func (mo *Mel3Object) Compute() error
func (*Mel3Object) Inspect ¶
func (mo *Mel3Object) Inspect() string
func (*Mel3Object) LoadProgramFromFile ¶
func (p *Mel3Object) LoadProgramFromFile(filename string) error
func (*Mel3Object) Mel3Init ¶
func (obj *Mel3Object) Mel3Init(c *mel.MelConfig, implementation map[uint16]*Mel3Implementation, creators map[uint16]Mel3VisitorCreator, ep *mel.EvolutionParameters)
The Mel3 registration program every new data struct has to do it (This is not an entry point !! Not MelInit !! )
func (*Mel3Object) MelDump ¶
func (prog *Mel3Object) MelDump(c *mel.DumpConfig)
Mel dump, it prints out the object
func (*Mel3Object) MelStringImport ¶
func (prog *Mel3Object) MelStringImport(input_string string) error
Mel string import: Call the Mel3 engine to get a program from a string
func (*Mel3Object) String ¶
func (prog *Mel3Object) String() string
Mel dump, it prints out the object
type Mel3Program ¶
type Mel3Program struct { LibraryID uint16 ProgramID uint16 NextPrograms []*Mel3Program ProgramValue string }
type Mel3Visitor ¶
type Mel3Visitor interface { GetName() string GetMel3Object() *Mel3Object SetMel3Object(*Mel3Object) Visit(*Mel3Program) Mel3Visitor GetError() error GetResult() *Mel3Program Inspect() string }
func BuiltInCreator ¶
func BuiltInCreator() Mel3Visitor
func DumpCreator ¶
func DumpCreator() Mel3Visitor
func ProgMux ¶
func ProgMux(v Mel3Visitor, in_prog *Mel3Program) Mel3Visitor
Mux different libraries
type Mel3VisitorCreator ¶
type Mel3VisitorCreator func() Mel3Visitor
type Mux ¶
type Mux func(Mel3Visitor, *Mel3Program) Mel3Visitor
type ProgramsTypes ¶
type ProgramsTypes []ProgType
type TerminalGenerator ¶
type TerminalGenerator func(*mel.EvolutionParameters) (*Mel3Program, error)
Click to show internal directories.
Click to hide internal directories.