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:
parent
2b62c6227d
commit
92cd114cf8
@ -148,7 +148,7 @@ struct FunctionDeclaration
|
||||
|
||||
std::string name;
|
||||
size_t arity;
|
||||
Domain domain{Domain::General};
|
||||
Domain domain{Domain::Noninteger};
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -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;
|
||||
|
@ -45,7 +45,7 @@ enum class OperationResult
|
||||
|
||||
enum class Domain
|
||||
{
|
||||
General,
|
||||
Noninteger,
|
||||
Integer,
|
||||
Unknown,
|
||||
};
|
||||
|
@ -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";
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ struct CheckIfDefinitionFalseFunctor
|
||||
return OperationResult::Unchanged;
|
||||
|
||||
// As a hypothesis, make the parameter’s 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 parameter’s 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 parameter’s domain noninteger
|
||||
variableDomainMap[&variableDeclaration] = Domain::General;
|
||||
variableDomainMap[&variableDeclaration] = Domain::Noninteger;
|
||||
|
||||
result = evaluate(completedFormula, variableDomainMap);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user