pnml

package
v0.0.0-...-b0f9fd1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: GPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotationGraphics

type AnnotationGraphics struct {
	XMLName xml.Name `xml:"graphics"`
	Offset  *Offset  `xml:"offset"`
	Fill    *Fill    `xml:"fill"` // optional
	Line    *Line    `xml:"line"` // optional
	Font    *Font    `xml:"font"` // optional
}

func (*AnnotationGraphics) UnmarshalXML

func (a *AnnotationGraphics) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Arc

type Arc struct {
	XMLName       xml.Name         `xml:"arc"`
	ID            *string          `xml:"id,attr"`
	Source        *string          `xml:"source,attr"`
	Target        *string          `xml:"target,attr"`
	Name          *Name            `xml:"name"`          // optional
	Weight        *PTArcAnnotation `xml:"inscription"`   // label for pt nets only
	HLInscription *HLAnnotation    `xml:"hlinscription"` // label for hl nets only, optional
	Graphics      *EdgeGraphics    `xml:"graphics"`      // optional
	ToolSpecifics []ToolSpecific   `xml:"toolspecific"`  // optional

}

func (*Arc) UnmarshalXML

func (a *Arc) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type BoolAnd

type BoolAnd struct {
	XMLName xml.Name    `xml:"and"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*BoolAnd) UnmarshalXML

func (b *BoolAnd) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type BoolConstant

type BoolConstant struct {
	XMLName xml.Name    `xml:"booleanconstant"`
	Value   *bool       `xml:"value,attr"`
	Terms   []HLSubterm `xml:"subterm"` // should not appear in a boolean constant, but allowed by the XML grammar
}

func (*BoolConstant) UnmarshalXML

func (b *BoolConstant) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type BoolEquality

type BoolEquality struct {
	XMLName xml.Name    `xml:"equality"`
	Terms   []HLSubterm `xml:"subterm"`
}

func (*BoolEquality) UnmarshalXML

func (b *BoolEquality) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type BoolImply

type BoolImply struct {
	XMLName xml.Name    `xml:"imply"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*BoolImply) UnmarshalXML

func (b *BoolImply) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type BoolInequality

type BoolInequality struct {
	XMLName xml.Name    `xml:"inequality"`
	Terms   []HLSubterm `xml:"subterm"`
}

func (*BoolInequality) UnmarshalXML

func (b *BoolInequality) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type BoolNot

type BoolNot struct {
	XMLName xml.Name    `xml:"not"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*BoolNot) UnmarshalXML

func (b *BoolNot) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type BoolOr

type BoolOr struct {
	XMLName xml.Name    `xml:"or"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*BoolOr) UnmarshalXML

func (b *BoolOr) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type BoolSort

type BoolSort struct {
	XMLName xml.Name `xml:"bool"`
}

type CyclicEnumPredecessor

type CyclicEnumPredecessor struct {
	XMLName xml.Name    `xml:"predecessor"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*CyclicEnumPredecessor) UnmarshalXML

func (c *CyclicEnumPredecessor) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type CyclicEnumSort

type CyclicEnumSort struct {
	XMLName   xml.Name     `xml:"cyclicenumeration"`
	Constants []FEConstant `xml:"feconstant"` // optional
}

type CyclicEnumSuccessor

type CyclicEnumSuccessor struct {
	XMLName xml.Name    `xml:"successor"`
	Terms   []HLSubterm `xml:"subterm"`
}

func (*CyclicEnumSuccessor) UnmarshalXML

func (c *CyclicEnumSuccessor) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Dimension

type Dimension struct {
	XMLName xml.Name `xml:"dimension"`
	X       *float32 `xml:"x,attr"` // between 0 and 999.9, 4 digits with 1 decimal digit
	Y       *float32 `xml:"y,attr"` // between 0 and 999.9, 4 digits with 1 decimal digit
}

func (*Dimension) UnmarshalXML

func (di *Dimension) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type DotConstant

type DotConstant struct {
	XMLName xml.Name `xml:"dotconstant"`
}

type DotSort

type DotSort struct {
	XMLName xml.Name `xml:"dot"`
}

type EdgeGraphics

type EdgeGraphics struct {
	XMLName   xml.Name   `xml:"graphics"`
	Positions []Position `xml:"position"` // optional
	Line      *Line      `xml:"line"`     // optional
}

type FEConstant

type FEConstant struct {
	XMLName xml.Name `xml:"feconstant"`
	ID      *string  `xml:"id,attr"`
	Name    *string  `xml:"name,attr"`
}

func (*FEConstant) UnmarshalXML

func (f *FEConstant) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type FESort

type FESort struct {
	XMLName   xml.Name     `xml:"finiteenumeration"`
	Constants []FEConstant `xml:"feconstant"` // optional
}

type FIRConstant

type FIRConstant struct {
	XMLName xml.Name    `xml:"finiteintrangeconstant"`
	Value   *int        `xml:"value,attr"`
	FIRSort *FIRSort    `xml:"finiteintrange"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*FIRConstant) UnmarshalXML

