Add interface for skolem functions in SkolemManager (#6256)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Mon, 5 Apr 2021 14:34:18 +0000 (09:34 -0500)
committerGitHub <noreply@github.com>
Mon, 5 Apr 2021 14:34:18 +0000 (14:34 +0000)
commitcf5cd9981f92985e647df5bb9244679715951e8c
tree8aa3e1209a6c6ff576e7381e28a2199f5b60ebf6
parent6c2779e52f1301d99b874897f902e31d4a8cc208
Add interface for skolem functions in SkolemManager (#6256)

This PR introduces the notion of a "skolem function" to SkolemManager, which is implemented as a simple cache of canonical skolem functions/variables.

This is a prerequisite for two things:
(1) Making progress on the LFSC proof conversion, which currently is cumbersome for skolems corresponding to regular expression unfolding.
(2) Cleaning up singletons. Having the ability make canonical skolem functions in skolem manager will enable Theory::expandDefinitions to move to TheoryRewriter::expandDefinitions. This will then enable removal of calls to SmtEngine::expandDefinitions.

This PR also makes arithmetic make use of this functionality already.

The next steps will be to clean up all raw uses of NodeManager::mkSkolem, especially for other theories that manually track allocated skolem functions.
src/expr/skolem_manager.cpp
src/expr/skolem_manager.h
src/theory/arith/operator_elim.cpp
src/theory/arith/operator_elim.h