Documentation ¶
Index ¶
- func BoolCompatible(b1, b2 Bool) bool
- func PrintQueries(queries []Query) string
- type Bool
- type BooleanConstant
- type Conjunction
- type Constant
- type Decoder
- type Disjunction
- type Formula
- type IntegerConstant
- type IntegerLe
- type IsFireable
- type Negation
- type Places
- type Property
- type PropertySet
- type Query
- type RawXML
- type TokensCount
- type Transitions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolCompatible ¶
BoolCompatible checks that b1 and b2 are equal when they are both defined (not UNDEF)
func PrintQueries ¶
Types ¶
type Bool ¶
type Bool int
Bool is the type of ternary Boolean values (True, False, Undef). By construction, the zero value of a Bool is UNDEF.
func (Bool) PrintShort ¶
type BooleanConstant ¶
type BooleanConstant bool
BooleanConstant defines a constant True or False.
func (BooleanConstant) String ¶
func (f BooleanConstant) String() string
type Conjunction ¶
type Conjunction []Formula
Conjunction is the conjunction of two or more formulas.
func (Conjunction) String ¶
func (f Conjunction) String() string
type Decoder ¶
A Decoder represents an XML parser reading a particular input stream that should be a valid formula file. It embeds an xml.Decoder for parsing a XML stream passed as an io.Reader. Like with xml.Decoder, the parser assumes that its input is encoded in UTF-8.
func NewDecoder ¶
NewDecoder creates a new XML parser reading from r.
type Disjunction ¶
type Disjunction []Formula
Disjunction is the disjunction of two or more formulas.
func (Disjunction) String ¶
func (f Disjunction) String() string
type Formula ¶
type Formula interface {
String() string
}
Formula is the interface that wraps the type of XML Formula.
Includes reports if one of the constant in the formula is part of the set of names
type IntegerConstant ¶
type IntegerConstant int
IntegerConstant defines an integer constant. It is an atomic integer expression.
func (IntegerConstant) String ¶
func (f IntegerConstant) String() string
type IntegerLe ¶
IntegerLe returns true if the value of the Left integer expression is less than or equal to the value of the Right one.
type IsFireable ¶
type IsFireable []string
IsFireable evaluates to true if one of the declared transition is fireable.
func (IsFireable) String ¶
func (f IsFireable) String() string
type Property ¶
type Property struct { Id string `xml:"id"` EF RawXML `xml:"formula>exists-path>finally,omitempty"` AG RawXML `xml:"formula>all-paths>globally,omitempty"` }
Property is one of EF phi or AG phi, with phi a state formula
type PropertySet ¶
PropertySet is the type of set of formulas defined in a MCC XML property file. We should have a list of 16 properties included inside a `property-set` XML element.
type Query ¶
type Query struct { ID string IsEF bool IsReachability bool Skip bool // whether we should skip evaluating this formula Original Formula // formula before simplification. For debugging purpose Formula }
Query is the type of reachability queries we need to check. When IsEF is true the query is (EF phi), meaning we report true if we can reach a state where phi is true. Conversely, when IsEF is false, the query is (AG phi), meaning we report false if (not phi) is reachable.
type RawXML ¶
type RawXML struct {
InnerXML []byte `xml:",innerxml"`
}
StateFormula is a Boolean combination of atomic properties and integer expressions that we should parse explicitly.
type TokensCount ¶
type TokensCount []string
TokensCount returns the exact number of tokens in a set of places. It is an atomic integer expression.
func (TokensCount) String ¶
func (f TokensCount) String() string
type Transitions ¶
type Transitions struct {
TrList []string `xml:"transition"`
}