Analyzing the State Behavior of Programs
It is generally agreed that the unrestricted use of state can make a program hard to understand, hard to compile, and hard to execute, and that these difficulties increase in the presence of parallel hardware. This problem has led some to suggest that constructs that allow state should be banished f...
Main Author: | |
---|---|
Format: | Working Paper |
Language: | en_US |
Published: |
MIT Artificial Intelligence Laboratory
2008
|
Online Access: | http://hdl.handle.net/1721.1/41478 |
_version_ | 1826198248272953344 |
---|---|
author | Bawden, Alan |
author_facet | Bawden, Alan |
author_sort | Bawden, Alan |
collection | MIT |
description | It is generally agreed that the unrestricted use of state can make a program hard to understand, hard to compile, and hard to execute, and that these difficulties increase in the presence of parallel hardware. This problem has led some to suggest that constructs that allow state should be banished from programming languages. But state is also a very useful phenomenon: some tasks are extremely difficult to accomplish without it, and sometimes the most perspicuous expression of an algorithm is one that makes use of state. Instead of outlawing state, we should be trying to understand it, so that we can make better use of it.
I propose a way of modeling systems in which the phenomenon of state occurs. I propose that systems that exhibit state-like behavior are those systems that must rely on their own nonlocal structure in order to function correctly, and I make this notion of nonlocal structure precise. This characterization offers some new insights into why state seems to cause the problems that it does. I propose to construct a compiler that takes advantage of these insights to achieve some of the benefits normally associated with purely functional programming systems. |
first_indexed | 2024-09-23T11:01:43Z |
format | Working Paper |
id | mit-1721.1/41478 |
institution | Massachusetts Institute of Technology |
language | en_US |
last_indexed | 2024-09-23T11:01:43Z |
publishDate | 2008 |
publisher | MIT Artificial Intelligence Laboratory |
record_format | dspace |
spelling | mit-1721.1/414782019-04-12T09:44:57Z Analyzing the State Behavior of Programs Bawden, Alan It is generally agreed that the unrestricted use of state can make a program hard to understand, hard to compile, and hard to execute, and that these difficulties increase in the presence of parallel hardware. This problem has led some to suggest that constructs that allow state should be banished from programming languages. But state is also a very useful phenomenon: some tasks are extremely difficult to accomplish without it, and sometimes the most perspicuous expression of an algorithm is one that makes use of state. Instead of outlawing state, we should be trying to understand it, so that we can make better use of it. I propose a way of modeling systems in which the phenomenon of state occurs. I propose that systems that exhibit state-like behavior are those systems that must rely on their own nonlocal structure in order to function correctly, and I make this notion of nonlocal structure precise. This characterization offers some new insights into why state seems to cause the problems that it does. I propose to construct a compiler that takes advantage of these insights to achieve some of the benefits normally associated with purely functional programming systems. MIT Artificial Intelligence Laboratory 2008-04-28T14:14:01Z 2008-04-28T14:14:01Z 1988-08 Working Paper http://hdl.handle.net/1721.1/41478 en_US MIT Artificial Intelligence Laboratory Working Papers, WP-311 application/pdf MIT Artificial Intelligence Laboratory |
spellingShingle | Bawden, Alan Analyzing the State Behavior of Programs |
title | Analyzing the State Behavior of Programs |
title_full | Analyzing the State Behavior of Programs |
title_fullStr | Analyzing the State Behavior of Programs |
title_full_unstemmed | Analyzing the State Behavior of Programs |
title_short | Analyzing the State Behavior of Programs |
title_sort | analyzing the state behavior of programs |
url | http://hdl.handle.net/1721.1/41478 |
work_keys_str_mv | AT bawdenalan analyzingthestatebehaviorofprograms |