Subtext (programming language)

Last updated
Schematic tables. An alpha build of the Subtext environment, which illustrates the unique "polymorphic conditionals" present in the IDE. Subtext vista.png
Schematic tables. An alpha build of the Subtext environment, which illustrates the unique "polymorphic conditionals" present in the IDE.

Subtext is a moderately visual programming language and environment, for writing application software. It is an experimental, research attempt to develop a new programming model, called Example Centric Programming, by treating copied blocks as first class prototypes, for program structure. It uses live text, similar to what occurs in spreadsheets as users update cells, for frequent feedback. It is intended to eventually be developed enough to become a practical language for daily use. It is planned to be open software; the license is not yet determined.

Visual programming language

In computing, a visual programming language (VPL) is any programming language that lets users create programs by manipulating program elements graphically rather than by specifying them textually. A VPL allows programming with visual expressions, spatial arrangements of text and graphic symbols, used either as elements of syntax or secondary notation. For example, many VPLs are based on the idea of "boxes and arrows", where boxes or other screen objects are treated as entities, connected by arrows, lines or arcs which represent relations.

Application software computer software designed to perform a group of coordinated functions, tasks, or activities for the benefit of the user

Application software is computer software designed to perform a group of coordinated functions, tasks, or activities for the benefit of the user. Examples of an application include a word processor, a spreadsheet, an accounting application, a web browser, a media player, an aeronautical flight simulator, a console game or a photo editor. The collective noun application software refers to all applications collectively. This contrasts with system software, which is mainly involved with running the computer.

Programming language language designed to communicate instructions to a machine

A programming language is a formal language, which comprises a set of instructions used to produce various kinds of output. Programming languages are used in computer programming to create programs that implement specific algorithms.

Subtext was created by Jonathan Edwards who submitted a paper on the language to OOPSLA. It was accepted as part of the 2005 conference.

OOPSLA is an annual ACM research conference. OOPSLA mainly takes place in the United States, while the sister conference of OOPSLA, ECOOP, is typically held in Europe. It is operated by the Special Interest Group for Programming Languages (SIGPLAN) group of the Association for Computing Machinery (ACM).

Environment

Early build of the Subtext environment with the program's current state visible. The employee data (like "wage") is visibly changed after invoking the "Raise" method by clicking its "invoke arrow", and the hypothetical state (displayed within the Raise method) is also updated. Subtext scitest.jpg
Early build of the Subtext environment with the program's current state visible. The employee data (like "wage") is visibly changed after invoking the "Raise" method by clicking its "invoke arrow", and the hypothetical state (displayed within the Raise method) is also updated.
Early build of the Subtext environment with interactive console inputs. Subtext constest.jpg
Early build of the Subtext environment with interactive console inputs.

Early video previews of the Subtext environment were released circa 2006, [1] which demonstrated the semantics of Subtext programs, and the close integration with the Subtex environment and runtime.

Subtext programs are declared and manipulated (or mutated) by adding and linking elements of various types to a syntax tree, and entering in values or names as necessary, as opposed to typing out textual programs. Due to the design of the Subtext language and environment, there is no distinction between a program's representation and its execution. Like spreadsheets, Subtext programs are live executions within an environment and runtime, and programming is direct manipulation of these executions via a graphical environment. Unlike typical functional programming languages, Subtext has simple semantics and is easily applicable to reactive systems that require mutable state, I/O, and concurrency, under a model known as "Reactive Programming". [2] Console input ("invocations") can be utilized via data flow within a Subtext program, allowing users to manipulate values interactively.

Graphical user interface user interface allowing interaction through graphical icons and visual indicators

The graphical user interface is a form of user interface that allows users to interact with electronic devices through graphical icons and visual indicators such as secondary notation, instead of text-based user interfaces, typed command labels or text navigation. GUIs were introduced in reaction to the perceived steep learning curve of command-line interfaces (CLIs), which require commands to be typed on a computer keyboard.

