sanmodel

package
v0.0.0-...-de1c4b4 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2016 License: MIT Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Automata

type Automata []*Automaton

Automata represents a collection of automatons

type Automaton

type Automaton struct {
	Name        string      `json:"name"`
	Transitions Transitions `json:"transitions"`
}

Automaton represents a single automaton present on the `network` block

func (*Automaton) AddTransition

func (a *Automaton) AddTransition(t *Transition)

AddTransition adds a Transition to the automaton

type Event

type Event struct {
	Name string `json:"name"`
	Type string `json:"type"`
	Rate string `json:"rate"`
}

Event represents a single event that has been parsed from the `events` block

type Events

type Events []*Event

Events represent a collection of events present on the `events` block

type Identifier

type Identifier struct {
	Name  string      `json:"name"`
	Type  string      `json:"type"`
	Value interface{} `json:"value"`
}

Identifier represents a single identifier that has been parsed from the `identifiers` block

type Identifiers

type Identifiers []*Identifier

Identifiers represent a collection of identifiers present on the `identifiers` block

type Model

type Model struct {
	Identifiers  Identifiers   `json:"identifiers"`
	Events       Events        `json:"events"`
	Reachability *Reachability `json:"reachability"`
	Network      *Network      `json:"network"`
	Results      Results       `json:"results"`
}

Model represents a model that has been parsed from a .san file

func New

func New() *Model

New instantiates a new model struct

func (*Model) AddEvent

func (m *Model) AddEvent(e *Event)

AddEvent adds an Event to the model

func (*Model) AddIdentifier

func (m *Model) AddIdentifier(i *Identifier)

AddIdentifier adds an Identifier to the model

func (*Model) AddResult

func (m *Model) AddResult(r *Result)

AddResult adds a Result to the model

func (*Model) Copy

func (m *Model) Copy(dest *Model) error

Copy copies over a model to another variable so that it can be manipulated without side effects

type Network

type Network struct {
	Name     string   `json:"name"`
	Type     string   `json:"type"`
	Automata Automata `json:"automata"`
}

Network aggregates automata information from the `network` block

func (*Network) AddAutomaton

func (n *Network) AddAutomaton(a *Automaton)

AddAutomaton adds an Automaton to a network

type Reachability

type Reachability struct {
	Partial    bool   `json:"partial"`
	Expression string `json:"expression"`
}

Reachability represents the reachability information about the model network

type Result

type Result struct {
	Label      string `json:"label"`
	Expression string `json:"expression"`
}

Result represents a single result present on the `results` block

type Results

type Results []*Result

Results represents a collection of results present on the `results` block

type Transition

type Transition struct {
	From   string           `json:"from"`
	To     string           `json:"to"`
	Events TransitionEvents `json:"events"`
}

Transition represents a single automaton transition

type TransitionEvent

type TransitionEvent struct {
	EventName   string `json:"name"`
	Probability string `json:"probability"`
}

TransitionEvent represents a single automaton transition event

type TransitionEvents

type TransitionEvents []*TransitionEvent

TransitionEvents represents a collection of transition events

type Transitions

type Transitions []*Transition

Transitions represent a collection of automaton transitions

Jump to

Keyboard shortcuts

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