AM_CFLAGS = -Wall
noinst_PROGRAMS = \
- sets_translate
+ sets2arrays \
+ sets2axioms
noinst_DATA =
-sets_translate_SOURCES = \
+sets2arrays_SOURCES = \
sets_translate.cpp
-sets_translate_LDADD = \
+sets2arrays_LDADD = \
@builddir@/../../src/parser/libcvc4parser.la \
@builddir@/../../src/libcvc4.la
+sets2axioms_SOURCES = \
+ sets_translate.cpp
+sets2axioms_LDADD = \
+ @builddir@/../../src/parser/libcvc4parser.la \
+ @builddir@/../../src/libcvc4.la
+sets2axioms_CXXFLAGS = \
+ -DENABLE_AXIOMS
+
# for installation
examplesdir = $(docdir)/$(subdir)
examples_DATA = $(DIST_SOURCES) $(EXTRA_DIST)
bool nonsense(char c) { return !isalnum(c); }
+#ifdef ENABLE_AXIOMS
const bool enableAxioms = true;
+#else
+const bool enableAxioms = false;
+#endif
string setaxioms[] = {
"(declare-fun inHOLDA (HOLDB (Set HOLDB)) Bool)",
// Get the filename
string input;
- if(argv > 0) input = (argv[1]);
+ if(argc > 1) input = string(argv[1]);
else input = "<stdin>";
// Create the expression manager
// Create the parser
ParserBuilder parserBuilder(&exprManager, input, options);
+ if(input == "<stdin>") parserBuilder.withStreamInput(cin);
Parser* parser = parserBuilder.build();
// Variables and assertions
return 0;
}
logicinfo = logicinfo.getUnlockedCopy();
- logicinfo.disableTheory(theory::THEORY_SETS);
- logicinfo.enableTheory(theory::THEORY_ARRAY);
- logicinfo.lock();
- // cout << SetBenchmarkLogicCommand(logicinfo.getLogicString()) << endl;
+ if(enableAxioms) {
+ logicinfo.enableQuantifiers();
+ logicinfo.lock();
+ if(!logicinfo.hasEverything()) {
+ (logicinfo = logicinfo.getUnlockedCopy()).disableTheory(theory::THEORY_SETS);
+ logicinfo.lock();
+ cout << SetBenchmarkLogicCommand(logicinfo.getLogicString()) << endl;
+ }
+ } else {
+ logicinfo.enableTheory(theory::THEORY_ARRAY);
+ // we print logic string only for Quantifiers, for Z3 stuff
+ // we don't set the logic
+ }
delete cmd;
continue;