# HG changeset patch # User Paul Boddie # Date 1383257498 -3600 # Node ID 1aa68ebc0df9fe13f56edb06091a1612879c36cf # Parent 4ed62788107079cf30b3420f3e7ceb95ccb45499 Updated the documentation to indicate that Syspython is the current output representation, and that the RSVP virtual machine and code generation will be developed separately. diff -r 4ed627881070 -r 1aa68ebc0df9 README.txt --- a/README.txt Thu Oct 31 17:18:31 2013 +0100 +++ b/README.txt Thu Oct 31 23:11:38 2013 +0100 @@ -1,18 +1,10 @@ -NOTE: This document needs updating for the separation of micropython and -NOTE: syspython functionality. - Introduction ------------ -Micropython is a language environment incorporating a compiler for a -simplified version of the Python programming language which targets a simple -instruction set supported by a virtual machine known as RSVP (a Really Simple -Virtual Processor). - -The RSVP instruction set is intended to map relatively closely to instructions -employed by real processors, with only a few "macroinstructions" which would -probably be implemented as short macros or library routines in programs -translated to the instruction set of a real target processor. +Micropython is a language environment incorporating static analysis tools and +a compiler for a simplified version of the Python programming language; this +compiler targets a simple target language called Syspython as well as +producing HTML reports describing the properties of Python programs. Prerequisites ------------- @@ -24,13 +16,14 @@ compiler package variant: http://hgweb.boddie.org.uk/python2.6-compiler-package-micropython/ +http://hgweb.boddie.org.uk/python2.7-compiler-package-micropython/ It should be sufficient to use the Python 2.6 package for systems running Python 2.5 or 2.6 since the underlying standard library does not seem to have changed significantly between these releases and the language syntax is -sufficiently similar. For Python 2.7, an appropriate variant may be preferable -or even required due to standard library and syntax changes in that release of -the language implementation, but this has not yet been tested in any depth. +sufficiently similar. For Python 2.7, the appropriate variant referenced above +is required due to standard library and syntax changes in that release of the +language implementation. Quick Start ----------- @@ -38,23 +31,17 @@ Currently, the test.py program is the principal means of compiling and running code. For example, to inspect the logical.py test program... - python -i test.py tests/logical.py -m + python -i test.py tests/logical.py -...will provide a number of objects which can then be inspected, notably the -rm (RSVP machine) object which provides the following methods: +...will provide a number of objects which can then be inspected. - * show - reveals the contents of the machine's memory - * run - starts execution of the code in the memory - * step - steps through the code one instruction at a time - * dump - shows the machine's registers +To generate Syspython programs, the -s option must be given along with a +target directory. For example: -To run a test and check the output, specify the -t option: - - python test.py tests/logical.py -t + python test.py tests/logical.py -s logical_program -To run all tests, use the test_all.py program: - - python test_all.py +The files in the indicated directory will then be suitable for processing by +tools that understand Syspython. Program Reports/Summaries ------------------------- @@ -92,14 +79,16 @@ credibility. If a toolchain cannot even produce working programs then any discussion of relative performance becomes academic. -Thus, an attempt has been made to make a genuine compiler and virtual machine -that can run and test compiled programs, hopefully modelling a sufficiently -realistic architecture without any unjustified shortcuts being taken to -produce the desired program behaviour. This virtual machine and the code -generation activity that is needed to exercise it can be regarded as -distractions from the principal merits of the software: the analysis activity -that attempts to define and indicate the structure and properties of a -reasonable subset of the Python language and its semantics. +Thus, an attempt has been made to make a genuine compiler and output +representation, together with a virtual machine that can run and test compiled +programs (previously part of this distribution, but now under separate +development), hopefully modelling a sufficiently realistic architecture +without any unjustified shortcuts being taken to produce the desired program +behaviour. This virtual machine and the code generation activity that is +needed to exercise it can be regarded as distractions from the principal +merits of the software: the analysis activity that attempts to define and +indicate the structure and properties of a reasonable subset of the Python +language and its semantics. With limited time to spend on the project, some activities are regarded as more rewarding than others. Making a viable virtual machine or runtime @@ -107,7 +96,10 @@ real machine architectures, at least if it is to be done in an optimal fashion. Experimenting with garbage collection strategies and memory allocation are interesting projects but can also be considered as peripheral -activities that can consume substantial amounts of effort. +activities that can consume substantial amounts of effort. Thus, the virtual +machine activity is now separate and the Syspython output representation has +been adopted as an intermediary between this work and the virtual machine +effort. It is therefore likely that interoperability with other projects and tools may take precedence over the production of a complete system that can target