Programming languages and coding standards provide invariants to ease reasoning about the correctness of code. Although useful, invariants are often intentionally broken by programmers for performance or compatibility purposes. An operation that consists of multiple steps can preserve an invariant overall even though it breaks it temporarily during the process—e.g., inserting a node into a doubly linked list takes two operations between which the list is ill-formed. It is important that intermediate states of these operations are not observable by the rest of the program. We explore various devices that are used to bundle together the different steps of such an operation in a way that hides intermediate states—bringing some form of atomicity. However, while all these constructs might work in a certain context there is no way to ensure they still work for extensions and new versions of the programming language, the underlying operating system, the linked libraries, or even the processor architecture. We propose a new construct, opaque, to overcome these problems—decoupling code correctness and execution context—and future-proof invariant-breaking code by insisting that both current and future versions of the compiler treat the enclosed block as having no observable intermediate states.
Thu 23 OctDisplayed time zone: Tijuana, Baja California change
15:30 - 17:00
|Korz: Simple, Symmetric, Subjective,
|Mining the Ecosystem to Improve Type Inference For Dynamically Typed Languages|
|Description Logic as Programming Language|
James Skene Auckland University of Technology
|It's only illegal if you get caught|