func (f *FIRConstant) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type FIRGreaterThan

type FIRGreaterThan struct {
	XMLName xml.Name    `xml:"greaterthan"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*FIRGreaterThan) UnmarshalXML

func (f *FIRGreaterThan) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type FIRGreaterThanOrEqual

type FIRGreaterThanOrEqual struct {
	XMLName xml.Name    `xml:"greaterthanorequal"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*FIRGreaterThanOrEqual) UnmarshalXML

func (f *FIRGreaterThanOrEqual) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type FIRLessThan

type FIRLessThan struct {
	XMLName xml.Name    `xml:"lessthan"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*FIRLessThan) UnmarshalXML

func (f *FIRLessThan) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type FIRLessThanOrEqual

type FIRLessThanOrEqual struct {
	XMLName xml.Name    `xml:"lessthanorequal"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*FIRLessThanOrEqual) UnmarshalXML

func (f *FIRLessThanOrEqual) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type FIRSort

type FIRSort struct {
	XMLName xml.Name `xml:"finiteintrange"`
	Start   *int     `xml:"start,attr"`
	End     *int     `xml:"end,attr"`
}

func (*FIRSort) UnmarshalXML

func (f *FIRSort) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Fill

type Fill struct {
	XMLName          xml.Name `xml:"fill"`
	Color            *string  `xml:"color,attr"`             // optional
	GradientColor    *string  `xml:"gradient-color,attr"`    // optional
	GradientRotation *string  `xml:"gradient-rotation,attr"` // optional (must be vertical, horizontal, or diagonal)
	Image            *string  `xml:"image,attr"`             // optional
}

func (*Fill) UnmarshalXML

func (f *Fill) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Font

type Font struct {
	XMLName    xml.Name `xml:"font"`
	Family     *string  `xml:"family,attr"`     // optional
	Style      *string  `xml:"style,attr"`      // optional
	Weight     *string  `xml:"weight,attr"`     // optional
	Size       *string  `xml:"size,attr"`       // optional
	Decoration *string  `xml:"decoration,attr"` // optional (must be underline, overline, or line-through)
	Align      *string  `xml:"align,attr"`      // optional (must be left, center, or right)
	Rotation   *float32 `xml:"rotation,attr"`   // optional
}

func (*Font) UnmarshalXML

func (f *Font) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type HLAnnotation

type HLAnnotation struct {
	XMLName       xml.Name            `xml:"hlinscription"`
	Info          *string             `xml:"text"`         // optional
	Graphics      *AnnotationGraphics `xml:"graphics"`     // optional
	ToolSpecifics []ToolSpecific      `xml:"toolspecific"` // optional
	Structure     *HLTermStructure    `xml:"structure"`    // optional
}

type HLCondition

type HLCondition struct {
	XMLName       xml.Name            `xml:"condition"`
	Info          *string             `xml:"text"`         // optional
	Graphics      *AnnotationGraphics `xml:"graphics"`     // optional
	ToolSpecifics []ToolSpecific      `xml:"toolspecific"` // optional
	Structure     *HLTermStructure    `xml:"structure"`    // optional
}

