Return to search

[en] INTEGRATING THE LUA LANGUAGE AND THE COMMON LANGUAGE RUNTIME / [pt] INTEGRAÇÃO ENTRE A LINGUAGEM LUA E O COMMON LANGUAGE RUNTIME

[pt] O Common Language Runtime (CLR) é uma plataforma criada
com o objetivo de facilitar a interoperabilidade entre
diferentes linguagens de programação, através de uma
linguagem intermediária (a Common Intermediate Language,
ou CIL) e um sistema de tipos comum (o Common Type System,
ou CTS). Lua é uma linguagem de script flexível e de
sintaxe simples; linguagens de script são frequentemente
usadas para juntar componentes escritos em outras
linguagens, para construir protótipos de aplicações, e em
arquivos de configuração. Este trabalho apresenta duas
abordagens de integração entre a linguagem Lua e o CLR,
com o objetivo de permitir que scripts Lua instanciem e
usem componentes escritos para o CLR. A primeira
abordagem é a de criar uma ponte entre o interpretador
Lua e o CLR, sem modificar o interpretador. Os recursos e
a implementação desta ponte são mostrados, e ela é
comparada com trabalhos que seguem a mesma abordagem. A
segunda abordagem é a de compilar as instruções da
máquina virtual do interpretador Lua para instruções da
Common Intermediate Language Do CLR, sem introduzir
mudanças na linguagem Lua. A implementação de
um compilador de instruções Lua para CIL é mostrada, e o
desempenho de scripts compilados por ele é comparado com
o desempenho dos mesmos scripts executados pelo
interpretador Lua e com o de scripts equivalentes
compilados por outros compiladores de linguagens de
script para o CLR. / [en] The Common Language Runtime (CLR) is a platform that aims
to make the interoperability among different programming
languages easier, by using a common language (the Common
Intermediate Language, or CIL) and a common type system
(the Common Type System, or CTS). Lua is a flexible
scripting language with a simple syntax; scripting
languages are frequently used to join components written in
other languages, to build application prototypes, and in
configuration files. This work presents two approachs for
integratiion between the Lua language and the CLR, with the
objective of allowing Lua scripts to instantiate and
use components written for the CLR. The first approach is
to create a bridge between the Lua interpreter and the CLR,
without changing the interpreter. The features and
implementation of this bridge are shown, and it is compared
with other work following the same approach. The second
approach is to compile the virtual-machine instructions of
the Lua interpreter to instructions of the CLR s Common
Intermediate Language, without introducing changes to the
Lua language. The implementation of a Lua instructions to
CIL compiler is shown, and the performance of scripts
compiled by it is compared with the performance of the same
scripts run by the Lua interpreter and with the performance
of equivalent scripts compiled by compilers of other
scripting language to the CLR.

Identiferoai:union.ndltd.org:puc-rio.br/oai:MAXWELL.puc-rio.br:4937
Date27 May 2004
CreatorsFABIO MASCARENHAS DE QUEIROZ
ContributorsROBERTO IERUSALIMSCHY
PublisherMAXWELL
Source SetsPUC Rio
LanguagePortuguese
Detected LanguageEnglish
TypeTEXTO

Page generated in 0.0019 seconds