Notes
Slide Show
Outline
1
Smalltalk Advances
Language Patterns, Interop and Modularization
  • SmallScript for AOS & .NET
    David Simmons
    SmallScript Corp
2
Overview
  • Outline SmallScript’s objectives
  • Describe the architecture and features
    • Object Model
    • Program Representation and Modularization
    • Platform and Cross Language Interop
  • Survey features for enhancing developer patterns
    • Reuse, Delegation, AOP, Text File Paradigm
  • Explore academic research opportunities
    • Advanced Language Features
3
Redesign Smalltalk to broaden its applicability and efficacy
  • Maintain full backward language compatibility with classic Smalltalk
  • Linearize user adoption and development process scalability by incorporating multi-paradigm features
  • Incorporate rich object-model and execution substrate to provide an extensible, hi-performance, multi-language platform
  • Incorporate first class support for features found within today’s advanced research languages
4
Redesign Smalltalk to broaden its applicability and efficacy
  • Incorporate the expectations of mainstream development patterns
  • Support technical requirements of today’s software integration and deployment processes
  • Support multiple execution platforms
    • SmallScript.AOS: On Win32 with its own Execution Engine
    • SmallScript.NET: On the Microsoft.NET Execution Engine
  • Integrate with existing and future IDE’s
5
Show us the results...
  • There are two modes
  • Interactive script compilation and execution
  • Classic binary build processes to emit deployable binaries


6
Introduction “Hello World”

  • The Script [If]
  • The Application
  • The DLL
  • The Extended Application
7
The Object Model:
Conceptual View of an Object
8
OM and Execution Engine:
Fundamental Principles
  • Everything is “conceptually” an object
  • All inter-object operations “conceptually” happen through messaging
  • “Conceptually,” only intra-object operations allow direct structure/representation access
  • Everything is dynamic and subject to change except an object’s identity
9
The Object Model &
Execution Engine Features
  • Lightweight modular architecture
    • Deploys as a single, self configuring, shared library file
  • Modularized packaging and deployment of code/programs
    • Default format deploys as industry standard COFF/DLL
  • Hybrid adaptive garbage collector
    • Finalization, Weak references, Interior pointers, Pinned objects, …
10
The Object Model &
Execution Engine Features
  • Native pre-emptive multi-threading and exceptions
  • Uniform object model and extensible MOP infrastructure services
    • based on review of ~20 different languages from various programming paradigms
  • Optional typing supporting dynamic marshalling, multi-methods, and arbitrary parametric type equations
11
The Object Model &
Execution Engine Features
  • Rich and extensible annotation system for all language entities.
  • Semantics based op-code instruction set, extensible through custom annotations.
  • Extensible predicate based binding architecture providing intrinsic AOP support and managed objects.
    • Hi performance support for arbitrary sandboxes, read write barriers and custom delegation models, and capability based binding.
12
The Object Model &
Execution Engine Features
  • Class and instance specific structure and behavior.
  • Dynamic multiple inheritance of both behavior and lazy aggregate mixin of structure.
    • AbstractMixin -- Specification mixin aspects
    • PureMixin -- Pure behavior mixin aspects
    • Interface -- Concrete (aggregate structure) mixin aspects
  • Distinct, first class, separation of module and namespace roles. Unified representation through a single type of lexical entity.
13
The roles of classes
  • Unit of Behavior
    • Inheritance of Implementation
      • SI via a single Superclass
      • MI through Aspects
        [Interfaces and Mixins]
    • Methods for The Class
      • A Function
    • Methods for Instances
      • A Member Function
  • Unit of Metadata
    • Mutable Repository
    • Arbitrarily extensible
    • Reflectively queryable
  • Unit of Structure
    • Constructor of Objects
    • Single Inheritance of Layout of Fields
      • Reference Types (Slots)
      • Value Types (Bits/Structs)
    • Intrinsic Aggregation and MI Composition through Interfaces
  • Unit of Privilege/Scope
    • Namespace
      • Container of shared fields (variables)
      • Scope for Message Selectors
    • Inheritance of Scope
      • SI via a single Superscope
      • MI through Importing

14
What is a Namespace?
  • Runtime unit of access and privilege
    • Unit of organization for variable binding scopes
    • Unit of organization for method access
    • Unit of organization for security
15
What is a Module?
  • Unit of packaging and deployment
    • All lexically named entities [classes, methods, etc] are owned by one and only one module.
  • Persistable repositories of code and media
    • Prerequisite’s manifest providing version, culture, and security data
  • Role performed by specialized types of classes
  • Implemented based on mainstream interop standards
    • COFF, PE, ELF, CodeFragments
    • Shared Libraries, DLL’s, EXE’s, OCX, CPL, etc
16
And, the Smalltalk is where?
  • SmallScript is AML[Smalltalk]
  • AML is XML with flexible syntax
    • Object Model Declarations
  • Smalltalk is one of many possible forms of method body source
17
Source code
Program representation
  • SmallScript source code structure is layered to support multiple languages
    • Examine Source Here
  • AML is a variant of XML entity-attribute structure, designed for humans to read and write programs.
  • AML enables semantic representation of programs, independent of the underlying coding language.
  • AML is the declarative language of the object model, based on imperative MOP facilities of the execution engine.
18
Source code
Program representation
  • AML Semantic Elements
    • Classes, Modules, Namespaces
      • Fields, Imports, Mixins, …
    • Methods, Enums, Evals
    • Resources, directives, …
  • Smalltalk you already know…
    • Eval methods
    • Behavior dictionary methods

19
SQL Database Demo
  • We will now explore what it takes to wrapper a native library of code and create an application that uses it.
20
Script Samples
  • We will now look at a number of small scripts that illustrate various language features of interest to developers and researchers.
21
Script Samples
  • VarArgs and printf
  • Graphics Classes and GDIResource
22
Academic Research Opportunities
  • Mixin Semantics
  • Ordered Multi-methods
  • Selector Namespaces and Secure Sandboxes
  • Behavioral Type System