<s>
The	O
Simplified	B-Application
Wrapper	I-Application
and	I-Application
Interface	I-Application
Generator	I-Application
(	O
SWIG	B-Application
)	O
is	O
an	O
open-source	B-Application
software	I-Application
tool	O
used	O
to	O
connect	O
computer	B-Application
programs	I-Application
or	O
libraries	B-Library
written	O
in	O
C	B-Language
or	O
C++	B-Language
with	O
scripting	B-Language
languages	I-Language
such	O
as	O
Lua	B-Language
,	O
Perl	B-Language
,	O
PHP	B-Application
,	O
Python	B-Language
,	O
R	B-Language
,	O
Ruby	B-Language
,	O
Tcl	B-Operating_System
,	O
and	O
other	O
languages	O
like	O
C#	B-Application
,	O
Java	B-Language
,	O
JavaScript	B-Language
,	O
Go	B-Application
,	O
D	B-Application
,	O
OCaml	B-Language
,	O
Octave	B-Language
,	O
Scilab	B-Application
and	O
Scheme	B-Language
.	O
</s>
<s>
Output	O
can	O
also	O
be	O
in	O
the	O
form	O
of	O
XML	B-Protocol
.	O
</s>
<s>
The	O
aim	O
is	O
to	O
allow	O
the	O
calling	O
of	O
native	O
functions	O
(	O
that	O
were	O
written	O
in	O
C	B-Language
or	O
C++	B-Language
)	O
by	O
other	O
programming	O
languages	O
,	O
passing	O
complex	O
data	O
types	O
to	O
those	O
functions	O
,	O
keeping	O
memory	O
from	O
being	O
inappropriately	O
freed	O
,	O
inheriting	O
object	O
classes	O
across	O
languages	O
,	O
etc	O
.	O
</s>
<s>
The	O
programmer	O
writes	O
an	O
interface	O
file	O
containing	O
a	O
list	O
of	O
C/C	O
++	O
functions	O
to	O
be	O
made	O
visible	O
to	O
an	O
interpreter	O
.	O
</s>
<s>
SWIG	B-Application
will	O
compile	O
the	O
interface	O
file	O
and	O
generate	O
code	O
in	O
regular	O
C/C	O
++	O
and	O
the	O
target	O
programming	O
language	O
.	O
</s>
<s>
SWIG	B-Application
will	O
generate	O
conversion	B-Application
code	I-Application
for	O
functions	O
with	O
simple	O
arguments	O
;	O
conversion	B-Application
code	I-Application
for	O
complex	O
types	O
of	O
arguments	O
must	O
be	O
written	O
by	O
the	O
programmer	O
.	O
</s>
<s>
The	O
SWIG	B-Application
tool	O
creates	O
source	O
code	O
that	O
provides	O
the	O
glue	O
between	O
C/C	O
++	O
and	O
the	O
target	O
language	O
.	O
</s>
<s>
a	O
shared	O
library	B-Library
that	O
can	O
be	O
linked	O
to	O
other	O
programs	O
compiled	O
in	O
the	O
target	O
language	O
(	O
for	O
example	O
,	O
using	O
Java	B-Language
Native	I-Language
Interface	I-Language
(	O
JNI	B-Language
)	O
in	O
Java	B-Language
)	O
.	O
</s>
<s>
SWIG	B-Application
is	O
not	O
used	O
for	O
calling	O
interpreted	O
functions	O
by	O
native	O
code	O
;	O
this	O
must	O
be	O
done	O
by	O
the	O
programmer	O
manually	O
.	O
</s>
<s>
SWIG	B-Application
wraps	O
simple	O
C	B-Language
declarations	O
by	O
creating	O
an	O
interface	O
that	O
closely	O
matches	O
the	O
way	O
in	O
which	O
the	O
declarations	O
would	O
be	O
used	O
in	O
a	O
C	B-Language
program	I-Language
.	O
</s>
<s>
When	O
SWIG	B-Application
creates	O
an	O
extension	O
module	O
,	O
these	O
declarations	O
are	O
accessible	O
as	O
scripting	B-Language
language	I-Language
functions	O
,	O
variables	O
,	O
and	O
constants	O
respectively	O
.	O
</s>
<s>
In	O
Python	B-Language
:	O
</s>
<s>
There	O
are	O
two	O
main	O
reasons	O
to	O
embed	O
a	O
scripting	B-Language
engine	I-Language
in	O
an	O
existing	O
C/C	O
++	O
program	O
:	O
</s>
<s>
The	O
program	O
can	O
then	O
be	O
customized	O
far	O
faster	O
,	O
via	O
a	O
scripting	B-Language
language	I-Language
instead	O
of	O
C/C	O
++	O
.	O
</s>
<s>
The	O
scripting	B-Language
engine	I-Language
may	O
even	O
be	O
exposed	O
to	O
the	O
end-user	O
,	O
so	O
that	O
they	O
can	O
automate	O
common	O
tasks	O
by	O
writing	O
scripts	O
.	O
</s>
<s>
Even	O
if	O
the	O
final	O
product	O
is	O
not	O
to	O
contain	O
the	O
scripting	B-Language
engine	I-Language
,	O
it	O
may	O
nevertheless	O
be	O
very	O
useful	O
for	O
writing	O
test	O
scripts	O
.	O
</s>
<s>
There	O
are	O
several	O
reasons	O
to	O
create	O
dynamic	O
libraries	B-Library
that	O
can	O
be	O
loaded	O
into	O
extant	O
interpreters	O
,	O
including	O
:	O
</s>
<s>
Provide	O
access	O
to	O
a	O
C/C	O
++	O
library	B-Library
which	O
has	O
no	O
equivalent	O
in	O
the	O
scripting	B-Language
language	I-Language
.	O
</s>
<s>
Write	O
the	O
whole	O
program	O
in	O
the	O
scripting	B-Language
language	I-Language
first	O
,	O
and	O
after	O
profiling	O
,	O
rewrite	O
performance-critical	O
code	O
in	O
C	B-Language
or	O
C++	B-Language
.	O
</s>
<s>
SWIG	B-Application
is	O
written	O
in	O
C	B-Language
and	O
C++	B-Language
and	O
has	O
been	O
publicly	O
available	O
since	O
February	O
1996	O
.	O
</s>
<s>
The	O
initial	O
author	O
and	O
main	O
developer	O
was	O
David	O
M	O
.	O
Beazley	O
who	O
developed	O
SWIG	B-Application
while	O
working	O
as	O
a	O
graduate	O
student	O
at	O
Los	O
Alamos	O
National	O
Laboratory	O
and	O
the	O
University	O
of	O
Utah	O
and	O
while	O
on	O
the	O
faculty	O
at	O
the	O
University	O
of	O
Chicago	O
.	O
</s>
<s>
SWIG	B-Application
has	O
been	O
released	O
under	O
a	O
GNU	B-License
General	I-License
Public	I-License
License	I-License
.	O
</s>
<s>
SWIG	B-Application
was	O
a	O
successful	O
participant	O
of	O
Google	B-Application
Summer	I-Application
of	I-Application
Code	I-Application
in	O
2008	O
,	O
2009	O
,	O
2012	O
.	O
</s>
<s>
In	O
2008	O
,	O
SWIG	B-Application
got	O
four	O
slots	O
.	O
</s>
<s>
Haoyu	O
Bai	O
spent	O
his	O
summers	O
on	O
SWIG	B-Application
's	O
Python	B-Language
3.0	O
Backend	O
,	O
Jan	O
Jezabek	O
worked	O
on	O
Support	O
for	O
generating	O
COM	B-Application
wrappers	O
,	O
Cheryl	O
Foil	O
spent	O
her	O
time	O
on	O
Comment	O
'	O
Translator	O
 '	O
