Learn R Programming

mlr3pipelines (version 0.7.0)

CnfSymbol: Symbols for CNF Formulas

Description

Representation of Symbols used in CNF formulas. Symbols have a name and a domain (a set of possible values), and are stored in a CnfUniverse.

Once created, it is currently not intended to modify or delete symbols.

Symbols can be used in CNF formulas by creating CnfAtom objects, either by using the %among% operator or by using the CnfAtom() constructor explicitly.

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

Usage

CnfSymbol(universe, name, domain)

Value

A new CnfSymbol object.

Arguments

universe

(CnfUniverse)
The universe in which the symbol is defined.

name

(character(1))
The name of the symbol.

domain

(character)
The domain, i.e. the set of possible values for the symbol. Must not be empty.

See Also

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

Examples

Run this code
u = CnfUniverse()
X = CnfSymbol(u, "X", c("a", "b", "c"))

# Use symbols to create CnfAtom objects
X %among% c("a", "b")
X %among% "a"
X %among% character(0)
X %among% c("a", "b", "c")

Run the code above in your browser using DataLab