This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.
Usually in the industry, software projects can become extremely large, and unmanageable. Object orientated programming teaches one to break the system down into smaller, more manageable subsystems, which is interchangeable more easier to manage as individuals. These subsystems does not necessarily need to be developed in the same language. Sometimes the subsystems even consists of multiple programming languages.
There are a huge range of programming languages, which all have their unique aspect to them. Sometimes the requirement just can't be fulfilled by the use of only one programming language. The only question is how. There are several ways of bridging the gap which includes using interfacing or creating software components and using them.
BB&D Pretoria is currently busy to develop a system for SARS, which is developed in C++, Python and C#. C++ is used to communicate with a database, and C# is used to develop the front end. Python scripts are used to reproduce business logic.
The usage of multiple languages has been defined in various sources as Multilanguage development or Multilanguage programming. This paper asks the questions what, how and why. This means this paper will define a formal definition for Multilanguage development, give possible applications for it( including experience at BB&D), this paper will also discuss any advantages and challenges of multi-language development.
This paper will first describe work experience gained during a 14 week period employed by Barone, Budge and Dominick. During this 14 weeks the author had hand-on-hand experience working on the SARS project. This project is developed using C++, Python and C#, and was the inspiration for this paper.
BB&D is an IT development house which has 4 offices in South Africa and one in Europe. The offices in South Africa are situated in Johannesburg, Midrand, Cape Town and Pretoria, and the one in Europe is situated in Cyprus, Greece. The Pretoria Branch is where the author has been placed. The Pretoria Branch is also called the SARS branch since this branch currently develops the whole SARS internal system.
This internal system was the inspiration of this paper. The author spent about a week and a half closely learning the structure before starting contributing to the project. Due to the project's complexity, it was thought best that newcomers to the project rather first get an overview of the structure of the system and learn how to use the tools that is use in development there-of, before working with it.
The system is basically divided into three parts: A database tier (in C++), a logical tier (in Python) and a Presentation Tier(in C#). The database tier is generated by an in-house tool. This tool defines pseudo language close to SQL. This generates proper SQL statements, C++ prepared statements and Python, C# and C++ "containers". These "containers" is used to communicate with the database via C++ prepared statements, which was generated by this tool. Once the code is generated, one must add the new files to several build files, and then generate a C++ project.
This C++ project generate several parts of the system including a binary file including all the Python scripts and a C++ executable, called ScriptNode, which will fire the scripts on a Linux server. ScriptNode uses this binary file in order to fire scripts, and make it able for the scripts to access the database through the generated C++ code layer. This allows developers to easily change the logic of the system more easily, since Python is much easier and safer to use than C++.
Along of the generated code is an IDE that is used to debug and run Python scripts that accesses the database. This IDE roll backs all database calls so that testing scripts won't cause any data damage.
The Python part of the system consists of a number of nodes, and each of these nodes are assigned to a certain Python script. These nodes creates and routes messages to one another until these messages are routed to a completed queue, if an error occurs or a script is not routed on to another node, its routed to an error queue. These node functions like a queue, first message on the queue is the first one to get processed. After a certain amount of days the completed queues get scraped of all messages. This allows the system not get overrun with completed messages that does not need to be analysed. The C++ and C# parts of the system are used in a few occasions to create messages. More on these queues will be discussed under Production Support section.
The author was part of the Production Support team during this three month period. This team is a group people that offer support to end-users, and handle requests which they might have.
The production support team seem to deliver invaluable service to the organisation and to the end users of the system.
As previously mentioned if something wrong happens within a node (or script assigned to a node), a message lands in an error queue. The routing history can be used to determine where the error occurred. One can also see what is actually contained in the message. With is information one can determine ways of fixing it. Here is a few ways:
Change the message content
Change the script assigned to the queue
After a change is implemented the messages are rerouted to the nodes responsible for the error, so that the message can be re-processed. Sometimes messages end up in an error queue because of a database error, thus not caused by the script or contents of the message. So only a reroute is necessary.
In some circumstances if the message can't be fixed, the faulty message should be routed to a junk queue.
Sometimes the messages revealed a bigger problem, caused from another part of the system, for example the call centre allowing for corrupt data to be inserted into the system and escaling to the back- end. This message routing system enables developers to determine all possible entry points and thus the origon of a problem can be discovered.
The author was assigned a number of error queues and was responsible for determining why there are errors are in this queue and to keep to the queue as clean as possible.
The author's main responsibility was to determine how synchronised 2 systems are, and how to get them more in sync. There was a script that already existed that was a bit out of date. The author's responsibility was thus to learn more about the system and use that knowledge in order to update the script.
The two systems that needs to be in sync is called ATP and ITS. ITS stands for Income Tax System, and is currently in use by SARS. The new, in production system, is called ATP which will eventually replace ITS. But until then ITS and ATP should be kept in sync.
ATP sends ITS messages via a node (as discussed earlier), and if a message was sent, there should be proof of it on the system.
Thanks to development and changes in the system during the last year this script needed to be changed. A file is received daily from ITS via FTP and then used to compare what is currently in ATP's database. As previously mentioned all database calls are done via the C++ layer. This script is written in Python.
The first step in the process was to develop a support script in order to determine what new inconsistencies comes into the system and what inconsistencies were fixed. This will determine whether changes made to the script benefitted the purpose or not.. This support script also categorises types of inconsistencies in order to see where to some looking into is required.
This was then used as a starting point to determine why these inconsistencies occurred and if these are indeed inconsistencies. Ways to determine this varies from emails, IM, phone calls and database queries. Eventually the author found a few things that the script does not cater for, and changes that was needed to be made to the existing code.
Experience with Multilanguage Development
The author was exposed to querying the database via Python scripts using the C++ layer. This was really exciting to see how 2 languages can be used together like this. Due to C++'s memory efficiency and Python's interpreter, one can by database calls on the spot without compilation.
The author also used the Workflow and Orchestration servers via C# in order to correct process data.
The author was also required to determine whether a Python script can cause a memory leak on the C++ side. It was determined that the Python scripts does not cause a memory leak, but do use more than needed memory and needed to be refactored.
Work Experience Conclusions
Out of experience it seems that are a few pillars that Multilanguage development stands on:
Tacit Knowledge (Experience)
As the saying goes : There is no substitution for experience. In this case there is no exception. With time one gets more use to the system's structure and also more confident working with it. Experience working with such systems can only help the developer.
Experience can be gained by some form of knowledge transfer between existing team members and newcomers.
Implicit Knowledge (Knowledge)
Since there is many aspects to the project, it important to keep them in mind, while development. Needless to say one can't just jump in halfway without some understanding what is going on within the system.
One must first get used to working with all the programming languages used, and learn how to "bridge" them.
It is very infeasible to develop such systems using basic Text Editors. Specialised tools is need not only to use for development, but also to bridge the gap between programming languages. If there is no tool for the job one needs to be development
There is a saying: "Hours of planning can save weeks of coding". This holds especially true more Multilanguage development. Addition to normal planning, there needs to determine which programming language can meet a certain requirement the best, and what role a specific programming language will play.
Multilanguage development is very feasible with large scale applications. If the scope is very small, the usefulness decreases and just become too complicated in order to write a simple application.
Production Support / Maintenance
There need to be some support team that maintains the system or at least handles issues that testers (or even end-users) have. It is also necessary that there is a good communication between the production support and developers.
It seems that Multilanguage development exposes the developer to new technologies and strategies how to use them. The 14 weeks at BB&D has proven to be a valuable introduction to the to the industry. As the paper already stated : "There is no substitute for experience". These 14 weeks proved this statement correct.
Programming Languages Concepts
This subsection of this paper re-introduces some programming languages concepts and determine how these apply to Multilanguage development. This will illustrate some aspects to keep in mind.
Sebesta(2008:2) mentions a few benefits of studying programming languages concepts:
Increased capacity to express ideas
Once one has a clear grasp of a number of languages, one can easily determine which one is more suitable for a certain task. One can see the benefit it can give to Multilanguage development.
Improved background for choosing appropriate languages
With a fair knowledge of a range of languages, one can customise large scale systems by meeting requirements as effective as possible
Increased ability to learn new languages
By using multiple languages in development of a system, one gets more familiar the respective languages used to develop the system. By using
Better use of languages that are already known
This methodology (if one can call it one ) forces developers and analysts to truly uncover the strengths and weaknesses of programming languages and embrace this information in development or designing the system
As described above the list of benefits has a certain amount of applicability to Multilanguage development. Needless to say how more is known about programming languages, the more one can determine ways to use them together.
Sebesta(2008:8) continues to mentions a number of programming languages criteria's and characteristics. Here are the 4 criteria's that Sebesta(2008:7-20):
Readability (how easy code can be understood)
Writability: (how easy it is to use)
Reliability: (how well it conform to specifications)
Cost: (can be seen as the trade off between the above 3)
There exists multiple characteristics of programming languages, and these languages and these characteristics have an impact on some of the aspects of it. In the following section one can see that there is no language that will cater for every need. But luckily with Multilanguage development it is not necessary to find a single language to cater for every need. The challenge then lies in determining which requirements can be resolved by which languages and how feasible is it to do so.
These languages main features include variables, assignment statements and iteration through data structures like lists and trees. These languages usually support Object Orientated Programming and includes scripting- and visual languages.
These languages mainly apply functions to given parameters, and by this means makes computations using recursion. These parameters can be mathematical operators, values or other functions.
Some examples include LISP, Haskell, ML and Scheme.
These languages are rule-based, and these rules are specified in no specific order. These languages are based on predicate calculus. Usually these languages are used to prove theorems.
An example is Prolog
Later on this paper will show examples in research papers where imperative - and functional languages are used together.
Importance of Multi-language development
Phelps() describes the importance of multi-language development in relation to game development. He states a few years ago, all games were written entirely in native code, sometimes in assembly code. There was no possibilities of adding extra portions through adding interpreted code. Phelps() describes this importance of multi-language development in terms of game development. Games used to be written entirely in C/C++. "If developers want to access the latest features of the latest hardware, they have very few options". Phelps()
Phelps() further states that processing power and computing capabilities on the desktop has increased tremendously over the past years, and this made it possible for upper layer logic of large applications to run almost as fast in interpreted code as in native languages.
As said once before some languages are better doing certain things. Phelps() uses the example of Vampire: The Masquerade-Redemption. This game used Java Development Kit (JDK) as its scripting engine. The games community has embraced the trend of multi-language development and undergone what could almost be described as a revolution in the past few years.
Multi-language development's applications are not limited too games alone, as already seen in work experience that it has other applications as well. Multi language development is an important aspect of software development today since it takes developers out of their comfort zones.
"Gone are the days of hardcore assembly number crunching and small teams of developers throwing out thousands of lines of C-header files" Phelps(). In the place of this developers are using other languages for a variety of purposes."The fundamental tenet of when to use what is now a choice based on developer audience and specific capability-as opposed to raw performance power." Phelps()
Vinoski() states that integration "often implies distribution, which means that various parts of the system communicate through network messages". This network supplies the system with boundaries between components. This allows developers to use the most suitable language for each component.
In the case of non-networked Multilanguage integration, one can make use of virtual machine development, since it now supports multiple languages. Vinoski() gives the example of the Microsoft Common Language Runtime (CLR). CLR Supports numerous languages, and allows languages of different types to work together. Gordon states that with the Visual Studio IDE one can develop components in languages like C#, Visual Basic and C++. There are also prototype .NET compilers for COBOL, Pascal and others. Thanks to CLR, all languages that can be compiled with a .NET can communicate with each other.
Another example is the Java Virtual Machine (JVM). It's now the base of various languages like JRuby, JavScript, Jython and Groovy.Since all of the languages that are JVM-based are built on the same byte code, the Java code can call into all of these languages and these languages can call Java code and also all pre-existing Java libraries. "The JVM thus provides a virtually pain-free way to mix and match the best languages for each part of an application." Vinoski()
Later on in the paper, SWIG will be introduced, which generates interfaces for C++ to other languages like C# and Python.
Vinoski() states that a programming languages usually exits because the designer of it felt that this language could address a number of problems better than other programming languages , even if it's only one. As seem in the previous section there are several trade-offs between languages, there is thus much room for many different approaches.
Vinoski() gives the example of a text processing problem. He states that its possible solve this problem by using a language designed to solve numeric problems for example MatLab or a functional language like LISP, but needless to say it's a terrible design choice. By choosing such a language, one needs to put in more effort to use this language to do something it was not intended to do. Vinoski() tried to illustrate here that the choice of language has a direct effect on developer productivity, and choosing a language designed to solve similar problems can increase productivity.
Vinoski() further argues that an imperative languages like Java and C++have good enough solutions for many problems, because of this developers that favours only one languages usually get "fall into ruts and never even consider other options" (Vinoski()).
XML processing can be used as an example. Many languages introduces unnecessary complexity, and thus the solution introduces more problems. Developers seem to just put up with these new problems that it produces by hacking a solution together that is but mediocre at best.
Developers usually resort to code generation in order to increase productivity, but code generation unfortunately convert flexible XML constructs into inflexible static data types, which are difficult to version adequately. Once the XML document has been changed, the code has to be regenerated to reflect on the changes. The system also requires to change to incorporate the new regenerated code wherever the application uses it. Thus the system has to rebuilt, retested and redeployed only because one changed an XML document. "Any minor productivity gains achieved through code generation are quickly lost in the noise when compared to ongoing maintenance costs" Vinoski.
Keeping with this example, Python has a brilliant xml parser: xml.etree. This parser handles all hiccup that usually comes with xml, like character sets, versioning and schema's. This parser makes xml handling extremely easy. Why would someone ever bother to try and figure out the complicated structure available in Java and C++?
Vinoski() states by choosing the right language allows developers to provide solutions much faster, and thus putting applications in users hander more swiftly. Feedbacks and changes from users can be given quicker. This "process can become a cycle of positive reinforcement, in which fewer lines of code result in fewer defects and easier enhancement, which leads to happier users who provide free word-of-mouth advertising along with better feedback that helps improve the software even further". Vinoski()
Vinoski() further says that Integrated Development Environments (IDE) can increase productivity but only for languages that's supported by the specific IDE. So it's only partially useful to Multilanguage developers. He continues by saying that developers not necessarily display higher productivity by using IDE . The bigger the size of the system, how longer it will takes for new developers to fully grasp the systems design and implementation, and how least likely it is going to be for any single developer to grasp the whole system. As the number of core developers increase needed to completely understand all the workings of the system, the communication between them increases exponentially. "The more of these paths there are, the harder it is to ensure that code changes to the system are appropriate and correct". Vinoski()
"A program is written once, but it will be read many times by many different developers: for reviews, corrections, and improvements. Today more than ever, companies must be in a position to easily extend and enhance their software. Better readability also helps catch errors earlier in the development cycle and hence improves code reliability." Gasperoni
Best of both worlds
Gasperoni() argues that Ada is a much more readable languages because it only has one way to create comments. They argue that Java's block comments are dangerous once mixed with code. Developers struggle to to determine what's commented or not. Another example Gasperoni() mentions is that if for example there is an integer variable that is assigned 0123, the compiler assumes its an octal constant, since it starts with a 0, in Ada that does not happen, and the user can implicitly specify which type of numeric system to use. He also mention the assignment operator. The assignment operator in Ada does not return anything and thus, this won't be an issue. Notice this piece of code:
A1 = true
A2 = false
If (A1 = A2)
This is obviously wrong, and building up on that since the assignment operator returns a value, one won't even notice this once its compiled.
Gasperoni() also states that together Ada 95 and Java in terms of portability, security, reliability, and rich features. Together these languages complement each other well, while Java provides security and writability, Ada provides readability.
Vinoki() states that some managers believes that it is more economical to develop and maintain a large range of solutions by only developing in a single imperative language like Java. Developers that work under these managers tend to be mere commodities that is easily replaceable, since it is easy to find Java programmers. By this way they try to protect themselves from getting stuck with code that only a few experts know how to maintain.
By using languages better suited languages (especially those that are JVM- or CLR-based) can easily lower the cost of the system during its lifetime by reducing the size and effort required from the developer. This takes stain off the developers hands and thus less developers are needed.
Some developers claim that learning a new language is hard, and time spent would only be beneficial when developing with a language they already know. Luckily not all languages are that hard to learn. Examples of such languages are Lisp and Python. The core concepts are relatively simple so that beginners can start to be productive very quickly. "The apparent simplicity of such languages belies a richness that can keep hardcore language enthusiasts busy for years discovering hidden treasures" Vinoski().
Multi-language development allows developers and organisation to get out of their comfort zone, by not only sticking to what they know, but applying it in another way and finding more efficient ways of solving problems. This allows continuous growth of knowledge and a will allow a better product to be produced at the end of the day.
Challenges and Solutions
Even though there many benefits, there are indeed a lot of difficulties working with them. This section will discuss a few challenges programmers might face during development.
Lack of Documentation.
Phelps() states that there exists limited resources exist for making languages behave together, and for debugging across languages. There are tool that allows debug across languages like Visual Studio and Code Warrior.
The documentation available usually only gives simple examples, and the resources on advanced practices such as object sharing and type casting are very scarce. Phelps() uses the example of the JNI documentation and explained that even though it was well documented, he wasn't able to get a set real-world examples.
The solution to this could be in the near future, once this becomes more popular, and more tools and applications in support of this becomes available. This will force people to write about it in forums and blogs and hopefully this paper may empower new research topics related to this one.
Handling memory in multi-language development is a nightmare, because when a software is written in two languages, it can happen that it is necessary to have two references to the same object (or pointer for that matter), one for each language. Phelps() states when this is the case there are 2 possible things that could go wrong. Firstly since there are two references, memory can only be freed once both languages has released, if this never happens it will cause a memory leak. The second is that the memory has been released while one of the languages are still busy with the object, thus a Null pointer exception, or a resource leak, is imminent since the referenced object has been released. Both of these problems are quite common, especially working with C++.
Which makes matters worse, languages like Java and Python uses built-in garbage collection, instead of allowing the developer to manage memory himself/herself. Any object created in these languages will be deconstructed once all references to it goes out of scope. One can derive that it becomes very difficult to know when something has been released from memory. One can possibly check if an object exists and then take action if it does but Phelps() states that it should be avoided since the object may exist but be out of scope. "A pointer accessing values from native code will have absolutely no ability to determine if the data it is reading is on the list to be collected" (Phelps).
Phelps suggests is to use state variables which can easily be accessed and reused. In the situation where all languages involved really have to share references to objects between them it's necessary to take control of the garbage collection mechanism.
JNI has mechanisms for native code to create global references to objects. This way the object is saved from the garbage collector since there is an reference that is in scope.
Later on in the paper, there is an application mentioned called Ravi, developed by Lux() . They also had issues with memory management. The structure of the system will be discussed later, but it boils down to a robotic system developed using Lisp and C. The question which side of the system should handle the memory. C has no memory manager on its own and Lisp's garbage collector will release memory even though the C++ side has instances to that object (as described above).
"One must not charge the system user with this question either, because the lifetime of objects in a system integrating perception and action is extremely difficult to control" Lux(). Lux() proposes a multi-strategy garbage collector which communicates with memory managers via the interface generator.
If objects are allocated as Singletons, Alexandrescu states that object should be deleted since the application is terminated. This may cause a resource leak and is very similar to the problem at hand here. Destroying objects that really has to be shared should only be done once the application is terminated. By doing this one does not have to worry that some entity tries to accessing an object that has been desctructed.
Phelps() states that in most of the scripting languages , the written code can be seen as an extension of the native code that calls it. It is thus treated as though it is ran from the same thread as the native code. However, with languages that rely on virtual machines , the native threads must be synchronised with non-native threads. Also references to an object that are valid in one thread may be invalid in another.
Language consideration is also quite important in this aspect especially when the system that is developed or used on different platforms. Threading is different on some operating systems, but when using Java it's the same on every patform. It is thus recommended that all requirements that requires threading that runs across platforms be done in Java, to ensure that differences between threads are minimal.
Phelps states that it is quite an expensive procedure to move things from one language to another. Take Java for example, a native call through JNI is much more expensive than a normal Java call. Phelps states the solution is to determine which programming is the most suitable to fulfil which requirement.
Phelps states an architecture that minimises calls between languages will perform better than one that has continuous calls hence and forth between languages. One should aim to keep calls to a minimum in order to optimise solutions.
Lux() states that writing code that uses another function is quite a mission to accomplish. This task is quite prone to error and could involve a large amount of code.
Lux() wrote about this a long time ago when there was very little interface generators, but these days there are more available, for example SWIG (Simplified Wrapper Inteface Generator) which is a software development tool that connects programs written in C++, with other languages like Python, Ruby, Common Lisp and C# to name a few. Lux() had to resort to developing one for the Ravi System. It is clear that creating interfaces are a issue but it is controllable.
Business Systems: SARS Service Manager
SARS Service Manager is currently being used by SARS for most of their processes. The previous system, called Income Tax System, is being completely replaced by Service Manager. This is one instance where a company is replacing its old legacy system with an entire new system.
Legacy systems usually doesn't get replaced, sometimes they just get a face lift, but with new advances in technology made this project completely plausible, especially if over ten thousand users are using the system and internal process are very complex.
The paper already identified the SARS system as an application of multi-language development, developed in C++, Python and C#. For more information refer back to the work experience section.
There has been increasing usage of Multilanguage development in the game industry. One example is a system developed by Phelps() called MUPPETS (Multi-user Programming Pedagogy for Enhancing Traditional Study.12.) This system includes a C++ base, which renders the graphical 3D objects and avatars, and a Java programming environment which creates and specifies these.
These 3D objects are actually part of Java software, and is graphically represented in this world. The 3D object has a common Java interface, and should implement and adhere to this interface so that it can be interpreted accurately. If any exceptions or errors happens while a certain object is interpreted, the stack trace of that exception is thrown in the console menu and saved to the log file, and the object is not added to world, if the object is already in the world it is removed.
MUPPETS includes an IDE for development of these object by means of Java. This IDE is integrated directly into the world. One can say the world and IDE is "one in the same". Thus the user can manipulate the world and the objects within in runtime without exiting the world.
The user does not need to have any knowledge of the C++ graphics system. But rather need some Java experience in order to create these objects, so that it can be represented in this three-dimensional world as graphical entities complete with behaviour and per-frame operations. Any Java object that adheres to the interface instantly knows how to draw the 3D representation, since it is specified in the C++ part of the system. This hides a lot of complexity from the user.
All objects in this virtual world can be shared between a number of clients. The moment a new object is added to the world, all clients can see and experience its creation.
The Java part of the system is handles all networking, because of Java's excellent libraries that's included in it, but this is hidden from the user. The user may use any Java library he/she wished to the object, so they can basically write their own networking code if they want, but it won't be integrated to the world (it would just be ignored). One could possibly extend this world
In order for the graphical core to use the Java objects, it needs control over the Java Virtual Machine (JVM) that "the invocation interface provides and thus treats each game entity as more of an application than an object" (Phelps()).
"MUPPETS statically links identical classes into both the core and the native library accessed by Java" (Phelps). In order to provide access same DirectInput devices to both Java and C++ parts, the MUPPETS system needs to create an instance to the DirectInput handler which is situated in the native core, and passes a pointer to it through Java to the native library. By this means it share state between C++ and Java. Without this the state can't be accessible or stored in various places which are independent or unknown of each other.
The diagram below illustrates the division between the logic layers of this system and the rendering core. The JavaController manages the interaction between the core and the object created by the users.
This system is still under development, according to Phelps(). He states the changes that will occur in the future is to more logic to the Java layer. These java objects will possibly have their own collision detection algorithms incorporated to the interface in the future. Even though C++ can execute such algorithms faster, it has to do numerous JNI calls to get information of all objects, rather than just doing these calculation in Java. Collision detection will then be done with a single call to the Java part.
Numerous other things will be moving to the Java part. This will basically leave a rendering core and a JNI management system "at the base of the engine"
At first glance it seems that they would only be using Java as a means of fancy structure, which could be similarly have been done with XML. But it was not long before it was realised how feasible it actually was to use Java instead of XML. Phelps() can possibly combine the Java part with logic derived from a functional language like LISP or predications from PROLOG. The next example will handle more about intelligence.
Robotics and Intelligence: Ravi System
The Ravi System is an experimental was designed by two Frenchmen Augustin Lux and Bruno Zoppin. "The Ravi System offers the possibility of incremental development on a Multilanguage platform" (Lux).
Lux() mentions that integration and control are important aspects to consider in the field of robotics (in any robotic system for that matter). In any robotic system is it required for a number of modules to be combined and work together effectively. Lux() feels that robotic systems have important shortcomings. The Ravi System has the following unqiue features in terms of a robotic systems:
It is written in multiple languages (Scheme, Clips and C),
It has facilities for dynamic system building and memory management
and has elements for automatic program generation
Lux() are conviced that these features are crutial in order to solve hard problems in the development of intelligent robots, especially in terms of control and learning. Lux() proposes the example of visual perception of a robot, looking for free space. The goal of the Ravi system is to is to develop some common sense, finding traces of empty space by using simplistic features gathered from analysed images without constructing an computational expensive 3D world.
Functions that are written in C is called and these function's results are stored in variables in the Scheme part of the system, which is then used to calculate logic. Clips is used to style rules in order to implement a simple control structure. There are three levels in the architecture namely:
Low level routines which analyse images and controls the robots. These routines are written mostly in C. It is important that these low level routines can be used without any tricky manipulations.
Schema is used "put things together". Doing these computations in a Lisp-related language like Schema allows the following level op processing to be easy. The Schema part of the system cut lines into significant pieces. In some case Lisp is used as a prototyping language, and functions are recorded in C later on
Stereoscopic fusion is governed by a set of rules which can easily be expressed in Clips. However, it is important to have access, from within the rules, to the programs de ned at the two preceding levels. Clips rules also are usefull to control the overall behaviour, connecting sensor interpretation and action control.
This work has a lot of potential, especially for algorithms like collision detection and other artificial intelligence related algorithms.
Mobile Applications in Symbiam
The Symbiam Developer Community has a number of wiki's how to develop Multilanguage mobile applications, and what languages to . This section will touch on some of combinations mention there.
The Symbian operating system is compatible with number of languages like C++, Java, Flash and Python. This opens up a lot op mobile development possibilities without the need for a large skill set, which will boost productivity in software development for mobile phones.
Java Moblie Edition and Flash Lite
Wiegmann(2010) states that this combination of languages will make applications written in it more portable, since most phones can run Java applications. Flash Lite reduces development effort in terms of graphical and animated user interfaces. A tool called Jarpa can be used as base for creating Flash Lite applications. It also support Java ME.
Flash Lite files can be included in Java Mobile applications and does not need to be installed on the mobile phone its run on. If it's not already installed on the mobile phone it will be installed once the application is installed on the phone.
Symbiam C++ and Flash Lite
Wiegmann(2010) states that a Flash Lite application can not be directly run on a phone with Symbiam as an operating system, a C++ "stub application" is needed to execute the application. The "stub application" is also used to provide the Flash Lite Application with access to the phone's functionality. These applications are built as a normal Symbiam application, which includes an installation package for a Flash Lite application.
Using applications for Symbiam OS are written in Symbiam C++ anyway. It is known for its special and occasionally difficult constructs, intended to make the application more efficient. But efficiency is not really a good thing if it means that the user will struggle to use it to develop an application. Developers usually have hickups with C++ are usually things like memory management.
Python and Flash Lite/Java ME
Python can be used in most cases in the place of C++ since Python has a lot of modules that C++doesn't have, and it is also easier to develop applications with it. Unfortunately the mobile phone has to have a Python interpreter installed on it to execute a Python though.
One advantage that Python has over the other languages is that Python can access the phone's features directly since it has the same privileges as other Symbiam applications. Java ME unfortunately does not have these privileges, at best a Java applications needs permission from the phone to access its feature like for example the internet.
Multilanguage development is ideal for medium to large sized projects. This helps overcome shortages in programming languages and embrace positive aspects of it.
It seems that development takes a longer than just using a single language in development of a system, some might say it's "stickier" than using a single language. But Multi-language development seem allow the developer gain valuable learning languages and saving cost on development.
Phelps() states that the game industry is the playground of multi-language development, especially large scales applications. "The real-time nature of games and the features-obsessed culture of their audience leaves little room for error and presents one of the most demanding environments in which to develop" Phelps().
Vinonski() states that learning a new language also improves the skills that the developer already has. With the exposure to a new language the developer gets a better undertanding of certain concept, which helps developers see way s of using certain languages and in which situation to use them.
This paper has looked at various topics where Multilanguage development has already been used like big business, games and in robots. It's apparent that this field is growing rapidly with almost endless applications.
The work experience gathered from Barone Budge and Dominick revealed that Multilanguage development is more than a reality that one may think, but also revealed that there is still a lot to learn. At this moment it seem that attempts seem to be trial and error, but like Vinonski() states "whatever you do, don't be afraid of failure, because failing can be a very productive way to learn". After 4 years in development SARS Service Manager is one of the most successful projects that BB&D has ever encountered.
Multilanguage development forces developers to continually learn new processes and concepts and introduces new ways of solving problems. "Do any of us really believe we've already learned the last programming language we'll ever need?" (Vinonski)
In a corporate world, finding a single programming language becomes less feasible on a daily basis. Especially when designing software systems for large companies. There is no perfect language yet, there is a few that is generally used all around like Java, C# and C++, but even they has their pros and cons.
Luckily with multi-language development one does not have to find a silver bullet solution. It's basically using the best of 2 (or more) programming languages by making them work together in order to increase performance and fulfil non-functional requirements. As the saying goes two is better that one
Multilanguage development has some connection to Component Based Development. This was not discussed in this paper in detail. Future research can perhaps define this relationship and perhaps draw the line between Multilanguage development and CBD.
BB&D uses an extensive amount of code generation together with Multilanguage programming. There can possibly be future research how these 2 concepts can be combined, and what the implications can be.
The author would like to thank Prof Carina de Villiers from the department of Informatics which arrange work for the author at BB&D. The author would also like to thank the people at BB&D for their hospitally and the opportunity for working hand on hand on the SARS project. To name a few names : Dieter Rosch, my supervisor; Streicher Stegman, Mike Combrink, Johan Drenth, David Morrison and Ignus Swart for valuable insights and assistance in the process of solving problems; Karen Combrink and Edna Rathebe for adhoc admin queries and assistance.