Understand how to render a reformed programming language!
This project introduces a process for defining a new programming language called Ada/PM. Organized with the novice programmer in mind, the project begins by developing a grammar suitable for top down, recursive descent parsing. The aim is to simplify and standardize a reduced set of constructs and data types then synthesize them into a bi-level programming facility where low-level assembly instructions can be inserted into high-level source code.
The project culminates by recording in a single reference document the standard features and changes made to Ada/PM and the rationale behind those changes. It should be noted that Ada/PM is composed of concepts derived from Ada, Pascal, Modula, and assembly; therefore, it is not a strict subset of any single language. More generally, Ada/PM represents a 64-bit programming language optimized for high-performance numeric processing and sophisticated string manipulation.
Criteria for a good programming language are driven by how the language is going to be used and what kind of data are going to be manipulated. The purpose of this project is to develop an efficient high-level programming language that integrates low-level assembly language instructions right in the source code. The justification for using this mixed-mode approach is to make it easy to practice using assembly language mnemonics to gain an understanding of how systems works at the processor level. Implicit design features for this reformed programming language include readability, consistency, safety, and ease of compiler design.
Ada/PM aims to make the best use of language technology to teach assembly language programming and compiler design!
This project covers the following topics:
Ada/PM embraces ideas inspired by the Algol-60 family of languages. It employs a high-level syntax that insulates programmers from the underlying machine architecture while allowing low-level assembly language statements to be inserted into the source code.
Ada/PM uses a highly standardized, syntactically simple grammar designed to facilitate program and compiler development. The language is expressly designed for high-performance number processing and sophisticated string manipulation.
Ada/PM is deliberately scaled in size and scope. The development of complex, commercially viable software applications generally involves large project teams with seemingly unlimited resources. The approach used in this project assumes resources are constrained and not unlimited.
Ada/PM is focused primarily on an orthogonal core syntax, reduced set of constructs, and extendable functionality. These criteria help make Ada/PM a modern, specialized programming language suitable for learning assembly language and constructing a compiler.
Ada/PM initially uses command-line tools to save time and resources. Once the language is finalized and a working compiler is developed, an integrated development environment (IDE) project will follow.
A great way to learn assembly language is to start using it with high-level source code.
Ada/PM Reference Manual is both a complete reference document and rationale for the Ada/PM programming language. Offered in three formats: softcover book, PDF document, and Windows help file, each format explains how Ada/PM derives many of its syntactic concepts from predecessor programming languages. Chapters progress from introductory explanations of central design decisions to detailed discussions of the language's features. Special attention is paid to connecting the foundations of grammar formalization to the implementation of a domain-specific programming language solution. Ideal for novice and experienced Ada/Pascal and C/C++ programmers, this project concentrates on defining a context-free grammar suitable for LL(k) recursive descent parsing, translating the grammar into a set of Ada-like EBNF production rules, and ensuring the language is easily translated by a hand-crafted compiler.
Note that Ada/PM is a highly specialized programming language incorporating optimal constructs found in many Algol-60 decendent programming languages. It also embraces low-level programming features and strong static type checking, which strives to produce error-free code containing few user surprises. For these reasons, Ada/PM relies on ample quantities of storage space for key language features to ensure accuracy, contextual compliance, and program safety.
Ada/PM Reference Manual is the essential guide to writing safe and reliable software applications. This project is intended for novice programmers and computer science students desiring an introductory foundation to an imperative programming language that combines inline assembly language instructions with high-level procedural-based programming code.
Designing a new programming language represents a significant undertaking in time and resources. Our purpose for creating a new programming language is to understand how to specify a language and build a compiler to convert its instructions to machine-readable code.
On the other hand, the main reason most programming communities embark on the task of creating a new programming language is to overcome the limitations of current languages and to create a language that meets specific programming requirements. As an example, Pascal was developed as a teaching language, C was developed as a cross-platform systems language, and Ada was created to standardize embedded programming languages from the multitude of vendor languages available to the DoD.
An outstanding programming language gives users what they want; a language they will love. It is just as easy to design a good language as it is a bad one. The fundamental language itself should be concise, but include adequate library functions to expand its power. The manual should be short as well. A well-designed language does not need lengthy clarifications, numerous warnings, or lots of special case examples.
Whatever the language you learn, understanding the decisions that went into its design and development help you use it more efficiently.
The expressive power of a language concerns the breadth of ideas that can be represented and communicated in that language. Ada/PM contributes to expressiveness by providing exceptional functionality, first-class functions, garbage collection, minimal syntactic sugar, and both static and inferential type checking.
Imperative programming uses procedural-based programming constructs. Ada/PM is memory safe, meaning it prevents memory leaks and buffer overflows through bounds checking. Ada/PM is type safe, meaning it prevents type errors through strong typing, enforced declarations, and improper casting.
Imperative languages are based on the von Neumann microprocessor architecture. In a von Neumann machine, both data and programs are stored in the same memory. The CPU, which executes instructions, is a separate block of circuitry from memory. The central constructs of imperative languages are variables.
Ada/PM is reliable because it performs to its specifications under all programming conditions and is highly readable and writeable. The easier a program is to write, the more likely it is to be correct. Programs that are difficult to read are often hard to write and modify. Reliability also comes about through strict type checking, exception handling, non-support for aliasing, and many other built-in syntax designs.
Ada/PM emphasizes program readability over program writeability, provides efficient and straightforward compilation, has built-in extensibility and modularity, and is highly orthogonal and safe.
As with any imperative programming language, Ada/PM is focused on storing program instructions, declaring typed objects, elaborating and storing the objects as data, and then manipulating those data using type-specific operations. Ada/PM operations are further strengthened by the use of packages that separate interfaces from the implementation code and by employing contracts between software components to verify code correctness.
Ada/PM's bi-level structure offers two levels of program development. At the high level, Ada/PM's expressive syntax is specifically designed to free users from the intricate details of the underlying system architecture. At the low level, Ada/PM provides extensive features explicitly designed to allow direct access to system hardware and external libraries using native inline assembly language instructions.
Ada/PM is an imperative general-purpose, structurally expressive programming language with static type checking, intuitively readable constructs, and built-in concurrency, encapsulation, exception handling, object-oriented structures, modularity, and extensibility.
Be aware that no software programming language can be all things to all programmers and Ada/PM is no exception. Ada/PM doesn't attempt to incorporate every possible language or library feature ever dreamed up just because they exist.
Ada/PM is implemented as a bi-level, procedurally imperative language for special-purpose systems programming where variable length string processing, extended precision arithmetic operations, and machine-level hardware access are primary requirements. As a high-level programming language, Ada/PM provides a rich set of abstract constructs that insulates programmers from the underlying machine architecture. To accomplish this, Ada/PM borrows conceptual features found in languages like Ada 2012, C11/C++17, Go, Modula, Oberon, Pascal, and SPARK 2014.
At the low-level, Ada/PM accepts inline assembly language instructions in order to extend the language's capabilities beyond what high-level languages typically are capable of offering. Ada/PM uses the Netwide assembler to translate program instructions into machine-readable code.
There are many excellent compilers built using C/C++ or even Java. This website focuses on designing and writing a 64-bit compiler using C as the bootstrap compiler, and eventually Ada/PM, which will be used to write its own compiler.
One hallmark of a cogent programming language is its user's manual. Ada/PM Reference Manual is designed to assist users in learning how to build practical applications using the Ada/PM programming language. This straightforward guide covers the many detailed features of the Ada/PM programming language. It incorporates example programs accompanied by programming tips, recommended practices, and learning exercises to ensure a complete understanding of Ada/PM's range of features.
Programmers who develop software are often constrained by the limits placed on the kinds of control structures, data structures, and abstractions they can use. The author decided that Ada/PM should be easily read, simple to write, and highly reliable.
One of the most important criteria for a programming language is the ease with which source code can be read and understood. Readability goes to the heart of overall syntactic simplicity, orthogonality, and data types.
Ada/PM is designed with a fundamentally small number of syntax constructs and reserved words, reduced ways to accomplish particular operations using legal syntax combinations, and restricted operator overloading and aliasing. Ada/PM achieves an optimal balance in orthogonal design.
Writability is a characteristic that measures how easy it is to write and create program code for a specified software domain. It is a well-known fact that the easier a program is to write, the more likely it is to be correct. Although Ada/PM's smaller number of constructs can be combined in many ways, they are consistently employed with a standard set of rules. Ada/PM is expressive.
Ada/PM also makes its computations convenient to use rather than cumbersome; there are no short-circuit constructs as found in other high-level programming languages. Ada/PM supports abstraction, which means it has the ability to define and use complicated structures and operators in ways that allow many of the details to be ignored.
Ada/PM achieves reliability through strict type checking; bounds checking; exception handling; and restricted use of anonymous types, aliasing, and operator overloading.
A component library represents a collection of routines that extend the capability of a programming language and can be reused in many programs. Most programming languages include some form of libraries that perform text, math, input and output, and machine-level services. Most libraries must be declared in a program before they can be used.
Although the goal of many languages is to be able to write their libraries in their own language, this is not always possible or desirable. Our philosophy is to use popular, well-tested library components where possible using Win64 API and 64-bit C runtime library functions. We strive to not reinvent the wheel when these time-proven facilities are generally available to all Windows programmers.
Copyright © 2020 PMzone. All rights reserved. Terms of Use