ieletestinginterpreter

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2019 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
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) Eval

func (i *Interpreter) Eval(c m.K, config m.K) (m.K, error)

Eval ... evaluates a KApply item based on its label and arguments

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL