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 | |||
15:30 22mTalk | Korz: Simple, Symmetric, Subjective,
Context-Oriented Programming Onward! Papers | ||
15:52 22mTalk | Mining the Ecosystem to Improve Type Inference For Dynamically Typed Languages Onward! Papers Boris Spasojevic University of Bern, Switzerland, Mircea Lungu University of Bern, Switzerland, Oscar Nierstrasz University of Bern, Switzerland DOI Pre-print | ||
16:15 22mTalk | Description Logic as Programming Language Onward! Papers James Skene Auckland University of Technology | ||
16:37 22mTalk | It's only illegal if you get caught Onward! Papers |