In computer science, functional programming is a programming paradigm—a style of building the structure and elements of computer programs—that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data. It is a declarative programming paradigm, which means programming is done with expressions or declarations instead of statements. Functional code is idempotent, the output value of a function depends only on the arguments that are passed to the function, so calling a function f twice with the same value for an argument x produces the same result f(x) each time; this is in contrast to procedures depending on a local or global state, which may produce different results at different times when called with the same arguments but a different program state. Eliminating side effects, i.e., changes in state that do not depend on the function inputs, can make it much easier to understand and predict the behavior of a program, which is one of the key motivations for the development of functional programming.

Command-line interface type of computer interface based on entering text commands and viewing text output

A command-line interface or command language interpreter (CLI), also known as command-line user interface, console user interface and character user interface (CUI), is a means of interacting with a computer program where the user issues commands to the program in the form of successive lines of text. A program which handles the interface is called a command language interpreter or shell (computing).

Coherence

A continuation and subset of the Subtext language using other principles, [3] is Coherence, an experimental programming language and environment, which uses a new model of change-driven computation called "Coherent reaction", to coordinate the effects and side-effects of programs interactively as they are being developed. The language is specialized for interactive application software, and is being designed by the creator of Subtext, Jonathan Edwards, who reports upon its development by publishing white papers.

Logo for the Coherence programming language Je coherencelogo.gif
Logo for the Coherence programming language

State changes trigger events called reactions, that in turn change other states. A coherent execution order is one in which each reaction executes before any others that are affected by its changes. A coherent order is discovered iteratively by detecting incoherencies as they occur and backtracking their effects. The fundamental building block of Coherence is the dynamically typed mutable tree. The fundamental abstraction mechanism is the virtual tree, whose value is lazily computed, and whose behavior is generated by coherent reactions. [4]

Related Research Articles

Procedural programming is a programming paradigm, derived from structured programming, based upon the concept of the procedure call. Procedures, also known as routines, subroutines, or functions, simply contain a series of computational steps to be carried out. Any given procedure might be called at any point during a program's execution, including by other procedures or itself. The first major procedural programming languages first appeared circa 1960, including Fortran, ALGOL, COBOL and BASIC. Pascal and C were published closer to the 1970s.

In computer science, denotational semantics is an approach of formalizing the meanings of programming languages by constructing mathematical objects that describe the meanings of expressions from the languages. Other approaches provide formal semantics of programming languages including axiomatic semantics and operational semantics.

Coherence, coherency, or coherent may refer to the following:

AspectJ is an aspect-oriented programming (AOP) extension created at PARC for the Java programming language. It is available in Eclipse Foundation open-source projects, both stand-alone and integrated into Eclipse. AspectJ has become a widely used de facto standard for AOP by emphasizing simplicity and usability for end users. It uses Java-like syntax, and included IDE integrations for displaying crosscutting structure since its initial public release in 2001.

In computer science, reflection is the ability of a computer program to examine, introspect, and modify its own structure and behavior at runtime.

In computer programming, a runtime library (RTL) is a set of low-level routines used by a compiler to invoke some of the behaviors of a runtime environment, by inserting calls to the runtime library into compiled executable binary. The runtime environment implements the execution model, built-in functions, and other fundamental behaviors of a programming language. During execution of that computer program, execution of those calls to the runtime library cause communication between the executable binary and the runtime environment. A runtime library often includes built-in functions for memory management or exception handling. Therefore, a runtime library is always specific to the platform and compiler.

In computer science and computer programming, a continuation is an abstract representation of the control state of a computer program. A continuation reifies the program control state, i.e. the continuation is a data structure that represents the computational process at a given point in the process's execution; the created data structure can be accessed by the programming language, instead of being hidden in the runtime environment. Continuations are useful for encoding other control mechanisms in programming languages such as exceptions, generators, coroutines, and so on.

