Fix TSO Bugs
[satcheck.git] / branchrecord.h
1 /*      Copyright (c) 2015 Regents of the University of California
2  *
3  *      Author: Brian Demsky <bdemsky@uci.edu>
4  *
5  *      This program is free software; you can redistribute it and/or
6  *      modify it under the terms of the GNU General Public License
7  *      version 2 as published by the Free Software Foundation.
8  */
9
10 #ifndef BRANCHRECORD_H
11 #define BRANCHRECORD_H
12 #include "classlist.h"
13
14 class BranchRecord {
15  public:
16         BranchRecord(EPRecord *record, uint numvars, Constraint **vars, bool isalwaysexecuted);
17         ~BranchRecord();
18         Constraint * getAnyBranch();
19         Constraint * getBranch(EPValue *val);
20         Constraint * getNewBranch();
21         int getBranchValue(bool *array);
22         int numDirections() {return numdirections;}
23         bool hasNextRecord() {return hasNext;}
24         MEMALLOC;
25  private:
26   EPRecord *branch;
27         bool hasNext;
28   uint numvars;
29         uint numdirections;
30         bool alwaysexecuted;
31   Constraint **vars;
32 };
33 #endif