Extend C With Lua

  1. Lua 5.3 Manual
  2. Lua Installation Guide

How to embed Lua 5.1 in C++

See full list on chsasank.github.io. Now, we will see how to extend Lua with new types written in C. We will start with a small example that we will extend through the chapter with metamethods and other goodies. Our example is a quite simple type: numeric arrays. The main motivation for this example is that it does not involve complex algorithms, so we can concentrate on API issues. Extending Lua: Making your own libraries. 1: The Lua Sources. 2: A C compiler - cc/gcc/g for Unix, and Visual C for Windows. Other compilers should work under Windows, basically any C compiler - I will cover compiling under Windows at the end of the tutorial.

June 7th, 2008 mysurface Posted in Developer, Lua | Hits: 74662 | 3 Comments »


Lua, is a scripting language providing dynamic data structures, maths, io and string manipulations just like any interprete language such as Bash, Python, Ruby etc.

What is so special about Lua?
Lua is Fast, Light-weight and Embeddable.

Lua can be embedded into c and c++ programs and Lua core are statically complied with your c++ programs, meaning your c++ program itself are now becoming Lua interpreter that execute Lua scripts. To extend your c++ application to execute Lua script is simple, lets check it out.


Before you start, please download and install Lua from HERE.
Disclaimer: My example are based on Lua 5.1.3.

1. Create a simple Lua script and name it as foo.lua.

2. Write a cpp program clua.cpp to execute foo.lua.

Lua API are in c format, in order to make it work with C++ you need to extern “C”. luaL_openlibs(L) loading up all the basic libs such as IO, String, Math etc. I believe if you are using Lua 5.0, you have to replace luaL_open(L) to load the libs one by one like this:

3. Compile the clua.cpp with g++.

IMPORTANT! You need to link you program with libdl besides liblua. I believe the use of luaL_openlibs() are calling dlopen, dlclose, dlerror, dlsym which needs libdl.

Else you may get linking error like this:

4. Execute your c++ app

Cool isn’t it?

Lets try to change foo.lua into this:

Now, run ./clua again! You name will be in RED, check out text color example HERE

Ofcause, in order to really extend your c++ apps to Lua script, you need more than lua_dofile(), you need to allow Lua script calling your c++ functions, you may need to access variables from Lua to c++ and vice versa. Well, mean while I am still learning, I will share more when I learn more tricks!

Reference and Tutorial!
Lua provides excellent documentation:

I am dilemma here whether should I post this at https://linux.byexamples.com or http://cc.byexamples.com. As an introduction post for Lua programming, I will put it on both blogs. For future post, if I write about Lua scripting, I will post at https://linux.byexamples.com and if I write about Lua C++ API, it will be at http://cc.byexamples.com.

Hope you enjoy this post, and start to script with Lua.
@lightstar: In case you are reading this, I would like to say thank you for introduce this wonderful language to me, I enjoy it very much!

Related Posts
Cool Ajax irc client that can be embed into your blogs
This is not a 'LINUX' application, not a command line or any tools that only runs under linux platform. But this is too ...
The social web browser – Flock
Nowadays, we don't get ourself online just to search for information. Through internet we always get connected with ...
xsnow, brings Christmas to your desktop
Xsnow is a desktop toy that was originally created as a virtual greeting card for Macintosh systems back in 1984. In...
reprint fromSoftware: Practice & Experience26 #6 (1996) 635–652.Copyright © 1996 John Wiley & Sons, Ltd.[ps·doi]

byRoberto Ierusalimschy,Luiz Henrique de Figueiredo,Waldemar Celes Filho

Lua 5.3 Manual

Abstract.

This paper describes Lua,a language for extending applications.Lua combines procedural features with powerfuldata description facilities,by using a simple, yet powerful, mechanism of tables.This mechanism implements the concepts of records, arrays,and recursive data types (pointers),and adds some object-oriented facilities,such as methods with dynamic dispatching.Lua presents a mechanism of fallbacksthat allows programmers to extend the semantics of the languagein some unconventional ways.As a noteworthy example, fallbacks allow the user to adddifferent kinds of inheritance to the language.Currently, Lua is being extensively used in production forseveral tasks,including user configuration,general-purpose].

