Rename “general” domain to “noninteger”

The “general” domain wasn’t really about general variables, but meant as
a distinction from integer variables. For this reason, this commit
renames the “general” domain to “noninteger.”
This commit is contained in:
Patrick Lühne 2018-04-22 14:48:37 +02:00
parent 2b62c6227d
commit 92cd114cf8
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
5 changed files with 12 additions and 11 deletions

View File

@ -148,7 +148,7 @@ struct FunctionDeclaration
std::string name;
size_t arity;
Domain domain{Domain::General};
Domain domain{Domain::Noninteger};
};
////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -1,6 +1,7 @@
#ifndef __ANTHEM__ARITHMETICS_H
#define __ANTHEM__ARITHMETICS_H
#include <anthem/AST.h>
#include <anthem/Utils.h>
namespace anthem
@ -59,7 +60,7 @@ struct IsTermArithmeticVisitor
{
switch (function.declaration->domain)
{
case Domain::General:
case Domain::Noninteger:
return EvaluationResult::False;
case Domain::Integer:
return EvaluationResult::True;
@ -127,7 +128,7 @@ struct IsTermArithmeticVisitor
switch (domain)
{
case Domain::General:
case Domain::Noninteger:
return EvaluationResult::False;
case Domain::Integer:
return EvaluationResult::True;
@ -184,7 +185,7 @@ struct IsTermIntegerVisitor
{
switch (function.declaration->domain)
{
case Domain::General:
case Domain::Noninteger:
return EvaluationResult::False;
case Domain::Integer:
return EvaluationResult::True;
@ -236,7 +237,7 @@ struct IsTermIntegerVisitor
{
switch (variable.declaration->domain)
{
case Domain::General:
case Domain::Noninteger:
return EvaluationResult::False;
case Domain::Integer:
return EvaluationResult::True;

View File

@ -45,7 +45,7 @@ enum class OperationResult
enum class Domain
{
General,
Noninteger,
Integer,
Unknown,
};

View File

@ -329,8 +329,8 @@ inline output::ColorStream &print(output::ColorStream &stream, const VariableDec
{
case Domain::Unknown:
return "";
case Domain::General:
return "g";
case Domain::Noninteger:
return "n";
case Domain::Integer:
return "i";
}

View File

@ -403,7 +403,7 @@ struct CheckIfDefinitionFalseFunctor
return OperationResult::Unchanged;
// As a hypothesis, make the parameters domain noninteger
variableDomainMap[&variableDeclaration] = Domain::General;
variableDomainMap[&variableDeclaration] = Domain::Noninteger;
result = evaluate(definition, variableDomainMap);
@ -436,7 +436,7 @@ struct CheckIfQuantifiedFormulaFalseFunctor
return OperationResult::Unchanged;
// As a hypothesis, make the parameters domain noninteger
variableDomainMap[&variableDeclaration] = Domain::General;
variableDomainMap[&variableDeclaration] = Domain::Noninteger;
result = evaluate(quantifiedFormula, variableDomainMap);
@ -469,7 +469,7 @@ struct CheckIfCompletedFormulaTrueFunctor
return OperationResult::Unchanged;
// As a hypothesis, make the parameters domain noninteger
variableDomainMap[&variableDeclaration] = Domain::General;
variableDomainMap[&variableDeclaration] = Domain::Noninteger;
result = evaluate(completedFormula, variableDomainMap);