In computer science, a metaobject is an object that manipulates, creates, describes, or implements objects. The object that the metaobject pertains to is called the base object. Some information that a metaobject might define includes the base object's type, interface, class, methods, attributes, parse tree, etc. Metaobjects are examples of the computer science concept of reflection, where a system has access to its own internal structure. Reflection enables a system to essentially rewrite itself on the fly, to alter its own implementation as it executes.

A memory barrier, also known as a membar, memory fence or fence instruction, is a type of barrier instruction that causes a central processing unit (CPU) or compiler to enforce an ordering constraint on memory operations issued before and after the barrier instruction. This typically means that operations issued prior to the barrier are guaranteed to be performed before operations issued after the barrier.

A runtime system, also called run-time system, runtime environment or run-time environment, primarily implements portions of an execution model. This is not to be confused with the runtime lifecycle phase of a program, during which the runtime system is in operation. Most languages have some form of runtime system that provides an environment in which programs run. This environment may address a number of issues including the layout of application memory, how the program accesses variables, mechanisms for passing parameters between procedures, interfacing with the operating system, and otherwise. The compiler makes assumptions depending on the specific runtime system to generate correct code. Typically the runtime system will have some responsibility for setting up and managing the stack and heap, and may include features such as garbage collection, threads or other dynamic features built into the language.

Evaluation strategies are used by programming languages to determine when to evaluate the argument(s) of a function call and what kind of value to pass to the function. For example, call by value/call by reference specifies that a function application evaluates the argument before it proceeds to the evaluation of the function's body and that it passes two capabilities to the function, namely, the ability to look up the current value of the argument and to modify it via an assignment statement. The notion of reduction strategy in lambda calculus is similar but distinct.

Racket (programming language) programming language

Racket is a general-purpose, multi-paradigm programming language based on the Scheme dialect of Lisp. It is designed to be a platform for programming language design and implementation. Racket is also used for scripting, computer science education, and research.

Programming language theory branch of computer science that deals with the design, implementation, analysis, characterization, and classification of programming languages and their individual features

Programming language theory (PLT) is a branch of computer science that deals with the design, implementation, analysis, characterization, and classification of programming languages and their individual features. It falls within the discipline of computer science, both depending on and affecting mathematics, software engineering, linguistics and even cognitive science. It is a well-recognized branch of computer science, and an active research area, with results published in numerous journals dedicated to PLT, as well as in general computer science and engineering publications.

A foreign function interface (FFI) is a mechanism by which a program written in one programming language can call routines or make use of services written in another.

In computing, reactive programming is a declarative programming paradigm concerned with data streams and the propagation of change. With this paradigm it is possible to express static or dynamic data streams with ease, and also communicate that an inferred dependency within the associated execution model exists, which facilitates the automatic propagation of the changed data flow.

Dart is a general-purpose programming language originally developed by Google and later approved as a standard by Ecma (ECMA-408). It is used to build web, server, desktop, and mobile applications.

Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. It was the main programming language supported by Apple for the macOS and iOS operating systems, and their respective application programming interfaces (APIs) Cocoa and Cocoa Touch until the introduction of Swift. The programming language Objective-C was originally developed in the early 1980s. It was selected as the main language used by NeXT for its NeXTSTEP operating system, from which macOS and iOS are derived. Portable Objective-C programs that do not use the Cocoa or Cocoa Touch libraries, or those using parts that may be ported or reimplemented for other systems, can also be compiled for any system supported by GNU Compiler Collection (GCC) or Clang.

References

Cited
  1. Introduction to Subtext, I/O and Mutable state, first Subtext environment video demo
  2. First Class Copy & Paste, MIT CSAIL draft paper by Jonathan Edwards in 2006.
  3. Coherence home page, states continuation of Subtext
  4. DSpace@MIT : Coherent Reaction, CSAIL Digital Archive, Technical Reports
Official
Related