CS179E Language Design Script

Purpose To guide a team though designing a programming language.
Entry Criteria Design of a new language or selection of a subset of an existing language
Phases Activities Description
0
Select
Paradigm
Imperative, Declarative (Functional, Logic), other
1
Select Concepts Determine feature set
Values
Bindings
Abstraction
  • Values - those things that may be evaluated, stored, incorporated in a data structure, passed as an argument to a procedure or function ...
  • Literals
  • Bindings
    • Scope rules
      • Block structure
        • Flat
        • Nested
    • Declarations
      • constants
      • types
      • variables
      • functions & procedures
      • classes, etc
  • Abstraction
    • Functions
    • Procedures
    • Parameters
      • parameter-argument passing association
        • copy
        • reference
      • evaluation order
    • Recursive routines
    • Mutually recursive routines
Types
  • Types
    • Primitive - boolean, character, integer, ...
    • Compound - product, union, function (array - static, dynamic)
    • Recursive
    • Strings
    • User defined
  • Type rules
    • Untyped
    • Static/Dynamic
    • Type equivalence (name/structure)
    • Type completeness
  • Type systems
    • Overloading
    • Polymorphism
    • Type inference
    • Coercion
    • Subtypes and inheritance
Expressions
  • each type
    • Boolean
    • Relational
    • Arithmetic
    • List
  • conditional
  • function call
  • side effects
Imperative
Features
Storage: Variables and Commands
  • Variables
  • Commands
    • Skips
    • Assignment
    • Procedure call
    • Sequential
    • Conditional
    • Iterative
Encapsulation
and modules
  • Packages
  • Abstract types
  • Objects and classes
  • Generics
Sequencers
  • Jumps
  • Escapes
  • Exceptions
2
Other
Issues
  • Program structure and layout
    • Layout
    • Order of declarations and references
  • Character set & internationalization
  • Keywords, reserved words
  • Standard environment
3
Simplicity and
Regularity
Include only those concepts essential for the application and combine the concepts systematically without unnecessary restrictions or surprising interactions. The following principles help to promote regularity and simplicity.
  • Type Completeness - no operation should be arbitrarily restricted in the types of its operands.
  • Abstraction - each computational program phrase should provide for abstracting the phrase and parameterizing it.
  • Correspondence - for each form of declaration there should be a corresponding  parameter mechanism.
  • Qualification - include a block in each meaningful syntactic class.
Exit criteria
A complete programming language design involving a small core language. There should be a small number of primitive types,  together with ways of defining new primitive and composite types, and associated operations.

References

Watt, David A.
Programming Language Concepts and Paradigms PHI 1990

Take One!

Based on Notes by Anthony Aaby.