object
sat_program
Canonical CNF statement validation, DIMACS source generation, and variable table computation.
Availability:
logtalk_load(sat(loader))Author: Paulo Moura
Version: 1:0:0
Date: 2026-11-10
Compilation flags:
static, context_switching_callsRemarks:
(none)
Inherited public predicates:
(none)
Public predicates
serialize/2
Serializes ground canonical CNF statements to DIMACS character codes, assigning sequential variable numbers by first occurrence.
Compilation flags:
staticTemplate:
serialize(Statements,Codes)Mode and number of proofs:
serialize(+list,-list(code)) - one_or_errorExceptions:
Statements is a partial list or a list with an element Statement which is a variable:instantiation_errorStatements is neither a partial list nor a list:type_error(list,Statements)An element
Statement of the list Statements is not a valid statement:domain_error(sat_statement,Statement)serialize/4
Serializes statements with origins and returns line(Start, End, Origin) source-map entries; the generated header occupies line 1.
Compilation flags:
staticTemplate:
serialize(Statements,Origins,Codes,SourceMap)Mode and number of proofs:
serialize(+list,+list,-list(code),-list(compound)) - one_or_errorExceptions:
Statements is a partial list or a list with an element Statement which is a variable:instantiation_errorStatements is neither a partial list nor a list:type_error(list,Statements)An element
Statement of the list Statements is not a valid statement:domain_error(sat_statement,Statement)Origins is a partial list or a list with an element Origin which is a variable:instantiation_errorOrigins is neither a variable nor a list:type_error(list,Origins)Origins has an element that is neither unknown nor a valid source(File, Start, End) term, or its length differs from Statements:domain_error(sat_origins,Origins)variables/2
Returns the ordered Term-Number variable table that serialize/2 and serialize/4 assign by first occurrence across clause statements.
Compilation flags:
staticTemplate:
variables(Statements,Variables)Mode and number of proofs:
variables(+list,-list(pair)) - one_or_errorExceptions:
Statements is a partial list or a list with an element Statement which is a variable:instantiation_errorStatements is neither a partial list nor a list:type_error(list,Statements)An element
Statement of the list Statements is not a valid statement:domain_error(sat_statement,Statement)Protected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)