Documentation ¶
Index ¶
- Constants
- Variables
- func DoAlphaConversion(elem Element)
- func GetAllFreeNames(elem Element) []string
- func InteractiveMode(flags Flags)
- func Log(strs ...string)
- func OutputMode(flags Flags) error
- func PrettyPrintAst(elem Element) string
- func PrettyPrintConfiguration(conf Configuration) string
- func RegisterGobs()
- type Configuration
- type DeclaredProcess
- type EdgeTemplate
- type ElemEquality
- type ElemInput
- type ElemNil
- type ElemOutput
- type ElemParallel
- type ElemProcess
- type ElemRestriction
- type ElemRoot
- type ElemSum
- type Element
- type ElementType
- type Flags
- type Label
- type Lts
- type Name
- type NameType
- type Registers
- func (reg *Registers) AddEmptyName()
- func (reg *Registers) GetLabel(name string) int
- func (reg *Registers) GetName(label int) string
- func (reg *Registers) Labels() []int
- func (reg *Registers) RemoveMax()
- func (reg *Registers) UpdateMax(freeName string) int
- func (reg *Registers) UpdateMin(name string, freshNames []string) int
- type Symbol
- type SymbolType
- type Transition
- type VertexTemplate
Constants ¶
const APOSTROPHE = 57359
const COMMA = 57353
const COMMENT = 57357
const DOLLARSIGN = 57360
const DOT = 57356
const EQUAL = 57354
const EXCLAMATION = 57362
const LANGLE = 57349
const LBRACKET = 57347
const LOWER_THAN_LBRACKET = 57364
const LOWPREC = 57363
const LSQBRACKET = 57351
const NAME = 57346
const PLUS = 57361
const RANGLE = 57350
const RBRACKET = 57348
const RSQBRACKET = 57352
const VERTBAR = 57355
const ZERO = 57358
Variables ¶
var DeclaredProcs map[string]DeclaredProcess
DeclaredProcs is a map of name -> (process, parameters).
Functions ¶
func DoAlphaConversion ¶
func DoAlphaConversion(elem Element)
DoAlphaConversion renames bound names to names appropriate to their scope.
func GetAllFreeNames ¶
GetAllFreeNames returns all fresh names in the AST.
func InteractiveMode ¶
func InteractiveMode(flags Flags)
InteractiveMode allows the user to inspect interactively the LTS in a prompt.
func OutputMode ¶
OutputMode generates an LTS from the pi-calculus program file and either writes the output to a file, or prints the output if an output file is not specified.
func PrettyPrintAst ¶
PrettyPrintAst returns a string containing the pi-calculus syntax of the AST.
func PrettyPrintConfiguration ¶
func PrettyPrintConfiguration(conf Configuration) string
PrettyPrintConfiguration returns a pretty printed string of the configuration.
func RegisterGobs ¶
func RegisterGobs()
RegisterGobs registers concrete types implementing the Element interface for encoding as binary gobs.
Types ¶
type Configuration ¶
type DeclaredProcess ¶
type EdgeTemplate ¶
type ElemEquality ¶
func (*ElemEquality) Type ¶
func (e *ElemEquality) Type() ElementType
type ElemOutput ¶
func (*ElemOutput) Type ¶
func (e *ElemOutput) Type() ElementType
type ElemParallel ¶
func (*ElemParallel) Type ¶
func (e *ElemParallel) Type() ElementType
type ElemProcess ¶
func (*ElemProcess) Type ¶
func (e *ElemProcess) Type() ElementType
type ElemRestriction ¶
func (*ElemRestriction) Type ¶
func (e *ElemRestriction) Type() ElementType
type ElemRoot ¶
type ElemRoot struct {
Next Element
}
func (*ElemRoot) Type ¶
func (e *ElemRoot) Type() ElementType
type Element ¶
type Element interface {
Type() ElementType
}
func InitProgram ¶
InitProgram parses the byte array and returns the root undeclared process.
func InitRootAst ¶
InitRootAst performs alpha-conversion and adds a root element to the AST as the head, for use in the transition relation.
type ElementType ¶
type ElementType int
const ( ElemTypNil ElementType = iota ElemTypOutput ElemTypInput ElemTypMatch ElemTypRestriction ElemTypSum ElemTypParallel ElemTypProcess ElemTypRoot )
type Flags ¶
type Flags struct { InteractiveMode bool RegisterSize int MaxStates int DisableGC bool InputFile string OutputFile string GVLayout string GVOutputStates bool GVTex bool Pretty bool Gob bool Statistics bool Quiet bool }
Flags are the user-specified flags for the command line.
type Label ¶
func (Label) PrettyPrintGraph ¶
type Lts ¶
type Lts struct { States map[int]Configuration Transitions []Transition RegSizeReached map[int]bool StatesExplored int StatesGenerated int }
type Registers ¶
func (*Registers) AddEmptyName ¶
func (reg *Registers) AddEmptyName()
AddEmptyName increments all labels by one while retaining mapping to their name and leaves an empty name (#) at label 1. #+o = {(1, #)} U {(i+1, v′) | (i, v′) E o}.
func (*Registers) RemoveMax ¶
func (reg *Registers) RemoveMax()
RemoveMax removes a free name from the register at the register size + 1 and decrements the register size. Undos UpdateMax.
type Symbol ¶
type Symbol struct { Type SymbolType Value int }
type SymbolType ¶
type SymbolType int
const ( SymbolTypTau SymbolType = iota SymbolTypInput SymbolTypOutput SymbolTypFreshInput SymbolTypFreshOutput SymbolTypKnown )