Unlike other languages that implement associative arrays,such asAWK [10],Tcl [11], andPerl [12],tables in Lua are not bound to a variable name;instead, they are dynamically created objectsthat can be manipulated much like pointers in conventional languages.The disadvantage of this choice is thata table must be explicitly created before used.The advantage is that tables can freely refer to other tables,and therefore have expressive power to modelrecursive data types,and to create generic graph structures,possibly with cycles.As an example,Figure 4 shows how to build circular linked lists in Lua.

Figure 4: A circular linked list in Lua.

Lua provides a number of interesting ways for creating a table.The simplest form is the expression {},which returns a new empty table.A more descriptive way,which creates a table and initializes some fields,is shown below;the syntax is somewhat inspired in the BibTeX [13] database format:

This command creates a table,initializes its fields x, y, and foreground,and assigns it to the variable window1.Note that tables need not be homogeneous;they can simultaneously store values of all types.

A similar syntax can be used to create lists:

This statement is equivalent to:

Sometimes, more powerful construction facilities are needed.Instead of trying to provide everything,Lua provides a simple constructor mechanism.Constructors are written name{...}, which is just syntactic sugar forname({...}).Thus, with a constructor, a table is created, initialized,and passed as parameter to a function.This function can do whatever initialization is needed,such as (dynamic) type checking, initialization of absent fields,and auxiliary data structures update, even in the host program.Typically, the constructor function is pre-defined, in C or in Lua,and oftenconfiguration users are not aware that the constructor is a function;they simply write something like:

and think about “windows” and other high level abstractions.Thus,although Lua is dynamically typed,it provides user controlled type constructors.

Because constructors are expressions,they can be nested to describe more complex structuresin a declarative style,as in the code below:

Extend C With Lua

Reflexive facilities

Another powerful mechanism of Lua is its abilityto traverse tables, using the built-in function next.This function takes two arguments:a table to be traversed and an index of this table.When the index is nil, the function returns a firstindex of the given table and the value associated to this index;when the index is not nil,the function returns a next index and its value.The indices are retrieved in an arbitrary order,and a nil index is returned to signal the end of the traversal.As an example of the use of Lua's traversal facilities,Figure 5 shows a routine for cloning objects.The local variable i runs over the indices of the object o,while v receives their values.These values, associated to their corresponding indices,are stored in a local table new_o.

Figure 5: Function to clone a generic object.

The same way next traverses a table,a related function, nextvar,traverses the global variables of Lua.Figure 6 presents a function that savesthe global environment of Lua in a table.As in function clone,a local variable n runs over the names of all global variables,while v receives their values,which are stored in a local table env.On exit, the function save returns this table,which can be later given to functionrestore to restore the environment (Figure 7).This function has two phases.First, the whole current environment is erased,including predefined functions.Then,local variables n and vrun over the indices and values of the given table,storing these values in the corresponding global variables.A tricky point is that the functions called by restoremust be kept in local variables,because all global names are erased.

List

Figure 6: Function to save Lua environment.

Figure 7: Function to restore a Lua environment.

Although it is an interesting example,the manipulation of the global environment in Lua isscarcely needed,since tables, used as objects, provide a better wayto maintain multiple environments.

Support for object oriented programming

Because functions are first class values,table fields can refer to functions.This property allows the implementation of someinteresting object-oriented facilities,which are made easier by syntactic sugar fordefining and calling methods.

Lua Installation Guide

First, method definitions can be written as

which is equivalent to

That is, an anonymous function is created and stored in a table field;moreover, this function has a hidden parameter called self.

Second, a method call can be written as

which is translated to

In words, the receiver of the method is passed as its first argument,giving the expected meaning to the parameter self.

It is worthwhile to note some characteristics of the above construction.First, it does not provide information hiding.So, purists may (correctly) claim that an important part ofobject orientation is missing.Second, it does not provide classes;each object carries its operations.Nevertheless,this construction is extremely light (only syntactic sugar),and classes can be simulated using inheritance,as is common in other prototype based languages,like Self [14].However, before discussing inheritance,it is necessary to discuss fallbacks.

Fallbacks

