model

package
v0.0.0-...-a1c361c Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NORMAL modelState = iota
	STUCK
	TERMINATED
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Src    string
	Dest   string
	Label  string
	IsSend bool
}

func NewActionFromString

func NewActionFromString(actionString string) (Action, error)

func (Action) String

func (a Action) String() string

func (Action) Subject

func (a Action) Subject() string

type Model

type Model struct {
	SemanticModel
	// contains filtered or unexported fields
}

func MakeModel

func MakeModel(semanticModel SemanticModel) Model

func MakeModelWithLogger

func MakeModelWithLogger(semanticModel SemanticModel, logger *zap.Logger) Model

func (*Model) AcceptTrace

func (m *Model) AcceptTrace(participant string, traces []Action)

func (*Model) IsStuck

func (m *Model) IsStuck() bool

type SemanticModel

type SemanticModel interface {
	IsTerminated() bool
	TryReduce(action Action) bool
	GetEnabledActions() []Action
	SetLogger(logger *zap.Logger)
	Shutdown()
}

Jump to

Keyboard shortcuts

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