Documentation ¶
Index ¶
- Constants
- func StartTraceReferenceComparer(referenceFileName string)
- type Interpreter
- func (i *Interpreter) DebugPrint(c m.K)
- func (i *Interpreter) Eval(c m.K, config m.K) (m.K, error)
- func (i *Interpreter) Execute(kastMap map[string][]byte) error
- func (i *Interpreter) ExecuteSimple(kdir string, execFile string)
- func (i *Interpreter) GetNrSteps() int
- func (i *Interpreter) GetState() m.K
- func (i *Interpreter) SetTracePretty()
- func (i *Interpreter) TakeStepsNoThread(k m.K) error
Constants ¶
const TopCellInitializer m.KLabel = m.LblInitGeneratedTopCell
TopCellInitializer ... label passed to Eval to initialize the top cell
Variables ¶
This section is empty.
Functions ¶
func StartTraceReferenceComparer ¶
func StartTraceReferenceComparer(referenceFileName string)
StartTraceReferenceComparer ... set the code to compare each step to list of steps exported from somewhere else
Types ¶
type Interpreter ¶
type Interpreter struct { Model *m.ModelState MaxSteps int Verbose bool // contains filtered or unexported fields }
Interpreter is a container with a reference to model and basic options
func NewInterpreter ¶
func NewInterpreter(kryptoRef *krypto.Krypto) *Interpreter
NewInterpreter creates a new interpreter instance
func (*Interpreter) DebugPrint ¶
func (i *Interpreter) DebugPrint(c m.K)
DebugPrint ... prints a K item to console, useful for debugging
func (*Interpreter) Execute ¶
func (i *Interpreter) Execute(kastMap map[string][]byte) error
Execute interprets the program with the structure
func (*Interpreter) ExecuteSimple ¶
func (i *Interpreter) ExecuteSimple(kdir string, execFile string)
ExecuteSimple interprets the program in the file given at input
func (*Interpreter) GetNrSteps ¶
func (i *Interpreter) GetNrSteps() int
GetNrSteps yields how many steps were executed until now from the start of the last execution
func (*Interpreter) GetState ¶
func (i *Interpreter) GetState() m.K
GetLastState yields the current (last) state of the interpreter
func (*Interpreter) SetTracePretty ¶
func (i *Interpreter) SetTracePretty()
SetTracePretty makes the interpreter save pretty traces of the execution
func (*Interpreter) TakeStepsNoThread ¶
func (i *Interpreter) TakeStepsNoThread(k m.K) error
TakeStepsNoThread executes as many steps as possible given the starting configuration
Source Files ¶
- constants.go
- error.go
- eval.go
- fresh.go
- functions.go
- global.go
- hooks_array.go
- hooks_bool.go
- hooks_buffer.go
- hooks_bytes.go
- hooks_float.go
- hooks_int.go
- hooks_io.go
- hooks_kequal.go
- hooks_kreflection.go
- hooks_list.go
- hooks_map.go
- hooks_mint.go
- hooks_set.go
- hooks_string.go
- interpreterDef.go
- interpreterFunc.go
- kmodelconvert.go
- run.go
- step.go
- stepLookups.go
- stepRules.go
- stuck.go
- testutil.go
- trace.go
- tracecompare.go
- tracekprint.go
- tracepretty.go