summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@cs.nyu.edu>2013-07-10 15:05:41 -0400
committerMorgan Deters <mdeters@cs.nyu.edu>2013-07-11 17:15:59 -0400
commit31ed442da0503a0653f0f7c26dfcd12318b56ccb (patch)
tree4cc48ee538b1beb37cf535036a2dd4930d4e091f /src
parente80b93ca958bdbeb28959029868f6193b39a3f19 (diff)
Remove auto-aritization from TPTP parser
Diffstat (limited to 'src')
-rw-r--r--src/parser/tptp/Tptp.g4
-rw-r--r--src/parser/tptp/tptp.h26
2 files changed, 3 insertions, 27 deletions
diff --git a/src/parser/tptp/Tptp.g b/src/parser/tptp/Tptp.g
index beeca818e..2ae31e810 100644
--- a/src/parser/tptp/Tptp.g
+++ b/src/parser/tptp/Tptp.g
@@ -631,9 +631,9 @@ tffTypedAtom[CVC4::Command*& cmd]
// as yet, it's undeclared
CVC4::Expr expr;
if(type.isFunction()) {
- expr = PARSER_STATE->mkTffFunction(name, type);
+ expr = PARSER_STATE->mkFunction(name, type);
} else {
- expr = PARSER_STATE->mkTffVar(name, type);
+ expr = PARSER_STATE->mkVar(name, type);
}
cmd = new DeclareFunctionCommand(name, expr, type);
}
diff --git a/src/parser/tptp/tptp.h b/src/parser/tptp/tptp.h
index 79092e98f..96c608f77 100644
--- a/src/parser/tptp/tptp.h
+++ b/src/parser/tptp/tptp.h
@@ -154,26 +154,6 @@ public:
inline Command* makeCommand(FormulaRole fr, Expr& expr, bool cnf);
- inline Expr mkTffVar(std::string& name, const Type& type) {
- std::string orig = name;
- std::stringstream ss;
- ss << name << "_0";
- name = ss.str();
- Expr var = mkVar(name, type);
- defineFunction(orig, var);
- return var;
- }
-
- inline Expr mkTffFunction(std::string& name, const FunctionType& type) {
- std::string orig = name;
- std::stringstream ss;
- ss << name << "_" << type.getArity();
- name = ss.str();
- Expr fun = mkFunction(name, type);
- defineFunction(orig, fun);
- return fun;
- }
-
/** Ugly hack because I don't know how to return an expression from a
token */
Expr d_tmp_expr;
@@ -192,10 +172,6 @@ private:
inline void Tptp::makeApplication(Expr& expr, std::string& name,
std::vector<Expr>& args, bool term) {
- // We distinguish the symbols according to their arities
- std::stringstream ss;
- ss << name << "_" << args.size();
- name = ss.str();
if(args.empty()) { // Its a constant
if(isDeclared(name)) { // already appeared
expr = getVariable(name);
@@ -227,7 +203,7 @@ inline void Tptp::makeApplication(Expr& expr, std::string& name,
inline Command* Tptp::makeCommand(FormulaRole fr, Expr& expr, bool cnf) {
// For SZS ontology compliance.
- // if we're in cnf() though, conjectures don't result in "Theorem" or
+ // If we're in cnf() though, conjectures don't result in "Theorem" or
// "CounterSatisfiable".
if(!cnf && (fr == FR_NEGATED_CONJECTURE || fr == FR_CONJECTURE)) {
d_hasConjecture = true;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback