Implemented simplification of nested quantified expressions.

This commit is contained in:
2016-09-06 18:50:23 +02:00
parent ad6b3d60eb
commit 31068bf89c
5 changed files with 98 additions and 8 deletions

View File

@@ -26,8 +26,15 @@ namespace expressions
////////////////////////////////////////////////////////////////////////////////////////////////////
Variable::Variable()
: m_isDirty{false}
{
}
////////////////////////////////////////////////////////////////////////////////////////////////////
Variable::Variable(std::string name)
: m_isDirty{false},
m_type{nullptr}
m_name{name}
{
}
@@ -180,8 +187,13 @@ bool Variable::isDirty() const
void Variable::print(std::ostream &ostream) const
{
// TODO: implement correctly
ostream << "(<variable " << m_name << ">)";
ostream << "?" << m_name;
if (m_type)
{
ostream << " - ";
m_type->print(ostream);
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////