OpenASIP 2.2
Loading...
Searching...
No Matches
OperationPimpl.cc
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2009 Tampere University.
3
4 This file is part of TTA-Based Codesign Environment (TCE).
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 */
24/**
25 * @file OperationPimpl.cc
26 *
27 * Definition of OperationPimpl (private implementation) class.
28 *
29 * @author Viljami Korhonen 2008 (viljami.korhonen-no.spam-tut.fi)
30 * @note rating: red
31 */
32
33#include "OperationPimpl.hh"
34#include "Operation.hh"
35#include "OperationBehavior.hh"
36#include "OperationDAG.hh"
38#include "SequenceTools.hh"
39#include "ContainerTools.hh"
40#include "StringTools.hh"
41#include "Application.hh"
42#include "OperationPool.hh"
43#include "TCEString.hh"
44#include "OperationPimpl.hh"
45#include "ObjectState.hh"
46
47// -----------
48/// @todo These two lines can be removed after C++11 features can be used in
49/// the source code, since it has native support for initializing std::map.
50#include "boost/assign.hpp"
51using namespace boost::assign;
52// -----------
53
54using std::set;
55using std::vector;
56using std::string;
57
58
59/**
60 * Constructor.
61 *
62 * @param name The name of the Operation.
63 * @param behavior The behavior of the Operation.
64 */
66 const TCEString& name,
67 OperationBehavior& behavior) :
68 behavior_(&behavior), name_(StringTools::stringToUpper(name)),
69 description_(""),
70 inputs_(0), outputs_(0), readsMemory_(false), writesMemory_(false),
71 canTrap_(false), hasSideEffects_(false), isClocked_(false),
72 controlFlowOperation_(false), isCall_(false), isBranch_(false) {
73}
74
75/**
76 * Destructor.
77 *
78 * Operands are destroyed.
79 */
83
84/**
85 * Clears the operation.
86 */
87void
89
90 for (int i = 0; i < dagCount(); i++) {
91 if (!dags_[i].dag->isNull()) {
92 delete dags_[i].dag;
93 }
94 }
95 dags_.clear();
96
99 inputOperands_.clear();
100 outputOperands_.clear();
101 affects_.clear();
102 affectedBy_.clear();
103 name_ = "";
104 inputs_ = 0;
105 outputs_ = 0;
106 readsMemory_ = false;
107 writesMemory_ = false;
108 canTrap_ = false;
109 hasSideEffects_ = false;
110 controlFlowOperation_ = false;
111 isBranch_ = false;
112 isCall_ = false;
113}
114
115/**
116 * Returns the name of the Operation.
117 *
118 * @return The name of the Operation.
119 */
122 return name_;
123}
124
125/**
126 * Returns the description of the Operation.
127 *
128 * @return The description of the Operation.
129 */
132 return description_;
133}
134
135/**
136 * Creates new DAG and adds it's code for operation.
137 *
138 * @param code Source code written in DAG language.
139 */
141 OperationDAGInfo newDag;
142 newDag.code = code;
143 newDag.dag = &OperationDAG::null;
144 newDag.compilationFailed = false;
145 dags_.push_back(newDag);
146}
147
148/**
149 * Removes DAG of given index from operation.
150 *
151 * @param index Index of dag to delete.
152 */
153void
155 DAGContainer::iterator i = dags_.begin() + index;
156
157 if (!i->dag->isNull()) {
158 delete i->dag;
159 i->dag = &OperationDAG::null;
160 }
161
162 dags_.erase(i);
163}
164
165
166/**
167 * Returns number of DAGs stored for operation.
168 *
169 * @return Number of DAGs stored for operation.
170 */
171int
173 return dags_.size();
174}
175
176/**
177 * Returns an operation DAG for operation.
178 *
179 * Compiles DAG from code to object if necessary.
180 *
181 * @param index Index of returned DAG.
182 * @return Requested operation DAG or OperationDAG::null
183 * if DAG is not valid.
184 */
186OperationPimpl::dag(int index) const {
187
188 // if dag is not up to date, try to compile it, if compilation failed and
189 // dag code has not been changed don't try to compile again
190 if (dags_[index].dag->isNull() && !dags_[index].compilationFailed) {
191
192 try {
193 dags_[index].dag =
194 OperationDAGConverter::createDAG(*this, dags_[index].code);
195 dags_[index].compilationFailed = false;
196 dags_[index].error = "";
197
198 } catch (const IllegalParameters &e) {
199 dags_[index].dag = &OperationDAG::null;
200 dags_[index].error = e.errorMessage();
201 dags_[index].compilationFailed = true;
202
203 } catch (const Exception &e) {
204 dags_[index].dag = &OperationDAG::null;
205 dags_[index].error = "UNEXPECTED ERROR: " + e.errorMessage();
206 dags_[index].compilationFailed = true;
207 }
208 }
209
210 return *dags_[index].dag;
211}
212
213/**
214 * Returns source code of DAG.
215 *
216 * @param index Index of DAG whose source code is requested.
217 * @return The source code set for DAG.
218 */
220OperationPimpl::dagCode(int index) const {
221 return dags_[index].code;
222}
223
224/**
225 * Set new source code for DAG and automatically tries to compile
226 * latest version to object.
227 *
228 * @param index Index of DAG whose source code is updated.
229 * @param code New source code in DAG Osal Language.
230 */
231void
232OperationPimpl::setDagCode(int index, const TCEString& code) {
233 dags_[index].code = code;
234 if (!dags_[index].dag->isNull()) {
235 delete dags_[index].dag;
236 dags_[index].dag = &OperationDAG::null;
237 }
238 dags_[index].compilationFailed = false;
239}
240
241/**
242 * Error message if DAG source code could not be compiled.
243 *
244 * @param index Index of DAG whose error is returned.
245 * @return Error message, empty string if DAG was compiles successfully.
246 */
248OperationPimpl::dagError(int index) const {
249 return dags_[index].error;
250}
251
252/**
253 * Returns true if Operation can trap.
254 *
255 * @return True if Operation can trap, false otherwise.
256 */
257bool
259 return canTrap_;
260}
261
262/**
263 * Return true if operation has side effects.
264 *
265 * @return True if Operation has side effects, false otherwise.
266 */
267bool
271
272/**
273 * Returns true if the operation is clocked.
274 *
275 * @return True if the operation is clocked.
276 */
277bool
279 return isClocked_;
280}
281
282/**
283 * Return true if the operation can change control flow.
284 *
285 * Branches and calls of different type have this property set.
286 *
287 * @return True if Operation is a control flow operation.
288 */
289bool
293
294/**
295 * Return true if the operation is call.
296 *
297 * Calls of different type have this property set.
298 *
299 * @return True if Operation is a call operation.
300 */
301bool
303 return isCall_;
304}
305/**
306 * Return true if the operation is branch.
307 *
308 * Branches of different type have this property set.
309 *
310 * @return True if Operation is a branch operation.
311 */
312bool
314 return isBranch_;
315}
316
317/**
318 * Sets the behavior for operation.
319 *
320 * @param behavior Behavior for an operation.
321 */
322void
326
327/**
328 * Returns the behavior of Operation.
329 *
330 * @return The behavior of Operation.
331 */
334 return *behavior_;
335}
336
337/**
338 * Returns the number of operations that affect this operation.
339 *
340 * @return The number of operations that affect this operation.
341 */
342int
344 return affects_.size();
345}
346
347/**
348 * Returns the number of operations affected by this operation.
349 *
350 * @return The number of operations affected by this operation.
351 */
352int
354 return affectedBy_.size();
355}
356
357/**
358 * Returns the name of the operation this operation affects.
359 *
360 * @param i The index of the operation.
361 * @return The name of the operation.
362 */
364OperationPimpl::affects(unsigned int i) const {
365
366 if (i >= affects_.size()) {
367 string method = "OperationPimpl::affects()";
368 string msg = "Index out of range.";
369 throw OutOfRange(__FILE__, __LINE__, method, msg);
370 }
371
372 set<string>::const_iterator it = affects_.begin();
373 unsigned int count = 0;
374 while (count < i) {
375 it++;
376 count++;
377 }
378 return *it;
379}
380
381/**
382 * Returns the name of the operation that is affected by this operation.
383 *
384 * @param i The index of the operation.
385 * @exception OutOfRange If index is illegal.
386 * @return The name of the operation.
387 */
389OperationPimpl::affectedBy(unsigned int i) const {
390
391 if (i >= affectedBy_.size()) {
392 string method = "OperationPimpl::affectedBy()";
393 string msg = "Index out of range.";
394 throw OutOfRange(__FILE__, __LINE__, method, msg);
395 }
396
397 set<string>::const_iterator it = affectedBy_.begin();
398 unsigned int count = 0;
399 while (count < i) {
400 it++;
401 count++;
402 }
403 return *it;
404}
405
406/**
407 * Returns true if Operation depends on the given operation.
408 *
409 * @param op The Operation being investigated.
410 * @return True if Operation depends on the given operation, false otherwise.
411 */
412bool
414 set<string>::const_iterator it = affects_.find(op.name());
415 if (it != affects_.end()) {
416 return true;
417 } else {
418 it = affectedBy_.find(op.name());
419 if (it != affectedBy_.end()) {
420 return true;
421 }
422 }
423
424 return false;
425}
426
427/**
428 * Returns true if Operands can be swapped.
429 *
430 * @param id1 Id of the first Operand.
431 * @param id2 Id of the second Operand.
432 * @return True, if Operands can be swapped, false otherwise.
433 */
434bool
435OperationPimpl::canSwap(int id1, int id2) const {
436
437 Operand& op1 = fetchOperand(id1);
438 Operand& op2 = fetchOperand(id2);
439
440 if (&op1 == &NullOperand::instance() ||
441 &op2 == &NullOperand::instance()) {
442 return false;
443 }
444 return op1.canSwap(op2);
445}
446
447/**
448 * Loads the Operation from ObjectState object.
449 *
450 * @param state The state of the Operation.
451 */
452void
454
455 clear();
456
457 string method = "OperationPimpl::loadState()";
458
459 try {
462
464
467
476
477 for (int i = 0; i < state->childCount(); i++) {
478 ObjectState* child = state->child(i);
479
480 if (child->name() == Operation::OPRN_IN) {
481 Operand* operand = new Operand(true);
482 operand->loadState(child);
483 if (operand->index() < 1 || operand->index() > inputs_) {
484 string msg = "Input operand index illegal";
485 throw Exception(__FILE__, __LINE__, method, msg);
486 }
488
489 } else if (child->name() == Operation::OPRN_OUT) {
490 Operand* operand = new Operand(false);
491 operand->loadState(child);
492 if (operand->index() <= inputs_ ||
493 operand->index() > inputs_ + outputs_) {
494 string msg = "Output operand index illegal";
495 throw Exception(__FILE__, __LINE__, method, msg);
496 }
498
499 } else if (child->name() == Operation::OPRN_AFFECTS) {
500 for (int j = 0; j < child->childCount(); j++) {
501 ObjectState* affects = child->child(j);
502 affects_.insert(
504 affects->stringAttribute(Operation::OPRN_NAME)));
505 }
506
507 } else if (child->name() == Operation::OPRN_AFFECTED_BY) {
508 for (int j = 0; j < child->childCount(); j++) {
509 ObjectState* affectedBy = child->child(j);
510 affectedBy_.insert(
512 affectedBy->stringAttribute(Operation::OPRN_NAME)));
513 }
514
515 } else if (child->name() == Operation::OPRN_TRIGGER) {
516 addDag(child->stringValue());
517
518 } else {
519 // no other childs should be possible
520 string msg = "Unknown child: " + child->name();
521 throw Exception(__FILE__, __LINE__, method, msg);
522 }
523 }
524
525 // TODO: check can-swap operands and verify that they are created
526 // properly
527
528 // add operands that are not defined in XML nor can-swap..
529 for (int i = 1; i <= inputs_; ++i) {
530 if (&operand(i) == &NullOperand::instance()) {
531 Operand* operand = new Operand(true, i, Operand::SINT_WORD);
533 }
534 }
535
536 for (int i = 1 + inputs_; i <= inputs_ + outputs_; ++i) {
537 if (&operand(i) == &NullOperand::instance()) {
538 Operand* operand = new Operand(true, i, Operand::SINT_WORD);
540 }
541 }
542
543 } catch (const Exception& e) {
544 string msg = "Problems loading Operation: " + e.errorMessage();
545 ObjectStateLoadingException error(__FILE__, __LINE__, method, msg);
546 error.setCause(e);
547 throw error;
548 }
549}
550
551/**
552 * Saves the state of the Operation in ObjectState object.
553 *
554 * @return The state of the Operation.
555 */
558
564
573
574 if (affectedBy_.size() > 0) {
576 set<string>::const_iterator it = affectedBy_.begin();
577 while (it != affectedBy_.end()) {
578 ObjectState* affectedByChild = new ObjectState(Operation::OPRN_OPERATION);
579 affectedByChild->setAttribute(Operation::OPRN_NAME, *it);
580 affectedBy->addChild(affectedByChild);
581 it++;
582 }
583 root->addChild(affectedBy);
584 }
585
586 if (affects_.size() > 0) {
588 set<string>::const_iterator it = affects_.begin();
589 while (it != affects_.end()) {
591 affectsChild->setAttribute(Operation::OPRN_NAME, *it);
592 affects->addChild(affectsChild);
593 it++;
594 }
595 root->addChild(affects);
596 }
597
598 for (unsigned int i = 0; i < inputOperands_.size(); i++) {
600 operand->setName(Operation::OPRN_IN);
601 root->addChild(operand);
602 }
603
604 for (unsigned int i = 0; i < outputOperands_.size(); i++) {
607 root->addChild(operand);
608 }
609
610 for (int i = 0; i < dagCount(); i++) {
612 trigger->setValue(dagCode(i));
613 root->addChild(trigger);
614 }
615
616 return root;
617}
618
619void
621 inputOperands_.push_back(operand);
622 inputs_ = inputOperands_.size();
623}
624
625void
630
631/**
632 * Returns the output Operand with the given index.
633 *
634 * This method can be used to traverse the list of output operands
635 * (the max index is numberOfOutput() - 1).
636 *
637 * @param index The index of Operand.
638 */
639Operand&
640OperationPimpl::output(int index) const {
641 return *outputOperands_.at(index);
642}
643
644/**
645 * Returns the Operand with the given id if found, otherwise null Operand.
646 *
647 * @note This method is used to fetch operands with their 'id', the number
648 * which identifies it to the programmer. That is, output ids start from
649 * the last input id + 1, etc.
650 *
651 * @param id The id of Operand.
652 * @return Operand if found, null Operand otherwise.
653 */
654Operand&
656 assert(id != 0);
658 if (&op == &NullOperand::instance()) {
659 return fetchOperand(id, outputOperands_);
660 }
661 return op;
662}
663
664/**
665 * Returns an operand with a certain id if it exists.
666 *
667 * If operand is not found, a null operand is returned.
668 *
669 * @param id The id of an operand.
670 * @param ops Vector where operand is searched.
671 * @return Operand with a certain id.
672 */
673Operand&
674OperationPimpl::fetchOperand(int id, const std::vector<Operand*>& ops) const {
675 assert(id != 0);
676
677 for (std::vector<Operand*>::const_iterator i = ops.begin(); i != ops.end();
678 ++i) {
679 if ((*i)->index() == id) {
680 return **i;
681 }
682 }
683
684 return NullOperand::instance();
685}
686
687/**
688 * Returns an operand with a certain id if it exists.
689 *
690 * If operand is not found, NullOperand is returned.
691 *
692 * @param id Id of the operand.
693 * @return Operand with a certain id.
694 */
695Operand&
697 assert(id != 0);
698
699 for (unsigned int i = 0; i < inputOperands_.size(); i++) {
700 if (inputOperands_[i]->index() == id) {
701 return *inputOperands_[i];
702 }
703 }
704
705 for (unsigned int i = 0; i < outputOperands_.size(); i++) {
706 if (outputOperands_[i]->index() == id) {
707 return *outputOperands_[i];
708 }
709 }
710
711 return NullOperand::instance();
712}
713
714/**
715 * Inserts operand to the right place.
716 *
717 * Operands are inserted according to their indexes.
718 *
719 * @param operand Operand to be inserted.
720 * @param ops Vector in which operand is inserted.
721 */
722void
723OperationPimpl::insertOperand(Operand* operand, std::vector<Operand*>& ops) {
724
725 vector<Operand*>::iterator it = ops.begin();
726 bool inserted = false;
727 while (it != ops.end()) {
728 if ((*it)->index() > operand->index()) {
729 inserted = true;
730 ops.insert(it, operand);
731 break;
732 }
733 it++;
734 }
735 if (!inserted) {
736 ops.push_back(operand);
737 }
738}
739
740/**
741 * Simulates the process of starting execution of an operation.
742 *
743 * @param io The input and output operands.
744 * @param context The operation context.
745 * @return True, if all values could be computed, false otherwise.
746 * @exception Exception Depends on the operation behavior.
747 *
748 */
749bool
751 SimValue** io,
752 OperationContext& context) const {
753
754 return behavior_->simulateTrigger(io, context);
755}
756
757/**
758 * Creates an instance of operation state for this operation and adds it to
759 * the operation context.
760 *
761 * @param context The operation context to add the state in.
762 */
763void
767
768/**
769 * Deletes an instance of operation state for this operation from the
770 * operation context.
771 *
772 * @param context The operation context to delete the state from.
773 */
774void
778
779/**
780 * Returns true if this operation has behavior, or dag which is
781 * simulateable (doesn't contain infinite recursion loop).
782 *
783 * @return True if this operation has behavior, or dag which is
784 */
785bool
789
790
791std::string
793 switch (type) {
795 return "i32";
797 return "i32";
799 return "f16";
801 return "f32";
803 return "f64";
806 return "i64";
807 default:
808 return "Unknown";
809 }
810}
811
812/**
813 * Name of emulation function which is called if the operation is emulated
814 * in program.
815 *
816 * @return Name of emulation function of the instruction.
817 */
820 std::string functionName;
821
822 functionName = "__emulate_" + std::string(name()) +
825
826 for (int i = 1; i <= numberOfInputs(); i++) {
827 Operand& oper = operand(i);
828 functionName += "_" + llvmOperandType(oper.type());
829 }
830
831 for (int i = 1; i <= numberOfOutputs(); i++) {
832 Operand& oper = operand(numberOfInputs() + i);
833 functionName += "_" + llvmOperandType(oper.type());
834 }
835
836 return functionName;
837}
838
839/**
840 * Sets property of operation indicating that the operation is changing
841 * control flow.
842 */
843void
847
848/**
849 * Sets property of operation indicating that the operation is function call.
850 */
851void
853 isCall_ = setting;
854}
855
856/**
857 * Sets property of operation indicating that the operation is branch changing
858 * control flow.
859 */
860void
862 isBranch_ = setting;
863}
864
865/**
866 * Specifies if operation reads memory.
867 */
868void
870 readsMemory_ = setting;
871}
872
873/**
874 * Specifies if operation writes memory.
875 */
876void
878 writesMemory_ = setting;
879}
#define assert(condition)
find Finds info of the inner loops in the false
std::string llvmOperandType(Operand::OperandType type)
static std::string toString(const T &source)
std::string errorMessage() const
Definition Exception.cc:123
void setCause(const Exception &cause)
Definition Exception.cc:75
static NullOperand & instance()
void setAttribute(const std::string &name, const std::string &value)
void setValue(const std::string &value)
ObjectState * child(int index) const
void addChild(ObjectState *child)
std::string stringAttribute(const std::string &name) const
bool boolAttribute(const std::string &name) const
int intAttribute(const std::string &name) const
std::string stringValue() const
std::string name() const
int childCount() const
virtual int index() const
Definition Operand.cc:135
virtual OperandType type() const
Definition Operand.cc:165
OperandType
Definition Operand.hh:58
@ SLONG_WORD
Definition Operand.hh:66
@ FLOAT_WORD
Definition Operand.hh:61
@ ULONG_WORD
Definition Operand.hh:67
@ SINT_WORD
Definition Operand.hh:59
@ DOUBLE_WORD
Definition Operand.hh:62
@ UINT_WORD
Definition Operand.hh:60
@ HALF_FLOAT_WORD
Definition Operand.hh:63
virtual bool canSwap(const Operand &op) const
Definition Operand.cc:372
virtual ObjectState * saveState() const
Definition Operand.cc:490
virtual void loadState(const ObjectState *state)
Definition Operand.cc:383
virtual void createState(OperationContext &context) const
virtual bool simulateTrigger(SimValue **io, OperationContext &context) const =0
virtual void deleteState(OperationContext &context) const
virtual bool canBeSimulated() const
static OperationDAG * createDAG(const OperationPimpl &operation, std::string sourceCode)
static OperationDAG null
bool isNull() const
void loadState(const ObjectState *state)
bool isClocked() const
void createState(OperationContext &context) const
OperationBehavior * behavior_
The behavior of the Operation.
TCEString description() const
bool dependsOn(const Operation &op) const
std::string name_
Name of the Operation.
DAGContainer dags_
Table of DAGs and their source codes of an operation.
std::string description_
Description of the Operation.
std::vector< Operand * > inputOperands_
Input Operands of the Operation.
void setDagCode(int index, const TCEString &code)
bool isCall() const
bool hasSideEffects() const
Operand & operand(int id) const
TCEString emulationFunctionName() const
bool canSwap(int id1, int id2) const
bool writesMemory_
Flag indicating if Operation writes to memory.
Operand & output(int index) const
void insertOperand(Operand *operand, std::vector< Operand * > &ops)
bool isBranch() const
std::set< std::string > affectedBy_
Operations that are affected by this Operation.
int inputs_
The number of inputs of the Operation.
ObjectState * saveState() const
int dagCount() const
std::set< std::string > affects_
Operations that affects this Operation.
int affectedByCount() const
bool isControlFlowOperation() const
bool controlFlowOperation_
Flag indicating if the Operation can change program flow.
void setBranch(bool setting)
int numberOfOutputs() const
OperationDAG & dag(int index) const
TCEString name() const
bool hasSideEffects_
Flag indicating if Operation has side effects.
void addInput(Operand *operand)
int numberOfInputs() const
void setReadsMemory(bool setting)
TCEString dagCode(int index) const
void removeDag(int index)
Operand & fetchOperand(int id, const std::vector< Operand * > &ops) const
TCEString affectedBy(unsigned int i) const
int outputs_
The number of outputs of the Operation.
std::vector< Operand * > outputOperands_
Output Operands of the Operation.
TCEString affects(unsigned int i) const
void setCall(bool setting)
bool canBeSimulated() const
bool canTrap() const
void addOutput(Operand *operand)
void setBehavior(OperationBehavior &behavior)
void addDag(const TCEString &code)
void deleteState(OperationContext &context) const
int affectsCount() const
TCEString dagError(int index) const
bool simulateTrigger(SimValue **, OperationContext &context) const
bool isCall_
Flag indicating if Operation is call.
void setWritesMemory(bool setting)
bool readsMemory_
Flag indicating if Operation reads from memory.
OperationBehavior & behavior() const
void setControlFlowOperation(bool setting)
bool canTrap_
Flag indicating if Operation can trap.
bool isClocked_
Flag indicating if Operation is clocked and needs AdvanceClock.
bool isBranch_
Flag indicating if Operation is branch changing control flow.
static const char * OPRN_CONTROL_FLOW
Object state name for control flow property.
Definition Operation.hh:81
static const char * OPRN_ISBRANCH
Object state name for branch property.
Definition Operation.hh:99
virtual TCEString name() const
Definition Operation.cc:93
static const char * OPRN_DESCRIPTION
Object state name for description.
Definition Operation.hh:69
static const char * OPRN_IN
Object state name for input operand.
Definition Operation.hh:91
static const char * OPRN_CLOCKED
Object state name for clockedness.
Definition Operation.hh:79
static const char * OPRN_TRAP
Object state name for trap.
Definition Operation.hh:75
static const char * OPRN_AFFECTED_BY
Object state name for affected by.
Definition Operation.hh:89
static const char * OPRN_OPERATION
Object state name for operation.
Definition Operation.hh:65
static const char * OPRN_TRIGGER
Object state name for trigger semantics.
Definition Operation.hh:95
static const char * OPRN_ISCALL
Object state name for call property.
Definition Operation.hh:97
static const char * OPRN_SIDE_EFFECTS
Object state name for side effects.
Definition Operation.hh:77
static const char * OPRN_READS_MEMORY
Object state name for reads memory.
Definition Operation.hh:83
static const char * OPRN_OUT
Object state name for output operand.
Definition Operation.hh:93
static const char * OPRN_OUTPUTS
Object state name for outputs.
Definition Operation.hh:73
static const char * OPRN_NAME
Object state name for name.
Definition Operation.hh:67
static const char * OPRN_INPUTS
Object state name for inputs.
Definition Operation.hh:71
static const char * OPRN_AFFECTS
Object state name for affects.
Definition Operation.hh:87
static const char * OPRN_WRITES_MEMORY
Object state name for writes memory.
Definition Operation.hh:85
static void deleteAllItems(SequenceType &aSequence)
static std::string stringToUpper(const std::string &source)
std::string code
Source code for creating DAG for operation.
OperationDAG * dag
DAG presentation of code. set to NullOperationDAG if could not be created.
bool compilationFailed
If code was already tried to compile and it did not succeed.