type HLDeclaration

type HLDeclaration struct {
	XMLName                        xml.Name                   `xml:"declaration"`
	Info                           *string                    `xml:"text"`                                    // optional
	SortDeclarations               []HLSortDeclaration        `xml:"structure>declarations>namedsort"`        // optional
	PartitionSortDeclarations      []PartitionSortDeclaration `xml:"structure>declarations>partition"`        // optional
	VariableDeclarations           []HLVariableDeclaration    `xml:"structure>declarations>variabledecl"`     // optional
	OperatorDeclarations           []HLOperatorDeclaration    `xml:"structure>declarations>namedoperator"`    // optional
	PartitionOperatorsDeclarations []PartitionElement         `xml:"structure>declarations>partitionelement"` // optional
	FEConstantDeclarations         []FEConstant               `xml:"structure>declarations>feconstant"`       // optional
}

type HLMarking

type HLMarking struct {
	XMLName       xml.Name            `xml:"hlinitialMarking"`
	Info          *string             `xml:"text"`         // optional
	Graphics      *AnnotationGraphics `xml:"graphics"`     // optional
	ToolSpecifics []ToolSpecific      `xml:"toolspecific"` // optional
	Structure     *HLTermStructure    `xml:"structure"`    // optional
}

type HLMultisetSort

type HLMultisetSort struct {
	XMLName xml.Name `xml:"multisetsort"`
	Sort    *HLSort  `xml:",any"`
}

func (HLMultisetSort) MarshalXML

func (h HLMultisetSort) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*HLMultisetSort) UnmarshalXML

func (h *HLMultisetSort) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type HLOperatorDeclaration

type HLOperatorDeclaration struct {
	XMLName              xml.Name                `xml:"namedoperator"`
	ID                   *string                 `xml:"id,attr"`
	Name                 *string                 `xml:"name,attr"`
	VariableDeclarations []HLVariableDeclaration `xml:"parameter>variabledecl"` // optional
	Def                  *HLTermDef              `xml:"def"`
}

func (*HLOperatorDeclaration) UnmarshalXML

func (h *HLOperatorDeclaration) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type HLProductSort

type HLProductSort struct {
	XMLName xml.Name `xml:"productsort"`
	Sorts   []HLSort `xml:",any"` // optional
}

func (HLProductSort) MarshalXML

func (h HLProductSort) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type HLSort

type HLSort struct {
	Type  string `xml:"-"`
	Value interface{}
}

func (*HLSort) UnmarshalXML

func (h *HLSort) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type HLSortDeclaration

type HLSortDeclaration struct {
	XMLName xml.Name `xml:"namedsort"`
	ID      *string  `xml:"id,attr"`
	Name    *string  `xml:"name,attr"`
	Sort    *HLSort  `xml:",any"`
}

func (HLSortDeclaration) MarshalXML

func (h HLSortDeclaration) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*HLSortDeclaration) UnmarshalXML

func (h *HLSortDeclaration) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type HLSortStructure

type HLSortStructure struct {
	XMLName xml.Name `xml:"structure"`
	Sort    *HLSort  `xml:",any"`
}

func (HLSortStructure) MarshalXML

func (h HLSortStructure) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*HLSortStructure) UnmarshalXML

func (h *HLSortStructure) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type HLSubterm

type HLSubterm struct {
	XMLName xml.Name `xml:"subterm"`
	Term    *HLTerm  `xml:",any"`
}

func (HLSubterm) MarshalXML

func (h HLSubterm) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*HLSubterm) UnmarshalXML

func (h *HLSubterm) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type HLTerm

type HLTerm struct {
	Type  string `xml:"-"`
	Value interface{}
}

func (*HLTerm) UnmarshalXML

func (h *HLTerm) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type HLTermDef

type HLTermDef struct {
	XMLName xml.Name `xml:"def"`
	Term    *HLTerm  `xml:",any"`
}

func (HLTermDef) MarshalXML

func (h HLTermDef) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*HLTermDef) UnmarshalXML

func (h *HLTermDef) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type HLTermStructure

