dsl

package
v0.0.0-...-d77e8f6 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unmarshal

func Unmarshal(a *any.Any) (*model.MetaModel, error)

load json model from {Any.Value: []byte}

Types

type Action

type Action = statemachine.Action

action def

type Actor

type Actor = model.Actor

Actor/User type declaration

type Cell

type Cell = ptnet.Place

codify node types

type CellDef

type CellDef func(CellRef, Cell) *model.Node

define a new place

type CellRef

type CellRef = model.Cell

Cell reference

type Defun

type Defun = statemachine.Transition

transition def

type Fn

type Fn = model.Fn

TX Function pointer

type FnDef

type FnDef func(Fn, Defun) *model.Node

define a new transition

type Model

type Model interface {
	Var() Var
	GetVars() []*model.VarMap
	StateMachine() *StateMachine
	PTNet() *ptnet.PTNet
	Marshal() (*any.Any, error)
}

func NewModel

func NewModel(schema string, m ModelDeclaration) Model

build new model instance and return it's interface

type ModelDeclaration

type ModelDeclaration func(RoleDef, CellDef, FnDef)

model builder function

type Node

type Node = model.Node

type Role

type Role = statemachine.Role

role def

type RoleDef

type RoleDef func(Actor) Role

define a new role

type StateMachine

type StateMachine = statemachine.StateMachine

type StateVector

type StateVector = statemachine.StateVector

type Token

type Token = uint64 // base token type

type Var

type Var = model.Var

bind outside data to the model with Vars Vars are applied when a model is loaded

type Vector

type Vector = statemachine.Delta

Jump to

Keyboard shortcuts

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