summaryrefslogtreecommitdiff
path: root/src/theory/theory_traits_template.h
diff options
context:
space:
mode:
authorAina Niemetz <aina.niemetz@gmail.com>2019-10-10 18:52:46 -0700
committerGitHub <noreply@github.com>2019-10-10 18:52:46 -0700
commit91acac585b0b2bc5a3fab4466d887cfbafa35f77 (patch)
tree0cb007ff0fb13c6d80675675e6375a9b5bab1be0 /src/theory/theory_traits_template.h
parent9c39dca48e7f0bff035cfff233c9d5224d9a0974 (diff)
Make order of theories explicit in the source code. (#3379)
Fixes #2517. This makes the order of theories explicit in the source code rather than relying on the order defined via the build system. Previously, the build system ensured the order of the theories via the KINDS_FILES variable, which is a list of kinds files that is fed to code generation scripts (mkkind, mkmetakind, mkrewriter, mktheorytraits). The generated code critical to the order of theories w.r.t. soundess is the TheoryId enum, and the CVC4_FOR_EACH_THEORY macro. Ideally, we would want to get rid of the latter (ugly and error prone), which is not possible in the current configuration, and to be discussed in the future. This PR moves the TheoryID enum and related functions to theory/theory_id.h, and the CVC4_FOR_EACH_THEORY macro to theory/theory_engine.cpp, the only place where it is used. I ran it on whole SMT-LIB (non-incremental and incremental) and did not encounter any soundness issues. The only issue that did occur is not related to these changes, non-critical and known: #2993
Diffstat (limited to 'src/theory/theory_traits_template.h')
-rw-r--r--src/theory/theory_traits_template.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/theory/theory_traits_template.h b/src/theory/theory_traits_template.h
index 00ad7656d..564864f19 100644
--- a/src/theory/theory_traits_template.h
+++ b/src/theory/theory_traits_template.h
@@ -34,9 +34,7 @@ struct TheoryTraits;
${theory_traits}
-${theory_for_each_macro}
-
-#line 40 "${template}"
+#line 38 "${template}"
struct TheoryConstructor {
static void addTheory(TheoryEngine* engine, TheoryId id) {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback