diff options
| author | Mattias Andrée <m@maandree.se> | 2026-06-01 19:07:14 +0200 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-06-01 19:07:14 +0200 |
| commit | 77ade8d20906fe9ca2cf6788ff1e1437e0912868 (patch) | |
| tree | 61495e90e057bf792bb1d8ce157cef0ecc2ab696 /man3/libnormalform_cnf.3 | |
| parent | First commit (diff) | |
| download | libnormalform-master.tar.gz libnormalform-master.tar.bz2 libnormalform-master.tar.xz | |
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'man3/libnormalform_cnf.3')
| -rw-r--r-- | man3/libnormalform_cnf.3 | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/man3/libnormalform_cnf.3 b/man3/libnormalform_cnf.3 new file mode 100644 index 0000000..c0d7438 --- /dev/null +++ b/man3/libnormalform_cnf.3 @@ -0,0 +1,125 @@ +.TH LIBNORMALFORM_CNF 3 LIBNORMALFORM +.SH NAME +libnormalform_cnf \- Reduce and express in conjunctive normal form + +.SH SYNOPSIS +.nf +#include <libnormalform.h> + +/* See \fBlibnormalform_express\fP(3) for relevant types and constants */ + +struct libnormalform_term * +libnormalform_cnf(LIBNORMALFORM_SENTENCE *\fIthis\fP, uint64_t \fIflags\fP, + const struct libnormalform_analysers *\fIanalysers\fP); +.fi +.PP +Link with +.IR -lnormalform . + +.SH DESCRIPTION +The +.BR libnormalform_cnf () +function is similar to the +.BR libnormalform_express (3) +function, please refer to +.BR libnormalform_express (3) +for a detailed explanation. There are however +the following differences: +.PP +The result will never contain a +.I LIBNORMALFORM_EXCLUSIVE_DISJUNCTION +clause, instead these are always relax +to disjunctions +.RI ( LIBNORMALFORM_RELAX_XOR ), +or reduced to an equivalent form if the +.I LIBNORMALFORM_REDUCE_XOR +flag is used. +.PP +.I LIBNORMALFORM_CONJUNCTION +and +.I LIBNORMALFORM_DISJUNCTION +clauses in the result can be singleton +clauses. +.PP +The root term is always a +.I LIBNORMALFORM_CONJUNCTION +clause containing only +.I LIBNORMALFORM_DISJUNCTION +clauses, each containing only literals +(boolean variables and boolean-output +functions), input transformations on +literals, and qualifications. That is +the returned expression is always +.I this +(or some relaxation) expressed in +conjunctive normal form. +.PP +Each +.RI non- NULL +.I .term.qualifier.antecedent +is expressed in conjunctive normal form. +.PP +Each +.I .term.qualifier.predicate +is expressed in conjunctive normal form. + +.SH RETURN VALUE +Upon successful completion, the +.BR libnormalform_cnf () +function return an object representing +the sentence, which is to be deallocated +by the application using the +.BR libnormalform_free (3) +function; otherwise, the function returns +.I NULL +and set +.I errno +to indicate the error; if the function +fails because an application-provided +callback function fails, +.I errno +will remain as set by that function +(or be unmodified if that function did +not set +.IR errno ). + +.SH ERRORS +The +.BR libnormalform_cnf () +function fails if: +.TP +.B ENOMEM +Insufficient memory was available to +create the representation of the sentence. +.TP +.B EINVAL +.I flags +contain unsupported options. + +.SH ATTRIBUTES +For an explanation of the terms used in this +section, see +.BR attributes (7) +and +.IR "info \(dq(libc)POSIX Safety Concepts\(dq" . +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libnormalform_cnf () +T} Thread safety MT-Safe race:\fIthis\fP +T{ +.BR libnormalform_cnf () +T} Async-signal safety AS-Unsafe heap +T{ +.BR libnormalform_cnf () +T} Async-cancel safety AC-Safe mem, AC-Unsafe heap +.TE + +.SH SEE ALSO +.BR libnormalform (7), +.BR libnormalform_express (3), +.BR libnormalform_dnf (3), +.BR libnormalform_cdnf (3) |