type HLTermStructure struct {
	XMLName xml.Name `xml:"structure"`
	Term    *HLTerm  `xml:",any"`
}

func (HLTermStructure) MarshalXML

func (h HLTermStructure) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*HLTermStructure) UnmarshalXML

func (h *HLTermStructure) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type HLTupleOperator

type HLTupleOperator struct {
	XMLName xml.Name    `xml:"tuple"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

type HLType

type HLType struct {
	XMLName       xml.Name            `xml:"type"`
	Info          *string             `xml:"text"`         // optional
	Graphics      *AnnotationGraphics `xml:"graphics"`     // optional
	ToolSpecifics []ToolSpecific      `xml:"toolspecific"` // optional
	Structure     *HLSortStructure    `xml:"structure"`    // optional
}

type HLUserOperator

type HLUserOperator struct {
	XMLName xml.Name    `xml:"useroperator"`
	ID      *string     `xml:"declaration,attr"` // data type="IDREF"
	Terms   []HLSubterm `xml:"subterm"`          // optional
}

func (*HLUserOperator) UnmarshalXML

func (h *HLUserOperator) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type HLUserSort

type HLUserSort struct {
	XMLName xml.Name `xml:"usersort"`
	ID      *string  `xml:"declaration,attr"` // data type="IDREF"
}

func (*HLUserSort) UnmarshalXML

func (h *HLUserSort) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type HLVariable

type HLVariable struct {
	XMLName xml.Name `xml:"variable"`
	ID      *string  `xml:"refvariable,attr"` // data type="IDREF"
}

func (*HLVariable) UnmarshalXML

func (h *HLVariable) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type HLVariableDeclaration

type HLVariableDeclaration struct {
	XMLName xml.Name `xml:"variabledecl"`
	ID      *string  `xml:"id,attr"`
	Name    *string  `xml:"name,attr"`
	Sort    *HLSort  `xml:",any"`
}

func (HLVariableDeclaration) MarshalXML

func (h HLVariableDeclaration) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*HLVariableDeclaration) UnmarshalXML

func (h *HLVariableDeclaration) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type IntAddition

type IntAddition struct {
	XMLName xml.Name    `xml:"addition"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*IntAddition) UnmarshalXML

func (i *IntAddition) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type IntDivision

type IntDivision struct {
	XMLName xml.Name    `xml:"div"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*IntDivision) UnmarshalXML

func (i *IntDivision) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type IntGreaterThan

type IntGreaterThan struct {
	XMLName xml.Name    `xml:"gt"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*IntGreaterThan) UnmarshalXML

func (i *IntGreaterThan) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type IntGreaterThanOrEqual

type IntGreaterThanOrEqual struct {
	XMLName xml.Name    `xml:"geq"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*IntGreaterThanOrEqual) UnmarshalXML

func (i *IntGreaterThanOrEqual) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type IntInteger

type IntInteger struct {
	XMLName xml.Name `xml:"integer"`
}

type IntLessThan

type IntLessThan struct {
	XMLName xml.Name    `xml:"lt"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*IntLessThan) UnmarshalXML

func (i *IntLessThan) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type IntLessThanOrEqual

type IntLessThanOrEqual struct {
	XMLName xml.Name    `xml:"leq"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*IntLessThanOrEqual) UnmarshalXML

func (i *IntLessThanOrEqual) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type IntModulo

type IntModulo struct {
	XMLName xml.Name    `xml:"mod"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*IntModulo) UnmarshalXML

func (i *IntModulo) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type IntMultiplication

type IntMultiplication struct {
	XMLName xml.Name    `xml:"mult"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*IntMultiplication) UnmarshalXML

func (i *IntMultiplication) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type IntNatural

type IntNatural struct {
	XMLName xml.Name `xml:"natural"`
}

type IntNumberConstant

type IntNumberConstant struct {
	XMLName xml.Name    `xml:"numberconstant"`
	Value   *int        `xml:"value,attr"`
	Terms   []HLSubterm `xml:"subterm"` // empty
	// choice
	IntNatural  *IntNatural  `xml:"natural"`
	IntPositive *IntPositive `xml:"positive"`
	IntInteger  *IntInteger  `xml:"integer"`
}

func (*IntNumberConstant) UnmarshalXML

func (i *IntNumberConstant) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type IntPositive

type IntPositive struct {
	XMLName xml.Name `xml:"positive"`
}

type IntSubtraction

type IntSubtraction struct {
	XMLName xml.Name    `xml:"subtraction"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*IntSubtraction) UnmarshalXML

func (i *IntSubtraction) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Line

type Line struct {
	XMLName xml.Name `xml:"line"`
	Shape   *string  `xml:"shape,attr"` // optional (must be line or curve)
	Color   *string  `xml:"color,attr"` // optional
	Width   *float32 `xml:"width,attr"` // optional (must be between 0 and 999.9, 4 digits with 1 decimal digit)
	Style   *string  `xml:"style,attr"` // optional (must be solid, dash, or dot)
}

func (*Line) UnmarshalXML

func (l *Line) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type ListAppend

type ListAppend struct {
	XMLName xml.Name    `xml:"listappend"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*ListAppend) UnmarshalXML

func (l *ListAppend) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type ListConcatenation

type ListConcatenation struct {
	XMLName xml.Name    `xml:"listconcatenation"`
	Terms   []HLSubterm `xml:"subterm"`
}

func (*ListConcatenation) UnmarshalXML

func (l *ListConcatenation) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type ListEmpty

type ListEmpty struct {
	XMLName xml.Name    `xml:"emptylist"`
	Sort    *HLSort     `xml:",any"`
	Terms   []HLSubterm `xml:"subterm"`
}

func (ListEmpty) MarshalXML

func (l ListEmpty) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*ListEmpty) UnmarshalXML

func (l *ListEmpty) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type ListLength

type ListLength struct {
	XMLName xml.Name    `xml:"listlength"`
	Terms   []HLSubterm `xml:"subterm"`
}

func (*ListLength) UnmarshalXML

func (l *ListLength) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type ListMake

type ListMake struct {
	XMLName xml.Name    `xml:"makelist"`
	Sort    *HLSort     `xml:",any"`
	Terms   []HLSubterm `xml:"subterm"` // 1 or more? what about empty list?
}

func (ListMake) MarshalXML

func (l ListMake) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*ListMake) UnmarshalXML

func (l *ListMake) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type ListMemberAtIndex

type ListMemberAtIndex struct {
	XMLName xml.Name    `xml:"memberatindex"`
	Index   *uint       `xml:"index,attr"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*ListMemberAtIndex) UnmarshalXML

func (l *ListMemberAtIndex) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type ListSort

type ListSort struct {
	XMLName xml.Name `xml:"list"`
	Sort    *HLSort  `xml:",any"`
}

func (ListSort) MarshalXML

func (l ListSort) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*ListSort) UnmarshalXML

func (l *ListSort) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type ListSublist

type ListSublist struct {
	XMLName xml.Name    `xml:"sublist"`
	Start   *uint       `xml:"start,attr"`
	Length  *uint       `xml:"length,attr"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*ListSublist) UnmarshalXML

func (l *ListSublist) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type MultisetAdd

type MultisetAdd struct {
	XMLName xml.Name    `xml:"add"`
	Terms   []HLSubterm `xml:"subterm"`
}

func (*MultisetAdd) UnmarshalXML

func (m *MultisetAdd) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type MultisetAll

type MultisetAll struct {
	XMLName xml.Name    `xml:"all"`
	Terms   []HLSubterm `xml:"subterm"`
	Sort    *HLSort     `xml:",any"`
}

func (MultisetAll) MarshalXML

func (m MultisetAll) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*MultisetAll) UnmarshalXML

func (m *MultisetAll) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type MultisetCardinality

type MultisetCardinality struct {
	XMLName xml.Name    `xml:"cardinality"`
	Terms   []HLSubterm `xml:"subterm"`
}

func (*MultisetCardinality) UnmarshalXML

func (m *MultisetCardinality) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type MultisetCardinalityOf

type MultisetCardinalityOf struct {
	XMLName xml.Name    `xml:"cardinalityof"`
	Terms   []HLSubterm `xml:"subterm"`
}

func (*MultisetCardinalityOf) UnmarshalXML

func (m *MultisetCardinalityOf) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type MultisetContains

type MultisetContains struct {
	XMLName xml.Name    `xml:"contains"`
	Terms   []HLSubterm `xml:"subterm"`
}

func (*MultisetContains) UnmarshalXML

func (m *MultisetContains) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type MultisetEmpty

type MultisetEmpty struct {
	XMLName xml.Name    `xml:"empty"`
	Terms   []HLSubterm `xml:"subterm"` // optional
	Sort    *HLSort     `xml:",any"`
}

func (MultisetEmpty) MarshalXML

func (m MultisetEmpty) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*MultisetEmpty) UnmarshalXML

func (m *MultisetEmpty) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type MultisetNumberOf

type MultisetNumberOf struct {
	XMLName xml.Name    `xml:"numberof"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*MultisetNumberOf) UnmarshalXML

