carl  24.04
Computer ARithmetic Library
UEquality.cpp
Go to the documentation of this file.
1 /**
2  * @file UEquality.cpp
3  * @author Florian Corzilius <corzilius@cs.rwth-aachen.de>
4  * @since 2014-10-20
5  * @version 2014-10-22
6  */
7 
8 #include "UEquality.h"
9 
10 namespace carl {
11 
12 void collectUFVars(std::set<UVariable>& uvars, UFInstance ufi) {
13  for (const auto& arg : ufi.args()) {
14  if (arg.isUVariable()) {
15  uvars.insert(arg.asUVariable());
16  } else if (arg.isUFInstance()) {
17  collectUFVars(uvars, arg.asUFInstance());
18  }
19  }
20 }
21 
22 void UEquality::gatherUVariables(std::set<UVariable>& uvars) const {
23  if (mLhs.isUVariable()) {
24  uvars.insert(mLhs.asUVariable());
25  } else {
27  }
28  if (mRhs.isUVariable()) {
29  uvars.insert(mRhs.asUVariable());
30  } else {
32  }
33 }
34 
35 } // end namespace carl
carl is the main namespace for the library.
void collectUFVars(std::set< UVariable > &uvars, UFInstance ufi)
Definition: UEquality.cpp:12
void gatherUVariables(std::set< UVariable > &uvars) const
Definition: UEquality.cpp:22
UTerm mRhs
The right-hand side of this uninterpreted equality.
Definition: UEquality.h:30
UTerm mLhs
The left-hand side of this uninterpreted equality.
Definition: UEquality.h:28
Implements an uninterpreted function instance.
Definition: UFInstance.h:25
const std::vector< UTerm > & args() const
Definition: UFInstance.cpp:25
UFInstance asUFInstance() const
Definition: UTerm.h:69
bool isUVariable() const
Definition: UTerm.h:48
UVariable asUVariable() const
Definition: UTerm.h:62