Applications Generation

Cards (23)

  • Applications Software
    Software that is designed to used by the end-user to perform specific tasks, but requires systems software in order to run properly

    Examples:
    - Word Processing
    - Spreadsheets
    - Web browsers
  • Systems software
    Low-level software that is needed to run the computer's hardware and application programs smoothly (e.g. interacting with hardware and providing a platform for applications software to run on)

    Not directly interacted with by the user, but ensures high-performance for the user

    Examples:
    - Libraries
    - Utility programs
    - OS
    - Device drivers
  • Utilities/utility software
    Utilities are parts of system software that are used to ensure a consistent high performance​ of the operating system.

    Each utility program is key to the ​maintenance of the operating system.

    Main examples:
    - Compression
    - Disk Defragmentation
    - Antivirus
    - Automatic Updating
    - Backup Utility Software
  • Compression Software
    Provided by OS, allows various file types to be compressed or decompressed.

    This can be used to compress large files that are to be transmitted across the internet, and to compress scanned files
  • Disk Fragmentation
    As the hard disk becomes full, processing/read-write times become slower due to fragmented files being scattered across memory.

    The disk defragmenting software rearranges the contents of the hard drive​ so they can be accessed faster, which improves performance.
  • Anti-Virus
    Antivirus is responsible for ​finding potential threats​ to the computer, alerting the user and removing these threats.
  • Automatic Updating

    Makes sure that the OS is kept up to date by installing any updates automatically when the computer is restarted.

    Updates can tackle bugs + security flaws, so this makes sure the system is less prone to malware and hacking threats
  • Backup Utility Software
    The backup utility automatically creates routine copies of specific files selected by the user (and how often files are backed up is also specified by the user)

    This means that files can be recovered in the event of an emergency (power failure, malicious attack from malware/hackers, major accidents, etc)
  • Source Code
    A program in a high-level language that is yet to be complied into machine code.

    When software is described to be 'open source' or 'closed source', this refers to whether the source code is accessible to the public.
  • Open Source
    Open source code is code that can be used by anyone without a license and is distributed with the source code.

    Advantages:
    - The public have access to the source code so it can be edited and improved by anyone.
    - You can receive technical support from the online community.
    - Code can also be modified and sold on

    Disadvantages:
    - The support available online may be insufficient or incorrect, and there are no user manuals
    - There may be lower security as the code may not have been developed in a secure environment
  • Closed source
    Code that requires the user to have an appropriate license to use it, and users cannot access the source code as the company owns the copyright license to it

    Advantages:
    - The code will have frequent, thorough and well-tested updates
    - Expert support and user manuals will be provided
    - There will be high levels of security as the code is developed professionally.

    Disadvantages:
    - The users can't edit and improve software by themselves as they don't have the source code
    - A user's license restricts how many people can use the software at once
  • Translator
    A program that ​converts high-level source code into low-level object code​.

    There are three types of translator (compiler, translator and assembler) that convert different types of code and work in different ways.
  • Compiler
    Compilers translate high-level code into machine code ​all at once, after a number of checks are carried out and any errors are reported back.

    Advantages:
    - finished compiled code will have no errors
    - code can be run without a translator present

    Disadvantages:
    - The initial compilation process is longer than using an interpreter/assembler
    - If changes need to be made to the code, the whole program must be recompiled which makes it a longer process
    - Once code has been compiled into machine code it is specific to a particular processor type and OS (can only be executed on certain devices)
  • Interpreter
    Interpreters ​translate and execute code line-by-line, and they stop and report back an error to the user if a line contains an error (often with what line the error is on)

    Advantages
    - Interpreters are useful for ​testing ​sections of code and pinpointing errors in the code, as it doesn't waste time attempting to compile the entire program before returning any errors
    - Code can be executed on a range of platforms as long as the right interpreter is available, so interpreted code is more portable than compiled.

    Disadvantages
    - Interpreters may initially appear faster than compilers because code is instantly executed, but can be slower because ​each line of code must be translated separately every time the code is executed.
    - Interpreted code always requires an interpreter in order to run on different devices
  • Assembler
    Assemblers translate assembly code into machine code.

    Assembly code is a low-level language, as each instruction is almost always equal to one machine code instruction, and so code is translated on an almost one-to-one basis

    Assembly code varies with the type of computer - since assembly code is platform-specific, each computer may a different instruction set, so each instruction set will ultimately have different assembly code.
  • Stages of Compilation
    When a compiler is used, high-level code goes through four stages before it is turned into object code:
    - Lexical analysis
    - Syntax analysis
    - Code generation
    - Code optimisation
  • Lexical Analysis
    Whitespace and comments are removed​ from the code.
    E.g.
    while flag = False: print "not found";
    #terminates when item is found

    Is translated into:

    while flag =False: print"not found";


    The remaining code is analysed for keywords, variables and constants which are represented by tokens, and information about the token associated each keyword/identifier is stored in a ​symbol table​.
  • Syntax Analysis
    Tokens are analysed against the grammar
    and rules of the programming language​, and any tokens that break the rules of the programming language are ​flagged as syntax errors,​ and added to a list of errors.
    - Parsing is used to systematically apply a set of rules to each statement in the source code
    - Examples of syntax errors: undeclared variable types, incomplete set of brackets, etc

    The priorities of arithmetic operations can be clarified, and expressions can be converted into simpler forms so that machine code can be generated easily.

    An abstract syntax tree is produced (a representation of the source code in the form of a tree)

    Any further detail about the identifiers is also added to the symbol table

    Semantic analysis​ is also carried out, where logic mistakes are detected within the program
    - semantic errors examples: multiple declaration, undeclared identifiers, etc
  • Code Generation
    The abstract syntax tree produced in the syntax analysis stage is used to produce machine code.
  • Code Optimisation
    The code optimisation stage searches through the code for areas that could be made more efficient - overall aim is to​ make the code faster to execute

    Advantages:
    - Insignificant/redundant parts of the code are detected and removed​.
    - Repeated sections of code can be grouped and replaced with more efficient pieces of code that produce the same result in shorter time.

    Disadvantages:
    - Can significantly increase compilation time
    - Excessive code optimisation can alter the code's behaviour unexpectedly.
  • Libraries
    Pre-compiled programs which can be incorporated into other programs using linkers

    Most programming languages have pre-built in libraries (e.g. pygame in python)

    Advantages:
    - ready-to-use and error free (as already been tested and debugged), so save time in developing/testing
    - can be reused within multiple programs
    - often provide a specialised range of functions which would otherwise require lots of time/effort to develop, so save programmers even more time through using the expertise of those who created the library

    Disadvantages:
    - Adding functionality/specific tweaks near-impossible
    - Sometimes you can be "black-boxed" (essentially barred) from seeing the actual implementation, so you don't know how efficient the library really is
    - You have to trust that the developers of a library will continually maintain/update it
  • Loaders
    Programs provided by the OS - it loads the executable program file (machine code) into memory to be run
    - also (in dynamic linking) it loads the library/subroutine the file uses into memory from a given memory location
  • Linkers
    Software responsible for linking external modules/libraries mentioned within the code into the object code (by including them/their addresses in all external call + return instructions)

    Two types:
    - static - modules/libraries are added directly onto the main file (and therefore the machine code), which increases it's size but means that updates to the modules/libraries won't effect the program (so a specific version of a library can be used)
    - dynamic - addresses of modules/libraries are included in the file when referenced, and when the program is run the loader retrieves them at the specified address
    - A: files for the program remain small and there is no need to re-write the code should the library/module update like with static linkers (external updates feed through to the main file)
    - D: if the dynamic libraries change significantly, the program may stop functioning because it tries to call the subroutine in the wrong way