Documentation ¶
Index ¶
- Variables
- func AddConstraint(inputConstraint string) error
- func Evaluate(constraint string) (bool, error)
- func FlipLiteral(literal string) error
- func GetModel() (map[string]bool, error)
- func Init()
- func IsSat() bool
- func ValidateConstraint(constraint string) (string, error)
- type Boolean
- type Conjunction
- type Constant
- type Disjunction
- type Expression
- type Factor
- type Implication
- type Literal
- type Unary
- type Unique
Constants ¶
This section is empty.
Variables ¶
View Source
var False falseConst = falseConst{}
View Source
var True trueConst = trueConst{}
Functions ¶
func AddConstraint ¶
func FlipLiteral ¶
func ValidateConstraint ¶
Types ¶
type Conjunction ¶
type Conjunction struct { Unary *Unary `parser:"@@"` Next *Conjunction `parser:"(AndOperator @@)?"` }
type Disjunction ¶
type Disjunction struct { Conjunction *Conjunction `parser:"@@"` Next *Disjunction `parser:"(OrOperator @@)?"` }
type Expression ¶
type Expression struct { Implication *Implication `parser:"@@"` Unique *Unique `parser:"|'{' @@ '}'"` }
type Factor ¶
type Factor struct { Constant *Constant `parser:"@@"` Literal *Literal `parser:"| @@"` SubExpression *Disjunction `parser:"| '(' @@ ')'"` }
type Implication ¶
type Implication struct { Left *Disjunction `parser:"@@"` Implication *Disjunction `parser:"( ImplicationOperator @@"` Equivalence *Disjunction `parser:"| EquivalenceOperator @@ )?"` }
Click to show internal directories.
Click to hide internal directories.