Quantitative extensions of logic programming often require the solution of so called second level inference tasks, i.e., problems that involve a third operation, such as maximization or normalization, on top of addition and multiplication, and thus go beyond the well-known weighted or algebraic model counting setting of probabilistic logic programming under the distribution semantics. We introduce Second Level Algebraic Model Counting (2AMC) as a generic framework for these kinds of problems. As 2AMC is to (algebraic) model counting what forall-exists-SAT is to propositional satisfiability, it is notoriously hard to solve. First level techniques based on Knowledge Compilation (KC) have been adapted for specific 2AMC instances by imposing variable order constraints on the resulting circuit. However, those constraints can severely increase the circuit size and thus decrease the efficiency of such approaches. We show that we can exploit the logical structure of a 2AMC problem to omit parts of these constraints, thus limiting the negative effect. Furthermore, we introduce and implement a strategy to generate a sufficient set of constraints statically, with a priori guarantees for the performance of KC. Our empirical evaluation on several benchmarks and tasks confirms that our theoretical results can translate into more efficient solving in practice. Under consideration for acceptance in TPLP.
翻译:逻辑编程的定量扩展往往要求解决所谓的二级推断任务,即,除了增加和倍增之外,涉及第三级行动的问题,例如最大化或正常化,这些问题包括:在增加和倍增之外,还涉及第三级行动,例如最大化或正常化,从而超越了在分配语义下众所周知的关于概率逻辑编程的加权或代数模型计算设置;我们引入了二级代数模型(2AMC)作为这类问题的一般框架;由于2AMC是(地理)模型,用来计算什么是 " 全面存在-SAT " 的代名词,因此很难解决。基于知识汇编(KC)的第一级技术已经适应了特定的2AMC情况,对由此形成的电路施加的可变顺序限制;然而,这些制约因素可能严重地增加电路段大小,从而降低这种方法的效率。我们可以利用2AMC问题的逻辑结构来忽略这些制约因素的部分内容,从而限制消极效果。此外,我们引入并执行一项战略,以产生一套充分的制约,即固定的制约,以知识编程为基础的技术技术技术,从而确定我们执行的理论基准。