Being an untyped language, Lua has a semantics with many run-timeabnormal conditions.Examples are arithmetic operations applied to non numerical operands,trying to index a non table value, or trying to call a non function value.Becausehalting in these situations would be unsuitable for an embedded language,Lua allows programmersto set their own functions to handle error conditions;such functions are called fallback functions.Fallbacks are also used to provide hooks to handle other situationsthat are not strictly error conditions,such asaccessing an absent field in a table andsignaling garbage collection.

To set a fallback function,the programmer calls the function setfallback,with two arguments:a string identifying the fallback,and the new function to be called whenever the corresponding condition occurs.Function setfallback returns the old fallback function,so programs can chain fallbacks for different kinds of objects.

Lua supports the following fallbacks,identified by the given strings:

'arith', 'order', 'concat'
These fallbacks are called when an operationis applied to invalid operands.They receive three arguments:the two operands and a string describing the offended operator('add', 'sub', ...).Their return value is the final result of the operation.The default functions for these fallbacks issue an error.
'index'
This fallback is calledwhen Lua tries to retrieve the value of an index not present in a table.It receives as arguments the table and the index.Its return value is the final result of the indexing operation.The default function returns nil.
'gettable', 'settable'
Called when Lua tries to read or write the value of an indexin a non table value.The default functions issue an error.
'function'
Called when Lua tries to call a non function value.It receives as arguments the non function value and the arguments given inthe original call.Its return values are the final results of the call operation.The default function issues an error.
'gc'
Called during the garbage collection.It receives as argument the table being collected,and nil to signal the end of garbage collection.The default function does nothing.

Before going on,it is important to notice thatfallbacks are not usually set by ordinary Lua programmers.Fallbacks are used mainly by expert programmers when binding Lua to aspecific application.After that, the facility is used as an integral part of the language.As a typical example,most real applications use fallbacks to implement inheritance,as described below,but most Lua programmers use inheritance without even knowing (or caring)how it is implemented.

Using fallbacks

Figure 8 shows an example that uses fallbacksto allow a more object oriented style of interpreting binary operators.When this fallback is set, expressions like a+b,where a is a table,are executed as a:add(b).Notice the use of the global variable oldFallback tochain fallback functions.

Figure 8: An example of fallbacks.

Another unusual facility provided by fallbacksis the reuse of Lua's parser.Many applications would benefit from an arithmetic expression parser,but do not include one because not everyone has therequired expertise or the inclinationto write a parser from scratch or to use a parser generator such as yacc.Figure 9 shows the complete implementation of anexpression parser using fallbacks.This program reads an arithmetic expression on the variablesa, ..., z,and outputs the series of primitive operations needed toevaluate the expression,using variables t1, t2, ... as temporary variables.For example,the code generated for the expression

is

The main part of this program is the function arithfb,which is set as a fallback for arithmetic operations.Function create is used to initialize the variablesa, ..., z with tables, each with a field namecontaining the variable name.After this initialization,a loop reads lines containing arithmetic expressions,builds an assignment to the variable E and passes it to theLua interpreter, calling dostring.Every time the interpreter tries to execute code like a*a,it calls the 'arith' fallback, since the value of a isa table, not a number.The fallback creates a temporary variable to storea symbolic representation of the result of eachprimitive arithmetic operation.

Although small,this code actually performs global common sub-expressionidentification and generates optimized code.Notice in the example abovehow a*a+b*b and a*a-b*b are both evaluatedbased on a single evaluation of a*a and b*b.Notice also that a*a+b*b is evaluated once only.Code optimization is done simply by caching previously computed quantities ina table T,indexed by a textual representation of the primitive operations,whose values are the temporary variablescontaining the results.For example, the value of T['mul(a,a)'] is t1.

The code in Figure 9 can be easily modified to handlecommutativity of addition and multiplication and anti-commutativity ofsubtraction and division.It is also easy to change it to outputpostfix representations or other formats.

In a real application,the variables a, ..., z would represent application objects,such as complex numbers, matrices, or even images, andthe 'arith' fallback would call application functions to perform theactual computation on these objects.Thus,the main use of Lua's parser is to allow programmers to usefamiliar arithmetic expressions to represent complex calculations onapplication objects.

Figure 9: An optimizing arithmetic expression compiler in Lua.

