Skip to content

Commit

Permalink
parenthesise domain sorts in type decls
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelRawson committed Mar 18, 2024
1 parent b8bbdca commit 7de932b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions FMB/FiniteModelMultiSorted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,12 @@ vstring FiniteModelMultiSorted::toString()
vstring name = env.signature->functionName(f);

OperatorType* sig = env.signature->getFunction(f)->fnType();
modelStm << "tff("<<prepend("declare_", name)<<",type,"<<name<<": ";
modelStm << "tff("<<prepend("declare_", name)<<",type,"<<name<<": (";
for(unsigned i=0;i<arity;i++){
modelStm << sig->arg(i).toString();
if(i+1 < arity) modelStm << " * ";
}
modelStm << " > " << sig->result().toString() << ")." << endl;
modelStm << ") > " << sig->result().toString() << ")." << endl;

modelStm << "tff("<<prepend("function_", name)<<",axiom,"<<endl;

Expand Down Expand Up @@ -378,14 +378,14 @@ vstring FiniteModelMultiSorted::toString()
vstring name = env.signature->predicateName(f);

OperatorType* sig = env.signature->getPredicate(f)->predType();
modelStm << "tff("<<prepend("declare_", name)<<",type,"<<name<<": ";
modelStm << "tff("<<prepend("declare_", name)<<",type,"<<name<<": (";
for(unsigned i=0;i<arity;i++){
TermList argST = sig->arg(i);
unsigned argS = argST.term()->functor();
modelStm << env.signature->typeConName(argS);
if(i+1 < arity) modelStm << " * ";
}
modelStm << " > $o )." << endl;
modelStm << ") > $o)." << endl;

modelStm << "tff("<<prepend("predicate_", name)<<",axiom,"<<endl;

Expand Down

0 comments on commit 7de932b

Please sign in to comment.