func (m *MultisetNumberOf) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type MultisetScalarProduct

type MultisetScalarProduct struct {
	XMLName xml.Name    `xml:"scalarproduct"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*MultisetScalarProduct) UnmarshalXML

func (m *MultisetScalarProduct) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type MultisetSubtract

type MultisetSubtract struct {
	XMLName xml.Name    `xml:"subtract"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*MultisetSubtract) UnmarshalXML

func (m *MultisetSubtract) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Name

type Name struct {
	XMLName       xml.Name            `xml:"name"`
	Text          *string             `xml:"text"`         // optional
	Graphics      *AnnotationGraphics `xml:"graphics"`     // optional
	ToolSpecifics []ToolSpecific      `xml:"toolspecific"` // optional
}

type Net

type Net struct {
	XMLName        xml.Name        `xml:"net"`
	ID             *string         `xml:"id,attr"`
	Type           *string         `xml:"type,attr"`
	Name           *Name           `xml:"name"`         // optional
	HLDeclarations []HLDeclaration `xml:"declaration"`  // optional
	Pages          []Page          `xml:"page"`         // at least 1
	ToolSpecifics  []ToolSpecific  `xml:"toolspecific"` // optional

}

func (*Net) UnmarshalXML

func (n *Net) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type NodeGraphics

type NodeGraphics struct {
	XMLName   xml.Name   `xml:"graphics"`
	Position  *Position  `xml:"position"`
	Dimension *Dimension `xml:"dimension"` // optional
	Fill      *Fill      `xml:"fill"`      // optional
	Line      *Line      `xml:"line"`      // optional
}

func (*NodeGraphics) UnmarshalXML

func (n *NodeGraphics) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Offset

type Offset struct {
	XMLName xml.Name `xml:"offset"`
	X       *float32 `xml:"x,attr"`
	Y       *float32 `xml:"y,attr"`
}

func (*Offset) UnmarshalXML

func (o *Offset) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type PTArcAnnotation

type PTArcAnnotation struct {
	XMLName       xml.Name            `xml:"inscription"`
	Value         *uint64             `xml:"text"`         // must be integer > 0
	Graphics      *AnnotationGraphics `xml:"graphics"`     // optional
	ToolSpecifics []ToolSpecific      `xml:"toolspecific"` // optional
}

func (*PTArcAnnotation) UnmarshalXML

func (p *PTArcAnnotation) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type PTMarking

type PTMarking struct {
	XMLName       xml.Name            `xml:"initialMarking"`
	Tokens        *uint64             `xml:"text"`         // must be integer >= 0
	Graphics      *AnnotationGraphics `xml:"graphics"`     // optional
	ToolSpecifics []ToolSpecific      `xml:"toolspecific"` // optional
}

func (*PTMarking) UnmarshalXML

func (p *PTMarking) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Page