Inheritance via fallbacks

Certainly,one of the most interesting uses of fallbacksis in implementing inheritance in Lua.Simple inheritance allows an object to look for the value ofan absent field in another object, called its parent;in particular, this field can be a method.This mechanism is a kind of object inheritance,in contrast to the more traditional class inheritance,adopted in Smalltalk and C++.One way to implement simple inheritance in Lua is to storethe parent object in a distinguished field,called parent for instance,and set an index fallback functionas shown in Figure 10.This code defines a function Inherit and sets itas the 'index' fallback.Whenever Lua attempts to access a field that is absent in an object,the fallback mechanism calls the function Inherit.This function first checkswhether the object has a field parent containing a table value.If so, it attempts to access the desired field in this parent object.If this field is not present in the parent,the fallback is automatically called again;this process is repeated “upwards” until a valuefor the field is found or the parent chain ends.

Figure 10: Implementing simple inheritance in Lua.

The above scheme allows endless variations.For instance, only methods could be inherited,or only fields starting with an underscore.Many forms of multiple inheritance can also be implemented.Among them, a frequently used form is double inheritance.In this model, whenever a field is not found in the parent hierarchy,the search continues through an alternative parent,usually called 'godparent'.In most cases, one extra parent is enough.Moreover,double inheritance can model generic multiple inheritance.In the code below,for instance,a inherits from a1, a2, and a3,in this order:

The use of Lua in real applications

TeCGraf is a research and development laboratory atthe Pontifical Catholic University in Rio de Janeiro (PUC-Rio)with many industrial partners.Some forty programmers at TeCGraf have used Lua in the past two yearsto develop several substantial products.This section describes some of these uses.

Configurable report generator for lithology profiles

As mentioned in the introduction, Lua initially arose for supportingtwo different applications that had their own, but limited, extensionlanguages.One of these applications is a tool for visualizing lithologyprofiles obtained from geological probes.Its main characteristic is to allow the user to configure profile layout,combining instances of objects and specifying the data to be shown.The program supports several kinds of objects, such as continuous curves,histograms, lithology representation, scales, etc.

To build a layout,users may write Lua code describing these objects(Figure 11).The application itself also has Lua code that allows the creation ofsuch descriptions by means of a graphical user interface.This facility was built over the EDG framework, described below.

Figure 11: Description of a lithology profile object in Lua.

Storing structured graphical metafiles

Another important use of Lua is for the storage ofstructured graphical metafiles.The generic drawing editor TeCDraw, developed by TeCGraf,saves metafiles containing high level descriptions, in Lua, of the graphicobjects that compose the drawing.Figure 12 illustrates these descriptions.

Figure 12: A excerpt from a structured graphical metafile.

Such generic structured metafiles bring several benefits for development:

  • As a direct consequence, the Lua interpreter can be used to load andparse the metafile;the editor only providesfunctions for holding Lua objects and converting them to thecorresponding application objects.
  • Applications can share graphical objects by usingthe same metafile format.Moreover,graphical objects generated in such applications can be edited with TeCDraw.
  • The structured description with Luasyntax makes the metafile editable by humans:it is easy to identify and modifyan object using conventional text editors.
  • Since each object iseasily identified, it can be individually manipulated.This feature is exploited in the EDG systemfor implementing support to active graphic objects.
  • A graphical metafile in Lua allows the instantiation ofprocedural objects.For example, it is possible to describe curves usingmathematical expressions.

High level, generic graphical data entry

Lua features are also heavily exploited in the implementation of EDG,a system for supporting the development of data entry programs,with high abstraction level.The system provides manipulation of interface objects(such as buttons, menus, lists) and graphic objects(such as lines, circles, and groups of primitives).Hence, programmers can build sophisticatedinterface dialogs in a high abstraction programming level.Programmers can also associate callback actions to graphic objects,thus creating active objects that react procedurally to user input.

The EDG system uses the Lua fallback feature for implementingdouble inheritance, as explained above.Thus, new interface and graphic objects can be built,inheriting original object behavior.Another interesting use of inheritance present in EDG iscross-language inheritance.EDG is built upon the portable user interface toolkit IUP [15].To avoid duplicating in Lua IUP data residing in the host,EDG uses fallbacks for 'gettable' and 'settable'to access fields in the toolkit directly from Lua.Thus, host data can be accessed directly,using an intuitive record syntax,without creating an access functionfor each exported data item in the host.

