Global Information Lookup Global Information

Typestate analysis information


Typestate analysis, sometimes called protocol analysis, is a form of program analysis employed in programming languages. It is most commonly applied to object-oriented languages. Typestates define valid sequences of operations that can be performed upon an instance of a given type. Typestates, as the name suggests, associate state information with variables of that type. This state information is used to determine at compile-time which operations are valid to be invoked upon an instance of the type. Operations performed on an object that would usually only be executed at run-time are performed upon the type state information which is modified to be compatible with the new state of the object.

Typestates are capable of representing behavioral type refinements such as "method A must be invoked before method B is invoked, and method C may not be invoked in between". Typestates are well-suited to representing resources that use open/close semantics by enforcing semantically valid sequences such as "open then close" as opposed to invalid sequences such as leaving a file in an open state. Such resources include filesystem elements, transactions, connections and protocols. For instance, developers may want to specify that files or sockets must be opened before they are read or written, and that they can no longer be read or written if they have been closed. The name "typestate" stems from the fact that this kind of analysis often models each type of object as a finite state machine. In this state machine, each state has a well-defined set of permitted methods/messages, and method invocations may cause state transitions. Petri nets have also been proposed as a possible behavioral model for use with refinement types.[1]

Typestate analysis was introduced by Rob Strom in 1983[2] in the Network Implementation Language (NIL) developed at IBM's Watson Lab. It was formalized by Strom and Yemini in a 1986 article[3] that described how to use typestate to track the degree of initialisation of variables, guaranteeing that operations would never be applied on improperly initialised data, and further generalized in the Hermes programming language.

In recent years, various studies have developed ways of applying the typestate concept to object-oriented languages.[4][5]

  1. ^ Jorge Luis Guevara D´ıaz (2010). "Typestate oriented design - A coloured petri net approach" (PDF).
  2. ^ Strom, Robert E. (1983). "Mechanisms for compile-time enforcement of security". Proceedings of the 10th ACM SIGACT-SIGPLAN symposium on Principles of programming languages - POPL '83. pp. 276–284. doi:10.1145/567067.567093. ISBN 0897910907. S2CID 6630704.
  3. ^ Strom, Robert E.; Yemini, Shaula (1986). "Typestate: A programming language concept for enhancing software reliability" (PDF). IEEE Transactions on Software Engineering. 12. IEEE: 157–171. doi:10.1109/tse.1986.6312929. S2CID 15575346.
  4. ^ DeLine, Robert; Fähndrich, Manuel (2004). "Typestates for Objects". ECOOP 2004 – Object-Oriented Programming. Lecture Notes in Computer Science. Vol. 3086. Springer. pp. 465–490. doi:10.1007/978-3-540-24851-4_21. ISBN 978-3-540-22159-3.
  5. ^ Bierhoff, Kevin; Aldrich, Jonathan (2007). "Modular typestate checking of aliased objects". Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems, languages and applications. Vol. 42. pp. 301–320. doi:10.1145/1297027.1297050. ISBN 9781595937865. S2CID 9793770.

and 15 Related for: Typestate analysis information

Request time (Page generated in 0.774 seconds.)

Typestate analysis

Last Update:

Typestate analysis, sometimes called protocol analysis, is a form of program analysis employed in programming languages. It is most commonly applied to...

Word Count : 1834

Design by contract

Last Update:

derivation Program refinement Strong typing Test-driven development Typestate analysis Meyer, Bertrand: Design by Contract, Technical Report TR-EI-12/CO...

Word Count : 2108

Static program analysis

Last Update:

In computer science, static program analysis (also known as static analysis or static simulation) is the analysis of computer programs performed without...

Word Count : 1864

Program analysis

Last Update:

In computer science, program analysis is the process of automatically analyzing the behavior of computer programs regarding a property such as correctness...

Word Count : 1310

Dependence analysis

Last Update:

In compiler theory, dependence analysis produces execution-order constraints between statements/instructions. Broadly speaking, a statement S2 depends...

Word Count : 564

Separation logic

Last Update:

has been included in comparatively few tools in the automatic program analysis category (and none mentioned in the next section). O'Hearn and Brookes...

Word Count : 3641

Model checking

Last Update:

model checking tools Partial order reduction Program analysis (computer science) Static code analysis For convenience, the example properties are paraphrased...

Word Count : 2717

Safety and liveness properties

Last Update:

Model checking Pointer Shape Symbolic execution Termination Type systems Typestate Dynamic Data-flow Taint tracking Concolic execution Fuzzing Invariant...

Word Count : 1738

SAT solver

Last Update:

significant impact on fields including software verification, program analysis, constraint solving, artificial intelligence, electronic design automation...

Word Count : 3558

Hyperproperty

Last Update:

Kim Guldstrand (eds.). Tools and Algorithms for the Construction and Analysis of Systems. Lecture Notes in Computer Science. Vol. 12651. Cham: Springer...

Word Count : 958

Path explosion

Last Update:

analyses, including fuzzing, symbolic execution, and path-sensitive static analysis. Path explosion refers to the fact that the number of control-flow paths...

Word Count : 303

Program slicing

Last Update:

applications of slicing include software maintenance, optimization, program analysis, and information flow control. Slicing techniques have been seeing a rapid...

Word Count : 1417

Abstract interpretation

Last Update:

performing all the calculations. Its main concrete application is formal static analysis, the automatic extraction of information about the possible executions...

Word Count : 2924

Polyvariance

Last Update:

In program analysis, a polyvariant or context-sensitive analysis (as opposed to a monovariant or context-insensitive analysis) analyzes each function multiple...

Word Count : 215

Hoare logic

Last Update:

verification Loop invariant Predicate transformer semantics Static program analysis Hoare originally wrote " P { C } Q {\displaystyle P\{C\}Q} " rather than...

Word Count : 3643

PDF Search Engine © AllGlobal.net