type Page struct {
	XMLName        xml.Name        `xml:"page"`
	ID             *string         `xml:"id,attr"`
	Name           *Name           `xml:"name"`                // optional
	ToolSpecifics  []ToolSpecific  `xml:"toolspecific"`        // optional
	HLDeclarations []HLDeclaration `xml:"declaration"`         // optional
	Pages          []Page          `xml:"page"`                // optional
	Places         []Place         `xml:"place"`               // optional
	Transitions    []Transition    `xml:"transition"`          // optional
	RefPlaces      []RefPlace      `xml:"referencePlace"`      // optional
	RefTransitions []RefTransition `xml:"referenceTransition"` // optional
	Arcs           []Arc           `xml:"arc"`                 // optional
	Graphics       *PageGraphics   `xml:"graphics"`            // optional

}

func (*Page) UnmarshalXML

func (p *Page) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type PageGraphics

type PageGraphics = NodeGraphics

type PartitionElement

type PartitionElement struct {
	XMLName xml.Name `xml:"partitionelement"`
	ID      *string  `xml:"id,attr"`
	Name    *string  `xml:"name,attr"`
	Terms   []HLTerm `xml:",any"`
}

func (*PartitionElement) UnmarshalXML

func (p *PartitionElement) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type PartitionElementOf

type PartitionElementOf struct {
	XMLName xml.Name    `xml:"partitionelementof"`
	Ref     *string     `xml:"refpartition,attr"` // data of type IDREF
	Terms   []HLSubterm `xml:"subterm"`           // optional
}

func (*PartitionElementOf) UnmarshalXML

func (p *PartitionElementOf) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type PartitionGreaterThan

type PartitionGreaterThan struct {
	XMLName xml.Name    `xml:"gtp"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*PartitionGreaterThan) UnmarshalXML

func (p *PartitionGreaterThan) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type PartitionLessThan

type PartitionLessThan struct {
	XMLName xml.Name    `xml:"ltp"`
	Terms   []HLSubterm `xml:"subterm"`
}

func (*PartitionLessThan) UnmarshalXML

func (p *PartitionLessThan) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type PartitionSortDeclaration

type PartitionSortDeclaration struct {
	XMLName           xml.Name           `xml:"partition"`
	ID                *string            `xml:"id,attr"`
	Name              *string            `xml:"name,attr"`
	Sort              *HLSort            `xml:",any"`
	PartitionElements []PartitionElement `xml:"partitionelement"` // one or more
}

func (PartitionSortDeclaration) MarshalXML

func (p PartitionSortDeclaration) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*PartitionSortDeclaration) UnmarshalXML

func (p *PartitionSortDeclaration) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Place

type Place struct {
	XMLName          xml.Name       `xml:"place"`
	ID               *string        `xml:"id,attr"`
	Name             *Name          `xml:"name"`             // optional
	ToolSpecifics    []ToolSpecific `xml:"toolspecific"`     // optional
	InitialMarking   *PTMarking     `xml:"initialMarking"`   // label for pt nets only, optional
	Type             *HLType        `xml:"type"`             // label for hl nets only, optional
	HLInitialMarking *HLMarking     `xml:"hlinitialMarking"` // label for hl nets only, optional
	Graphics         *NodeGraphics  `xml:"graphics"`         // optional

}

func (*Place) UnmarshalXML

func (p *Place) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Pnml

type Pnml struct {
	XMLName xml.Name `xml:"http://www.pnml.org/version-2009/grammar/pnml pnml"`
	Nets    []Net    `xml:"net"` // at least 1
}

func GetPnml

func GetPnml(path string, panicOnWrongModel bool) *Pnml

GetPnml parses a pnml model described in the file whose path is given in argument, if the panicOnWrongModel argument is false, the model will be read even if it contains small mistakes such as wrong operators arities

func (Pnml) GetMaxConstantInMarking

func (p Pnml) GetMaxConstantInMarking() (c uint64)

GetMaxConstantInMarking gives the maximum constant appearing in the initial marking of a net represented by a pnml model (only for PT nets)

func (Pnml) Getptids

func (p Pnml) Getptids() (pids []string, tids []string)

Getptids returns the ids of the places and transitions of a pnml model

func (*Pnml) UnmarshalXML

func (p *Pnml) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Position

type Position struct {
	XMLName xml.Name `xml:"position"`
	X       *float32 `xml:"x,attr"`
	Y       *float32 `xml:"y,attr"`
}

func (*Position) UnmarshalXML

func (p *Position) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type RefPlace

type RefPlace struct {
	XMLName       xml.Name       `xml:"referencePlace"`
	ID            *string        `xml:"id,attr"`
	Reference     *string        `xml:"ref,attr"`
	Name          *Name          `xml:"name"`         // optional
	ToolSpecifics []ToolSpecific `xml:"toolspecific"` // optional
	Graphics      *NodeGraphics  `xml:"graphics"`     // optional
}

func (*RefPlace) UnmarshalXML

func (r *RefPlace) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type RefTransition

type RefTransition struct {
	XMLName       xml.Name       `xml:"referenceTransition"`
	ID            *string        `xml:"id,attr"`
	Reference     *string        `xml:"ref,attr"`
	Name          *Name          `xml:"name"`         // optional
	ToolSpecifics []ToolSpecific `xml:"toolspecific"` // optional
	Graphics      *NodeGraphics  `xml:"graphics"`     // optional
}

func (*RefTransition) UnmarshalXML

func (r *RefTransition) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type StringAppend

type StringAppend struct {
	XMLName xml.Name    `xml:"stringappend"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*StringAppend) UnmarshalXML