for	O
SWIG	B-Application
,	O
and	O
Maciej	O
Drwal	O
worked	O
on	O
a	O
C	B-Language
backend	O
.	O
</s>
<s>
In	O
2009	O
,	O
SWIG	B-Application
again	O
participated	O
in	O
Google	B-Application
Summer	I-Application
of	I-Application
Code	I-Application
.	O
</s>
<s>
Baozeng	O
Ding	O
worked	O
on	O
a	O
Scilab	B-Application
module	O
.	O
</s>
<s>
Matevz	O
Jekovec	O
spent	O
time	O
on	O
C++0x	B-Language
features	O
.	O
</s>
<s>
Ashish	O
Sharma	O
spent	O
his	O
summer	O
on	O
an	O
Objective-C	B-Language
module	O
,	O
Miklos	O
Vajna	O
spent	O
his	O
time	O
on	O
PHP	B-Application
directors	O
.	O
</s>
<s>
In	O
2012	O
,	O
SWIG	B-Application
participated	O
in	O
Google	B-Application
Summer	I-Application
of	I-Application
Code	I-Application
.	O
</s>
<s>
Leif	O
Middelschulte	O
worked	O
on	O
a	O
C	B-Language
target	O
language	O
module	O
.	O
</s>
<s>
Swati	O
Sharma	O
enhanced	O
the	O
Objective-C	B-Language
module	O
.	O
</s>
<s>
Neha	O
Narang	O
added	O
the	O
new	O
module	O
on	O
JavaScript	B-Language
.	O
</s>
<s>
Dmitry	O
Kabak	O
worked	O
on	O
source	O
code	O
documentation	O
and	O
Doxygen	B-Language
comments	O
.	O
</s>
<s>
For	O
Python	B-Language
,	O
similar	O
functionality	O
is	O
offered	O
by	O
SIP	B-Application
and	O
Boost	B-Language
's	I-Language
Boost.python	I-Language
library	I-Language
.	O
</s>
