Error description on algebraic specification and its automatic addition
Takeshi Hamaguchi, Shinichirou Yamamoto, Kiyshi Agusa, Masahiko Sakai · Systems and Computers in Japan · 1996
Abstract We define an algebraic specification having a framework for error handling and give an algorithm for automatically appending error description. Generally, error description in algebraic specification is so complicated that it is difficult to comprehend and inconsistencies arise if handwritten. Therefore, it is effective to add error description automatically to algebraic specification that has no error description and without creating any inconsistency. Error constructors are introduced that represent error values as a framework for error handling. When there exists a term which is not equal to any constructor term, an equation to equalize the term and an error constructor are appended. To avoid inconsistency, i.e., normal value and error value become equal, we distinguish three kinds of variables. Some variables can be substituted for only by normal terms, some variables can be replaced only by error terms and some variables can be replaced by any term. Moreover, we show correctness of automatic error description addition; i.e., partitioning of terms in the normal part of sort is preserved before and after error description addition.