func (s *StringAppend) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type StringConcatenation

type StringConcatenation struct {
	XMLName xml.Name    `xml:"stringconcatenation"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*StringConcatenation) UnmarshalXML

func (s *StringConcatenation) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type StringConstant

type StringConstant struct {
	XMLName xml.Name    `xml:"stringconstant"`
	Value   *string     `xml:"value>text"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*StringConstant) UnmarshalXML

func (s *StringConstant) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type StringGreaterThan

type StringGreaterThan struct {
	XMLName xml.Name    `xml:"gts"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*StringGreaterThan) UnmarshalXML

func (s *StringGreaterThan) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type StringGreaterThanOrEqual

type StringGreaterThanOrEqual struct {
	XMLName xml.Name    `xml:"geqs"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*StringGreaterThanOrEqual) UnmarshalXML

func (s *StringGreaterThanOrEqual) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type StringLength

type StringLength struct {
	XMLName xml.Name    `xml:"stringlength"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*StringLength) UnmarshalXML

func (s *StringLength) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type StringLessThan

type StringLessThan struct {
	XMLName xml.Name    `xml:"lts"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*StringLessThan) UnmarshalXML

func (s *StringLessThan) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type StringLessThanOrEqual

type StringLessThanOrEqual struct {
	XMLName xml.Name    `xml:"leqs"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*StringLessThanOrEqual) UnmarshalXML

func (s *StringLessThanOrEqual) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type StringSort

type StringSort struct {
	XMLName xml.Name `xml:"string"`
}

type StringSubstring

type StringSubstring struct {
	XMLName xml.Name    `xml:"substring"`
	Start   *uint       `xml:"start,attr"`
	Length  *uint       `xml:"length,attr"`
	Terms   []HLSubterm `xml:"subterm"` // optional
}

func (*StringSubstring) UnmarshalXML

func (s *StringSubstring) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type ToolSpecific

type ToolSpecific struct {
	XMLName xml.Name `xml:"toolspecific"`
	Tool    *string  `xml:"tool,attr"`
	Version *string  `xml:"version,attr"`
}

func (*ToolSpecific) UnmarshalXML

func (t *ToolSpecific) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Transition

type Transition struct {
	XMLName       xml.Name       `xml:"transition"`
	ID            *string        `xml:"id,attr"`
	Name          *Name          `xml:"name"`         // optional
	ToolSpecifics []ToolSpecific `xml:"toolspecific"` // optional
	Condition     *HLCondition   `xml:"condition"`    // label for hl nets only, optional
	Graphics      *NodeGraphics  `xml:"graphics"`     // optional

}

func (*Transition) UnmarshalXML

func (t *Transition) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

Source Files

Jump to

Keyboard shortcuts

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