Extend

The EDG system has been used in the development of severaldata entry programs.In many engineering systems,the complete analysis is divided in three steps:data entry, called pre-processing;the analysis itself, called processing or simulation;and result report and verification, called post-processing.The data entry task can be made easier by drawinggraphical representation of the data that must be specified asinput to the analysis.For such applications, the EDG system is extremely helpful and providesa fast development tool for customized data entry.These graphical data entry tools have given new life tothe legacy code ofbatch simulation programs.

Generic attribute configuration for finite element meshes

Another engineering area where Lua is being used is the generation offinite element meshes.A finite element mesh is composed bynodes and elements, which decompose the domain of analysis.To complete the model, physical properties (attributes)must be associated to nodes and elements,such as material type, support conditions and loading cases.The set of attributes that must be specifiedvaries widely according to the analysis to be done.Thus, to implement versatile finite element mesh generators,it is recommended that the attributes remain configurable by the user,and not hard coded in the program.

ESAM [16] is a generic system that usesLua to provide support for attribute configuration.Like EDG,ESAM adopts an object oriented approach:users create specific properties deriving from pre-defined core classes.Figure 13 shows an example of howto create a new kind of material, called “Isotropic”.

Figure 13: Creating a new material in ESAM.

Related work

This section discusses some other extension languages,and compares them with Lua.There is no intention of being comprehensive;instead, some representativesof current trends in extension languageshave been selected:Scheme, Tcl, and Python.A comprehensive list of embedded languagesis available in the Internet [17].This section also compares the fallback mechanism with someother language mechanisms.

Lisp dialects, particularly Scheme,have always been a popular choice for extension languages,for their simple, easily parsed syntax and built-in extensibility[8,18,19].For instance,a major part of the text editor Emacsis actually written in its own variant of Lisp;several other text editors have followed the same path.There are currently many implementations of Scheme in theform of libraries,especially designed to be used as an embedded language(for instance,libscheme [18],OScheme [20], andElk [3]).However,Lisp cannot be called user-friendly when it comes to customization.Its syntax is rather crude for non-programmers.Moreover, few implementations of Lisp or Scheme are truly portable.

Another very popular extension language nowadays is Tcl [11].Undoubtedly, one of the reasons for its success is the existence of Tk,a powerful Tcl toolkit for building graphical user interfaces.Tcl has a very primitive syntax,which greatly simplifies its interpreter,but also complicates writing even slightly complex constructions.For example, the Tcl code to double the value of a variable A isset A [expr $A*2].Tcl supports a single primitive type, string.This fact, added to the absence of pre-compilation,makes Tcl rather inefficient,even for an extension language.Correcting these problems can improve the efficiency of Tcl by a factorof 5 to 10, as shown by TC [21].Lua, with more adequate data types and pre-compilation,runs 10 to 20 times faster than Tcl.A simple test shows that a procedure call with no arguments,in Tcl 7.3 running in a Sparcstation 1,costs around 44 µs, while the increment of a global variable takes 76 µs.In Lua v. 2.1, the same operations cost 6 µs and 4 µs, respectively.On the other hand,Lua is approximately 20 times slower than C.This seems to be a typical value for interpreted languages [22].

Tcl does not have built-in control structures,such as whiles and ifs.Instead, control structures are programmable via delayed evaluation,as in Smalltalk.Although powerful and elegant,programmable control structures can lead to verycryptic programs, and are seldom used in practice.Moreover, they often bring a high performance penalty.

