From: weiyu Date: Mon, 30 Sep 2019 17:41:07 +0000 (-0700) Subject: Concrete predicate class X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0870af877484b364b86c860aec8e137354693b69;p=c11tester.git Concrete predicate class --- diff --git a/concretepredicate.cc b/concretepredicate.cc new file mode 100644 index 00000000..e3cbcac6 --- /dev/null +++ b/concretepredicate.cc @@ -0,0 +1,16 @@ +#include "concretepredicate.h" + +ConcretePredicate::ConcretePredicate(void * loc) : + location(loc), + expressions() +{} + +ConcretePredicate::~ConcretePredicate() +{ + expressions.clear(); +} + +void ConcretePredicate::add_expression(token_t token, uint64_t value, bool equality) +{ + expressions.push_back(concrete_pred_expr(token, value, equality)); +} diff --git a/concretepredicate.h b/concretepredicate.h new file mode 100644 index 00000000..2ec4e85d --- /dev/null +++ b/concretepredicate.h @@ -0,0 +1,23 @@ +#ifndef __CONCRETE_PREDICATE_H__ +#define __CONCRETE_PREDICATE_H__ + +#include +#include "classlist.h" +#include "predicatetypes.h" + +class ConcretePredicate { +public: + ConcretePredicate(void * loc); + ~ConcretePredicate(); + + void add_expression(token_t token, uint64_t value, bool equality); + SnapVector * getExpressions() { return &expressions; } + void * get_location() { return location; } + + SNAPSHOTALLOC +private: + void * location; + SnapVector expressions; +}; + +#endif /* __CONCRETE_PREDICATE_H */