1 /* Copyright (c) 2015 Regents of the University of California
3 * Author: Brian Demsky <bdemsky@uci.edu>
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.
12 #include "classlist.h"
17 typedef HashSet<MCChange *, intptr_t, 0, model_malloc, model_calloc, model_free, MCChangeHash, MCChangeEquals> ChangeHashSet;
18 typedef HSIterator<MCChange *, intptr_t, 0, model_malloc, model_calloc, model_free,MCChangeHash, MCChangeEquals> ChangeIterator;
20 enum PlanResult {NOSCHEDULE, SCHEDULED};
24 Planner(MCExecution * e);
28 void addChange(MCChange *change);
29 void processChanges();
30 void processEquals(MCChange * change);
31 void processFunction(MCChange * change);
32 void processRMW(MCChange * change);
33 void processLoad(MCChange * change);
34 void processStore(MCChange * change);
35 bool checkConstGraph(EPRecord *record, uint64_t val);
36 void registerValue(EPRecord *record, uint64_t val, unsigned int index);
37 ConstGen * getConstGen() {return cgen;}
42 void registerBranchValue(EPRecord *record, uint64_t val, unsigned int index);
43 void registerLoadValue(EPRecord *record, uint64_t val, unsigned int index);
44 void registerRMWValue(EPRecord *record, uint64_t val, unsigned int index);
45 void registerStoreValue(EPRecord *record, uint64_t val, unsigned int index);
46 void registerFunctionValue(EPRecord *record, uint64_t val, unsigned int index);
47 void registerEqualsValue(EPRecord *record, uint64_t val, unsigned int index);
48 void doRMWRFChange(EPRecord *record, uint64_t readval);
49 void doRMWBaseChange(EPRecord *record, uint64_t baseval);
50 void doRMWOldValChange(EPRecord *record);
51 void doRMWNewAddrChange(EPRecord *record, uint64_t addr);
55 void processNewStoreAddress(MCChange *change);
56 void processNewStoreValue(MCChange *change);
57 void processNewReturnValue(MCChange *change);
58 void processNewLoadAddress(MCChange *change);
60 ChangeHashSet * changeset;
61 ChangeHashSet * completedset;