The Eiffel Loop library collection
Finnian Reilly
[ Printable view ]
Contents
Overview of the
Eiffel Loop libraries
The Eiffel Loop library started life in 2002 with the port of a
small
logging framework written in Java the previous year. As it happened
Eiffel was a much more suitable language for implementing this
framework. This was a followed followed by a parsing and pattern
matching module and then based on this, various utilities and an
auto-editing framework. Later came various modules for XML processing
and extensions to the logging framework.
The libraries are far from being finished and more work is required
to bring them to maturity but I have decided to release them (May 2010)
as I believe many programmers would find at least some of the modules
quite useful. The EROS
network application framework showcases many features of the Eiffel
Loop library collection.
The most recent development phase has been Linux centric so some of
the digital processing modules developed on Windows have fallen into
disrepair but I hope to rectify this soon.
One of the more interesting DSP modules uses Macromedia Flash for
the
presentation layer. Unfortunately I no longer have access to the Flash
development environment to keep it maintained and cannot afford the
cost of purchasing a license.
The main goal now is to make all the modules fully implemented on
both Linux and Windows.
Library categories
Audio management
- Native Eiffel module to read and write wav audio file headers and
data.
- Eiffel interface to the eyeD3 Python library for reading and
writing ID3 audio tags.
- Unified Eiffel interface to both the libid3tag (C) and libid3
(C++) for reading and
writing ID3 audio tags.
Digital Signal
Processing
- Eiffel interface to the Windows sound input API allowing
streaming audio from the microphone to be processed in Eiffel
using
classes from the producer-consumer thread library. Implemented as a WEL
extension.
- Eiffel framework for buffering audio data into the Windows audio
output API. Can be used to create audio synthesizers.
- Eiffel interface to the Praat sound analysis engine and script
interpreter. Praat is an open source tool used by linguists for
analyzing speech. The interface allows Praat scripts to be run from
Eiffel and
the resulting values of script variables to be retrieved.
- Eiffel/ActionScript 2.0 framework for building applications that
analyze microphone input in real-time in the Praat speech analysis
engine and visually representing the results in Macromedia Flash.
The
microphone status is presented in an Eiffel GUI as an overlay to a
Flash presentation. Synchronized opening and closing of Flash/Eiffel
applications gives the illusion of a single application.
Multi-threading
- A generic producer-consumer thread communication framework where
a producing thread places products onto a queue for consumption by a
consumer thread.
- Features:
- Implementation of a single consumer thread consuming
the products of a single worker thread.
- Implementation of multiple consumer threads
consuming
the products of a single worker thread.
- Vision2 extension allowing products of a thread to be consumed
by the main GUI application thread.
- Specialized consumer-producer thread classes for agent action
consuming.
- A Vision2 extension framework for building proxy interfaces to
GUI components that are callable from non-GUI threads. Allows non-GUI
threads to asynchronously call routines that call Vision2
routines.
- Intermittent timed event framework
- Specialized "action loop" thread classes with a number of
variations:
- Intermittently repeat an action with a specified sleep interval
until signaled to stop.
- Continuously repeat an action until signaled to stop.
- Continuously repeat an action until receiving a signal to
suspend or exit. Remains suspended unless signaled to resume or exit.
- A generic synchronization monitor allowing synchronization on
an object to be protected with a contract requiring that the object is
locked before being referenced. It is integrated with the logging
framework to help detect deadlock conditions. If a thread needs to wait
for a lock on a synchronized object, both the waiting and acquiring of
the lock is logged in the thread's log.
- Container cell class for numeric types shared across threads.
Features thread safe increment, decrement, add and subtract operations.
- Thread safe queue and stack container classes.
Logging
Logging framework with the following features:
- Output is indented to reflect the state of the call stack. Shows
the entry and exit from routines in a way that is designed to mimic the
routines code definition.
- Global filtering mechanism to restrict output to selected classes
and routines. A wildcard character can be used to log all routines for
a
particular class.
- Integrated with UI component to switch thread context visible in
console.
- Support for both Vision2 and WEL GUI toolkits.
- Thread contexts selectable from a dialog
drop down list
- Thread selection history navigation buttons with browser style
ALT
left/right arrow keyboard shortcuts
Client-server network
- EROS,
an XML orientated remote procedure call application
framework with an
original protocol based purely on XML processing instructions rather
that any special XML tags.
- Features:
- Easily create multi threaded XML-RPC applications in Eiffel.
- Allows standard XML documents (SVG, XHTML etc) to be turned
into procedure calls with the addition of a single processing
instruction.
- Based on framework that allows flexible mapping of XML data to
native Eiffel objects. Represent your XML data in Eiffel any way you
want. Skim off as little or as much data from the document as you need.
Much more efficient than DOM based approach.
- Deserialization (XML->Eiffel) uses declarative xpath to
setter mapping arrays. Multi context mapping greatly simplifies
deserialization of complex documents and eliminating the need for very
long absolute XPaths. Instead define a number of XML contexts with
shorter relative xpaths.
- Serialization (Eiffel->XML) uses Evolicity the Eiffel Loop
templating mini language (Similar to Apache Velocity). Evolicity
supports multi context serialization to simplify serialization of
complex Eiffel structures.
- Develop your remotely accessible application components on
single threaded console test harness and deploy on multi-threaded
server with thread output and performance monitor.
- Demo application to calculate Fourier transformations based on
Greg Lee's Numeric Eiffel Library.
- Server GUI to control startup/shutdown and thread log output
context switching in command console. Easily see whats happening with a
large number of threads with browser like navigation controls.
- Server GUI monitors 11 different performance characteristics.
- Eiffel/Flash ActionScript framework allowing Eiffel to make
asynchronous calls to ActionScript procedures in a Flash application
using simple XML messages. Also allows Flash button clicks to be
actioned in Eiffel application.
- Extension to Eiffel Software FTP_PROTOCOL class making it easy to
upload files, create remote directories and perform other common FTP
operations.
Application management
- Eiffel binding to Windows dll for creating and editing Windows
short cuts.
- Eiffel binding to Python library for creating and editing Gnome
menus.
- Framework for creating installer applications for Windows.
- Framework for creating self installing multi-mode applications on
Linux/Gnome (Windows version to follow). Features:
- Define application sub menus
- Define application menu launchers
- Define launcher as file context Nautilus action script.
- Framework design is multi-platform.
- Framework for managing multiple applications in a single Eiffel
project. Applications are selected for launch by a command line switch.
Useful for managing many experimental variants of a single application.
Integrated with "self installing app" framework.
GUI
- An Windows application configuration framework integrating user
editions with command line parameter options. Features:
- MVC style binding of edit controls to textual, numeric and file
name field containers.
- Possible to register listeners for field containers value
changes.
- A UI framework based on WEL library for creating applications
that do directory tree file processing.
- Features:
- Input and output directory selection
- Files processed count monitor
- Cancel batch button
- Framework for managing installed application graphics integrated
with scons application build process.
- Various UI components based on Vision2 GUI library including:
- Panel with On/Off status lights and configurable bulb icons.
- Text box specialized for user selected directory paths
- Slider control for integer interval with proportional setter
procedure
- Task completion bar display component for worker threads.
- Grid of radio buttons component
- Various UI components based on WEL GUI library including:
- Audio input level indicator
- Panel with On/Off status lights
File naming and
processing
- A framework for processing file trees.
- A memory efficient file and directory name list container
- Library of routines for managing file and directory paths.
Text processing
- A parsing and lexing library that allow grammars and text
patterns to be completely specified in Eiffel without precompilation.
- Features:
- Navigate of grammar structures in EiffelStudio.
- agent based pattern match handling
- A total of 21 kernel patterns constructs and 18 derived
patterns.
- For
readability patterns are described textually in preference to regular
expressions.
- Same pattern matching engine is used for both text strings and
token strings.
- Collection of patterns to search for Eiffel code fragments.
- Collection of patterns to search for C code fragments.
- Collection of patterns to search for XML code fragments.
- A framework for creating automated text file editors operating on
directory source trees. Based on the Eiffel Loop parsing and lexing
library, it is able find and replace complex patterns with equally
complex editions. It is both simpler and more powerful than the Unix
sed utility. Programs are more readable than Perl scripts and equally
powerful. Suited to creating tools for migrating a source tree to a
different platform or compiler. If a new version of the source tree
comes a long the migration tool you created for the previous version
will probably still work.
- Evolicity, an Eiffelized version of the Apache
Velocity text substitution scripting language allowing Eiffel data
to
be easily interpolated into plain text. Evolicity was created using the
Eiffel Loop parsing and lexing framework.
XML processing
- Eiffel
interface to the VTD-XML
XML parser. VTD-XML is arguably the world's top performing XML
parser and xpath 1.0 implementation both in terms of speed and
memory efficiency. The
Eiffel interface actually represents an improvement over the original C
and Java API. It supports nested
xpath queries and is much more developer friendly requiring fewer
objects to manage.
- Eiffel
interface to the Expat XML
parser that is significantly faster than the GOBO parser.
- High performance XPath event processor based on declarative
mapping of xpaths to Eiffel agents using a minimal subset of xpath
query language.
- An XML deserialization framework based on declarative mapping of
relative xpaths to Eiffel builder agents. A builder agent is a routine
that constructs some part of an Eiffel object.
- Key features:
- Ability to define many mapping contexts for a single document.
All Xpaths defined within a context are relative to a parent context.
- Allows flexible mapping of XML documents to Eiffel models
composed of an arbitrary number of classes.
- Supports recursive data models.
- Uses a small subset of the xpath query language.
- Supports xpath mapping based on attribute value predicates,
i.e. Expressions of the form AAA/BBB[@x='y'] may be used to map
building agents.
- A framework for serializing Eiffel objects as XML based on the
Eiffel Loop text substitution scripting language, Evolicity.
- A DOM like mini framework for modeling XML in Eiffel.
- A parser for an alternate "Pythonized" XML syntax called Pyxis
(Acronym
for PYthonic Xml Ideal Source). The
goal is to have a
more readable
text for XML configuration files.
External Language
integration
- An advanced framework for wrapping Java classes that adds a layer
of abstraction to Eiffel Software's Java2Eiffel library. It is based on
the concept of a Java agent in Eiffel (JAVA_FUNCTION or JAVA_PROCEDURE
inheriting JAVA_ROUTINE) that is analogous to an Eiffel agent. JAVA_ROUTINE's
automatically generate correct JNI call signatures. Allows the creation
of recursively wrapped classes where the arguments and return types to
wrapped routines are themselves wrapped classes.
- An extension to the PEPE
framework for wrapping Python libraries that automates the process
of converting Eiffel types to Python types and vice-versa.
- A framework for calling Matlab scripts and Matlab scripts that
have been compiled into C, and processing the results in Eiffel.
- A framework for running Praat speech analysis scripts in Eiffel
and processing the results.
- Container library for sharing data with C/C++ programs including:
- C strings covering all permutations of little and big endian 8,
16 and 32 bit characters.
- Wrapper for C numeric arrays.
Math
- Basic column and row vector implementation
Structures
- An extension to the standard Elks ARRAY class that
allows memory area sharing on sub arrays. Possible to see up to a 100%
performance increase on digital processing applications which make
heavy use of ARRAYs. (Standard Elks subarray function makes a copy of
the subarray. Safe but not very efficient.)
- Memory efficient form of numeric lists with many repeats
implemented as run length encoded arrayed lists.
- Numeric array serialization.
OS interaction
- Cross
platform Eiffel interface to various OS file system commands including:
- File
listing
- Directory
listing
- Directory
moving, copying and deleting.
- File moving,
copying and deleting.
- A
command string variable substitution component
Accessories
Development tools
Code editing
- Automatic code editor that operates on the gcc source code
tree of the Praat linguistics tool. The editor adds hooks for an Eiffel
interface and modifications allowing
compilation with the MS VC++ compiler.
- Build
tool for commenting out logging lines in Eiffel source code.
- Tool
for normalizing Eiffel source code file names to match class names.
- Eiffel
class renaming tool that is faster than EiffelStudio.
Build tools
- A script to manage OS environments from a project Python script
and launch EiffelStudio.
- An extension to scons build system for Eiffel projects with the
following features:
- Select freeze or finalize build
- Builds any Eiffel library precompiles using a standard
SConstruct
- Checks for existence of SConstruct to build C dependencies
- Installs application graphics specified with an extra ECF tag
into standardized directories locatable by an Eiffel class.
- Migration tool to translate an Eiffel configuration file written
in the Pyxis data format to XML format. Pyxis is an alternate
"Pythonized" XML syntax devised by Finnian
Reilly.
Applications
- Documentation tool to create a class inventory in HTML format
from an Eiffel source tree.
- A web publishing application configured by an XML script to
create multiple views of HTML documents created in the Thunderbird
email client HTML editor.
- An application to perform off-site archiving of project files
featuring:
- Backups scripted with XML.
- File filtering and wildcards.
- Optional cyclical versioning upto a maximum version.
- Optional gpg encryption for selected directories.
- Archive compression.
- Offsite transfer of all archives via ftp.
Download
http://www.eiffel-loop.com/download/Eiffel-Loop.1.0.tar.gz