Python [23]is an interesting new language thathas also been proposed as an extension language.However,according to its own author,there is still a need for“improved support for embedding Python in other applications,e.g., by renaming most global symbols to have a `Py' prefix” [24].Python is not a tiny language,and has many features not necessary in extension languages,like modules and exception handling.These features add extra cost to applications using the language.

Lua has been designed to combine the best of existing languagesin order to fulfill its aim as an extensible extension language.Like Tcl, Lua is a small library,with a simple interface to C;this interface is a single header file with 100 lines.Unlike Tcl, however,Lua is pre-compiled to a standard bytecode intermediate form.Like Python, Lua has a clean but familiar syntax,and a built-in notion of objects.Like Lisp, Lua has a single data structure mechanism (tables),powerful enough to efficiently implement most data structures.Tables are implemented using hashing.Collisions are handled by linear probing,with automatic reallocation and rehashing whenthe table becames more than 70% full.Hash values are cached to improve access performance.

The fallback mechanism presented in Lua can be viewed asa kind of exception handling mechanism with resumption [25].However, the dynamic nature of Lua allows its use in many caseswhere a statically typed language would issue an error at compile time;both examples presented above are of this kind.Three particular fallbacks,'arith', 'order' and 'concat',are mainly used to implement overloading.In particular, the example in Figure 9could be readily translated toother languages with overloading, like Ada or C++.However, because of its dynamic nature, fallbacks are moreflexible than exception handling or overloading mechanisms.On the other hand,some authors [26] argue that programs that usethese mechanisms tend to be difficult to verify, understand, and debug;these difficulties are worsened when using fallbacks.Fallbacks should be written with care and moderation,and only by expert programmers.

Conclusion

The increasing demand for configuration applicationsis changing the structure of programs.Nowadays, many programs are writtenin two different languages:one for writing a powerful “virtual machine”,and another for writing single programs for this machine.Lua is a language designed specifically for the latter task.It is small:as already noted, the whole library is around six thousand lines of ANSI C.It is portable: Lua is being used in platforms ranging fromPC-DOS to CRAY.It has a simple syntax and a simple semantics.And it is flexible.

Such flexibility has been achieved throughsome unusual mechanisms thatmake the language highly extensible.Among these mechanisms, we emphasize the following:

Associative arraysare a strong unifying data constructor.Moreover, it allows more efficient algorithms than other unifyingconstructors like strings or lists.Unlike other languages that implement associative arrays[10,11,12],tables in Lua are dynamically created objectswith an identity.This greatly simplifies the use of tables as objects,and the addition of object-oriented facilities.

Fallbacksallow programmers to extend the meaning of most built-in operations.Particularly, with the fallbacks for indexing operations,different kinds of inheritance can be added to the language,while fallbacks for 'arith' and other operatorscan implement dynamic overloading.

Reflexive facilitiesfor data structure traversal help produce highly polymorphic code.Many operations that must be supplied as primitives in other systems,or coded individually for each new type,can be programmed in a single generic form in Lua.Examples are cloning objects and manipulating the global environment.

In addition to using Lua in several industrial applications,we are currently experimenting with Lua in a number of research projects,ranging fromcomputing with distributed objects that send each other messages containingLua code [27](an idea previously proposed in Tcl [4]),to transparently extending WWW browsers with client-side Lua code.Because all functions that interface Lua with the operating systemare provided in external libraries,it is easy to restrict the power of the interpreterin order to provide adequate security.

We also plan to improve the facilities for debugging Lua;currently,only a simple stack traceback is available.Following the philosophy of providing powerful meta mechanismsthat allow programmers to build their own extensions,we plan to add simple hooks to the run time systemto allow user programs to be informed when important events happen,such asentering or exiting a function,executing a line of user code,etc.Different debugging interfaces can be builton top of these basic hooks.Moreover,the hooks are also useful for building other tools,such as profilers for performance analysis.

The implementationof Lua described in this paper is availablein the Internet at:

Acknowledgements

We would like to thank the staff at ICAD and TeCGraffor using and testing Lua,and John Roll,for valuable suggestions by mailconcerning fallbacks in a previous version of Lua.The industrial applications mentioned in the text arebeing developed in partnership withthe research centers at PETROBRAS (The Brazilian Oil Company)and ELETROBRAS (The Brazilian Electricity Company).The authors are partially supported by research and development grants fromthe Brazilian government (CNPq and CAPES).Lua means moon in Portuguese.

References

[1]B. Ryan, 'Scripts unbounded', Byte, 15(8), 235–240 (1990).

[2]N. Franks, 'Adding an extension language to your software', Dr. Dobb's Journal, 16(9), 34–43 (1991).

[3]O. Laumann and C. Bormann.Elk: The extension language kit.ftp://ftp.cs.indiana.edu:/pub/scheme-repository/imp/elk-2.2.tar.gz,Technische Universität Berlin, Germany.

[4]J. Ousterhout, 'Tcl: an embeddable command language', Proc. of the Winter 1990 USENIX Conference. USENIX Association, 1990.

[5]D. Cowan, R. Ierusalimschy, and T. Stepien, 'Programming environments for end-users', 12th World Computer Congress. IFIP, Sep 1992, pp. 54–60 Vol. A-14.

[6]L. H. Figueiredo, C. S. Souza, M. Gattass, and L. C. Coelho, 'Geração de interfaces para captura de dados sobre desenhos', V SIBGRAPI, 1992, pp. 169–175.

[7]R. Ierusalimschy, L. H. Figueiredo, and W. Celes,'Reference manual of the programming language Lua version 2.1',Monografias em Ciência da Computação08/95,PUC-Rio, Rio de Janeiro, Brazil, 1995.(available by ftp atftp.inf.puc-rio.br/pub/docs/techreports).

[8]B. Beckman, 'A scheme for little languages in interactive graphics', Software, Practice & Experience, 21, 187–207 (1991).

[9]J. Bentley, More programming pearls, Addison-Wesley, 1988.

[10]A. V. Aho, B. W. Kerninghan, and P. J. Weinberger,The AWK programming language, Addison-Wesley, 1988.

[11]J. K. Ousterhout, Tcl and the Tk Toolkit, Addison-Wesley, 1994.

[12]L. Wall and R. L. Schwartz, Programming perl, O'Reilly & Associates, Inc., 1991.

[13]L. Lamport, LaTeX: A Document Preparation System, Addison-Wesley, 1986.

[14]D. Ungar et al., 'Self: The power of simplicity', Sigplan Notices, 22(12), 227–242 (1987)(OOPSLA'87).

[15]C. H. Levy, L. H. de Figueiredo, C. J. Lucena, and D. D. Cowan.'IUP/LED: a portable user interface development tool',Software: Practice & Experience26 #7 (1996) 737–762.

[16]M. T. de Carvalho and L. F. Martha,'Uma arquitetura para configuração de modeladores geométricos:aplicação a mecânica computacional',PANEL95 - XXI Conferência Latino Americana de Informática, 1995, pp. 123–134.

[17]C. Nahaboo.A catalog of embedded languages.ftp://koala.inria.fr:/pub/EmbeddedInterpretersCatalog.txt.

[18]B. W. Benson Jr.,'libscheme: Scheme as a C Library',Proceedings of the 1994 USENIX Symposium on Very High Level Languages. USENIX, October 1994, pp. 7–19.

[19]A. Sah and J. Blow,'A new architecture for the implementation of scripting languages',Proc. USENIX Symposium on Very High Level Languages, 1994.

[20]A. Baird-Smith.'OScheme manual'.http://www.inria.fr/koala/abaird/oscheme/manual.html,1995.

[21]A. Sah,'TC: An efficient implementation of the Tcl language',Master's Thesis,University of California at Berkeley, Dept. of Computer Science,Berkeley, CA, 1994.

[22]Sun Microsystems, Java, The Language, 1995.http://java.sun.com/people/avh/talk.ps.

[23]G. van Rossum,'An introduction to Python for UNIX/C programmers',Proc. of the UUG najaarsconferentie. Dutch UNIX users group, 1993.(ftp://ftp.cwi.nl/pub/python/nluug-paper.ps).

[24]G. van Rossum.Python frequently asked questions, version 1.20++.ftp://ftp.cwi.nl/pub/python/python-FAQ,March 1995.

[25]S. Yemini and D. Berry,'A modular verifiable exception handling mechanism',ACM Transactions on Programming Languages and Systems,7(2) (1985).

[26]A. Black, 'Exception handling: the case against', Ph.D. Thesis, University of Oxford, 1982.

[27]R. Cerqueira, N. Rodriguez, and R. Ierusalimschy,'Uma experiência em programação distribuída dirigida por eventos',PANEL95 - XXI Conferência Latino Americana de Informática,1995, pp. 225–236.

Last update:Tue Apr 7 20:45:53 BRT 2015