PLaSM

functional language for computing with geometry

Tools

Several multi-platform tools are available for PLaSM, including an easy-to-use Integrated Development Environment (Xplode), a functionally equivalent IDE plugin for an industrial-strength open development platform (Eclipse), a large set of libraries for dimension-independent geometric modeling, documented in the book by Wiley, a visual programming framework based on only two graphical tokens, and producing high-levell executable code (Visual PLaSM). Support is also given for Knuth's Literate Programming with LaTeX (listings package).

Xplode IDE

Example

window
magnify

User interface

The Xplode window is divided into three panes: the upper part is the editor; the lower-left is the listener, for messages from the Plasm interpreter; the lower-right is a list of references to generated VRML models.

Xplode is a multiplatform IDE designed for the Plasm language. IDE stands for Integrated Development Environment, a program that embeds an editor and a connection with the compiler. So, you can edit your own programs with the editor window, and then compile your programs, or better, make the MzPlasm Interpreter evaluate your geometric definitions or expressions.

The source code is the same for all platforms (actually, there's just a little OS-dependant code). The binary distribution for MacOSX and Windows include the Qt library, since they're not included in any operating system version. The Linux binary distribution does not include the Qt library as any distribution ships the library. Check your distribution web site for the proper package. For a complete overview about software licenses, see the license page. For more information about the Qt Library, refer to the relative page.

PLaSM Eclipse Plug-In

Example

screenshot02
magnify

Eclipse is an open source community whose projects are focused on building an open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the lifecycle. A large and vibrant ecosystem of major technology vendors, innovative start-ups, universities, research institutions and individuals extend, complement and support the Eclipse platform.

This plugin provides an advanced IDE to develop in PLaSM and to export in various formats (even the outdated vrml ;))

The intent of the project is to port the features of the development tool for PLaSM, XPlode, using the general and well-know architecture of Eclipse, improving what XPlode already gave to the PLaSM environment. The language used is Java, and the OS (I hope) is not a constraint (still testing...).

PLaSM Libraries

The set of predefined libraries of PLaSM operators is listed here, grouped by library and then alphabetically ordered. The rationale and the implementation are discussed in the book by Wiley.

Functions are documented according to the format below. For sake of readability the preconditions are given using the same semantics of a PLaSM definition. The pre- and postconditions are predicates that must be satisfied by the function input and output, respectively.

NAME short description of how the function works
Pre/Post conds function prototype → type of returned value
Example function usage example

Visual PLaSM

User interface

visualplasm1
magnify

Gives a visual approach to functional programming with PLaSM, the design language used for geometric programming and the parametric generation of CAD models. A visual diagram is generated according to very few simple rules, and may be used both for automatically generating the PLaSM code and for the specification and distribution of computer tasks to be concurrently run in a multithread environment, either single or multi-host. The visual diagram of a computation may be used as a tool to make the code debugging easier and interactive, since it allows for inspecting each value in the functional environment with a single point-and-click interaction paradigm, as well as a user-interface to powerful generative CAD environments.

LaTeX support

Listings package

listings
magnify

Literate programming

Literate programming is the writing of computer programs primarily for human beings to read, similar to a work of literature; hence the name "literate programming." This contrasts with the traditional view that a programmer's primary creation is source code to be read by a computer.

Documentation and source code are written into one source file. Both the complete source code and its documentation can be extracted from this file with specific utilities. The information is written and presented in a reading order suitable for human consumption with detailed explanations. The code is automatically rearranged for ordinary processing by other computer tools, such as compilers or interpreters. (From Wikipedia)

The same file may contain both source code and its LaTeX documentation, and can be executed either by the PLaSM interpreter or by a LaTeX typesetting environment. This behavior is readily obtained by toggling between sources and comments though appropriately using the character %, which is both the comment toggle switch in PLaSM, and the start of a comment line in LaTeX.

For better typesetting results, use the LaTeX package Listings to add source code listings to LaTeX documents. It supports highlighting of all the most common languages, including PLaSM, and it is highly customizable.

PLaSM is Free Software and may be distributed under GNU GPL