1 / 32

Piotr Mielecki Ph. D.

Introduction to Computer Systems (7). Application software – basic concepts, programming languages and developing tools, designing of the software. Piotr Mielecki Ph. D. http://www.wssk.wroc.pl/~mielecki. mielecki@wssk.wroc.pl. Piotr.Mielecki@pwr.wroc.pl. Basic concepts. 1.1. Definitions.

Download Presentation

Piotr Mielecki Ph. D.

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.


Presentation Transcript

  1. Introduction to Computer Systems (7) Application software –basic concepts, programming languages and developing tools, designing of the software. PiotrMielecki Ph. D. http://www.wssk.wroc.pl/~mielecki mielecki@wssk.wroc.pl Piotr.Mielecki@pwr.wroc.pl

  2. Basic concepts. 1.1. Definitions. • Application software – subclass of computer software that uses the resources of a computer directly to tasks that the user wishes to perform. This is distinguished from the system software, which integrates a various capabilities of the computer, but typically does not directly apply them to the tasks that benefit the user. In this context the term application refers to both the application software and its implementation as well. • Middleware – another class of software which was previously seen as something which works ”in the middle” between application software working on different machines, with different operating systems in many cases. ObjectWeb consortium defines middleware as: ”The software layer that lies between the operating system and applications on each side of a distributed computing system in a network”. Typical examples include client-server (SQL-oriented) database systems, telecommunications (networking) software, transaction monitors, and messaging-and-queueing software.

  3. The distinction between operating system or application software and middleware functionality is today arbitrary rather: • While core kernel functionality (like process management, for example) can only be provided by the operating system itself, some functionality previously provided by separately sold middleware is now typically integrated in operating systems. Well known example is the TCP/IP stack of communication protocols, nowadays implemented in most of operating systems on the kernel level. • The modern software tools used for virtualization (like VMware ESX Server – see Lecture 6.) work sometimes even below the level of operating system (between the hardware and operating system kernel / kernels). • On the other hand, Object Request Broker makes it possible for applications to send objects and request services in an object-oriented spread application system, Application Servers support serving (running) of applications for remote (in most of cases) clients etc.

  4. Multiple applications bundled together as a package are sometimes referred to as an application suite. In many cases (in most of Linux distributions, for example) many pieces of typical application software (like C/C++ compiler, OpenOffice.org office suite or PostgreSQL database engine, for example) are shipped together with the operating system. So sometimes it’s really hard to say, where the system software ”ends” and the application software ”starts” (is the file manager like TotalCommander or MidnightCommander an application program or not? Maybe they are both the ”system utilities”, but not a part of operating system itself?).

  5. 1.2. Types of application software. • We can classify the application software into some classes, taking into consideration the field of activity the programs can support and the user profiles: • Product engineering software – used in developing hardware and software products. This class includes Computer Aided Design (CAD), Computer Aided Engineering (CAE), programming language editing and compiling tools, Integrated Development Environments (IDE), and Application Programmer Interfaces (API). • Information worker software – designated for users who create and manage information, often for individual projects within a department (in contrast to enterprise management). Examples include Personal Information and Time Management (PIM), resource management, documentation tools, analytical, and collaborativeworking tools. Word processors, spreadsheets, e-mail and blog clients, and individual media editors may aid in multiple information worker tasks.

  6. Enterprise software addresses the needs of organization processes and data flow, often in a large distributed organizational structure. Examples include financial, customer relationship management, supply chain management, enterprise resource planning (ERP) etc. Departmental Software is a sub-type of Enterprise Software, with a focus on smaller organizations or groups within a large organization. Examples include travel expense management, call center support and IT helpdesk. • Enterprise infrastructure software provides common capabilities needed to create Enterprise Software systems. Examples include database engines, e-mail and web servers, network and security management tools etc. • Content access software is used primarily to access the information of particular type, without editing (but sometimes may include software that allows for content editing). Such software addresses the needs of individuals and groups to consume digital media and entertainment, and published digital content. Examples include media players, web browsers, help browsers, games etc.

  7. Media development software addresses the needs of authors who generate printed and electronic media for others to consume, most often in a commercial, entertainment or educational field. This includes graphic art software, desktop publishing systems (DTP), multimedia development tools, HTML editors, digital animation editors, digital audio and video composition, and many others. • Educational software is related to media and entertainment software, but has distinct requirements for delivering evaluations (tests) and tracking progress through material. It is also related to collaboration software in that many educational (or e-learning) systems include collaborative capabilities. • Simulation software – tools used for simulation of physical or abstract structures (like mechanical constructions, chemical processes or organizational workflows, for example), for research, training or entertainment purposes.

  8. 2. Programming languages. 2.1. Definitions. • Programming language – an artificial language that can be used to control the behavior of a machine, particularly a computer. Programming languages, like natural languages, are defined by: • syntactic rules (combination of different symbols), • semantic rules (meanings of these combinations), • which describe their structure and meaning respectively. • Many programming languages have some kind of written specification (ANSI, for example) of their syntax and semantics; some are defined only by an official implementation.

  9. Programming languages are used to support the task of organizing and manipulating information, and to express algorithms precisely. • Some authors restrict the term ”programming language” to those languages that can express all possible algorithms. • Sometimes the term ”computer language” is used for more limited languages, designed for specialized tasks (database querying in SQL, document page description in PostScript etc.). • Thousands of different programming languages have been created, and new languages are created every year.

  10. Most important aspects taking into consideration when defining computer languages: • Function – programming language is a language used to write computer programs, which involve a computer performing some kind of computation or algorithm and possibly control external devices such as printers, multimedia, robots, and so on. • Target – programming languages differ from natural languages in that natural languages are only used for interaction between people, while programming languages also allow humans to communicate instructions to machines. Some programming languages are used by one device to control another. For example PostScript programs are frequently created by another program to control a printer or display, SQL scripts are generated by client applications providing users with access to database systems etc. • Constructions – programming languages may contain different constructions for: • defining and manipulating data structures, • controlling the flow of execution.

  11. Expressive power – the theory of computation classifies languages by the computations they can express (see Chomsky hierarchy – hierarchical collection of strictly nested sets of symbols, classes of formal grammars in this case). All Turing-complete languages can implement the same set of strictly defined algorithms, so they can be called ”multipurpose” or ”general purpose” languages. ANSI/ISO SQL is example of language that is not Turing-complete, but also often called a programming language.

  12. 2.2. Purpose. • A purpose of programming languages is to provide instructions to a computer. Programming languages differ from human natural languages in that they require a greater degree of precision and completeness. When using a natural language to communicate with other people, human authors and speakers can make small errors, and still expect their intent to be understood. However, computers do exactly what they are told to do, and cannot understand the code the programmer ”intended” to write. • The combination of: • the language definition, • the program (written in this language), • the program’s inputs (data to process) • must fully specify the external behavior that occurs when the program is executed.

  13. Many languages have been designed from scratch, altered to meet new needs, combined with other languages, and eventually fallen into disuse. Although there have been attempts to design one ”universal” computer language that serves all purposes (”The universal programming language PL/I”, IBM Library; 1966), all of them have failed to be accepted in this role. The need for diverse computer languages arises from the diversity of contexts in which languages are used: • Programs range from tiny scripts written by individual hobbyists or system administrators for short tasks to huge projects implemented by hundreds of programmers. • Programmers range in expertise from novices who need simplicity above all else, to experts who may be comfortable with considerable complexity. • Programs must balance speed, size, and simplicity on systems ranging from microcontrollers to supercomputers. • Programs may be written once and not change for generations, or they may undergo nearly constant modifications. • Programmers may differ in their tastes: they may be accustomed to discussing problems and expressing them in a particular language.

  14. One common trend in the development of programming languages has been to add more ability to solve problems using a higher level of abstraction. • The earliest programming languages were tied very closely to the underlying hardware of the computer (close to assembly-level). • As new programming languages were developed, features have been added that let programmers express ideas that are more sophisticated than simple translation into underlying hardware instructions. • Because programmers are not forced to take the architecture of the particular computer under consideration, their programs can do more computing with less effort from the programmer. This lets them write more programs in the same amount of time. On the other hand, compiling the same source code or using the same scripts on computers with quite different hardware architectures (porting) is possible – the family of UNIX-like operating systems (especially when using C language) is good example.

  15. 2.3. Elements of computer languages. 2.3.1. Syntax and semantics. • Most programming languages are purely textual – to define and manipulate the symbols they use sequences of text including words, numbers, and punctuation, like written natural languages. • On the other hand, there are some programming languages which are more graphical in nature, using spatial relationships between symbols to specify a program. • The syntax of a language describes the possible combinations of symbols that form a syntactically correct program. • The meaning given to a combination of symbols is defined by semantics.

  16. Not all syntactically correct programs are semantically correct. Many syntactically correct programs are formed badly, per the language’s rules; and may (depending on the language specification and the implementation) result in an error on translation or execution. In some cases, such programs may exhibit undefined behavior. Even when a program is well-defined within a language, it may still have a meaning that is not intended by the person who wrote it. • The following C-language code example is syntactically correct, but semantically incorrect. We can compile it without any warnings, but program performs an operation that is not semantically defined (because c_val is a null pointer, the operations c_val->real and c_val->im have no meaning). So even if the compiler doesn’t show any error or warning the execution error will occur. • #include <math.h> • typedef struct { • float real; • float im; • } complex; • int main() • { • complex *c_val = NULL; • double abs_val = sqrt(c_val->real * c_val->real + c_val->im * c_val->im); • return( 0 ); • }

  17. 2.3.2. Data types. • A type system defines how a programming language classifies values and expressions into types, how it can manipulate those types and how do they interact. This generally includes a description of the data structures that can be used or constructed in the language. The design and study of type systems using formal mathematics is known as type theory. Typed vs. untyped languages. • A language is typedif operations defined for one data type cannot be performed on values of another data type. For example, “this text between the quotes” is a string. In most programming languages, dividing a number by a string has no meaning. Most modern programming languages will therefore reject any program attempting to perform such an operation. • In some languages, the meaningless operation will be detected when the program is compiled (static type checking), and rejected by the compiler, while in others it will be detected when the program is running (dynamic type checking), resulting in a runtime exception.

  18. In contrast, an untyped language, such as most assembly languages, allows any operation to be performed on any data, which are generally considered to be sequences of bits (binary words) of various lengths. The examples of high-level languages which are untyped are BCPL and some varieties of Forth. • In practice, while few languages are considered purely typed from the point of view of type theory (verifying or rejecting all operations), most modern languages offer a degree of typing. Many production languages provide means to bypass or subvert the type system (typecasting, unions, void pointers etc.).

  19. Static vs. dynamic typing. • In static typing all expressions have their types determined prior to the program being run (typically at compile time). For example, 1 and (2+2) are integer expressions; they cannot be passed to a function that expects a string, or stored in a variable that is defined to hold dates. Statically-typed languages can be: • manifestly typed – the programmer must explicitly write types at certain textual positions (for example, at variable declarations); • type-inferred– the compiler infers (deduces) the types of expressions and declarations based on context. • Most popular statically-typed languages, such as C++ and Java, are manifestly typed. Complete type inference has traditionally been associated with less mainstream languages, such as Haskell and ML. However, many manifestly typed languages support partial type inference; for example, Java and C# both infer types in certain limited cases.

  20. Dynamic typing, also called latent typing, determines the type-safety of operations at runtime. In other words, types are associated with runtime values rather than textual expressions. As with type-inferred languages, dynamically typed languages do not require the programmer to write explicit type annotations on expressions. Among other things, this may permit a single variable to refer to values of different types at different points in the program execution. However, type errors cannot be automatically detected until a piece of code is actually executed, making debugging more difficult. Ruby, Lisp, JavaScript, and Python are dynamically typed.

  21. Weak and strong typing. • Weak typing allows a value of one type to be treated as another, for example integer as float or string as a number. This can occasionally be useful, but it can also cause some kinds of program faults to go undetected at compile time. • Strong typing prevents the above. Attempting to mix types raises an error. Strongly-typed languages are often called type-safe or safe. Type safety can prevent particular kinds of program faults occurring (because constructs containing them are detected at compile time). • An alternative definition for ”weakly typed” refers to languages, such as Perl, JavaScript, and C++ which permit a large number of implicit type conversions (castings). Perl in particular can be characterized as a dynamically typed programming language in which type checking can take place at runtime. This capability is often useful, but occasionally dangerous; as it would permit operations whose objects can change type on demand. • Strong and static are generally considered orthogonal concepts, but usage in the literature differs. Some use the term strongly typed to mean strongly, statically typed, or, even more confusingly, to mean simply statically typed. Thus C has been called both strongly typed and weakly, statically typed.

  22. 2.3.3. Execution semantics. • Once data has been specified, the machine must be instructed to perform operations on the data. The execution semantics of a language defines how and when the various constructs of a language should produce a program behavior. For example, the semantics may define the strategy by which expressions are evaluated to values, or the manner in which different control structures conditionally execute statements. 2.3.4. Core library. • Most programming languages have an associated core library (sometimes known as the ”standard library”, especially if it is included as part of the published language standard, like ANSI C), which is conventionally made available by all implementations of the language. Core libraries typically include definitions for commonly used algorithms (functions), data structures, and mechanisms for input and output.

  23. 2.4. Implementation. • An implementation of a programming language provides a way to execute that program on one or more configurations of hardware and software. There are, broadly, two approaches to programming language implementation: compilation and interpretation: • The output of the compiler (and linker) is usually the binary code, which can be executed explicitly on the hardware. • The source code executed by the interpreter is usually analyzed line-after-line and then dynamically bonded to the appropriate constructs, implemented in the interpreter’s run-time environment. • In some implementations that make use of the interpreter approach there is no distinct boundary between compiling and interpreting. For instance, some implementations of the BASIC compile and then execute the source a line at a time. On the other hand, in some compilers (Java, for example) the source code is not compiled to binary (the internal language of the particular CPU), but to quasi-binary code / bytecode (Java classes, for example), which is then executed in the virtual machine environment (implemented in software for particular machine and/or operating system).

  24. One of the techniques used for improving the performance of interpreted programs is just-in-time compilation – the virtual machine monitors which sequences of bytecode are frequently executed and translates them to machine code for direct execution on the hardware.

  25. 2.5. Taxonomies (classifications) of programming languages. • There is no one universal classification scheme for programming languages. For example, given programming language does not usually have a single ancestor language. New languages commonly arise by combining the elements of several older languages with new ideas in circulation at the time. Ideas that originate in one language will diffuse throughout a family of related languages, and then leap suddenly across familial gaps to appear in an entirely different family. • The task is further complicated by the fact that languages can be classified along multiple axes. For example, Java is both an object-oriented language (because it encourages object-oriented organization) and a concurrent language (because it contains built-in constructs for running multiple threads in parallel). Python is an example of object-oriented scripting language and so on.

  26. Programming languages divide into programming paradigms (though patterns). Paradigms include: • procedural programming, • object-oriented programming, • functional programming, • logic programming. • Some languages are hybrids of paradigms or multi-paradigmatic. An assembly language is not so much a paradigm as a direct model of underlying machine architecture. • As far as intended domain of use (purpose) is concerned, programming languages might be considered: • general purpose, • system programming languages, • scripting languages, • domain-specific languages (databases or computer graphic, for example), • concurrent / distributed languages , • or a combination of these.

  27. 3. Software developing tools. • A programming tool or software tool is an application that software developers (programmers) use to create, debug, or maintain other programs and applications. • For many years this term referred to relatively simple programs that could be combined together to accomplish the project (see Fig. 1.). For many years, Computer-Assisted Software Engineering (CASE) tools were sought after. CASE tools emphasized design and architecture support, such as for Unified Modeling Language (UML). • Today’s developing tools are the sophisticated, integrated environments (Integrated Development Environment – IDE) rather. They consist of specialized editors, visual tools for graphic user interface (GUI) building, compilers, linkers, debuggers and support for team work.

  28. Today well-known examples of integrated environments are: • Microsoft Visual Studio – collection of different compilers (C++, Visual Basic, C# first of all) with support for visual-object designing of GUI, sophisticated editor and debuggers. • Borland Delphi, C++ Builder, C# Builder, JBuilderand other advanced, integrated environments for different languages (Object Pascal, C++, C#, Java), alternative to Microsoft Visual Studio, equipped with more ergonomic support for visual-object programming. • Eclipse – open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the development and entire lifecycle. The Eclipse Project was originally created by IBM in November 2001 and supported by a consortium of software vendors, as platform dedicated for Java programming first of all. The Eclipse Foundation was created in January 2004 as an independent not-for-profit corporation. The Eclipse IDE supports today also C++.

  29. EDITOR Source code(s) COMPILER COMPILATION Static library file(s) Other object file(s) Object file(s) LINKING LINKER Static libraries linked on loading Dynamic libraries linked while running Loadable binary code OS LOADER LOADING RUNNING

  30. 4. Designing of the software. • Software design is a process of problem-solving and planning for a software solution. After the purpose and specifications of software is determined, software developers will design or employ designers to develop a plan for a solution. It includes low-level component and algorithm implementation issues as well as the architectural view. • The software requirements analysis (SRA) step of a software development process yields specifications that are used in software engineering. • If the software is user-oriented, design may involve user experience in those specifications. • If the software is completely automated (meaning no user or user interface), a software design may be as simple as a flow chart or text describing a planned sequence of events. • There are also semi-formal methods like Unified Modeling Language(UML) and Fundamental Modeling concepts. In either case some documentation of the plan is usually the product of the design. The IEEE 1016-1998, also known as the 1016 Standard for Software Design Description is an IEEE standard that specifies the form of the document used to specify system architecture and application design in a software related project.

  31. There are many aspects to consider in the design of a piece of software: • Extensibility– new capabilities can be added to the software without major changes to the underlying architecture. • Robustness– the software is able to operate under stress or tolerate unpredictable or invalid input. For example, it can be designed with a resilience to low memory conditions. • Reliability– The software is able to perform a required function under stated conditions for a specified period of time. • Fault-tolerance– The software is resistant to and able to recover from component failure. • Security– The software is able to withstand hostile acts and influences. • Maintainability– The software can be restored to a specified condition within a specified period of time. For example, antivirus software may include the ability to periodically receive virus definition updates in order to maintain the software's effectiveness.

  32. Compatibility– The software is able to operate with other products that are designed for interoperability with another product. For example, a piece of software may be backward-compatible with an older version of itself. • Modularity– the resulting software comprises well defined, independent components. That leads to better maintainability. The components could be then implemented and tested in isolation before being integrated to form a desired software system. This allows division of work in a software development project. • Reuse– the modular components designed should capture the essence of the functionality expected out of them and no more or less. This single-minded purpose render the components reusable wherever there are similar needs in other designs.

More Related