CnfUniverse: Symbol Table for CNF Formulas

View source: R/CnfUniverse.R

CnfUniverseR Documentation

Symbol Table for CNF Formulas

Description

A symbol table for CNF formulas. The CnfUniverse is a by-reference object that stores the domain of each symbol. Symbols are created with CnfSymbol() and can be retrieved with $. Using [[ retrieves a given symbol's domain.

It is only possible to combine symbols from the same (identical) universe.

This is part of the CNF representation tooling, which is currently considered experimental; it is for internal use.

Usage

CnfUniverse()

Value

A new CnfUniverse object.

See Also

Other CNF representation objects: CnfAtom(), CnfClause(), CnfFormula(), CnfSymbol()

Examples

u = CnfUniverse()
X = CnfSymbol(u, "X", c("a", "b", "c"))
Y = CnfSymbol(u, "Y", c("d", "e", "f"))

u$X
u[["Y"]]

X %among% c("a", "c")
u$X %among% c("a", "c")
Y %among% c("d", "e", "f")
Y %among% character(0)

u$X %among% "a" | u$Y %among% "d"

mlr3pipelines documentation built on Sept. 30, 2024, 9:37 a.m.