language.h
Go to the documentation of this file.
/********************* */
#include "cvc4_public.h"
#ifndef __CVC4__LANGUAGE_H
#define __CVC4__LANGUAGE_H
#include <sstream>
#include <string>
#include "util/exception.h"
#include "options/option_exception.h"
namespace CVC4 {
namespace language {
namespace input {
enum CVC4_PUBLIC Language {
// SPECIAL "NON-LANGUAGE" LANGUAGES HAVE ENUM VALUE < 0
LANG_AUTO = -1,
// COMMON INPUT AND OUTPUT LANGUAGES HAVE ENUM VALUES IN [0,9]
// AND SHOULD CORRESPOND IN PLACEMENT WITH OUTPUTLANGUAGE
//
// EVEN IF A LANGUAGE ISN'T CURRENTLY SUPPORTED AS AN INPUT OR
// OUTPUT LANGUAGE, IF IT IS "IN PRINCIPLE" A COMMON LANGUAGE,
// INCLUDE IT HERE
LANG_SMTLIB_V1 = 0,
LANG_SMTLIB_V2,
LANG_TPTP,
LANG_CVC4,
LANG_Z3STR,
// START INPUT-ONLY LANGUAGES AT ENUM VALUE 10
// THESE ARE IN PRINCIPLE NOT POSSIBLE OUTPUT LANGUAGES
LANG_MAX
};/* enum Language */
inline std::ostream& operator<<(std::ostream& out, Language lang) CVC4_PUBLIC;
inline std::ostream& operator<<(std::ostream& out, Language lang) {
switch(lang) {
case LANG_AUTO:
out << "LANG_AUTO";
break;
case LANG_SMTLIB_V1:
out << "LANG_SMTLIB_V1";
break;
case LANG_SMTLIB_V2:
out << "LANG_SMTLIB_V2";
break;
case LANG_TPTP:
out << "LANG_TPTP";
break;
case LANG_CVC4:
out << "LANG_CVC4";
break;
case LANG_Z3STR:
out << "LANG_Z3STR";
break;
default:
out << "undefined_input_language";
}
return out;
}
}/* CVC4::language::input namespace */
namespace output {
enum CVC4_PUBLIC Language {
// SPECIAL "NON-LANGUAGE" LANGUAGES HAVE ENUM VALUE < 0
LANG_AUTO = -1,
// COMMON INPUT AND OUTPUT LANGUAGES HAVE ENUM VALUES IN [0,9]
// AND SHOULD CORRESPOND IN PLACEMENT WITH INPUTLANGUAGE
//
// EVEN IF A LANGUAGE ISN'T CURRENTLY SUPPORTED AS AN INPUT OR
// OUTPUT LANGUAGE, IF IT IS "IN PRINCIPLE" A COMMON LANGUAGE,
// INCLUDE IT HERE
LANG_SMTLIB_V1 = input::LANG_SMTLIB_V1,
LANG_SMTLIB_V2 = input::LANG_SMTLIB_V2,
LANG_TPTP = input::LANG_TPTP,
LANG_CVC4 = input::LANG_CVC4,
LANG_Z3STR = input::LANG_Z3STR,
// START OUTPUT-ONLY LANGUAGES AT ENUM VALUE 10
// THESE ARE IN PRINCIPLE NOT POSSIBLE INPUT LANGUAGES
LANG_AST = 10,
LANG_CVC3,
LANG_MAX
};/* enum Language */
inline std::ostream& operator<<(std::ostream& out, Language lang) CVC4_PUBLIC;
inline std::ostream& operator<<(std::ostream& out, Language lang) {
switch(lang) {
case LANG_SMTLIB_V1:
out << "LANG_SMTLIB_V1";
break;
case LANG_SMTLIB_V2:
out << "LANG_SMTLIB_V2";
break;
case LANG_TPTP:
out << "LANG_TPTP";
break;
case LANG_CVC4:
out << "LANG_CVC4";
break;
case LANG_Z3STR:
out << "LANG_Z3STR";
break;
case LANG_AST:
out << "LANG_AST";
break;
case LANG_CVC3:
out << "LANG_CVC3";
break;
default:
out << "undefined_output_language";
}
return out;
}
}/* CVC4::language::output namespace */
}/* CVC4::language namespace */
typedef language::input::Language InputLanguage;
typedef language::output::Language OutputLanguage;
namespace language {
InputLanguage toInputLanguage(OutputLanguage language) CVC4_PUBLIC;
OutputLanguage toOutputLanguage(InputLanguage language) CVC4_PUBLIC;
InputLanguage toInputLanguage(std::string language) CVC4_PUBLIC;
OutputLanguage toOutputLanguage(std::string language) CVC4_PUBLIC;
}/* CVC4::language namespace */
}/* CVC4 namespace */
#endif /* __CVC4__LANGUAGE_H */
cvc4_public.h
Macros that should be defined everywhere during the building of the libraries and driver binary,...
CVC4_PUBLIC
#define CVC4_PUBLIC
Definition cvc4_public.h:30
exception.h
CVC4's exception base class and some associated utilities.
CVC4::language::input::Language
Language
Definition language.h:33
CVC4::language::input::LANG_AUTO
@ LANG_AUTO
Auto-detect the language.
Definition language.h:37
CVC4::language::input::LANG_TPTP
@ LANG_TPTP
The TPTP input language.
Definition language.h:51
CVC4::language::input::LANG_SMTLIB_V1
@ LANG_SMTLIB_V1
The SMTLIB v1 input language.
Definition language.h:47
CVC4::language::input::LANG_Z3STR
@ LANG_Z3STR
The Z3-str input language.
Definition language.h:55
CVC4::language::input::LANG_MAX
@ LANG_MAX
LANG_MAX is > any valid InputLanguage id.
Definition language.h:61
CVC4::language::input::LANG_CVC4
@ LANG_CVC4
The CVC4 input language.
Definition language.h:53
CVC4::language::input::LANG_SMTLIB_V2
@ LANG_SMTLIB_V2
The SMTLIB v2 input language.
Definition language.h:49
CVC4::language::input::operator<<
std::ostream & operator<<(std::ostream &out, Language lang)
Definition language.h:65
CVC4::language::output::Language
Language
Definition language.h:95
CVC4::language::output::LANG_Z3STR
@ LANG_Z3STR
The Z3-str output language.
Definition language.h:117
CVC4::language::output::LANG_SMTLIB_V1
@ LANG_SMTLIB_V1
The SMTLIB v1 output language.
Definition language.h:109
CVC4::language::output::LANG_CVC4
@ LANG_CVC4
The CVC4 output language.
Definition language.h:115
CVC4::language::output::LANG_CVC3
@ LANG_CVC3
The CVC3-compatibility output language.
Definition language.h:125
CVC4::language::output::LANG_SMTLIB_V2
@ LANG_SMTLIB_V2
The SMTLIB v2 output language.
Definition language.h:111
CVC4::language::output::LANG_TPTP
@ LANG_TPTP
The TPTP output language.
Definition language.h:113
CVC4::language::output::LANG_AUTO
@ LANG_AUTO
Match the output language to the input language.
Definition language.h:99
CVC4::language::output::LANG_AST
@ LANG_AST
The AST output language.
Definition language.h:123
CVC4::language::output::LANG_MAX
@ LANG_MAX
LANG_MAX is > any valid OutputLanguage id.
Definition language.h:128
CVC4::language::output::operator<<
std::ostream & operator<<(std::ostream &out, Language lang)
Definition language.h:132
CVC4::language::toInputLanguage
InputLanguage toInputLanguage(OutputLanguage language)
CVC4::language::toOutputLanguage
OutputLanguage toOutputLanguage(InputLanguage language)
CVC4
Definition expr.h:106
CVC4::OutputLanguage
language::output::Language OutputLanguage
Definition language.h:166
CVC4::InputLanguage
language::input::Language InputLanguage
Definition language.h:165
option_exception.h
Options-related exceptions.