#ifndef CONCLUSION_CLASS #define CONCLUSION_CLASS // conclusion: part of the specification notation for indicating that a // consequence specified for this operation is about to become the actual // consequence after the operation's application to its operands. // this bit of the semantics supports the indication of which consequence // to conclude with. #include "strings.h" #include "zeno_tree.h" class conclusion : public chunk { public: conclusion(); ~conclusion(); // consequence_name: returns the name of the consequence that concludes the // operation. string &consequence_name() const; void consequence_name(string &name); // link: a location in the parsing tree that is associated with this // ZENO conclusion. it either points at a return statement or a raise // statement (which should be prefixed by a valid label for that statement, // by the point the link is set). zeno_tree *link() const; void link(zeno_tree *new_link); // well_formed: returns TRUE if the zeno conclusion is well formed. // if well_formed returns TRUE, these guarantees are satisfied for the // conclusion: // 1. the link has been set. // 2. the consequence name has been set. // 3. int well_formed() const; // print: prints out the info for the conclusion. void print() const; private: string conclusion_name; zeno_tree *conclusion_link; }; #endif