bmbuilder

package
v0.0.0-...-fe19dca Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

README

BM Builder

BM Builder is a library that generates a BondMachine architecture file from a set of already existing BondMachines by combining them. BM Builder is a tool that is part of the BondMachine toolchain. It works by layering the BondMachines on top of each other, and then combining them into a single BondMachine. It is used with its companion CLI tool, called in the same way, bmbuilder, or used as a library in other tools as for example in the bmqsim tool.

Generators

Documentation

Index

Constants

View Source
const (
	FinalBMInput = uint8(1) + iota
	FinalBMOutput
	FirstBMInput
	FirstBMOutput
	SecondBMInput
	SecondBMOutput
)
View Source
const (
	LAST_PASS = passGeneratorsExec
)

Variables

This section is empty.

Functions

func GetPassMnemonic

func GetPassMnemonic() map[uint64]string

func IsOptionalPass

func IsOptionalPass() map[uint64]bool

Types

type BMBuilder

type BMBuilder struct {
	// contains filtered or unexported fields
}

The instance

func (*BMBuilder) ActivePass

func (bi *BMBuilder) ActivePass(active uint64) bool

func (*BMBuilder) Alert

func (bi *BMBuilder) Alert(logline ...interface{})

Alert helper function

func (*BMBuilder) BMBuilderInit

func (bld *BMBuilder) BMBuilderInit()

func (*BMBuilder) BMMerge

func (*BMBuilder) BuildBondMachine

func (bi *BMBuilder) BuildBondMachine() error

func (*BMBuilder) BuildSequentialBlock

func (bi *BMBuilder) BuildSequentialBlock(block *BMBuilderBlock) error

func (*BMBuilder) Debug

func (bi *BMBuilder) Debug(logline ...interface{})

Debug helper functrion

func (*BMBuilder) ExportBasmBody

func (bi *BMBuilder) ExportBasmBody() (*bmline.BasmBody, error)

func (*BMBuilder) GetBondMachine

func (bi *BMBuilder) GetBondMachine() *bondmachine.Bondmachine

func (*BMBuilder) Info

func (bi *BMBuilder) Info(logline ...interface{})

Info helper function

func (*BMBuilder) ParseBuilderDefault

func (bld *BMBuilder) ParseBuilderDefault(filePath string) error

func (*BMBuilder) ParseBuilderFile

func (bld *BMBuilder) ParseBuilderFile(filePath string, parseFunction func(*BMBuilder, string, uint32) error) error

ParseBuilderFile opens the actual assembly file and call a parse function on every line with the underline BMBuilder loaded

func (*BMBuilder) ParseBuilderString

func (bld *BMBuilder) ParseBuilderString(text string, parseFunction func(*BMBuilder, string, uint32) error) error

ParseBuilderString opens the actual assembly file and call a parse function on every line with the underline BMBuilder loaded

func (*BMBuilder) RunBuilder

func (bi *BMBuilder) RunBuilder() error

func (*BMBuilder) SetActive

func (bi *BMBuilder) SetActive(pass string) error

func (*BMBuilder) SetDebug

func (bld *BMBuilder) SetDebug()

SetDebug sets the debug flag on a BMBuilder

func (*BMBuilder) SetVerbose

func (bld *BMBuilder) SetVerbose()

SetVerbose sets the verbose flag on a BMBuilder

func (*BMBuilder) String

func (bi *BMBuilder) String() string

func (*BMBuilder) UnsetActive

func (bi *BMBuilder) UnsetActive(pass string) error

func (*BMBuilder) Warning

func (bi *BMBuilder) Warning(logline ...interface{})

Warning helper function

type BMBuilderBlock

type BMBuilderBlock struct {
	// contains filtered or unexported fields
}

func (*BMBuilderBlock) String

func (m *BMBuilderBlock) String() string

type BMConnections

type BMConnections struct {
	Links []BMLink
}

func ConnectorDefault

func ConnectorDefault(b *BMBuilder, e *bmline.BasmElement, l *bmline.BasmLine) (*BMConnections, error)

func (*BMConnections) String

func (c *BMConnections) String() string

type BMEndPoint

type BMEndPoint struct {
	BType uint8
	BNum  int
}

func (BMEndPoint) String

func (e BMEndPoint) String() string
type BMLink struct {
	E1 BMEndPoint
	E2 BMEndPoint
}

Jump to

Keyboard shortcuts

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