Open source refers to a philosophy and practice characterized by making the code available (in the context of software), but the term is also used more broadly to refer to similar free culture principles in other fields.
Basic Workflow[edit | edit source]
- (Binary and Source Code) The source of the software can be analysed, updated and improve by software engineer and developers while the binary code of the open source software will be executed on an Operating System to perform specifics tasks to
- (Openness and Validation of the Code) The source of the software is completely open to check if the software does, what it pretends to do.
- (Compiler/Interpreter) The users can compile the software on their Operating System with an Open Source Compiler to convert the source code into the binary executable form that is running on the Operating System of choice. An Interpreter reads the source code and interprets the code directly on the operating system. Compiler and interpreter convert the source code into an executable form for the processor of your computer. The main difference between Compiler and Interpreter is that the compiler does that once and then the binary is executed and the interpreter does that on execution time on the operating.
- (Compiler/Interpreter as Open Source Software) A compiler and interpreter is a software product so the Open Source philosophy is applicable on these software products as well. The compiler as Open Source software allows software engineers to check, fix, optimize and add additional features to the compilation workflows to improve performance, privacy, ...
- (Execution on Operating Systems and Hardware) The hardware processors in a computer perform at the end the work encoded in the Open Source software. The executions on different hardware and operating systems should be functional equivalent to the open source code provided by the developers. E.g. if the open source defines the sum of two decimal numbers and then developers would expect that independent of operating systems the result of independent of the used hardware and operating system.
T-Diagram for a Compiler[edit | edit source]
The T-diagram for a compiler visualizes a task the compiler performs. The compiler in the diagram should convert source software in the programming language ADA into a functional equivalent software in destination language - The compiler itself is a software that is written in the programming language C.
Example of Interpreter and Compiler[edit | edit source]
In this example we analyse the concept of Java as programming language. We will see both concepts of interpretation and compilation are combined to retrieve a platform independent execution on different hardware and operating systems. As mentioned above different processors "understand" and interpret byte code information differently. So consequence is, that byte code for processor A will not be executed functionally equivalent on a processor B that gets the same byte code sequence as input. Java uses a compilation from source code to Java Byte Code (JBC) and executes that on different hardware and operating systems with the Java Runtime Environment (JRE). This software design of Java uses the JRE as an interpreter that generates functional equivalent execution of the source on different hardware.
Now we visualize a machine/hardware that is able to ("understand") interpret the byte code BC1. In a diagram we use a square with a double frame to indicate hardware. See the diagram on the right in which interpreter is started on hardware, that "understands" the byte code BC1. The interpreter itself is now executed and though the interpreter is able load open source code in Python and interpret the code.
Basically the interpreter converts the code in python into a sequence of commands into byte code BC1 that is doing the job encode in the OpenSource code in python. Let us assume we have software, that does Open Source Speech Recognition.
- The T-diagram for compiler is a theoretical compiler that is written in Python,
- when you execute the compiler it will convert a C++ source into the byte code BC1.
- the blue triangle indicates that the compiler is running and doing the job.
- to make the compiler run we put all the elements together.
- in the diagram below an Open Source speech recognition software written is compiled in byte code BC1 that is running on hardware that is able to interpret the byte code. The generated byte code is functional equivalent to source code. The different is that we have hardware that can execute the byte code BC1 but we do not have an interpreter for the open source code. So the Open Source code for speech recognition cannot be executed directly. Theoretically we could run the Open Source speech recognition if the we C++ interpreter available that runs a BC1 hardware.
- In the following diagram the generated /compiled speech recognition software in byte code BC1 is regarded. In this context the speech recognition software are regarded as input file (in C++) and output file in the byte code BC1.
- at the bottom on the right hand side in the output file from the compilation process is not interpreted on a machine that take command in byte code as input and executes the code. The blue triangle indicates that the software in running and here to software take audio input from a microphone and converts the audio input into recognized text output.
- the main lesson learnt is that Open Source software is used in different use-cases. The compilation of the source code and in an execution context on a hardware where the functional equivalent software in BC1 is executed.
- explain the interpretation process how the compiler is running. Explain the relevance for offline speech recognition in an educational setting for processing audio input with an Open Source compilation and interpretation infrastructure locally in a digital learning environment.
Learning Tasks[edit | edit source]
- (T- and I-diagrams for Java as Programming Language) Analyse the concept of Java and do a presentation about Interpreter and Compiler and how those principles work together for open source software created with Java. Explain the role of platform independency of the Java software design principle.
- (Compiling and Executing an Open Source Editor) Search e.g. for a open source text editor written in Java for OpenJDK (Open Java Developers Kit) and explain that workflow to the other students in your class or seminar. Explain with T-diagrams and I-diagrams how the Open Source editor written in Java is compiled, executed for editing specific files. Explain the role of input and output files in the context of an editor in comparison to input and output file of compilers.
- Compare the workflow in Java with an approach for Linux Operating Systems where open source code for the operating system is compiled from C++, C# to byte code that can be executed directly on hardware and operating system.
- (Operating Systems) Operating System are doing their job between hardware and the Open Source applications. The hardware can be the same but on one computer an OpenSource Linux operating system is installed and on the other computer a different operating system. Extend the T-diagrams and I-diagrams with an Operating System on top of the hardware in mind. What are important requirements and constraints for compiling and executing Open Source applications on different operating systems. Create I-diagrams and T-diagrams for that context and you might want to include even the use of virtual machines implemented as OpenSource infrastructure. What are the benefits to write code for an OpenSource application and create with different compilers binaries as executable byte code on Linux BC1, LineageOS on mobile device BC2 or even on proprietary operating systems.
- (Open Source Speech Recognition) Assume we compile in an Open Source speech recognition software from Java source code into Java Byte Code (JBC). This functional equivalent code in JBC can now be executed on different hardware and operating systems. Create the I-diagrams for the interpretation on different machine and the T-diagram for compilation of the open source software. What are the benefits and challenges for such a scenario for the developer.
- (Bootstrap - Compiling a Compiler) Now we assume we have a compiler for Python that is written in Python. This compiler compiles Python source code into a specific byte code BC1. Furthermore we have a Python interpreter that is able to interpret Python code and execute the Compiler written in Python on a machine the executes byte code BC1. Paint the I-diagram and T-diagram for the compilation of open source software written in Python. Create with the tools you have as learning task a binary for Python compilerhttps://pegjs.org/ (Java to BC1) that runs natively on the machine BC1 and is not interpreted with an OpenSource Python interpreter for compiling Python sources in byte code BC1.
Objectives[edit | edit source]
Design of learning resource will support learners for the following objectives:
- be able to access the application of open source software and identify requirements and constraints of applications,
- assist learner in installation, maintenance and usage of open source software on different levels:
- Open Source Operating Systems
- Open Source Software
- Open Source on Open Hardware
- learn about challenges and workflows to migrate towards an Open Source infrastructure of multiple IT devices.
- Calculate total cost of ownership
For more info, see open source (Wikipedia).
Learning Task[edit | edit source]
- (Digital Divide) Explore the benefits and challenges for Open Source Software, the maintenance, ... and analyze the relevance for working against the Digital Divide.
- (Sustainable Development Goals) Explain the relevance for Sustainable Development Goals - check the different goals for application of Open Source software and identify possible Open Source software for the specific goal.
- (Low-Cost Technology) Explore the concept of low-cost technology to reach a maximum number of people.
- (Open Community Approach) The Open Community Approach is a generalisation of the Open Source principle. Explain the differences and join ideas that are shared between Open Source and the Open Community Approach!
Idea[edit | edit source]
Open source software development has begun a revolution. The three major characteristics are:
- open source revision control/repository systems such as Git,
- pair programming that starts with modifying examples,
- Test driven development (TDD) which involves Unit Testing documented by DICE.
A majority of engineering projects involve software. Typically the next team finds it easier to start over rather than re-use software. This has to change. The above tools are designed to emphasize software documentation and creation that is rapidly evolving in the open software community.
The goal of this project is to develop introductory tutorials in each of the above topics, figure out how to integrate this within a general engineering introduction course, and how this is linked to wikiversity documentation.
Version Control Systems[edit | edit source]
A community of developers create bug fixes, improve the software and create new releases in a team. Explain the role of Version Control for the Open Source community.