词条 | Algebraic specification |
释义 |
Algebraic specification,[1][2][3] is a software engineering technique for formally specifying system behavior. Algebraic specification seeks to systematically develop more efficient programs by:
An algebraic specification achieves these goals by defining one or more data types, and specifying a collection of functions that operate on those data types. These functions can be divided into two classes:
ExampleConsider a formal algebraic specification for the boolean data type. One possible algebraic specification may provide two constructor functions for the data-element: a true constructor and a false constructor. Thus, a boolean data element could be declared, constructed, and initialized to a value. In this scenario, all other connective elements, such as XOR and AND, would be additional functions. Thus, a data element could be instantiated with either "true" or "false" value, and additional functions could be used to perform any operation on the data element. Alternatively, the entire system of boolean data types could be specified using a different set of constructor functions: a false constructor and a not constructor. In that case, an additional function could be defined to yield the value "true." The algebraic specification therefore describes all possible states of the data element, and all possible transitions between states. See also
Notes1. ^{{cite book|title=Algebraic Specification|first=H.|last= Ehrig|author2=B. Mahr|publisher=Academic Press|year=1989|isbn=0-201-41635-2}} {{compsci-stub}}2. ^{{cite book|title=Algebraic Specification|first=J.A.|last=Bergstra|author2=J. Heering |author3=J. Klint |publisher=Springer-Verlag|year=1985|series=EATCS Monographs on Theoretical Computer Science|volume=6}} 3. ^{{cite book|title=Algebraic Specification|first=M.|last=Wirsing|series=Handbook of Theoretical Computer Science|volume=B|editor=Jan van Leeuwen|year=1990|publisher=Elsevier|pages=675–788}} 1 : Formal methods |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。