text
stringlengths
11
320k
source
stringlengths
26
161
Documentationis any communicable material that is used to describe, explain or instruct regarding some attributes of an object, system or procedure, such as its parts, assembly, installation, maintenance, and use.[1]As a form ofknowledge managementandknowledge organization, documentation can be provided on paper, online, or ondigitaloranalog media, such asaudio tapeorCDs. Examples areuser guides,white papers,online help, and quick-reference guides. Paper or hard-copy documentation has become less common.[citation needed]Documentation is often distributed via websites, software products, and other online applications. Documentation as a set of instructional materials shouldn't be confused withdocumentation science, the study of the recording and retrieval of information. While associatedInternational Organization for Standardization(ISO) standards are not easily available publicly, a guide from other sources for this topic may serve the purpose.[2][3][4][5] Documentation development may involve document drafting, formatting, submitting, reviewing, approving, distributing, reposting and tracking, etc., and are convened by associatedstandard operating procedurein a regulatory industry. It could also involve creating content from scratch. Documentation should be easy to read and understand. If it is too long and too wordy, it may be misunderstood or ignored. Clear, concise words should be used, and sentences should be limited to a maximum of 15 words. Documentation intended for a general audience should avoid gender-specific terms and cultural biases. In a series of procedures, steps should be clearly numbered.[6][7][8][9] Technical writersand corporate communicators are professionals whose field and work is documentation. Ideally, technical writers have a background in both the subject matter and also in writing, managing content, andinformation architecture. Technical writers more commonly collaborate withsubject-matter experts, such as engineers, technical experts, medical professionals, etc. to define and then create documentation to meet the user's needs.Corporate communicationsincludes other types of written documentation, for example: The following are typical software documentation types: The following are typical hardware and service documentation types: Acommon typeof software document written in the simulation industry is the SDF. When developing software for a simulator, which can range from embedded avionics devices to 3D terrain databases by way of full motion control systems, the engineer keeps a notebook detailing the development "the build" of the project or module. The document can be a wiki page, Microsoft Word document or other environment. They should contain arequirementssection, aninterfacesection to detail the communication interface of the software. Often anotessection is used to detail the proof of concept, and then track errors and enhancements. Finally, atestingsection to document how the software was tested. This documents conformance to the client's requirements. The result is a detailed description of how the software is designed, how to build and install the software on the target device, and any known defects and workarounds. This build document enables future developers and maintainers to come up to speed on the software in a timely manner, and also provides a roadmap to modifying code or searching for bugs. These software tools can automatically collect data of your network equipment. The data could be for inventory and for configuration information. TheInformation Technology Infrastructure Libraryrequests to create such a database as a basis for all information for the IT responsible. It is also the basis for IT documentation. Examples include XIA Configuration.[11] "Documentation" is the preferred term for the process of populating criminal databases. Examples include theNational Counterterrorism Center'sTerrorist Identities Datamart Environment,sex offender registries, and gang databases.[12] Documentation, as it pertains to the early childhood education field, is "when we notice and value children's ideas, thinking, questions, and theories about the world and then collect traces of their work (drawings, photographs of the children in action, and transcripts of their words) to share with a wider community".[13] Thus, documentation is a process, used to link the educator's knowledge and learning of the child/children with the families, other collaborators, and even to the children themselves. Documentation is an integral part of the cycle of inquiry - observing, reflecting, documenting, sharing and responding.[13] Pedagogical documentation, in terms of the teacher documentation, is the "teacher's story of the movement in children's understanding".[13]According to Stephanie Cox Suarez in "Documentation - Transforming our Perspectives", "teachers are considered researchers, and documentation is a research tool to support knowledge building among children and adults".[14] Documentation can take many different styles in the classroom. The following exemplifies ways in which documentation can make the research, or learning, visible: Documentation is certainly a process in and of itself, and it is also a process within the educator. The following is the development of documentation as it progresses for and in the educator themselves:
https://en.wikipedia.org/wiki/Documentation
Literate programmingis aprogramming paradigmintroduced in 1984 byDonald Knuthin which acomputer programis given as an explanation of how it works in anatural language, such as English, interspersed (embedded) withsnippetsofmacrosand traditionalsource code, from whichcompilablesource code can be generated.[1]The approach is used inscientific computingand indata scienceroutinely forreproducible researchandopen accesspurposes.[2]Literate programming tools are used by millions of programmers today.[3] The literate programming paradigm, as conceived by Donald Knuth, represents a move away from writing computer programs in the manner and order imposed by the compiler, and instead givesprogrammersmacros to develop programs in the order demanded by the logic and flow of their thoughts.[4]Literate programs are written as an exposition of logic in morenatural languagein whichmacrosare used to hide abstractions and traditionalsource code, more like the text of anessay. Literate programming (LP) tools are used to obtain two representations from a source file: one understandable by a compiler or interpreter, the "tangled" code, and another for viewing as formatteddocumentation, which is said to be "woven" from the literate source.[5]While the first generation of literate programming tools werecomputer language-specific, the later ones arelanguage-agnosticand exist beyond the individual programming languages. Literate programming was first introduced in 1984 by Donald Knuth, who intended it to create programs that were suitable literature for human beings. He implemented it atStanford Universityas a part of his research onalgorithmsand digitaltypography. The implementation was called "WEB" since he believed that it was one of the few three-letter words of English that had not yet been applied to computing.[6]However, it resembles the complicated nature of software delicately pieced together from simple materials.[1]The practice of literate programming has seen an important resurgence in the 2010s with the use ofcomputational notebooks, especially indata science. Literate programming is writing out the program logic in a human language with included (separated by a primitive markup) code snippets and macros. Macros in a literate source file are simply title-like or explanatory phrases in a human language that describe human abstractions created while solving the programming problem, and hiding chunks of code or lower-level macros. These macros are similar to thealgorithmsinpseudocodetypically used in teachingcomputer science. These arbitrary explanatory phrases become precise new operators, created on the fly by the programmer, forming ameta-languageon top of the underlying programming language. Apreprocessoris used to substitute arbitrary hierarchies, or rather "interconnected 'webs' of macros",[7]to produce the compilable source code with one command ("tangle"), and documentation with another ("weave"). The preprocessor also provides an ability to write out the content of the macros and to add to already created macros in any place in the text of the literate program source file, thereby disposing of the need to keep in mind the restrictions imposed by traditional programming languages or to interrupt the flow of thought. According to Knuth,[8][9]literate programming provides higher-quality programs, since it forces programmers to explicitly state the thoughts behind the program, making poorly thought-out design decisions more obvious. Knuth also claims that literate programming provides a first-rate documentation system, which is not an add-on, but is grown naturally in the process of exposition of one's thoughts during a program's creation.[10]The resulting documentation allows the author to restart their own thought processes at any later time, and allows other programmers to understand the construction of the program more easily. This differs from traditional documentation, in which a programmer is presented with source code that follows a compiler-imposed order, and must decipher the thought process behind the program from the code and its associated comments. The meta-language capabilities of literate programming are also claimed to facilitate thinking, giving a higher "bird's eye view" of the code and increasing the number of concepts the mind can successfully retain and process. Applicability of the concept to programming on a large scale, that of commercial-grade programs, is proven by an edition ofTeXcode as a literate program.[8] Knuth also claims that literate programming can lead to easy porting of software to multiple environments, and even cites the implementation of TeX as an example.[11] Literate programming is very often misunderstood[12]to refer only to formatted documentation produced from a common file with both source code and comments – which is properly calleddocumentation generation– or to voluminous commentaries included with code. This is the converse of literate programming: well-documented code or documentation extracted from code follows the structure of the code, with documentation embedded in the code; while in literate programming, code is embedded in documentation, with the code following the structure of the documentation. This misconception has led to claims that comment-extraction tools, such as thePerlPlain Old DocumentationorJavaJavadocsystems, are "literate programming tools". However, because these tools do not implement the "web of abstract concepts" hiding behind the system of natural-language macros, or provide an ability to change the order of the source code from a machine-imposed sequence to one convenient to the human mind, they cannot properly be called literate programming tools in the sense intended by Knuth.[12][13] Implementing literate programming consists of two steps: Weaving and tangling are done on the same source so that they are consistent with each other. A classic example of literate programming is the literate implementation of the standardUnixwcword counting program. Knuth presented aCWEBversion of this example in Chapter 12 of hisLiterate Programmingbook. The same example was later rewritten for thenowebliterate programming tool.[14]This example provides a good illustration of the basic elements of literate programming. The following snippet of thewcliterate program[14]shows how arbitrary descriptive phrases in a natural language are used in a literate program to create macros, which act as new "operators" in the literate programming language, and hide chunks of code or other macros. The mark-up notation consists of double angle brackets (<<...>>) that indicate macros. The@symbol, in a noweb file, indicates the beginning of a documentation chunk. The<<*>>symbol stands for the "root", topmost node the literate programming tool will start expanding the web of macros from. Actually, writing out the expanded source code can be done from any section or subsection (i.e. a piece of code designated as<<name of the chunk>>=, with the equal sign), so one literate program file can contain several files with machine source code. The unraveling of the chunks can be done in any place in the literate program text file, not necessarily in the order they are sequenced in the enclosing chunk, but as is demanded by the logic reflected in the explanatory text that envelops the whole program. Macros are not the same as "section names" in standard documentation. Literate programming macros hide the real code behind themselves, and be used inside any low-level machine language operators, often inside logical operators such asif,whileorcase. This can be seen in the followingwcliterate program.[14] The macros stand for any chunk of code or other macros, and are more general than top-down or bottom-up "chunking", or than subsectioning. Donald Knuth said that when he realized this, he began to think of a program as awebof various parts.[1] In a noweb literate program besides the free order of their exposition, the chunks behind macros, once introduced with<<...>>=, can be grown later in any place in the file by simply writing<<name of the chunk>>=and adding more content to it, as the following snippet illustrates (+is added by the document formatter for readability, and is not in the code).[14] The documentation for a literate program is produced as part of writing the program. Instead of comments provided as side notes to source code a literate program contains the explanation of concepts on each level, with lower level concepts deferred to their appropriate place, which allows for better communication of thought. The snippets of the literatewcabove show how an explanation of the program and its source code are interwoven. Such exposition of ideas creates the flow of thought that is like a literary work. Knuth wrote a "novel" which explains the code of theinteractive fictiongameColossal Cave Adventure.[15] The first published literate programming environment wasWEB, introduced by Knuth in 1981 for hisTeXtypesetting system; it usesPascalas its underlying programming language and TeX for typesetting of the documentation. The complete commented TeX source code was published in Knuth'sTeX: The program, volume B of his 5-volumeComputers and Typesetting. Knuth had privately used a literate programming system called DOC as early as 1979. He was inspired by the ideas ofPierre-Arnoul de Marneffe.[16]The freeCWEB, written by Knuth and Silvio Levy, is WEB adapted forCandC++, runs on most operating systems, and can produce TeX andPDFdocumentation. There are various other implementations of the literate programming concept as given below. Many of the newer among these do not have macros and hence do not comply with theorder of human logicprinciple, which makes them perhaps "semi-literate" tools. These, however, allow cellular execution of code which makes them more along the lines ofexploratory programmingtools. Other useful tools include: The literate scripts can be full LaTeX source text, at the same time it can be compiled, with no changes, because the interpreter only compiles the text in a code environment, for example: The code can be also marked in the Richard Bird style, starting each line with a greater than symbol and a space, preceding and ending the piece of code with blank lines. The LaTeXlistingspackage provides alstlistingenvironment which can be used to embellish the source code. It can be used to define acodeenvironment to use within Haskell to print the symbols in the following manner: which can be configured to yield: I had the feeling that top-down and bottom-up were opposing methodologies: one more suitable for program exposition and the other more suitable for program creation. But after gaining experience with WEB, I have come to realize that there is no need to choose once and for all between top-down and bottom-up, because a program is best thought of as a web instead of a tree. A hierarchical structure is present, but the most important thing about a program is its structural relationships. A complex piece of software consists of simple parts and simple relations between those parts; the programmer's task is to state those parts and those relationships, in whatever order is best for human comprehension not in some rigidly determined order like top-down or bottom-up. WEB's macros are allowed to have at most one parameter. Again, I did this in the interests of simplicity, because I noticed that most applications of multiple parameters could in fact be reduced to the one-parameter case. For example, suppose that you want to define something like [example elided] .... In other words, the name of one macro can usefully be a parameter to another macro. Another surprising thing that I learned while using WEB was that traditional programming languages had been causing me to write inferior programs, although I hadn't realized what I was doing. My original idea was that WEB would be merely a tool for documentation, but I actually found that my WEB programs were better than the programs I had been writing in other languages. Thus the WEB language allows a person to express programs in a"stream of consciousness" order. TANGLE is able to scramble everything up into the arrangement that a PASCAL compiler demands. This feature of WEB is perhaps its greatest asset; it makes a WEB-written program much more readable than the same program written purely in PASCAL, even if the latter program is well commented. And the fact that there's no need to be hung up on the question of top-down versus bottom-up, since a programmer can nowview a large program as a web, to be explored in apsychologically correct orderis perhaps the greatest lessonI have learned from my recent experiences. I chose the name WEB partly because it was one of the few three-letter words of English that hadn't already been applied to computers. But as time went on, I've become extremely pleased with the name, because I think that a complex piece of software is, indeed, best regarded as a web that has been delicately pieced together from simple materials. We understand a complicated system by understanding its simple parts, and by understanding the simple relations between those parts and their immediate neighbors. If we express a program as a web of ideas, we can emphasize its structural properties in a natural and satisfying way.
https://en.wikipedia.org/wiki/Literate_programming
In software distribution andsoftware development, aREADMEfilecontains information about the other files in adirectoryorarchiveof computersoftware. A form ofdocumentation, it is usually a simpleplain textfile calledREADME,Read Me,READ.ME,README.txt,[1]orREADME.md(to indicate the use ofMarkdown) The file's name is generally written in uppercase. OnUnix-likesystems in particular, this causes it to stand out – both because lowercase filenames are more common, and because thelscommand commonly sorts and displays files inASCII-code order, in which uppercase filenames will appear first.[nb 1] A README file typically encompasses: The convention of including a README file began in the mid-1970s.[3][4][5][6][7][8][9]EarlyMacintosh system softwareinstalled a Read Me on the Startup Disk, and README files commonly accompanied third-party software. In particular, there is a long history offree softwareandopen-source softwareincluding a README file; theGNU Coding Standardsencourage including one to provide "a general overview of the package".[10] Since the advent of thewebas ade factostandardplatform forsoftware distribution, many software packages have moved (or occasionally, copied) some of the above ancillary files and pieces of information to awebsiteorwiki, sometimes including the README itself, or sometimes leaving behind only a brief README file without all of the information required by a new user of the software. The popularsource codehosting websiteGitHubstrongly encourages the creation of a README file – if one exists in the main (top-level) directory of a repository, it is automatically presented on the repository's front page.[11]In addition to plain text, various other formats andfile extensionsare also supported,[12]and HTML conversion takes extensions into account – in particular aREADME.mdis treated asGitHub Flavored Markdown. The expression "readme file" is also sometimes used generically, for other files with a similar purpose.[citation needed]For example, the source-code distributions of many free software packages (especially those following theGnits Standardsor those produced withGNU Autotools) include a standard set of readme files: Also commonly distributed with software packages are anFAQfile and aTODOfile, which lists planned improvements. This article is based in part on theJargon File, which is in the public domain.
https://en.wikipedia.org/wiki/README
User assistanceis a general term for guided assistance to a user of asoftwareproduct. The phrase incorporates all forms of help available to a user. Assistance can also automatically perform procedures or step users through the procedure, depending on the question that the user asked. The term is broader thanonline help, and includes procedural and tutorial information. User assistance provides information to help a person to interact with software. This can include describing the user interface, but also focuses on how to help the user to best apply the software capabilities to their needs. User assistance can be considered a component of the broader category ofuser experience. User assistance employs a number of devices including help,wizards,tutorials, printed manuals (and theirPDFequivalents), and user interface text. User assistance professionals also contribute to enterprise knowledge bases andcontent management systems.[1] Effective user assistance development requires a variety of communication skills. These include writing, editing,task analysis, andsubject-matter expert(SME) interviewing. Since the user assistance profession is directly involved with software development, the discipline often requires an understanding ofUIdesign, usability testing,localization, testing,quality assurance, instructional design,scriptingorprogramming, and accessibility.[1] For information related to this topic, seeInstruction manual (computer and video games) A traditional form of user assistance is a user manual, which is distributed either with the product inpaperform or electronically. Typical features of a user manual include installation procedures, a guide to how to use the software, as well as a disclaimer stating the licensing status of the software. Details of a helpline may also be available. For more information on this topic, seeOnline help For information related to this topic, seeHelpline
https://en.wikipedia.org/wiki/User_Assistance
TheUnified Modeling Language(UML) is a general-purpose visualmodeling languagethat is intended to provide a standard way to visualize the design of a system.[1] UML provides a standard notation for many types of diagrams which can be roughly divided into three main groups: behavior diagrams, interaction diagrams, and structure diagrams. The creation of UML was originally motivated by the desire to standardize the disparate notational systems and approaches to software design. It was developed atRational Softwarein 1994–1995, with further development led by them through 1996.[2] In 1997, UML was adopted as a standard by theObject Management Group(OMG) and has been managed by this organization ever since. In 2005, UML was also published by theInternational Organization for Standardization(ISO) and theInternational Electrotechnical Commission(IEC) as theISO/IEC 19501standard.[3]Since then the standard has been periodically revised to cover the latest revision of UML.[4] In software engineering, most practitioners do not use UML, but instead produce informal hand drawn diagrams; these diagrams, however, often include elements from UML.[5]: 536 UML has evolved since the second half of the 1990s and has its roots in theobject-oriented programmingmethods developed in the late 1980s and early 1990s. The timeline (see image) shows the highlights of the history of object-oriented modeling methods and notation. It is originally based on the notations of theBooch method, theobject-modeling technique(OMT), andobject-oriented software engineering(OOSE), which it has integrated into a single language.[6] Rational Software CorporationhiredJames RumbaughfromGeneral Electricin 1994 and after that, the company became the source for two of the most popular object-oriented modeling approaches of the day:[7]Rumbaugh'sobject-modeling technique(OMT) andGrady Booch's method. They were soon assisted in their efforts byIvar Jacobson, the creator of theobject-oriented software engineering(OOSE) method, who joined them at Rational in 1995.[2] Under the technical leadership of those three (Rumbaugh, Jacobson, and Booch), a consortium called theUML Partnerswas organized in 1996 to complete theUnified Modeling Language (UML)specification and propose it to the Object Management Group (OMG) for standardization. The partnership also contained additional interested parties (for exampleHP,DEC,IBM, andMicrosoft). The UML Partners' UML 1.0 draft was proposed to the OMG in January 1997 by the consortium. During the same month, the UML Partners formed a group, designed to define the exact meaning of language constructs, chaired byCris Kobrynand administered by Ed Eykholt, to finalize the specification and integrate it with other standardization efforts. The result of this work, UML 1.1, was submitted to the OMG in August 1997 and adopted by the OMG in November 1997.[2][8] After the first release, a task force was formed[2]to improve the language, which released several minor revisions, 1.3, 1.4, and 1.5.[9] The standards it produced (as well as the original standard) have been noted as being ambiguous and inconsistent.[10] As with database Chen, Bachman, and ISOER diagrams, class models are specified to use "look-across"cardinalities, even though several authors (Merise,[11]Elmasri & Navathe,[12]amongst others[13]) prefer same-side or "look-here" for roles and both minimum and maximum cardinalities. Recent researchers (Feinerer[14]and Dullea et al.[15]) have shown that the "look-across" technique used by UML and ER diagrams is less effective and less coherent when applied ton-ary relationships of order strictly greater than 2. Feinerer says: "Problems arise if we operate under the look-across semantics as used for UML associations. Hartmann[16]investigates this situation and shows how and why different transformations fail.", and: "As we will see on the next few pages, the look-across interpretation introduces several difficulties which prevent the extension of simple mechanisms from binary ton-ary associations." UML 2.0 major revision replaced version 1.5 in 2005, which was developed with an enlarged consortium to improve the language further to reflect new experiences on the usage of its features.[17] Although UML 2.1 was never released as a formal specification, versions 2.1.1 and 2.1.2 appeared in 2007, followed by UML 2.2 in February 2009. UML 2.3 was formally released in May 2010.[18]UML 2.4.1 was formally released in August 2011.[18]UML 2.5 was released in October 2012 as an "In progress" version and was officially released in June 2015.[18]The formal version 2.5.1 was adopted in December 2017.[1] There are four parts to the UML 2.x specification: Until UML 2.4.1, the latest versions of these standards were:[19] Since version 2.5, the UML Specification has been simplified (without Superstructure and Infrastructure), and the latest versions of these standards are now:[20] It continues to be updated and improved by the revision task force, who resolve any issues with the language.[21] UML offers a way to visualize a system's architectural blueprints in a diagram, including elements such as:[6] Although originally intended for object-oriented design documentation, UML has been extended to a larger set of design documentation (as listed above),[22]and has been found useful in many contexts.[23] UML is not a development method by itself;[24]however, it was designed to be compatible with the leading object-oriented software development methods of its time, for example,OMT,Booch method,Objectory, and especiallyRUPit was originally intended to be used with when work began at Rational Software. It is important to distinguish between the UML model and the set of diagrams of a system. A diagram is a partial graphic representation of a system's model. The set of diagrams need not completely cover the model and deleting a diagram does not change the model. The model may also contain documentation that drives the model elements and diagrams (such as written use cases). UML diagrams represent two different views of a system model:[25] UML models can be exchanged amongUML toolsby using theXML Metadata Interchange(XMI) format. In UML, one of the key tools for behavior modeling is the use-case model, caused byOOSE. Use cases are a way of specifying required usages of a system. Typically, they are used to capture the requirements of a system, that is, what a system is supposed to do.[26] UML 2 has many types of diagrams, which are divided into two categories.[6]Some types representstructuralinformation, and the rest represent general types ofbehavior, including a few that represent different aspects ofinteractions. These diagrams can be categorized hierarchically as shown in the following class diagram:[6] These diagrams may all contain comments or notes explaining usage, constraint, or intent. Structure diagrams represent the static aspects of the system. It emphasizes the things that must be present in the system being modeled. Since structure diagrams represent the structure, they are used extensively in documenting thesoftware architectureof software systems. For example, thecomponent diagramdescribes how a software system is split up into components and shows the dependencies among these components. Behavior diagrams represent the dynamic aspect of the system. It emphasizes what must happen in the system being modeled. Since behavior diagrams illustrate the behavior of a system, they are used extensively to describe the functionality of software systems. As an example, theactivity diagramdescribes the business and operational step-by-step activities of the components in a system. Visual Representation: Staff User → Complaints System: Submit Complaint Complaints System → HR System: Forward Complaint HR System → Department: Assign Complaint Department → Complaints System: Update Resolution Complaints System → Feedback System: Request Feedback Feedback System → Staff User: Provide Feedback Staff User → Feedback System: Submit Feedback. This description can be used to draw a sequence diagram using tools like Lucidchart, Draw.io, or any UML diagram software. The diagram would have actors on the left side, with arrows indicating the sequence of actions and interactions between systems and actors as described. Sequence diagrams should be drawn for each use case to show how different objects interact with each other to achieve the functionality of the use case. In UML, anartifact[27]is the "specification of a physical piece of information that is used or produced by asoftware development process, or by deployment and operation of a system."[27] "Examples of artifacts include model files,sourcefiles, scripts, andbinary executablefiles, atablein adatabase system, a development deliverable, aword-processingdocument, or amailmessage."[27] Artifacts are the physical entities that are deployed onNodes[27](i.e. Devices and Execution Environments). Other UML elements such as classes and components are first manifested into artifacts and instances of these artifacts are then deployed. Artifacts can also be composed of other artifacts. TheObject Management Group(OMG) has developed ametamodelingarchitecture to define the UML, called theMeta-Object Facility.[28]MOF is designed as a four-layered architecture, as shown in the image at right. It provides a meta-meta model at the top, called the M3 layer. This M3-model is the language used by Meta-Object Facility to build metamodels, called M2-models. The most prominent example of a Layer 2 Meta-Object Facility model is the UML metamodel, which describes the UML itself. These M2-models describe elements of the M1-layer, and thus M1-models. These would be, for example, models written in UML. The last layer is the M0-layer or data layer. It is used to describe runtime instances of the system.[29] The meta-model can be extended using a mechanism calledstereotyping. This has been criticized as being insufficient/untenable byBrian Henderson-Sellersand Cesar Gonzalez-Perez in "Uses and Abuses of the Stereotype Mechanism in UML 1.x and 2.0".[30] In 2013, UML had been marketed by OMG for many contexts, but aimed primarily at software development with limited success.[23][31] It has been treated, at times, as a designsilver bullet, which leads to problems. UML misuse includes overuse (designing every part of the system with it, which is unnecessary) and assuming that novices can design with it.[32] It is considered a large language, with manyconstructs. Some people (includingJacobson) feel that UML's size hinders learning and therefore uptake.[33] MS Visual Studio dropped support for UML in 2016 due to lack of usage.[34] According to Google Trends, UML has been on a steady decline since 2004.[35]
https://en.wikipedia.org/wiki/Unified_Modeling_Language
Incomputer science,pseudocodeis a description of the steps in analgorithmusing a mix of conventions ofprogramming languages(likeassignment operator,conditional operator,loop) with informal, usually self-explanatory, notation of actions and conditions.[1][2]Although pseudocode shares features with regularprogramming languages, it is intended forhumanreading rather than machine control. Pseudocode typically omits details that are essential for machine implementation of the algorithm, meaning that pseudocode can only be verified by hand.[3]The programming language isaugmentedwithnatural languagedescription details, where convenient, or with compactmathematical notation. The reasons for using pseudocode are that it is easier for people to understand than conventional programming language code and that it is an efficient and environment-independent description of the key principles of an algorithm. It is commonly used in textbooks andscientific publicationsto document algorithms and in planning of software and other algorithms. No broad standard for pseudocodesyntaxexists, as a program in pseudocode is not an executable program; however, certain limited standards exist (such as for academic assessment). Pseudocode resemblesskeleton programs, which can becompiledwithout errors.Flowcharts,drakon-chartsandUnified Modelling Language(UML) charts can be thought of as a graphical alternative to pseudocode, but need more space on paper. Languages such asHAGGISbridge the gap between pseudocode and code written in programming languages. Pseudocode is commonly used in textbooks andscientific publicationsrelated tocomputer scienceandnumerical computationto describe algorithms in a way that is accessible to programmers regardless of their familiarity with specific programming languages. Textbooks often include an introduction explaining the conventions in use, and the detail of pseudocode may sometimes approach that of formal programming languages. Programmersfrequently begin implementing an unfamiliar algorithm by drafting it in pseudocode, then translating it into a programming language while adapting it to fit the larger program. Thistop-downstructuring approach often starts with a pseudocode sketch refined into executable code. Pseudocode is also used in standardization; for example, theMPEGstandards rely on formalC-like pseudocode, these standards cannot be understood without grasping the details of the code.[4] Pseudocode generally does not actually obey thesyntaxrules of any particular language; there is no systematic standard form. Some writers borrow style and syntax from control structures from some conventional programming language, although this is discouraged.[5][6]Some syntax sources includeFortran,Pascal,BASIC,C,C++,Java,Lisp, andALGOL. Variable declarations are typically omitted. Function calls and blocks of code, such as code contained within a loop, are often replaced by a one-line natural language sentence. Depending on the writer, pseudocode may therefore vary widely in style, from a near-exact imitation of a real programming language at one extreme, to a description approaching formatted prose at the other. This flexibility brings both major advantages and drawbacks: on the positive side, no executable programming language "can beat the convenience of inventing new constructs as needed and letting the reader try to deduce their meaning from informal explanations", on the negative, "untested code is usually incorrect".[7] Pascal style: C style: Python style: Innumerical computation, pseudocode often consists ofmathematical notation, typically frommatrixandset theory, mixed with the control structures of a conventional programming language, and perhaps alsonatural languagedescriptions. This is a compact and often informal notation that can be understood by a wide range of mathematically trained people, and is frequently used as a way to describe mathematicalalgorithms. For example, the sum operator (capital-sigma notation) or the product operator (capital-pi notation) may represent a for-loop and a selection structure in one expression: Normally non-ASCIItypesettingis used for the mathematical equations, for example by means of markup languages, such asTeXorMathML, or proprietaryformula editors. Mathematical style pseudocode is sometimes referred to aspidgin code, for examplepidginALGOL(the origin of the concept),pidginFortran,pidginBASIC,pidginPascal,pidginC, andpidginLisp. The following is a longer example of mathematical-style pseudocode, for theFord–Fulkerson algorithm: Several attempts to bring elements of natural language grammar into computer programming have produced programming languages such asHyperTalk,Lingo,AppleScript,SQL,Inform, and to some extentPython. In these languages, parentheses and other special characters are replaced by prepositions, resulting in quite verbose code. These languages are typicallydynamically typed, meaning that variable declarations and otherboilerplate codecan be omitted. Such languages may make it easier for a person without knowledge about the language to understand the code and perhaps also to learn the language. However, the similarity to natural language is usually more cosmetic than genuine. The syntax rules may be just as strict and formal as in conventional programming, and do not necessarily make development of the programs easier. An alternative to using mathematical pseudocode (involving set theory notation or matrix operations) for documentation of algorithms is to use a formal mathematical programming language that is a mix of non-ASCII mathematical notation and program control structures. Then the code can be parsed and interpreted by a machine. Several formalspecification languagesinclude set theory notation using special characters. Examples are: Somearray programminglanguages include vectorized expressions and matrix operations as non-ASCII formulas, mixed with conventional control structures. Examples are:
https://en.wikipedia.org/wiki/Pseudocode
The Cathedral and the Bazaar: Musings on Linux and Open Source by an Accidental Revolutionary(abbreviatedCatB) is an essay, and later a book, byEric S. Raymondonsoftware engineeringmethods, based on his observations of theLinux kerneldevelopment process and his experiences managing anopen sourceproject,fetchmail. It examines the struggle betweentop-down and bottom-up design. The essay was first presented by Raymond at theLinux Kongresson May 27, 1997, inWürzburg, Germany, and was published as the second chapter of the same‑titled book in 1999. The illustration on the cover of the book is a 1913 painting byLyubov PopovatitledComposition with Figuresand belongs to the collection of theState Tretyakov Gallery.[1]The book was released under theOpen Publication Licensev2.0 in 1999.[2] The software essay contrasts two differentfree softwaredevelopment models: The essay's central thesis is Raymond's proposition that "given enough eyeballs, allbugsare shallow" (which he termsLinus's law):the more widely availablethe source code is for public testing, scrutiny, and experimentation, the more rapidly all forms of bugs will be discovered. In contrast, Raymond claims that an inordinate amount of time and energy must be spent hunting for bugs in the Cathedral model, since the working version of the code is available only to a few developers. Raymond points to 19 "lessons" learned from various software development efforts, each describing attributes associated with good practice in open source software development:[3] In 1998, the essay helped the final push forNetscape Communications Corporationto release thesource codeforNetscape Communicatorand start theMozillaproject; it was cited by Frank Hecker and other employees as an outside independent validation of his arguments.[4][5][6]Netscape's public recognition of this influence brought Raymond renown in hacker culture.[7] WhenO'Reilly Mediapublished the book in 1999 it became one of the first complete, commercially distributed books published under theOpen Publication License.[2] Marshall Poe, in his essay "The Hive", likensWikipediato the bazaar model that Raymond defines.[8]Jimmy Waleshimself was inspired by the work (as well as arguments put forward in pre-Internet works, such asFriedrich Hayek's article "The Use of Knowledge in Society"), arguing that "It opened my eyes to the possibility of mass collaboration".[9] In 1999Nikolai Bezroukovpublished two critical essays onEric Raymond'sviews of open source software, the second one called "A second look atThe Cathedral and the Bazaar".[10][11][12][13]They produced a sharp response from Eric Raymond.[14] Curtis Yarvin's essay "The Cathedral or the Bizarre", which argues for the end ofAmerican democracy, is named after the Raymond essay.[15]
https://en.wikipedia.org/wiki/The_Cathedral_and_the_Bazaar
A number of computeroperating systemsemploy security features to help preventmalicious softwarefrom gaining sufficient privileges to compromise the computer system. Operating systems lacking such features, such asDOS,Windowsimplementations prior toWindows NT(and its descendants), CP/M-80, and all Mac operating systems prior to Mac OS X, had only one category of user who was allowed to do anything. With separate execution contexts it is possible for multiple users to store private files, for multiple users to use a computer at the same time, to protect the system against malicious users, and to protect the system against malicious programs. The first multi-user secure system wasMultics, which began development in the 1960s; it wasn't untilUNIX,BSD,Linux, andNTin the late 80s and early 90s that multi-tasking security contexts were brought tox86consumer machines. A major security consideration is the ability of malicious applications to simulate keystrokes or mouse clicks, thus tricking orspoofingthe security feature into granting malicious applications higher privileges. Another security consideration is the ability of malicious software tospoofdialogs that look like legitimate security confirmation requests. If the user were to input credentials into a fake dialog, thinking the dialog was legitimate, the malicious software would then know the user's password. If the Secure Desktop or similar feature were disabled, the malicious software could use that password to gain higher privileges. Another consideration that has gone into these implementations isusability. In order for an operating system to know when to prompt the user for authorization, an application or action needs to identify itself as requiring elevated privileges. While it is technically possible for the user to be prompted at the exact moment that an operation requiring such privileges is executed, it is often not ideal to ask for privileges partway through completing a task. If the user were unable to provide proper credentials, the work done before requiring administrator privileges would have to be undone because the task could not be seen through to the end. In the case of user interfaces such as the Control Panel in Microsoft Windows, and the Preferences panels in Mac OS X, the exact privilege requirements are hard-coded into the system so that the user is presented with an authorization dialog at an appropriate time (for example, before displaying information that only administrators should see). Different operating systems offer distinct methods for applications to identify their security requirements:
https://en.wikipedia.org/wiki/Comparison_of_privilege_authorization_features
Compared with previous versions ofMicrosoft Windows,features new toWindows Vistaare numerous, covering most aspects of the operating system, includingadditional management features,new aspects of security and safety,new I/O technologies,new networking features, andnew technical features. Windows Vista alsoremovedsome others. Windows Vista introduces a newuser experiencebased on auser interfaceandvisual stylecalledWindows Aero(a backronym for Authentic, Energetic, Reflective, and Open[1]). Microsoft intended for Windows Aero to be aesthetically pleasing, and cleaner than interfaces in previous versions of Windows. Windows Aero introduces blurred, translucent glass window frames; dynamic light effects; dynamictaskbarthumbnail previews of open windows; and window animations facilitated by the newDesktop Window Manager. Moreover, Windows Aero encompasses new sets ofcursors, fonts (theSegoe UItypeface), notifications, sounds, andwizards, as well as revisions to prose and tone of text used throughout the operating system. Windows Aero is available in the Home Premium, Business, Enterprise, and UltimateWindows Vista editions.[2][3] All editions of Windows Vista include a new Windows Vista Basic theme with updated visuals; it is equivalent toLunaofWindows XPin that it does not rely on acompositing window manager. Blurred glass translucencies, light effects, live thumbnails, and window animations of Windows Aero are not available with Windows Vista Basic. The Home Basic edition of Windows Vista additionally includes a unique Windows Vista Standard theme (having the same hardware requirements of Windows Aero) but Windows Vista Standard does not provide Windows Aero features such as blurred glass translucency or dynamic taskbar thumbnails.[2][3] The Start menu has undergone a significant revision in Windows Vista, being updated in accordance with Windows Aero design principles, featuring blurred glass translucency and subtle light effects while Windows Aero is enabled. The current user's profile photo is present above the right column, and hovering over an item in the right column replaces the current user's profile photo with a dynamically changing icon to reflect the item that will be opened. The right column of the Start menu no longer shows icons for items, and the layout of items in this column has changed from Windows XP; the "Printers" and "Run..." commands are removed by default. "All Programs" is no longer a cascading listing of applications and folders; instead, applications and folders appear within a scrollabletree viewlist. The most significant change to the Start menu is the addition of aStart Searchbox that allows users toincrementally searchfor file names, file contents, and metadata, and which also functions as an application launcher. The power button now transitions tosleep modeby default.[2] Like Windows XP, Windows Vista also allows users to revert to the classic Start menu introduced inWindows 95.[4] The leftwardTask Paneof Windows XP has been replaced by an upward Command Bar that provides the same contextual tasks and file operation commands. The Navigation Pane can now be enabled with these commands and tasks always available; in Windows XP, it was necessary to switch between the Navigation Pane and the Task Pane — both were not available simultaneously. The Navigation Pane itself has been updated to host optional Favorite Links. Themenu baris hidden by default, but it can be displayed with theALTkey. Theaddress barhas been modified to present abreadcrumbsview, which shows the full path to the current location; clicking any location in the breadcrumb hierarchy navigates to that location, which eliminates the need to go back multiple times or up multiple directories—the Up button is removed accordingly. It is also possible to navigate to any subfolder of any parent folder of the current hierarchy by using the arrow between folders. Groups of items can now be contracted and expanded, and group headings can be clicked on to select all items belonging in specific groups. Groups additionally now feature the number of items in each group.[2]Multiple groups of files can also be selected by clicking each group header while holding downCTRL. Windows Explorer also sorts files on-the-fly automatically as they are renamed or pasted. When copying or moving files, Windows Explorer now displays the destination path and the source path, the number of items being transferred, and the transfer speed of items as megabytes per second (MB/s) (in addition to displaying a estimated completion time and the names of files being transferred as previous versions of Windows did). Conflicts now do not terminate file operations. If a conflict occurs with only one file, the user will be presented with options for resolution. If a conflict occurs with multiple files, the user can either apply the resolution to every file to avoid conflicts with other files in the operation or to only a single file (if two or more files have the same name, for example, users can rename the source file and retain both the destination file and the source file; in previous versions of Windows, the only options were to either replace the destination file or cancel the operation). If an external data storage device is disconnected while files are being moved or copied, the user can retry the copy or move without restarting the same file operation from the very beginning; this gives the user an option to reconnect the external data storage device without loss of data. Additionally, if a file is in use by another application during a deletion, move, or rename operation, Windows Explorer introduces a newIFileIsInUseAPI that allows developers to inform of the application with an open handle on the file, which can provide users with options to close the application, switch to it to finish working on the file, or to terminate its open handle on the file.[5] If a user does not have permission to access an object, a new dialog box with an option to assign permissions appears (Click Continue to get access to this folder).[6]If the user has been denied access to the object even after clickingContinue, a message with a hyperlink to theSecuritytab belonging to the corresponding object appears so that a user with the required permissions and privileges can change ownership of, and access to the object. In previous versions of Windows the user was only informed that access was denied, with no immediate, visible option for conflict resolution. Iconsin Windows Vista are visually more realistic than illustrative. Icons are scalable in size up to 256 × 256 pixels. Required icon sizes are16 × 16,32 × 32, and256 × 256; optional sizes are24 × 24,48 × 48,64 × 64,96 × 96, and128 × 128. Icons now display thumbnails depicting the actual contents of files. New media overlays are available for photo, track, and video thumbnails, which are now distinguished by an overlay of the icon of the application assigned as the default for the respective file types. File icon viewing modes are Extra Large, Large, Medium, Small, List, Details, and Tiles. It is possible to transition between icon viewing modes with an incremental slider or by holding down theCTRLkey and scrolling with the mouse scroll wheel. To reduce the size of large icons, icons may be stored as compressedPNGs;[7]to maintain backward compatibility with earlier versions of Windows, only larger sized icons can use lossless PNG. Windows Explorer in Windows Vista introduces significant changes from previous versions of Windows for the organization and visualization of items. Column header (property) controls are now available in all icon viewing modes in Windows Explorer (in Windows XP and earlier they were only available in Details view) and provide enhanced filtering, grouping, and sorting capabilities. New split buttons now appear next to column headers that, when clicked, display drop-down menus for column header properties for users to filter items by any property value of the selected column header.[2]There were over 30 default properties by which to group or sort items in Windows XP. With Windows Vista, Microsoft introduced over 200 new properties for items, encompassing those for documents, photos, recorded television broadcasts, tracks, and videos; new properties are also introduced for attachments, contacts, and messages, which are kinds of items available in the Windows Shell for the first time in Windows Vista.[8] New organizational capabilities enabled by theWindows SearchIndex and platform includeStacks, which are collections of related items (depicted visually as a pile) assembled by a common property, andSaved Searches, which are built by specifying predicates on item properties, and separate the concept of organization from the concept of location;[2]these features were originally intended to be provided byWinFS.[9] A newDetails Paneallows users to add or change metadata of items (such asAuthororTitle) directly from within Windows Explorer — without requiring them to open the application that created the item or to open a separate dialog box. Many more properties are exposed to the Windows Shell in Windows Vista than in Windows XP. For instance, it is now possible to query for photos based on types ofcamera flashesor whether a camera flash was used at all.[10]Windows Vista includes built-in support for Microsoft Office documents and other types of items; support for metadata belonging to new types or other unrecognized types can be added by writingProperty Handlersfor the types. Unlike previous versions of Windows, all metadata is stored within items in Windows Vista to ensure that it is not lost when items are copied to a CD-ROM, moved across machines or partitions, or sent as attachments in a message.[11] Individual files in Windows Vista can be shared; previously, it was only possible to designate a folder as a share and set permissions on individual files and folders, which meant that users had to organize all of the desired items in the folder, and then share the folder. ASharebutton on the new Command Bar appears when selecting both files and folders — in Windows XP, the equivalent command on the Task Pane only appeared when a folder was selected — and there is now a context menu option (Share...) to share files when a file is selected.[2] Windows Vista introduces a new Sharing Wizard that displays users and groups with whom the current user can share; sharers can select local sharees on the current PC or those fromActive Directory, aWindows domain, or aworkgroupwhen the sharer's PC is registered with adomain controller. If the desired user is not available, there is an option to create a new user account.[2]When sharing with a user or group, there are three new permission levels that can be assigned:[12] When a file or folder has been shared, the Sharing Wizard additionally includes an option to automatically compose an email with an embedded hyperlink to the shared resource so the recipient can easily access the file or folder.[2] There are new columns in Windows Explorer that indicate whether an item is shared[13]and the sharees with whom an item is shared;[14]users can arrange and search for items based on these details (for example, to find all items shared with a specific user or group). Because it can be difficult to locate or recall each file or folder that is being shared, and the users or groups with whom these resources are shared, Windows Vista includes a Saved Search dedicated to sharing that displays the files and folders directly shared out by the current user.[2] Windows Vista introduces aWindows SearchIndexand platform that supersedes both theIndexing ServiceandWindows Desktop Searchto unify platform search and to provide enhanced capabilities and greater rapidity of results; it was developed after the postponement of WinFS and introduces features originally touted as benefits of that platform, such as content indexing, incremental searching, and property stacking.[2][9]Windows Search appears in the Common Item Dialog (Open/Save dialog boxes), the Control Panel, the Start menu, in various applications, and in Windows Explorer. Windows Search by default indexes user profiles (excludingAppData). Windows Search usesIFilters— the same interface used byMicrosoft Exchange Server,SharePoint, andSQL Server— to extract, index, and scanfile formatcontents; it similarly usesProperty Handlersto read and modify properties. For non-indexed queries, Windows Search in Windows Vista uses the same IFilters that are used for indexing, which offers more consistent results between indexed and non-indexed searches, as well as the ability of non-indexed queries to discover and display results for contents and properties — a feature that was unavailable in previous versions of Windows. Windows Search uses a default querysyntaxreferred to as theAdvanced Query Syntax(AQS), which featuresbooleanoperators (AND, OR, NOT) to disambiguate the parameters of queries for contents, files, items, and properties; an advanced search interface for building queries in place of AQS is available. With Windows Vista, Windows Search also includes an optionalnatural language searchsyntax calledNatural Query Syntax(NQS) that enables queries such as "documents modified today", "e-mail from holly sent this week", "music by Mozart", and "videos of family created December 2007".[15]Additionally,Windows Search SQL Syntax, which enables developers to issue SQL clauses and statements for queries is fully supported in Windows Vista.[16] Windows Vista by default includes six available Saved Searches:Recent Documents,Recent E-mail,Recent Pictures and Videos,Recently Changed, andShared By Me.[17]When users create a Saved Search they can optionally reuse previous search results; when results of the previous Saved Search change, all Saved Searches that match the criteria will display new results.[18][19] Windows Sidebaris an interface that hostsMicrosoft Gadgets, which are small applications designed for a particular purpose. Windows Sidebar is positioned rightward on the desktop, though users can place it leftward or detach gadgets to the desktop. Windows Vista includesCalendar,Clock,Contacts,CPU Meter,Currency Conversion,Feed Headlines,Notes,Picture Puzzle,Slide Show,Stocks, andWeathergadgets. Microsoft hosted a Web gallery for users to download and install additional gadgets. Gadgets are written with a combination ofDHTML,JScript, andVBScript, and are individually packaged asGADGETfiles. A single gadget on the Windows Sidebar can also optionally be hosted atWindows Liveor onWindows SideShowdevices. Windows Vista introduced native support forpacket writingonoptical media, using theUniversal Disk Format(UDF) file system. This feature, known asLive File System, makes writeable optical media act likeflash storageby allowing users to incrementally add, modify, move and delete files on recordable and rewriteable optical media such asCD-R,CD-RW,DVD±R,DVD±RW,BD-RandBD-RE. While the preceding Windows XP only supported reading UDF versions of up to 2.01 inside Windows Explorer, and relied on third-party software such asInCDfor packet writing file operations, Windows Vista natively supports all UDF versions ranging up toUDF 2.60, used forBD-R.Live File Systemis supported with UDF version 1.50 and higher.[20] A common issue in previous Windows versions was that competing applications doing common tasks each tried to associate themselves as the default for a certain file type using their own custom user interface. The default application information for a particular file type was stored in the registry on a per-machine basis, resulting in applications changing another user's default program when one user's defaults were changed and each application querying several different registry values when launched. In Windows Vista onwards,file type associationsand protocol handlers can be set on a per-user basis using the newDefault ProgramsAPI, meaning default programs for file types and tasks can be different for each individual user. There is an API for calling a commonuser interfaceso applications no longer need to maintain their own file association UI. The Default Programs API gives applications a programmatic way to check for and discover other default applications, restore a single or all registered defaults, query for the owner of a specific default file association/protocol, launch theDefault Programs UIfor a specific application or clear all per user associations. Applications only need to registered at install time to be part ofDefault Programs. Windows Vista Home Premium, Business, Ultimate, and Enterprise supportWindows Flip, which displays a dynamic thumbnail of each open window—instead of an application icon for each window—on a Windows Aero glass surface and replaces theAlt+Tab ↹interface of previous versions of Windows; andWindows Flip 3D, which enables users to flip through a cascading stack of open windows by pressing⊞ Win+Tab ↹; releasing these keys selects the nearest application window. Users can retain Flip 3D after releasing the keyboard keys by pressingCtrlin addition to⊞ WinandTab ↹. Pressing the⇧ Shiftkey will flip through the stack of open windows in reverse. Flip 3D can also be scrolled with the scroll wheel of a mouse. UnlikeAlt+Tab ↹in previous versions of Windows, both Flip and Flip 3D allow users to switch to the desktop itself. Alt+Tab ↹in previous versions of Windows arranges open windows in theZ-order. In Windows Vista, when Windows Aero is enabled and there are multiple windows open, only the first several windows are arranged in the Z-order while the remaining are listed inalphabetical orderto make it easier to switch to the desired window.[21] Taskbar buttons in Windows Vista when Windows Aero is enabled also display a dynamic thumbnail of each window when the user hovers over them with the mouse cursor; when a video in an open window is playing, for example, the thumbnail on the taskbar will display the live video.[2] Windows Ultimate Extras are optional features, which includeBitLockerandWindows Marketplaceenhancements, games,Multilingual User Interfacepackages,Windows DreamScenedynamic wallpapers, and Windows sound schemes that are accessible fromWindows Updatein Windows Vista Ultimate. Backup and Restore CenterreplacesNTBackupand operates in two modes: (a) Backup or restore selected files[37]or (b) Complete PC Backup.[38]If using Complete PC Backup, incremental snapshots are stored on external hard disk or optical media, and the complete system can be restored to protect against hardware failure or severe software damage. Automatic scheduling of file backups is not available in Windows Vista Home Basic and Complete PC Backup is not available in Windows Vista Home Basic or Windows Vista Home Premium.[3] FreeCell,Hearts,Minesweeper,Solitaire, andSpider Solitaireof previous Windows versions are rewritten in DirectX to take advantage of Windows Vista's new graphical capabilities.[39]InkBallfromWindows XP Tablet PC Editionis also included, and has been updated to support being played with a mouse. New games includeChess Titans,Mahjong Titans, andPurble Place.[2]Microsoft TinkerandTexas Hold 'Em Pokerare available asWindows Ultimate Extrasin Windows Vista Ultimate. All Windows Vista games supportXInput, which allows them to be played with anXbox 360 Controller.[40]There is intrinsic support for Xbox 360 controllers and peripherals in Windows Vista.[2][40] Internet Explorer 7 adds support fortabbed browsing,Atom,RSS,internationalized domain names, a search box, aphishingfilter, an anti-spoofing URL engine, fine-grained control over ActiveX add-ons, thumbnails of all open tabs in a single window (called Quick Tabs), page zoom, and tab groups. Tab groups make it possible to open a folder of Favorites in tabs with a single click. Importing bookmarks and cookies from other web browsers is also supported. Additionally, there is now proper support forPNGimages with transparency as well as improvements and fixes toCSSand HTML rendering. The Windows RSS Platform offers native RSS support, with developer APIs. On Windows Vista, Internet Explorer operates in a special "Protected Mode", which runs the browser in a security sandbox that has no access to the rest of the operating system or file system, except theTemporary Internet Filesfolder. This feature aims to mitigate problems whereby newly discovered flaws in the browser (or inActiveXcontrols hosted inside it) allowed hackers to subversively install software on the user's computer (typically spyware).[41][42]Internet Explorer 7 in Windows Vista also exclusively supportsAdvanced Encryption Standard(AES) key lengths up to 256 bits outlined in RFC 3268 andcertificaterevocation checking usingOnline Certificate Status Protocol. The TLS implementation has also been updated to support extensions as outlined in RFC 3546, most notable of which isServer Name Indicationsupport. Internet Explorer 7 additionally features an update to the WinInet API. The new version has better support forIPv6, and handles hexadecimal literals in the IPv6 address. It also includes better support forGzipanddeflatecompression, so that communication with a web server can be compressed and thus will require less data to be transferred. Internet Explorer Protected Mode support in WinInet is exclusive to Windows Vista and later Windows versions.[43][44] Internet Information Services (IIS) 7.0 introduces a refactored, modular architecture with integrated .NET Framework extensibility; the new version includes a completely modular Web server engine with optional modules to offer specific features—instead of being a monolithic server that automatically includes all features. The administration interface additionally is rewritten and uses theMicrosoft Management Consolefor asynchronous operation and other features, withASP.NETconfiguration being more prominent.ISAPIextension development is deprecated in favor of APIs that enable the new module architecture. All Web server configuration information is stored inXMLfiles instead of in the metabase. A global configuration file stores default settings of the server, with optional additions from Web document roots and subdirectories optionally augmenting or supplanting these. There are additional new features dedicated to backward compatibility, deployment, performance, and security.[45] Magnifierin Windows Vista can magnify the vector-based content ofWindows Presentation Foundationapplications without blurring the magnified content—it performs resolution-independent zooming—when the Desktop Window Manager is enabled;[46]the release of.NET Framework 3.5 SP1in 2008 removes this capability when installed in Windows Vista.[47] Magnifier can now be docked to the bottom, left side, right side, or top of the screen.[2]Microsoft also introduced the Magnification API so that developers can build solutions that magnify portions of the screen or that apply color effects.[48] Paintfeatures a new set of colors in the color box; the location of the color box is also now near both the menu bar and the tool box (instead of near the status bar) to facilitate access to colors when accessing editing commands. All of the icons for commands on the tool box have been updated for the first time since Windows 95. All commands for shapes in the tool box now include line thickness options (in addition to the opacity options available in previous versions of Paint). TheFilemenu includes a newSet As Background (Stretched)option. TheEditmenu includes a newInvert Selectionfeature. TheImagemenu features a newCropcapability. TheUndocommand in Paint now supports undoing ten of the previous consecutive actions (previous versions of Paint allowed only up to three consecutive actions to be undone). TheMagnifierin Paint has been updated and now allows users to incrementally zoom in to or zoom out of an image (previously, it only allowed 1x, 2x, 6x, and 8x fixed zoom percentage values); scrolling with the mouse scroll wheel to zoom is supported when hovering over the magnifier in the tool box. Similarly, there are new custom zoom percentages (12.5,25, and50) listed in theCustomsubmenu inZoomon theViewmenu. Finally, Paint in Windows Vista saves in the JPEG format by default, which facilitates the writing of metadata properties to an image such as specifying an author of an image (the version of Paint in Windows XP saved images as 24-bit bitmap (BMP) files by default). Snipping Tool(previously available in Microsoft Experience Pack for Tablet PC in Windows XP Tablet PC Edition 2005) is included in the Windows Vista Home Premium, Business, Enterprise, and Ultimate editions as ascreenshotapplication that allows taking screenshots of entire screens, freeform areas, open application windows, and rectangular selections, which can then be annotated by using a mouse or stylus, saved as an image or Web archive, or sent as an attachment in an email message.[2] When an image is saved as a Web archive or sent as an attachment in an email client that supports inline HTML, Snipping Tool can add hyperlinks to the resource captured in the screenshot if the application provides information on how to obtain them (for example, a Web browser can preserve the context of a Web page of which Snipping Tool is used to take a screenshot so that the recipient of the screenshot can access the hyperlinks referenced by the Web page).[49] Sound Recorderhas been rewritten for Windows Vista and supports recording clips of any length—in previous versions of Windows the recording length was limited to 60 seconds, with subsequent additions limited by available system memory—as long as hard disk space is available. Sound Recorder now supports saving recordings asWMAfiles, with options in the new Common Item Dialog to write metadata properties when saving recordings. Task Manager, although visually similar to the version in Windows XP has seen significant feature introductions in Windows Vista. Columns in pages now feature arrows and colors when they are selected to visually indicate the sort direction and selected column. Memory consumption in the status bar is now displayed as a percentage value instead of as separatecommit chargevalues. A newServicespage displays all services and service details including descriptions, names, process IDs, groups, and statuses, withGo To Process,Start Service, andStop Servicecontext menu options. The following changes were also made to Task Manager pages of previous versions of Windows:[50] Windows Calendaris an integrated calendar application in Windows Vista that supports creating, managing, publishing, sharing, and subscribing to calendars across the Internet or across network shares; the populariCalendarformat is among its supported calendar formats.[2] Windows Contactsreplaces theWindows Address Bookas a new unified contact and personal information management application; it stores contacts asCONTACTfiles based on XML and features extensibility APIs and options for integration with other applications and devices. LegacyWABfiles and theCSVandVCFopen standards are also supported. Windows DVD Makeris a DVD creation application. Applications can also pass an XML file to DVD maker for authoring and burning. Windows Fax and Scanin the Business, Ultimate, and Enterprise editions of Windows Vista is a faxing and scanning application that supports sending and receiving faxes, faxing or emailing scanned documents, and forwarding faxes as email attachments. It replaces the optionalFax Servicescomponent of Windows XP. Users can preview documents before faxing them and directly fax or email documents after scanning. Windows MailreplacesOutlook Expressand introduces fundamental revisions to the storage architecture and security mechanisms. It is intended to be a significantly more secure offering than Outlook Express by includingBayesian spam filtering,email attachmentblocking, thejunk emailfiltering functionality of Microsoft Exchange, the new Phishing Filter of Internet Explorer 7, andtop-level domainblocking functionality that was previously exclusive toMicrosoft Outlook. Windows Mail additionally eliminates thesingle point of failuredesign of Outlook Express.[51] Windows Media Center in Windows Vista is available in the Home Premium and Ultimate editions and has been upgraded significantly from Windows XP Media Center Edition 2005. The interface has undergone a revision where each button in the main menu includes sections that, when selected, provide submenus that extend horizontally outward. These submenu options are presented as a grid, with each providing album art for tracks, or thumbnails for photos, television shows, and videos; while playing, live content is overlaid in the background during user interface navigation. Examples of other new features of Windows Media Center include: Windows Media Player 11 features a revised interface. Media Library is now presented without the category trees which were prominent in the earlier versions. Rather, on selecting the category in the left pane, the contents appear on the right, in a graphical manner with thumbnails—a departure from textual presentation of information. Missing album art can be added directly to the placeholders in the Library itself (though the program re-renders all album art imported this way into 1:1 pixel ratio, 200x200 resolutionJPEGimages). Views for Music, Pictures, Video and Recorded TV are separate and can be chosen individually from the navigation bar. Entries for Pictures and Video show their thumbnails. Search has been upgraded to be much faster. Windows Media Player 11 in Windows Vista Home Premium and Ultimate Editions supports MMC-5 driver commands for theAACScontent protection scheme, as well as theUDFfile system which is required forBlu-rayandHD DVDplayback. However, not all the codecs required for playback of HD DVD and Blu-ray video are included.VC-1and theMPEG-2video decoders, as well as theDolby Digital (AC-3) 5.1audio decoder are included in Windows Vista Home Premium and Ultimate Editions.H.264video and other multichannel surround sound audio standards still require third party decoders.[52][53] Other features of Windows Media Player 11 include: Certain features of Media Sharing in Windows Media Player 11 are only available in Windows Vista and later.[54]For example, Windows Media Player 11 on Windows Vista can also connect to remote media libraries throughDLNA; this is not available in the Windows XP version. Windows Meeting Spaceis apeer-to-peercollaboration application and the replacement forNetMeeting. Users can share applications or desktops with other users on the local network, or over the Internet. Distribution and collaborative editing of documents, as well as passing notes to other participants is supported. Windows Meeting Space automatically discovers other local users usingPeople Near Me, a feature that usesWS-Discovery. Windows Movie Makernow supports Direct3D effects and transitions, editing and outputting HD video, importing recordedDVR-MSformat videos, as well as burning output movies on a CD. Beginning with the Home Premium edition of Windows Vista, it can importHDVvideo from camcorders and output video to Windows DVD Maker for creatingDVD-Videodiscs. New effects and transitions have been added. Movie Maker of Windows Vista requires GPU hardware acceleration, pixel shader, and WDDM hardware support; however, Movie Maker from Windows XP was released by Microsoft as a download for Windows Vista users whose computers cannot run the new version. Windows Photo Galleryis a photo and video library management application that replacesWindows Fax and Scanof Windows XP and consists of a toolbar for photo commands, a navigation tree for dates, folders, ratings, and tags, and a control bar with options to change view modes, navigate between photos, rotate photos, start slide shows, and zoom photos; preview thumbnails appear when users hover over photos with the mouse cursor. Users can adjust color, exposure, saturation, temperature, and tint, crop or resize, lessen red-eye, rotate, print, rate, or tag photos. Users can view tagged photos by clicking dates, ratings, and tags in the navigation tree; pressing and holding theCTRLwhile clicking multiple tags across metadata types enables advanced queries such as “all photos of either Steve or Frank, taken in July, with a rating of at least 3 stars.” Users can add tags to files by dragging photos to tags listed in the navigation tree, and tags themselves can also be arranged in a hierarchical tree structure.RAWphotos are supported and users can view any format for which there is an installedWindows Imaging Componentcodec. The photo import process now relies on the Media Transport Protocol, which introduces capabilities such as importing photos from mobile phones or wireless cameras.[2] Slideshows with fade, pan, and zoom transitions can be created and burnt to a DVD; additional effects are in Windows Vista Home Premium and Windows Vista Ultimate. ASlide Show Screen Saveroption can createscreensaversbased on photos with specific ratings or tags ("all four-star photos") with an option to exclude specific tags ("all four-star photos tagged beach, but not tagged private"). AnOnline Print Wizardenables users to order prints of photos over the Internet for delivery to an address by mail or for local pickup at a nearby store. ThePhoto Print Wizardnow supports borderless prints, international photo sizes, larger paper sizes, and includes more templates than were available in Windows XP.[2] Windows Updateis now a native client application in Windows Vista; in previous versions of Windows it wasweb applicationthat had to be accessed from a web browser. Automatic Updates can now automatically download and installRecommendedupdates (in addition toHigh Priorityupdates that could be automatically downloaded and installed in previous versions of Windows). The prompt that appears when an update is installed that requires a machine to berestartedhas been revised, with new options to postpone an operating system restart by 10 minutes, by 1 hour, or by 4 hours. Users can still postpone a restart indefinitely, but an update may cause a machine to be restarted within 15 minutes if no action for postponement is taken. In Windows XP, users could only repeatedly dismiss the prompt to restart, or allow the machine to be restarted within 15 minutes of the appearance of the prompt. WordPadnow supports theText Services Framework, on whichWindows Speech Recognitionis implemented, which allows users to dictate text into the application.[55] Microsoft announced aTrustworthy Computinginitiative in 2002; Windows Vista was built with the underlying ethos of "secure by default, secure in deployment, secure by design" to make it a more secure operating system than its predecessors. All existing code was refactored and reviewed in an effort to improve security. Some of the most discussed and most significant introduced security features includeAddress Space Layout Randomization,BitLocker,Device Installation Control,Mandatory Integrity Control,Parental Controls,User Account Control,User Interface Privilege Isolation, andWindows Defender.Windows Firewallis significantly improved, with the new ability to block and filter outbound connections, as well as to provide granular configuration policies. Windows Vista introduces new features and technologies that aim to assist and facilitate system management. Some notable changes include acomplete replacementforNTLDR; a rewrittenTask Scheduler; enhancedRemote Desktopfunctionality including per-application sessions; and theWindows Imaging Format, a new image-based deployment format. There is also a range of newGroup Policysettings for the new features. The Desktop Window Manager is the newwindowing systemwhich handles the drawing of all content to the screen. Instead of windows drawing directly to the video card's memory buffers, contents are instead rendered to back-buffers (technically Direct3D surfaces), which are then arranged in the appropriate Z-order, then displayed to the user. This drawing method uses significantly more video memory than the traditional window-drawing method used in previous versions of Windows, which only required enough memory to contain the composite of all currently visible windows at any given time. With the entire contents of windows being stored in video memory, a user can move windows around the screen smoothly, without having "tearing" artifacts be visible while the operating system asks applications to redraw the newly visible parts of their windows. Other features new to Windows Vista such as live thumbnail window previews and Flip 3D are implemented through the DWM. Users need to have aDirectX9 capable video card to be able to use the Desktop Window Manager. Machines that can't use the DWM fall back to a "Basic" theme, and use screen drawing methods similar to Windows XP. Desktop Window Manager is included in all editions of Windows Vista except the Starter edition.[3] Windows Vista includes Direct3D 10, which adds scheduling and memory virtualization capabilities to the Windows graphics subsystem, as well as support for unifiedpixel shaders, geometry shaders, andvertex shaders. Significant is the elimination of "capability bits" of previous versions of Direct3D, which previously were used to indicate which features were active on the graphics hardware; instead, Direct3D 10 defines a minimum standard of hardware capabilities that must be supported for a system to be regarded as compatible with the new infrastructure. Microsoft's goal with this design was to create an environment for developers, designers, and gamers that would assure them that their input would be rendered exactly the same across all compatible graphics cards. Direct3D 10 is able to display certain graphics up to eight times more quickly than Direct3D 9 because of the newWindows Display Driver Model(WDDM) and incorporates Microsoft'sHigh-Level Shader Language4.0. However, Direct3D 10 is not backward compatible with previous versions; the same game will not be compatible with both Direct3D 10andDirect3D 9 or earlier, which means that developers who wish to use Direct3D 10 and provide support for older versions of Windows would need to create separate versions of the same game in order to target both Windows Vista and earlier versions. Windows Vista does, however, contain a backward compatible implementation of Direct3D 9. Direct3D 10 functionality also requires the WDDM and new graphics hardware, which will allow the hardware to be pre-emptively multithreaded—to allow multiple threads to use the GPU in turns—and provide paging operations to graphics memory. Direct3D 9 in Windows Vista is called Direct3D 9Ex and also uses the WDDM, which allows Direct3D applications to access new features available in Windows Vista including advanced gamma functions, cross-process shared surfaces, device removal management, managed graphics memory, prioritization of resources, and text anti-aliasing. Windows Vista introduces DirectX Video Acceleration (DXVA) 2.0 which enhances the implementation of the video pipeline and adds a host of otherDDIs, including a Capture DDI for video capture. The DDIs it shares with DXVA 1.0 are also enhanced with support for hardware acceleration of more operations. Also, the DDI functions are directly available to callers and need not be mediated by the video renderer.[56]As such, pipelines for simply decoding the media (without rendering) or post-processing and rendering (without decoding) can also be created; these features require support for the WDDM. Windows Vista also introduces a new video renderer, available as both aMedia Foundationcomponent and aDirectShowfilter, called the Enhanced Video Renderer (EVR).[57]EVR is designed to work withDesktop Window Manager. DXVA 2.0 supports onlyEnhanced Video Rendereras the video renderer on Windows Vista. DXVA integrates withMedia Foundationand allows DXVA pipelines to be exposed asMedia Foundation Transforms(MFTs). Even decoder pipelines or post-processing pipelines can be exposed as MFTs, which can be used by theMedia Foundationtopology loader to create a full media playback pipeline. DXVA 1.0 is emulated using DXVA 2.0. Windows Imaging Component(WIC) is a new extensible imaging framework that allows applications supporting the framework to automatically get support of installed codecs forgraphics file formats. It was later ported back toWindows XP SP3. Windows Presentation Foundationapplications also automatically support the installed image codecs. Developers can write their own image codecs for their specific image file formats. Windows Vista ships with theBMP,GIF,HD Photo,JPEG,PNG, andTIFFcodecs. Codecs forRAWimage formats used generally by high-end digital cameras are also supported in this manner.Windows ExplorerandWindows Photo Galleryare based on this new framework and can thus view and organize images in any format for which the necessary codecs are installed. HD Photo(previously known as Windows Media Photo) is a new photographic still graphics file format that supports features such ashigh-dynamic-range imaging,lossyas well aslossless compression, up to 32-bppfixedorfloating pointrepresentation,transparency,RGB,CMYKand n-channelcolor spaces,RadianceRGBE, embeddedICCcolor profiles, multiple images per file and support forExifandXMPmetadataformats. It is the preferred image format forXPSdocuments.[58] Windows Vista featuresWindows Color System (WCS), a platform forcolor management.[59]Its goal is to obtain color consistency across various software and hardware including cameras, monitors, printers, and scanners. Different devices interpret the same colors differently, according to their software and hardware configurations. As a result, they must be properly calibrated to reproduce colors consistently across different devices. WCS aims to make this process of color calibration automatic and transparent, as an evolution of ICC Color Profiles. Windows Color System is based on a completely newColor Infrastructure and Translation Engine(CITE). It is backed up by a new color processing pipeline that supports bit-depths more than 32 bits per pixel, multiple color channels (more than 3), alternative color spaces and high-dynamic-range coloring, using a technology namedKyuanosdeveloped byCanon.[60]The color processing pipeline allows device developers to add their owngamutmapping algorithm into the pipeline to customize the color response of the device. The new pipeline also uses floating point calculations to minimize round-off losses, which are inherent in integer processing. Once the color pipeline finishes processing the colors, the CITE engine applies acolor transformaccording to a color profile, specific to a device to ensure the output color matches to what is expected. WCS features explicit support for LCD as well as CRT monitors, projectors, printers, and other imaging devices and provides customized support for each. WCS uses color profiles according to the CIE Color Appearance Model recommendation (CIECAM02), defined using XML, to define how the color representation actually translates to a visible color.ICCV4 color profiles are also supported.Windows Photo Galleryand Photo Viewer,Windows Imaging Component, theHD Photoformat,XPSprint path and XPS documents all support color management. Significant changes have been made for mobile computing with Windows Vista. Windows Vista introduces cursors for pens, with a pen cursor appearing at all times to show where a tap will be performed while users hover over the screen with a pen. Cursors for tap, double tap, and hold operations visually indicate specific events: a subtle ring appears after a tap; two subtle rings appear after a double tap; and hold operations display a chord that will form a circle to indicate that users can release the pen to perform the equivalent of a secondary mouse button press. A circle appears on the screen when users press a pen button to inform them of a successful button press.[61] Flicksare gestures allowing users to stroke the pen in a certain direction to perform a specific action. Flicking upward and downward perform scroll operations with inertia (physics and weight are simulated, with the scroll distance proportional to the pressure of the pen), while flicking leftward or rightward navigates back and forth.[62]Flicks are exposed as two categories:Navigational(Back, Forward, Page Up, and Page Down) andEditing(Copy, Paste, Delete, Undo) and can be performed in the eight major compass directions or configured to perform custom actions.[63]Pen panning allows users to drag pages upward or downward in Internet Explorer 7 and Microsoft Office 2007. The Tablet PC Input Panel of Windows XP Tablet PC Edition is updated to supportAutoCompletein address bars, context disambiguation, and handwriting personalization. Context determines the user's intent when writing: in an address bar, handwritten text is automatically identified as a URL, but the same text is identified as prose when written in a body of text. Password fields selected with the pen now display theOn-Screen Keyboardinstead of the Tablet PC Input Panel to prevent observers from viewing handwritten passwords. The recognizer can now identify and adapt to specific handwriting, with an optionalAutomatic Learningfeature improving recognition accuracy on an ongoing basis through regular use; users can also manually correct characters, words, or submit handwritten ink samples, and a training interface allows users to practice with sentences.[63]The recognizer also usesharvestingto analyzes users' corpus and disambiguate based on context and terminology.[64]An optional data collection feature allows handwritten text samples to be sent to Microsoft to improve handwriting recognition. The Tablet PC Input Panel itself can now be resized, and it supportsscratch-outgestures with which whereby users can quickly delete a word or phrase by scribbling instead of erasing with the back of a pen.[63] There is intrinsic support for singletouchscreen-based interaction in addition to support foractive pens;[63]its inclusion in Windows Vista is the first time intrinsic support is available to Windows.[64]A new, optionaltouch pointerinterface simulates a computer mouse by displaying a two-button computer mouse on the screen, which users can drag to move the mouse cursor or touch its buttons to perform primary or secondary mouse click operations, especially where targets are too small to comfortably touch with a finger. Apanning handfeature of Internet Explorer 7 allows users to scroll webpages with a finger.[61]Flick gestures available to pens can also be used with fingers.[2] Checkboxes appear alongside files in Windows Explorer on a tablet PC so that users can more easily select and manage files with a pen, which is useful especially on tablets without a keyboard where holding theCTRLkey or the⇧ Shiftkey to select multiple files is not possible.[61]Checkbox targets in Windows Explorer also extend beyond the checkboxes themselves to facilitate the selection of multiple files with a pen.[65] Windows Vista aims to simplify the detection, configuration, and installation of external displays by introducing a standardized setup procedure and interface with the new WDDM, which enables hot plug detection and alerts the newTransient Multimon Manager(TMM) for external display configuration when one is connected. In previous versions of Windows, installation routines varied due to hardware configurations such as function keys, manufacturer requirements, and manufacturer-specific interfaces.[66][67]The TMM also saves user preferences for external displays so these are automatically restored when the same display is reconnected at some different time or location. The improvements intend to enable an experience that provides the ease of use ofplug and playperipherals.[67][66][68] Windows Vista also allows applications to respond to changing monitor environments. When a secondary display with an active window is disconnected, for example, open windows on the secondary display will be moved back to the primary display so that they remain visible.[68][69] Windows Vista introduces a new and standardized setup procedure for the detection and connection of projectors.[70]Networked projectors can discovered automatically or users can manually enter addresses of the projectors to which Windows Vista should connect.[71]Windows Vista automatically surpresses all notifications andsleep modeduring a presentation; users can also change backgrounds, screensavers, and volumes, while preferences can by saved to specific displays and restored when the display is reconnected.[72]Devices Profile for Web Servicessimplifies installation and management of networked devices.[73]Windows VistaService Pack 1enhances network projection by temporarily resizing the desktop to accommodate custom projector resolutions.[74] Previous versions of Windows included six different power schemes.[75]Windows Vista aims to simplify power management by presenting concise names for power schemes and by reducing the number of default schemes to the following three schemes:Balanced, which is enabled by default and adjusts performance and power consumption based on user interaction;Power Saver, which reduces performance by favoring energy efficiency by disabling desktop composition when on battery life, reducing display brightness, processor performance, and the time until the screen is dimmed or the time until sleep; andMaximum Performance, which favors performance regardless of user activity.[75][76] Microsoft said these changes are a result of confusion caused by schemes in previous versions of Windows: power schemes were incomprehensible, indiscoverable, and numerous, which confused and intimidated users, who would often select a specific scheme to conserve battery life, for example, which would instead maximize performance at the expense of battery life.[77] Power schemes are nowGUIDs, and users can now create, export, or import schemes. Schemes change based on user context — when a PC is plugged in, it can use High Performance, but when it is unplugged, it can automatically switch to Power Saver. Applications can now register to be informed of changes to power schemes to scale back features (such as graphical details or network polls) so that bandwidth and/or battery life is preserved.[76] Windows Vista introduces many new granular control policies for power schemes that were unavailable in previous versions of Windows. Users can change CPU cooling and CPU state options, idle timers for operating system events, network adapter settings,PCI Expresslink state settings, and USB selective suspension options.[78]USB selective suspension additionally is supported among a wider range of class drivers than in previous Windows versions, with support for Bluetooth classes, portable devices, and video classes.[79]Windows Vista also includes new power options for indexing items, playing video, and streaming media; users can prioritize battery life or efficiency of any of the aforementioned activities.[78] Windows Vista SP1 introduces the ability for the operating system to turn off periodic VSync interrupt counting of CPU cycles when the screen is not being refreshed from new graphics or mouse activity, which can result in significant energy savings.[80] Sleep is the default power suspension state (instead of shut down) fordesktop computersand mobile PCs such aslaptops[75][76][81]and it replaces the standby feature of previous versions of Windows.[82]To ensure that the transition to sleep is reliable, Windows Vista does not allow sleep to be vetoed.[75][83]Vetoing the sleep process, which prevents Windows from going to sleep, was a significant source of power transition failures in previous versions of Windows and which eventually resulted in user distrust of sleep due to data loss, decreased battery life, and overheated PCs.[76][83]Early in the development of Windows Vista, Microsoft indicated it would allow sleep to be vetoed,[84]but subsequent investigations revealed that veto was frequently abused by developers.[76][83]Administrators can still enable veto with group policy.[85] Hybrid sleep combines sleep andhibernationby savingmemorycontents to a hibernation file on disk and entering sleep. Normally, if a PC loses power when asleep, it will lose all contents in memory, but with hybrid sleep, the system can still restore these from the hibernation file.[86]By default, it is enabled ondesktop computers, which usually do not include anuninterruptible power supply, but disabled onlaptopsas they usually include another power source such as a battery.[86]Hybrid sleep requires a WDDM driver.[66] Windows Vista introducesAway Modepower management functionality that suppresses all display and sound emissions while allowing a PC to remain operational for recording or streaming.[87][88][89]Away Mode allows a PC to behave like a consumer electronics device,[75]but Microsoft emphasizes that it does not replace sleep mode despite its power saving benefits.[88] Away Mode was previously released inWindows XP Media Center Edition 2005Update Rollup 2,[90]but it was conceived for Windows Vista in 2004 when it was codenamed "Longhorn".[91][92] Windows HotStart(formerlyWindows Direct[77][81]and also known asDirect Media Mode[93][94]) enables opening an application in response to the press of a button or event such as a remote control press.[95]HotStart enablesappliance-like availability—a PC that automatically starts a media player after boot functions as a DVD player.[91]Original equipment manufacturers(OEMS) can customize HotStart hardware implementation and functionality.[95][96]Users can customize HotStart through theWindows Registry; instead of launching a multimedia application a user can, for example, configure a button to launch an e-mail application.[95]HotStart can result in power savings because it enables direct and immediate access to desired content.[97] TheFontsControl Panel now allows fonts to be filtered, grouped, and sorted. Icons for fonts can be scaled. Users can now arrange fonts based on font type, and view the full file system paths of installed font locations. Windows Vista includes new Western (Latin, Greek and Cyrillic)ClearTypetypefaces:Calibri(sans-serif),Cambria(serif),Candara(sans-serif),Consolas(monospaced),Constantia(serif),Corbel(sans-serif),Segoe UI,Segoe Script(script), andSegoe Print(casual).[2]Additionally, four new Asian fonts have been added:Malgun Gothic(Korean),Meiryo(Japanese),Microsoft JhengHei(Traditional Chinese), andMicrosoft YaHei(Simplified Chinese). Windows Vista is a language-independent operating system, unlike previous versions of Windows, and it supports additional languages when compared with previous versions. The Enterprise and Ultimate editions of Windows Vista allow additional languages to be installed withMultilingual User Interface. Users can now install and select non-English languages on a per-user basis—instead of a per-device basis—to transform the entire Shell and application user interfaces to that language. Unicode font and character support have also been improved. Windows Vista also supports "custom locales", allowing users to create their own locale data for use in applications using theLocale Buildertool.[107]
https://en.wikipedia.org/wiki/Features_new_to_Windows_Vista
Polkit(formerlyPolicyKit) is a component for controlling system-wideprivilegesinUnix-likeoperating systems. It provides an organized way for non-privileged processes to communicate with privileged ones. Polkit allows a level of control of centralized system policy. It is developed and maintained by David Zeuthen fromRed Hatand hosted by thefreedesktop.orgproject. It is published asfree softwareunder the terms of version 2 of theGNU Lesser General Public License.[3] Since version 0.105, released in April 2012,[4][5]the name of the project was changed fromPolicyKittopolkitto emphasize that the system component was rewritten[6]and that theAPIhad changed, breakingbackward compatibility.[7][dubious–discuss] Fedorabecame the firstdistributionto include PolicyKit, and it has since been used in other distributions, includingUbuntusince version 8.04 andopenSUSEsince version 10.3. Some distributions, like Fedora,[8]have already switched to the rewritten polkit. It is also possible to use polkit to execute commands with elevated privileges using the commandpkexecfollowed by the command intended to be executed (withrootpermission).[9]However, it may be preferable to usesudo, as this command provides more flexibility and security, in addition to being easier to configure.[10] Thepolkitddaemonimplements Polkit functionality.[11] Amemory corruptionvulnerability PwnKit (CVE-2021-4034[12]) discovered in thepkexeccommand (installed on all major Linux distributions) was announced on January 25, 2022.[13][14]The vulnerability dates back to the original distribution from 2009. The vulnerability received aCVSS scoreof 7.8 ("High severity") reflecting serious factors involved in a possible exploit: unprivileged users can gain full root privileges, regardless of the underlying machine architecture or whether thepolkitdaemon is running or not. Thisfree and open-source softwarearticle is astub. You can help Wikipedia byexpanding it.
https://en.wikipedia.org/wiki/Polkit
Incomputing,runas(a compound word, from “run as”) is acommandin theMicrosoft Windowsline ofoperating systemsthat allows a user to run specific tools and programs under a differentusernameto the one that was used tologonto a computer interactively.[1]It is similar to theUnixcommandssudoandsu, but the Unix commands generally require prior configuration by the system administrator to work for a particular user and/or command. Therunascommand was introduced with theWindows 2000operating system.[2]Any application can use this API to create aprocesswith alternate credentials, for example,Windows ExplorerinWindows 7allows an application to be started under a different account if the shift key is held while right clicking itsicon. The program has the ability to cache verified credentials so that the user only ever has to enter them once. The command-syntaxis:[3] This section is paraphrased from therunas /?command. Note: Only type in the user's password, when the system asks for it. Note: The/profileswitch is not compatible with the/netonlyswitch. Note: The/savecredand the/smartcardswitches may not be used together. The command is also included in theInfernooperating system.[4] runaswrites theuserto/dev/userand invokescmdwith the givenarguments. Note: The command is only invoked if setting of the username succeeds.
https://en.wikipedia.org/wiki/Runas
Asecure attention key(SAK),special attention key,[1]orsecure attention sequence(SAS)[2]is a special key,key combinationor sequence to be pressed on acomputer keyboardbefore aloginscreen which must, to the user, be completely trustworthy. Theoperating systemkernel, which interacts directly with the hardware, orinit systemis able to detect whether the secure attention key has been pressed. When this event is detected, the trusted login processing is started. The secure attention key is designed to makelogin spoofingimpossible, as the kernel will suspend any program, including those masquerading as the computer's login process, before starting a trustable login operation. Some examples are: This article related to adesktop environmentis astub. You can help Wikipedia byexpanding it.
https://en.wikipedia.org/wiki/Secure_attention_key
Thereare a number ofsecurity and safetyfeatures new toWindows Vista, most of which are not available in any priorMicrosoft Windowsoperating systemrelease. Beginning in early 2002 with Microsoft's announcement of itsTrustworthy Computinginitiative, a great deal of work has gone into making Windows Vista a more secure operating system than its predecessors. Internally, Microsoft adopted a "Security Development Lifecycle"[1]with the underlying ethos of "Secure by design, secure by default, secure in deployment". New code for Windows Vista was developed with the SDL methodology, and all existing code was reviewed and refactored to improve security. Some specific areas where Windows Vista introduces new security and safety mechanisms include User Account Control, parental controls,Network Access Protection, a built-in anti-malwaretool, and new digital content protection mechanisms. User Account Controlis a new infrastructure that requires user consent before allowing any action that requires administrative privileges. With this feature, all users, including users with administrative privileges, run in a standard user mode by default, since most applications do not require higher privileges. When some action is attempted that needs administrative privileges, such as installing new software or changing system or security settings, Windows will prompt the user whether to allow the action or not. If the user chooses to allow, the process initiating the action is elevated to a higher privilege context to continue. While standard users need to enter a username and password of an administrative account to get a process elevated (Over-the-shoulder Credentials), an administrator can choose to be prompted just for consent or ask for credentials. If the user doesn't click Yes, after 30 seconds the prompt is denied. UAC asks for credentials in aSecure Desktopmode, where the entire screen is faded out and temporarily disabled, to present only the elevation UI. This is to prevent spoofing of the UI or the mouse by the application requesting elevation. If the application requesting elevation does not havefocusbefore the switch toSecure Desktopoccurs, then its taskbar icon blinks, and when focussed, the elevation UI is presented (however, it is not possible to prevent a malicious application from silently obtaining the focus). Since theSecure Desktopallows only highest privilegeSystemapplications to run, no user mode application can present its dialog boxes on that desktop, so any prompt for elevation consent can be safely assumed to be genuine. Additionally, this can also help protect againstshatter attacks, which intercept Windows inter-process messages to run malicious code or spoof the user interface, by preventing unauthorized processes from sending messages to high privilege processes. Any process that wants to send a message to a high privilege process must get itself elevated to the higher privilege context, via UAC. Applications written with the assumption that the user will be running with administrator privileges experienced problems in earlier versions of Windows when run from limited user accounts, often because they attempted to write to machine-wide or system directories (such asProgram Files) or registry keys (notablyHKLM)[2]UAC attempts to alleviate this usingFile and Registry Virtualization, which redirects writes (and subsequent reads) to a per-user location within the user's profile. For example, if an application attempts to write to “C:\program files\appname\settings.ini” and the user doesn't have permissions to write to that directory, the write will get redirected to “C:\Users\username\AppData\Local\VirtualStore\Program Files\appname\.” BitLocker, formerly known as "Secure Startup", this feature offersfull disk encryptionfor the system volume. Using the command-line utility, it is possible to encrypt additional volumes. Bitlocker utilizes a USB key or Trusted Platform Module (TPM) version 1.2 of the TCG specifications to store its encryption key. It ensures that the computer running Windows Vista starts in a known-good state, and it also protects data from unauthorized access.[3]Data on the volume is encrypted with a Full Volume Encryption Key (FVEK), which is further encrypted with a Volume Master Key (VMK) and stored on the disk itself. Windows Vista is the first Microsoft Windows operating system to offer native support for the TPM 1.2 by providing a set of APIs, commands, classes, and services for the use and management of the TPM.[4][5]A new system service, referred to as TPM Base Services, enables the access to and sharing of TPM resources for developers who wish to build applications with support for the device.[6] Encrypting File System (EFS) in Windows Vista can be used to encrypt the systempage fileand the per-userOffline Filescache. EFS is also more tightly integrated with enterprisePublic Key Infrastructure(PKI), and supports using PKI-based key recovery, data recovery through EFS recovery certificates, or a combination of the two. There are also new Group Policies to requiresmart cardsfor EFS, enforce page file encryption, stipulate minimum key lengths for EFS, enforce encryption of the user'sDocuments folder, and prohibit self-signed certificates. The EFS encryption key cache can be cleared when a user locks his workstation or after a certain time limit. The EFS rekeying wizard allows the user to choose a certificate for EFS and to select and migrate existing files that will use the newly chosen certificate. Certificate Manager also allows users to export their EFS recovery certificates and private keys. Users are reminded to back up their EFS keys upon first use through aballoon notification. The rekeying wizard can also be used to migrate users in existing installations from software certificates tosmart cards. The wizard can also be used by an administrator or users themselves in recovery situations. This method is more efficient than decrypting and reencrypting files. Windows Vistasignificantly improves the firewall[7]to address a number of concerns around the flexibility ofWindows Firewallin a corporate environment: Windows Vista includes Windows Defender, Microsoft's anti-spyware utility. According to Microsoft, it was renamed from 'Microsoft AntiSpyware' because it not only features scanning of the system for spyware, similar to other free products on the market, but also includes Real Time Security agents that monitor several common areas of Windows for changes which may be caused by spyware. These areas include Internet Explorer configuration and downloads, auto-start applications, system configuration settings, and add-ons to Windows such as Windows Shell extensions. Windows Defender also includes the ability to removeActiveXapplications that are installed and block startup programs. It also incorporates theSpyNetnetwork, which allows users to communicate with Microsoft, send what they consider is spyware, and check which applications are acceptable. Windows Vista allow administrators to enforce hardware restrictions viaGroup Policyto prevent users from installing devices, to restrict device installation to a predefined white list, or to restrict access to removable media and classes of devices.[8][9] Windows Vista includes a range ofparental controlsfor administrators to monitor and restrict computer activity of standard user accounts that are not part of adomain;User Account Controlenforces administrative restrictions. Features include:Windows Vista Web Filter—implemented as aWinsockLSPfilter to function across all Web browsers—which prohibits access to websites based on categories of content or specific addresses (with an option to block all file downloads);Time Limits, which prevents standard users from logging in during a date or time specified by an administrator (and which locks restricted accounts that are already logged in during such times);Game Restrictions, which allows administrators to block games based on names, contents, or ratings defined by avideo game content rating systemsuch as theEntertainment Software Rating Board (ESRB), with content restrictions taking precedence over rating restrictions (e.g.,Everyone 10+ (E10+)games may be permitted to run in general, butE10+games with mild language will still be blocked if mild language itself is blocked);Application Restrictions, which usesapplication whitelistsfor specific applications; andActivity Reports, which monitors and records activities of restricted standard user accounts. Windows Parental Controls includes an extensible set of options, withapplication programming interfaces(APIs) for developers to replace bundled features with their own. Windows Vista usesAddress Space Layout Randomization(ASLR) to load system files at random addresses in memory.[10]By default, all system files are loaded randomly at any of the possible 256 locations. Other executables have to specifically set a bit in the header of thePortable Executable (PE)file, which is the file format for Windows executables, to use ASLR. For such executables, the stack and heap allocated is randomly decided. By loading system files at random addresses, it becomes harder for malicious code to know where privileged system functions are located, thereby making it unlikely for them to predictably use them. This helps prevent most remote execution attacks by preventingreturn-to-LIBCbuffer overflowattacks. ThePortable Executableformat has been updated to support embedding ofexceptionhandler address in the header. Whenever an exception is thrown, the address of the handler is verified with the one stored in the executable header. If they match, the exception is handled, otherwise it indicates that the run-time stack has been compromised, and hence the process is terminated. Function pointers are obfuscated byXOR-ingwith a random number, so that the actual address pointed to is hard to retrieve. So would be to manually change a pointer, as the obfuscation key used for the pointer would be very hard to retrieve. Thus, it is made hard for any unauthorized user of the function pointer to be able to actually use it. Also metadata for heap blocks are XOR-ed with random numbers. In addition, check-sums for heap blocks are maintained, which is used to detect unauthorized changes and heap corruption. Whenever a heap corruption is detected, the application is killed to prevent successful completion of the exploit. Windows Vista binaries include intrinsic support for detection of stack-overflow. When a stack overflow in Windows Vista binaries is detected, the process is killed so that it cannot be used to carry on the exploit. Also Windows Vista binaries place buffers higher in memory and non buffers, like pointers and supplied parameters, in lower memory area. So to actually exploit, a buffer underrun is needed to gain access to those locations. However, buffer underruns are much less common than buffer overruns. Windows Vista introducesMandatory Integrity Controlto set integrity levels for processes. A low integrity process can not access the resources of a higher integrity process. This feature is being used to enforce application isolation, where applications in a medium integrity level, such as all applications running in the standard user context can not hook into system level processes which run in high integrity level, such as administrator mode applications but can hook onto lower integrity processes like WindowsInternet Explorer 7or8. A lower privilege process cannot perform a window handle validation of higher process privilege, cannot SendMessage or PostMessage to higher privilege application windows, cannot use thread hooks to attach to a higher privilege process, cannot use Journal hooks to monitor a higher privilege process and cannot perform DLL–injection to a higher privilege process. Windows Vista offers full support for theNX(No-Execute) feature of modern processors.[11]DEP was introduced in Windows XP Service Pack 2 and Windows Server 2003 Service Pack 1. This feature, present as NX (EVP) inAMD'sAMD64processors and as XD (EDB) inIntel's processors, can flag certain parts of memory as containing data instead of executable code, which prevents overflow errors from resulting in arbitrary code execution. If the processor supports the NX-bit, Windows Vista automatically enforces hardware-basedData Execution Preventionon all processes to mark some memory pages as non-executable data segments (like the heap and stack), and subsequently any data is prevented from being interpreted and executed as code. This prevents exploit code from being injected as data and then executed. If DEP is enabledfor all applications, users gain additional resistance againstzero-day exploits. But not all applications are DEP-compliant and some will generate DEP exceptions. Therefore, DEP is not enforcedfor all applications by defaultin 32-bit versions of Windows and is only turned on for critical system components. However, Windows Vista introduces additional NX policy controls that allow software developers to enable NX hardware protection for their code, independent of system-wide compatibility enforcement settings. Developers can mark their applications as NX-compliant when built, which allows protection to be enforced when that application is installed and runs. This enables a higher percentage of NX-protected code in the software ecosystem on 32-bit platforms, where the default system compatibility policy for NX is configured to protect only operating system components. For x86-64 applications, backward compatibility is not an issue and therefore DEP is enforced by default for all 64-bit programs. Also, only processor-enforced DEP is used in x86-64 versions of Windows Vista for greater security. Newdigital rights managementand content-protection features have been introduced in Windows Vista to help digital content providers and corporations protect their data from being copied. The inclusion of newdigital rights managementfeatures has been a source ofcriticism of Windows Vista. Windows Service Hardeningcompartmentalizes the services such that if one service is compromised, it cannot easily attack other services on the system. It prevents Windows services from doing operations on file systems, registry or networks[14]which they are not supposed to, thereby reducing the overallattack surfaceon the system and preventing entry of malware by exploitingsystem services. Services are now assigned a per-serviceSecurity identifier(SID), which allows controlling access to the service as per the access specified by the security identifier. A per-service SID may be assigned during the service installation via theChangeServiceConfig2API or by using theSC.EXEcommand with thesidtypeverb. Services can also useaccess control lists(ACL) to prevent external access to resources private to itself. Services in Windows Vista also run in a less privileged account such asLocal ServiceorNetwork Service, instead of theSystemaccount. Previous versions of Windows ransystem servicesin the same login session as the locally logged-in user (Session 0). In Windows Vista, Session 0 is now reserved for these services, and all interactive logins are done in other sessions.[15]This is intended to help mitigate a class of exploits of the Windows message-passing system, known asShatter attacks. The process hosting a service has only the privileges specified in theRequiredPrivilegesregistry value underHKLM\System\CurrentControlSet\Services. Services also need explicit write permissions to write to resources, on a per-service basis. By using a write-restrictedaccess token, only those resources which have to be modified by a service are given write access, so trying to modify any other resource fails. Services will also have pre-configured firewall policy, which gives it only as much privilege as is needed for it to function properly. Independent software vendors can also use Windows Service Hardening to harden their own services. Windows Vista also hardens thenamed pipesused byRPCservers to prevent other processes from being able to hijack them. Graphical identification andauthentication(GINA), used for secure authentication and interactive logon has been replaced byCredential Providers. Combined with supporting hardware, Credential Providers can extend the operating system to enable users to log on throughbiometric devices(fingerprint, retinal, or voice recognition), passwords,PINsandsmart cardcertificates, or any custom authentication package and schema third-party developers wish to create. Smart card authentication is flexible as certificate requirements are relaxed. Enterprises may develop, deploy, and optionally enforce custom authentication mechanisms for all domain users. Credential Providers may be designed to supportSingle sign-on(SSO), authenticating users to a securenetwork access point(leveragingRADIUSand other technologies) as well as machine logon. Credential Providers are also designed to support application-specific credential gathering, and may be used for authentication to network resources, joining machines to a domain, or to provide administrator consent forUser Account Control. Authentication is also supported usingIPv6orWeb services. A new Security Service Provider, CredSSP is available throughSecurity Support Provider Interfacethat enables an application to delegate the user's credentials from the client (by using the client-side SSP) to the target server (through the server-side SSP). The CredSSP is also used by Terminal Services to providesingle sign-on. Windows Vista can authenticate user accounts usingSmart Cardsor a combination of passwords and Smart Cards (Two-factor authentication). Windows Vista can also use smart cards to storeEFSkeys. This makes sure that encrypted files are accessible only as long as the smart card is physically available. If smart cards are used for logon, EFS operates in asingle sign-onmode, where it uses the logon smart card for file encryption without further prompting for the PIN. Fast User Switchingwhich was limited to workgroup computers on Windows XP, can now also be enabled for computers joined to a domain, starting with Windows Vista. Windows Vista also includes authentication support for theRead-Only Domain Controllersintroduced inWindows Server 2008. Windows Vista features an update to the crypto API known as Cryptography API: Next Generation (CNG). TheCNG APIis auser modeandkernel modeAPI that includes support forelliptic curve cryptography(ECC) and a number of newer algorithms that are part of theNational Security Agency(NSA)Suite B. It is extensible, featuring support for plugging in custom cryptographic APIs into the CNG runtime. It also integrates with thesmart cardsubsystem by including a BaseCSPmodule which implements all the standard backend cryptographic functions that developers and smart card manufacturers need, so that they do not have to write complexCSPs. The Microsoftcertificate authoritycan issue ECC certificates and the certificate client can enroll and validate ECC and SHA-2 based certificates. Revocation improvements include native support for theOnline Certificate Status Protocol(OCSP) providing real-time certificate validity checking,CRLprefetching and CAPI2 Diagnostics. Certificate enrollment is wizard-based, allows users to input data during enrollment and provides clear information on failed enrollments and expired certificates. CertEnroll, a new COM-based enrollment API replaces theXEnrolllibrary for flexible programmability. Credential roaming capabilities replicate Active Directory key pairs, certificates and credentials stored inStored user names and passwordswithin the network. Windows Vista introducesNetwork Access Protection(NAP), which ensures that computers connecting to or communicating with a network conform to a required level ofsystem healthas set by the administrator of a network. Depending on the policy set by the administrator, the computers which do not meet the requirements will either be warned and granted access, allowed access to limited network resources, or denied access completely. NAP can also optionally provide software updates to a non-compliant computer to upgrade itself to the level as required to access the network, using aRemediation Server. A conforming client is given aHealth Certificate, which it then uses to access protected resources on the network. ANetwork Policy Server, runningWindows Server 2008acts as health policy server and clients need to useWindows XP SP3or later. AVPNserver,RADIUSserver orDHCPserver can also act as the health policy server. A number of specific security and reliability changes have been made:
https://en.wikipedia.org/wiki/Security_and_safety_features_new_to_Windows_Vista
Sensitive compartmented information(SCI) is a type ofUnited Statesclassified informationconcerning or derived from sensitive intelligence sources, methods, or analytical processes. All SCI must be handled within formal access control systems established by theDirector of National Intelligence.[1] SCI is not a classification; SCI clearance has sometimes been called "above Top Secret",[2]but information at any classification level may exist within an SCI control system. When "decompartmentalized", this information is treated the same as collateral information at the same classification level. The federal government requires[3]the SCI be processed, stored, used or discussed in aSensitive compartmented information facility(SCIF). Eligibility for access to SCI is determined by aSingle Scope Background Investigation(SSBI) or periodic reinvestigation.[4]Because the same investigation is used to grantTop Secretsecurity clearances, the two are often written together asTS//SCI. Eligibility alone does not confer access to any specific SCI material; it is simply a qualification. One must receive explicit permission to access an SCI control system or compartment. This process may include apolygraphor other approved investigative or adjudicative action.[5] Once it is determined a person should have access to an SCI compartment, they sign a nondisclosure agreement, are "read in" or indoctrinated, and the fact of this access is recorded in a local access register or in a computer database. Upon termination from a particular compartment, the employee again signs the nondisclosure agreement. SCI is divided into control systems, which are further subdivided into compartments and sub-compartments. These systems and compartments are usually identified by a classified codeword. Several such codewords have been declassified. The following SCI control systems, with their abbreviations and compartments, are known: SCI control system markings are placed immediately after the classification level markings in a banner line (banner spells out TOP SECRET in full) or portion marking (here TS is used).[24]Sometimes, especially on older documents, they are stamped. The following banner line and portion marking describe a top secret document containing information from the notional SI-GAMMA 1234 subcompartment, the notional SI-MANSION compartment, and the notional TALENT KEYHOLE-BLUEFISH compartment (TK is always abbreviated, because in some cases even the full meaning may be classified, like for BUR keyword, BUR-BLG-HCAS, BUR-BLG-JETS): Older documents were marked with HANDLE VIA xxxx CONTROL CHANNELS (or "HVxCC"), HANDLE VIA xxxx CHANNELS ONLY (or "HVxCO"), or HANDLE VIA xxxx CHANNELS JOINTLY (or "HVxCJ"), but this requirement was rescinded in 2006.[25]For example, COMINT documents were marked as HANDLE VIA COMINT CHANNELS ONLY. This marking led to the use of thecaveatCCO (COMINT Channels Only) in portion markings,[26]but CCO is also obsolete.[27]
https://en.wikipedia.org/wiki/Sensitive_compartmented_information
Inobject-oriented programming,inheritanceis the mechanism of basing anobjectorclassupon another object (prototype-based inheritance) or class (class-based inheritance), retaining similarimplementation. Also defined as deriving new classes (sub classes) from existing ones such as super class orbase classand then forming them into a hierarchy of classes. In most class-based object-oriented languages likeC++, an object created through inheritance, a "child object", acquires all the properties and behaviors of the "parent object", with the exception of:constructors, destructors,overloaded operatorsandfriend functionsof the base class. Inheritance allows programmers to create classes that are built upon existing classes,[1]to specify a new implementation while maintaining the same behaviors (realizing an interface), to reuse code and to independently extend original software via public classes andinterfaces. The relationships of objects or classes through inheritance give rise to adirected acyclic graph. An inherited class is called asubclassof its parent class or super class. The terminheritanceis loosely used for both class-based and prototype-based programming, but in narrow use the term is reserved for class-based programming (one classinherits fromanother), with the corresponding technique in prototype-based programming being instead calleddelegation(one objectdelegates toanother). Class-modifying inheritance patterns can be pre-defined according to simple network interface parameters such that inter-language compatibility is preserved.[2][3] Inheritance should not be confused withsubtyping.[4][5]In some languages inheritance and subtyping agree,[a]whereas in others they differ; in general, subtyping establishes anis-arelationship, whereas inheritance only reuses implementation and establishes a syntactic relationship, not necessarily a semantic relationship (inheritance does not ensure behavioral subtyping). To distinguish these concepts, subtyping is sometimes referred to asinterface inheritance(without acknowledging that the specialization of type variables also induces a subtyping relation), whereas inheritance as defined here is known asimplementation inheritanceorcode inheritance.[6]Still, inheritance is a commonly used mechanism for establishing subtype relationships.[7] Inheritance is contrasted withobject composition, where one objectcontainsanother object (or objects of one class contain objects of another class); seecomposition over inheritance. In contrast to subtyping’sis-arelationship, composition implements ahas-arelationship. Mathematically speaking, inheritance in any system of classes induces astrict partial orderon the set of classes in that system. In 1966,Tony Hoarepresented some remarks on records, and in particular, the idea of record subclasses, record types with common properties but discriminated by a variant tag and having fields private to the variant.[8]Influenced by this, in 1967Ole-Johan DahlandKristen Nygaardpresented a design that allowed specifying objects that belonged to different classes but had common properties. The common properties were collected in a superclass, and each superclass could itself potentially have a superclass. The values of a subclass were thus compound objects, consisting of some number of prefix parts belonging to various superclasses, plus a main part belonging to the subclass. These parts were all concatenated together.[9]The attributes of a compound object would be accessible by dot notation. This idea was first adopted in theSimula67 programming language.[10]The idea then spread toSmalltalk,C++,Java,Python, and many other languages. There are various types of inheritance, based on paradigm and specific language.[11] "Multiple inheritance... was widely supposed to be very difficult to implement efficiently. For example, in a summary of C++ in his book onObjective C,Brad Coxactually claimed that adding multiple inheritance to C++ was impossible. Thus, multiple inheritance seemed more of a challenge. Since I had considered multiple inheritance as early as 1982 and found a simple and efficient implementation technique in 1984, I couldn't resist the challenge. I suspect this to be the only case in which fashion affected the sequence of events."[12] Subclasses,derived classes,heir classes, orchild classesaremodularderivative classes that inherit one or morelanguageentities from one or more other classes (calledsuperclass,base classes, orparent classes). The semantics of class inheritance vary from language to language, but commonly the subclass automatically inherits theinstance variablesandmember functionsof its superclasses. The general form of defining a derived class is:[13] Some languages also support the inheritance of other constructs. For example, inEiffel,contractsthat define the specification of a class are also inherited by heirs. The superclass establishes a common interface and foundational functionality, which specialized subclasses can inherit, modify, and supplement. The software inherited by a subclass is consideredreusedin the subclass. A reference to an instance of a class may actually be referring to one of its subclasses. The actual class of the object being referenced is impossible to predict atcompile-time. A uniform interface is used to invoke the member functions of objects of a number of different classes. Subclasses may replace superclass functions with entirely new functions that must share the samemethod signature. In some languages a class may be declared asnon-subclassableby adding certainclass modifiersto the class declaration. Examples include thefinalkeyword inJavaandC++11onwards or thesealedkeyword in C#. Such modifiers are added to the class declaration before theclasskeyword and the class identifier declaration. Such non-subclassable classes restrictreusability, particularly when developers only have access to precompiledbinariesand notsource code. A non-subclassable class has no subclasses, so it can be easily deduced atcompile timethat references or pointers to objects of that class are actually referencing instances of that class and not instances of subclasses (they do not exist) or instances of superclasses (upcastinga reference type violates the type system). Because the exact type of the object being referenced is known before execution,early binding(also calledstatic dispatch) can be used instead oflate binding(also calleddynamic dispatch), which requires one or morevirtual method tablelookups depending on whethermultiple inheritanceor onlysingle inheritanceare supported in the programming language that is being used. Just as classes may be non-subclassable, method declarations may contain method modifiers that prevent the method from being overridden (i.e. replaced with a new function with the same name and type signature in a subclass). Aprivatemethod is un-overridable simply because it is not accessible by classes other than the class it is a member function of (this is not true for C++, though). Afinalmethod in Java, asealedmethod in C# or afrozenfeature in Eiffel cannot be overridden. If a superclass method is avirtual method, then invocations of the superclass method will bedynamically dispatched. Some languages require that method be specifically declared as virtual (e.g. C++), and in others, all methods are virtual (e.g. Java). An invocation of a non-virtual method will always be statically dispatched (i.e. the address of the function call is determined at compile-time). Static dispatch is faster than dynamic dispatch and allows optimizations such asinline expansion. The following table shows which variables and functions get inherited dependent on the visibility given when deriving the class, using the terminology established by C++.[14] Inheritance is used to co-relate two or more classes to each other. Manyobject-oriented programming languagespermit a class or object to replace the implementation of an aspect—typically a behavior—that it has inherited. This process is calledoverriding. Overriding introduces a complication: which version of the behavior does an instance of the inherited class use—the one that is part of its own class, or the one from the parent (base) class? The answer varies between programming languages, and some languages provide the ability to indicate that a particular behavior is not to be overridden and should behave as defined by the base class. For instance, in C#, the base method or property can only be overridden in a subclass if it is marked with the virtual, abstract, or override modifier, while in programming languages such as Java, different methods can be called to override other methods.[15]An alternative to overriding ishidingthe inherited code. Implementation inheritance is the mechanism whereby a subclassre-usescode in a base class. By default the subclass retains all of the operations of the base class, but the subclass mayoverridesome or all operations, replacing the base-class implementation with its own. In the following Python example, subclassesSquareSumComputerandCubeSumComputeroverride thetransform()method of the base classSumComputer. The base class comprises operations to compute the sum of thesquaresbetween two integers. The subclass re-uses all of the functionality of the base class with the exception of the operation that transforms a number into its square, replacing it with an operation that transforms a number into itssquareandcuberespectively. The subclasses therefore compute the sum of the squares/cubes between two integers. Below is an example of Python. In most quarters, class inheritance for the sole purpose of code reuse has fallen out of favor.[citation needed]The primary concern is that implementation inheritance does not provide any assurance ofpolymorphicsubstitutability—an instance of the reusing class cannot necessarily be substituted for an instance of the inherited class. An alternative technique, explicitdelegation, requires more programming effort, but avoids the substitutability issue.[citation needed]In C++ private inheritance can be used as a form ofimplementation inheritancewithout substitutability. Whereas public inheritance represents an "is-a" relationship and delegation represents a "has-a" relationship, private (and protected) inheritance can be thought of as an "is implemented in terms of" relationship.[16] Another frequent use of inheritance is to guarantee that classes maintain a certain common interface; that is, they implement the same methods. The parent class can be a combination of implemented operations and operations that are to be implemented in the child classes. Often, there is no interface change between the supertype and subtype- the child implements the behavior described instead of its parent class.[17] Inheritance is similar to but distinct fromsubtyping.[4]Subtyping enables a giventypeto be substituted for another type or abstraction and is said to establish anis-arelationship between the subtype and some existing abstraction, either implicitly or explicitly, depending on language support. The relationship can be expressed explicitly via inheritance in languages that support inheritance as a subtyping mechanism. For example, the following C++ code establishes an explicit inheritance relationship between classesBandA, whereBis both a subclass and a subtype ofAand can be used as anAwherever aBis specified (via a reference, a pointer or the object itself). In programming languages that do not support inheritance as asubtypingmechanism, the relationship between a base class and a derived class is only a relationship between implementations (a mechanism for code reuse), as compared to a relationship betweentypes. Inheritance, even in programming languages that support inheritance as a subtyping mechanism, does not necessarily entailbehavioral subtyping. It is entirely possible to derive a class whose object will behave incorrectly when used in a context where the parent class is expected; see theLiskov substitution principle.[18](Compareconnotation/denotation.) In some OOP languages, the notions of code reuse and subtyping coincide because the only way to declare a subtype is to define a new class that inherits the implementation of another. Using inheritance extensively in designing a program imposes certain constraints. For example, consider a classPersonthat contains a person's name, date of birth, address and phone number. We can define a subclass ofPersoncalledStudentthat contains the person's grade point average and classes taken, and another subclass ofPersoncalledEmployeethat contains the person's job-title, employer, and salary. In defining this inheritance hierarchy we have already defined certain restrictions, not all of which are desirable: Thecomposite reuse principleis an alternative to inheritance. This technique supports polymorphism and code reuse by separating behaviors from the primary class hierarchy and including specific behavior classes as required in any business domain class. This approach avoids the static nature of a class hierarchy by allowing behavior modifications at run time and allows one class to implement behaviors buffet-style, instead of being restricted to the behaviors of its ancestor classes. Implementation inheritance has been controversial among programmers and theoreticians of object-oriented programming since at least the 1990s. Among the critics are the authors ofDesign Patterns, who advocate instead for interface inheritance, and favorcomposition over inheritance. For example, the decorator pattern (as mentionedabove) has been proposed to overcome the static nature of inheritance between classes. As a more fundamental solution to the same problem,role-oriented programmingintroduces a distinct relationship,played-by, combining properties of inheritance and composition into a new concept.[citation needed] According toAllen Holub, the main problem with implementation inheritance is that it introduces unnecessarycouplingin the form of the"fragile base class problem":[6]modifications to the base class implementation can cause inadvertent behavioral changes in subclasses. Using interfaces avoids this problem because no implementation is shared, only the API.[19]Another way of stating this is that "inheritance breaksencapsulation".[20]The problem surfaces clearly in open object-oriented systems such asframeworks, where client code is expected to inherit from system-supplied classes and then substituted for the system's classes in its algorithms.[6] Reportedly, Java inventorJames Goslinghas spoken against implementation inheritance, stating that he would not include it if he were to redesign Java.[19]Language designs that decouple inheritance from subtyping (interface inheritance) appeared as early as 1990;[21]a modern example of this is theGoprogramming language. Complex inheritance, or inheritance used within an insufficiently mature design, may lead to theyo-yo problem. When inheritance was used as a primary approach to structure programs in the late 1990s, developers tended to break code into more layers of inheritance as the system functionality grew. If a development team combined multiple layers of inheritance with the single responsibility principle, this resulted in many very thin layers of code, with many layers consisting of only 1 or 2 lines of actual code.[citation needed]Too many layers make debugging a significant challenge, as it becomes hard to determine which layer needs to be debugged. Another issue with inheritance is that subclasses must be defined in code, which means that program users cannot add new subclasses at runtime. Other design patterns (such asEntity–component–system) allow program users to define variations of an entity at runtime.
https://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming)
Object-oriented programming(OOP) is aprogramming paradigmbased on the concept ofobjects.[1]Objects can containdata(calledfields,attributesorproperties) and have actions they can perform (calledproceduresormethodsand implemented incode). In OOP,computer programsare designed by making them out of objects that interact with one another.[2][3] Many of the most widely used programming languages (such asC++,Java,[4]andPython) support object-oriented programming to a greater or lesser degree, typically as part ofmultiple paradigmsin combination with others such asimperative programminganddeclarative programming. Significant object-oriented languages includeAda,ActionScript,C++,Common Lisp,C#,Dart,Eiffel,Fortran 2003,Haxe,Java,[4]JavaScript,Kotlin,Logo,MATLAB,Objective-C,Object Pascal,Perl,PHP,Python,R,Raku,Ruby,Scala,SIMSCRIPT,Simula,Smalltalk,Swift,ValaandVisual Basic.NET. The idea of "objects" in programming started with theartificial intelligencegroup atMITin the late 1950s and early 1960s. Here, "object" referred toLISPatoms with identified properties (attributes).[5][6]Another early example wasSketchpadcreated byIvan Sutherlandat MIT in 1960–1961. In the glossary of his technical report, Sutherland defined terms like "object" and "instance" (with the class concept covered by "master" or "definition"), albeit specialized to graphical interaction.[7]Later, in 1968, AED-0, MIT's version of theALGOLprogramming language, connected data structures ("plexes") and procedures, prefiguring what were later termed "messages", "methods", and "member functions".[8][9]Topics such asdata abstractionandmodular programmingwere common points of discussion at this time. Meanwhile, in Norway,Simulawas developed during the years 1961–1967.[8]Simula introduced essential object-oriented ideas, such asclasses, inheritance, anddynamic binding.[10]Simula was used mainly by researchers involved withphysical modelling, like the movement of ships and their content through cargo ports.[10]Simula is generally accepted as being the first language with the primary features and framework of an object-oriented language.[11] I thought of objects being like biological cells and/or individual computers on a network, only able to communicate with messages (so messaging came at the very beginning – it took a while to see how to do messaging in a programming language efficiently enough to be useful). Influenced by both MIT and Simula,Alan Kaybegan developing his own ideas in November 1966. He would go on to createSmalltalk, an influential object-oriented programming language. By 1967, Kay was already using the term "object-oriented programming" in conversation.[1]Although sometimes called the "father" of object-oriented programming,[12]Kay has said his ideas differ from how object-oriented programming is commonly understood, and has implied that the computer science establishment did not adopt his notion.[1]A 1976 MIT memo co-authored byBarbara LiskovlistsSimula 67,CLU, andAlphardas object-oriented languages, but does not mention Smalltalk.[13] In the 1970s, the first version of theSmalltalkprogramming language was developed atXerox PARCbyAlan Kay,Dan IngallsandAdele Goldberg. Smalltalk-72 was notable for use of objects at the language level and its graphical development environment.[14]Smalltalk was a fully dynamic system, allowing users to create and modify classes as they worked.[15]Much of the theory of OOP was developed in the context of Smalltalk, for example multiple inheritance.[16] In the late 1970s and 1980s, object-oriented programming rose to prominence. TheFlavorsobject-oriented Lisp was developed starting 1979, introducingmultiple inheritanceandmixins.[17]In August 1981,Byte Magazinehighlighted Smalltalk and OOP, introducing these ideas to a wide audience.[18]LOOPS, the object system forInterlisp-D, was influenced by Smalltalk and Flavors, and a paper about it was published in 1982.[19]In 1986, the firstConference on Object-Oriented Programming, Systems, Languages, and Applications(OOPSLA) was attended by 1,000 people. This conference marked the beginning of efforts to consolidate Lisp object systems, eventually resulting in theCommon Lisp Object System. In the 1980s, there were a few attempts to designprocessor architecturesthat includedhardwaresupport for objects inmemory, but these were not successful. Examples include theIntel iAPX 432and theLinn SmartRekursiv. In the mid-1980s, new object-oriented languages likeObjective-C,C++, andEiffelemerged. Objective-C was developed byBrad Cox, who had used Smalltalk atITT Inc..Bjarne StroustrupcreatedC++based on his experience using Simula for his PhD thesis.[14]Bertrand Meyerproduced the first design of theEiffel languagein 1985, which focused on software quality using adesign by contractapproach.[20] In the 1990s, object-oriented programming became the main way of programming, especially as more languages supported it. These includedVisual FoxPro3.0,[21][22]C++,[23]andDelphi[citation needed]. OOP became even more popular with the rise ofgraphical user interfaces, which used objects for buttons, menus and other elements. One well-known example is Apple'sCocoaframework, used onMac OS Xand written inObjective-C. OOP toolkits also enhanced the popularity ofevent-driven programming.[citation needed] AtETH Zürich,Niklaus Wirthand his colleagues created new approaches to OOP.Modula-2(1978) andOberon(1987), included a distinctive approach to object orientation, classes, and type checking across module boundaries. Inheritance is not obvious in Wirth's design since his nomenclature looks in the opposite direction: It is called type extension and the viewpoint is from the parent down to the inheritor. Many programming languages that existed before OOP have added object-oriented features, includingAda,BASIC,Fortran,Pascal, andCOBOL. This sometimes caused compatibility and maintainability issues, as these languages were not originally designed with OOP in mind. In the new millenium, new languages likePythonandRubyhave emerged that combine object-oriented and procedural styles. The most commercially important "pure" object-oriented languages continue to beJava, developed bySun Microsystems, as well asC#andVisual Basic.NET(VB.NET), both designed for Microsoft's.NETplatform. These languages show the benefits of OOP by creating abstractions from implementation. The .NET platform supports cross-language inheritance, allowing programs to use objects from multiple languages together. Object-oriented programming focuses on working with objects, but not all OOP languages have every feature linked to OOP. Below are some common features of languages that are considered strong in OOP or support it along with other programming styles. Important exceptions are also noted.[24][25][26][27]Christopher J. Datepointed out that comparing OOP with other styles, likerelational programming, is difficult because there isn't a clear, agreed-upon definition of OOP.[28] Features from imperative and structured programming are present in OOP languages and are also found in non-OOP languages. Support formodular programminglets programmers organize related procedures into files and modules. This makes programs easier to manage. Each modules has its ownnamespace, so items in one module will not conflict with items in another. Object-oriented programming (OOP) was created to make code easier toreuseandmaintain.[29]However, it was not designed to clearly show the flow of a program's instructions—that was left to the compiler. As computers began using more parallel processing and multiplethreads, it became more important to understand and control how instructions flow. This is difficult to do with OOP.[30][31][32][33] An object is a type ofdata structurethat has two main parts:fieldsandmethods. Fields may also be known as members, attributes, or properties, and hold information in the form of statevariables. Methods are actions,subroutines, or procedures, defining the object's behavior in code. Objects are usually stored inmemory, and in many programming languages, they work likepointersthat link directly to a contiguous block containing the object instances's data. Objects can contain other objects. This is calledobject composition. For example, an Employee object might have an Address object inside it, along with other information like "first_name" and "position". This type of structures shows "has-a" relationships, like "an employee has an address". Some believe that OOP places too much focus on using objects rather than onalgorithmsanddata structures.[34][35]For example, programmerRob Pikepointed out that OOP can make programmers think more about type hierarchy than composition.[36]He has called object-oriented programming "theRoman numeralsof computing".[37]Rich Hickey, creator ofClojure, described OOP as overly simplistic, especially when it comes to representing real-world things that change over time.[35]Alexander Stepanovsaid that OOP tries to fit everything into a single type, which can be limiting. He argued that sometimes we need multisorted algebras—families of interfaces that span multiple types, such as ingeneric programming. Stepanov also said that calling everything an "object" doesn't add much understanding.[34] Sometimes, objects represent real-world things and processes in digital form.[38]For example, a graphics program may have objects such as "circle", "square", and "menu". An online shopping system might have objects such as "shopping cart", "customer", and "product".Niklaus Wirthsaid, "This paradigm [OOP] closely reflects the structure of systems in the real world and is therefore well suited to model complex systems with complex behavior".[39] However, more often, objects represent abstract entities, like an open file or a unit converter. Not everyone agrees that OOP makes it easy to copy the real world exactly or that doing so is even necessary.Bob Martinsuggests that because classes are software, their relationships don't match the real-world relationships they represent.[40]Bertrand Meyerargues inObject-Oriented Software Construction, that a program is not a model of the world but a model of some part of the world; "Reality is a cousin twice removed".[41]Steve Yeggenoted that natural languages lack the OOP approach of strictly prioritizingthings(objects/nouns) beforeactions(methods/verbs), as opposed tofunctional programmingwhich does the reverse.[42]This can sometimes make OOP solutions more complicated than those written in procedural programming.[43] Most OOP languages allowreusingandextendingcode through "inheritance". This inheritance can use either "classes" or "prototypes", which have some differences but use similar terms for ideas like "object" and "instance". Inclass-based programming, the most common type of OOP, every object is aninstanceof a specificclass. The class defines the data format, like variables (e.g., name, age) and methods (actions the object can take). Every instance of the class has the same set of variables and methods. Objects are created using a special method in the class known as aconstructor. Here are a few key terms in class-based OOP: Classes may inherit from other classes, creating a hierarchy of "subclasses". For example, an "Employee" class might inherit from a "Person" class. This means the Employee object will have all the variables from Person (like name variables) plus any new variables (like job position and salary). Similarly, the subclass may expand the interface with new methods. Most languages also allow the subclass tooverridethe methods defined by superclasses. Some languages supportmultiple inheritance, where a class can inherit from more than one class, and other languages similarly supportmixinsortraits. For example, a mixin called UnicodeConversionMixin might add a method unicode_to_ascii() to both a FileReader and a WebPageScraper class. Some classes areabstract, meaning they cannot be directly instantiated into objects; they're only meant to be inherited into other classes. Other classes areutilityclasses which contain only class variables and methods and are not meant to be instantiated or subclassed.[44] Inprototype-based programming, there aren't any classes. Instead, each object is linked to another object, called itsprototypeorparent. In Self, an object may have multiple or no parents,[45]but in the most popular prototype-based language, Javascript, every object has exactly oneprototypelink, up to the base Object type whose prototype is null. The prototype acts as a model for new objects. For example, if you have an objectfruit, you can make two objectsappleandorange, based on it. There is nofruitclass, but they share traits from thefruitprototype. Prototype-based languages also allow objects to have their own unique properties, so theappleobject might have an attributesugar_content, while theorangeorfruitobjects do not. Some languages, likeGo, don't use inheritance at all.[46]Instead, they encourage "composition over inheritance", where objects are built using smaller parts instead of parent-child relationships. For example, instead of inheriting from class Person, the Employee class could simply contain a Person object. This lets the Employee class control how much of Person it exposes to other parts of the program.Delegationis another language feature that can be used as an alternative to inheritance. Programmers have different opinions on inheritance. Bjarne Stroustrup, author of C++, has stated that it is possible to do OOP without inheritance.[47]Rob Pikehas criticized inheritance for creating complicated hierarchies instead of simpler solutions.[48] People often think that if one class inherits from another, it means the subclass "is a" more specific version of the original class. This presumes theprogram semanticsare that objects from the subclass can always replace objects from the original class without problems. This concept is known asbehavioral subtyping, more specifically theLiskov substitution principle. However, this is often not true, especially in programming languages that allowmutableobjects, objects that change after they are created. In fact,subtype polymorphismas enforced by thetype checkerin OOP languages cannot guarantee behavioral subtyping in most if not all contexts. For example, thecircle-ellipse problemis notoriously difficult to handle using OOP's concept of inheritance. Behavioral subtyping is undecidable in general, so it cannot be easily implemented by a compiler. Because of this, programmers must carefully design class hierarchies to avoid mistakes that the programming language itself cannot catch. When a method is called on an object, the object itself—not outside code—decides which specific code to run. This process, calleddynamic dispatch, usually happens at run time by checking a table linked to the object to find the correct method. In this context, a method call is also known asmessage passing, meaning the method name and its inputs are like a message sent to the object for it to act on. If the method choice depends on more than one type of object (such as other objects passed as parameters), it's calledmultiple dispatch. Dynamic dispatch works together with inheritance: if an object doesn't have the requested method, it looks up to its parent class (delegation), and continues up the chain until it finds the method or reaches the top. Dataabstractionis a way of organizing code so that only certain parts of the data are visible to related functions (data hiding). This helps prevent mistakes and makes the program easier to manage. Because data abstraction works well, many programming styles, like object-oriented programming and functional programming, use it as a key principle.Encapsulationis another important idea in programming. It means keeping the internal details of an object hidden from the outside code. This makes it easier to change how an object works on the inside without affecting other parts of the program, such as incode refactoring. Encapsulation also helps keep related code together (decoupling), making it easier for programmers to understand. In object-oriented programming, objects act as a barrier between their internal workings and external code. Outside code can only interact with an object by calling specificpublicmethods or variables. If a class only allows access to its data through methods and not directly, this is calledinformation hiding. When designing a program, it's often recommended to keep data as hidden as possible. This means using local variables inside functions when possible, then private variables (which only the object can use), and finally public variables (which can be accessed by any part of the program) if necessary. Keeping data hidden helps prevent problems when changing the code later.[49]Some programming languages, like Java, control information hiding by marking variables asprivate(hidden) orpublic(accessible).[50]Other languages, like Python, rely on naming conventions, such as starting a private method's name with an underscore. Intermediate levels of access also exist, such as Java'sprotectedkeyword, (which allows access from the same class and its subclasses, but not objects of a different class), and theinternalkeyword in C#, Swift, and Kotlin, which restricts access to files within the same module.[51] Abstraction and information hiding are important concepts in programming, especially in object-oriented languages.[52]Programs often create many copies of objects, and each one works independently. Supporters of this approach say it makes code easier to reuse and intuitively represents real-world situations.[53]However, others argue that object-oriented programming does not enhance readability or modularity.[54][55]Eric S. Raymondhas written that object-oriented programming languages tend to encourage thickly layered programs that destroy transparency.[56]Raymond compares this unfavourably to the approach taken with Unix and theC programming language.[56] One programming principle, called the "open/closed principle", says that classes and functions should be "open for extension, but closed for modification".Luca Cardellihas stated that OOP languages have "extremely poor modularity properties with respect to class extension and modification", and tend to be extremely complex.[54]The latter point is reiterated byJoe Armstrong, the principal inventor ofErlang, who is quoted as saying:[55] The problem with object-oriented languages is they've got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle. Leo Brodie says that information hiding can lead to copying the same code in multiple places (duplicating code),[57]which goes against thedon't repeat yourselfrule of software development.[58] Polymorphismis the use of one symbol to represent multiple different types.[59]In object-oriented programming, polymorphism more specifically refers tosubtypingor subtype polymorphism, where a function can work with a specificinterfaceand thus manipulate entities of different classes in a uniform manner.[60] For example, imagine a program has two shapes: a circle and a square. Both come from a common class called "Shape." Each shape has its own way of drawing itself. With subtype polymorphism, the program doesn't need to know the type of each shape, and can simply call the "Draw" method for each shape. The programming language runtime will ensure the correct version of the "Draw" method runs for each shape. Because the details of each shape are handled inside their own classes, this makes the code simpler and more organized, enabling strongseparation of concerns. In object-oriented programming, objects have methods that can change or use the object's data. Many programming languages use a special word, likethisorself, to refer to the current object. In languages that supportopen recursion, a method in an object can call other methods in the same object, including itself, using this special word. This allows a method in one class to call another method defined later in a subclass, a feature known aslate binding. OOP languages can be grouped into different types based on how they support and use objects: Many popular programming languages, like C++, Java, and Python, use object-oriented programming. In the past, OOP was widely accepted,[62]but recently, some programmers have criticized it and prefer functional programming instead.[63]A study by Potok et al. found no major difference in productivity between OOP and other methods.[64] Paul Graham, a well-known computer scientist, believes big companies like OOP because it helps manage large teams of average programmers. He argues that OOP adds structure, making it harder for one person to make serious mistakes, but at the same time restrains smart programmers.[65]Eric S. Raymond, aUnixprogrammer andopen-source softwareadvocate, argues that OOP is not the best way to write programs.[56] Richard Feldman says that, while OOP features helped some languages stay organized, their popularity comes from other reasons.[66]Lawrence Krubner argues that OOP doesn't offer special advantages compared to other styles, like functional programming, and can make coding more complicated.[67]Luca Cardellisays that OOP is slower and takes longer to compile than procedural programming.[54] In recent years, object-oriented programming (OOP) has become very popular indynamic programming languages. Some languages, likePython,PowerShell,RubyandGroovy, were designed with OOP in mind. Others, likePerl,PHP, andColdFusion, started as non-OOP languages but added OOP features later (starting with Perl 5, PHP 4, and ColdFusion version 6). On the web,HTML,XHTML, andXMLdocuments use theDocument Object Model(DOM), which works with theJavaScriptlanguage. JavaScript is a well-known example of aprototype-basedlanguage. Instead of using classes like other OOP languages, JavaScript creates new objects by copying (or "cloning") existing ones. Another language that uses this method isLua. When computers communicate in a client-server system, they send messages to request services. For example, a simple message might include a length field (showing how big the message is), a code that identifies the type of message, and a data value. These messages can be designed as structured objects that both the client and server understand, so that each type of message corresponds to a class of objects in the client and server code. More complex messages might include structured objects as additional details. The client and server need to know how to serialize and deserialize these messages so they can be transmitted over the network, and map them to the appropriate object types. Both clients and servers can be thought of as complex object-oriented systems. TheDistributed Data Management Architecture(DDM) uses this idea by organizing objects into four levels: The first version of DDM defined distributed file services. Later, it was expanded to support databases through theDistributed Relational Database Architecture(DRDA). Design patternsare common solutions to problems in software design. Some design patterns are especially useful for object-oriented programming, and design patterns are typically introduced in an OOP context. The following are notablesoftware design patternsfor OOP objects.[68] A commonanti-patternis theGod object, an object that knows or does too much. Design Patterns: Elements of Reusable Object-Oriented Softwareis a famous book published in 1994 by four authors:Erich Gamma,Richard Helm,Ralph Johnson, andJohn Vlissides. People often call them the "Gang of Four". The book talks about the strengths and weaknesses of object-oriented programming and explains 23 common ways to solve programming problems. These solutions, called "design patterns," are grouped into three types: Both object-oriented programming andrelational database management systems(RDBMSs) are widely used in software today. However,relational databasesdon't store objects directly, which creates a challenge when using them together. This issue is calledobject-relational impedance mismatch. To solve this problem, developers use different methods, but none of them are perfect.[69]One of the most common solutions isobject-relational mapping(ORM), which helps connect object-oriented programs to relational databases. Examples of ORM tools includeVisual FoxPro,Java Data Objects, andRuby on RailsActiveRecord. Some databases, calledobject databases, are designed to work with object-oriented programming. However, they have not been as popular or successful as relational databases. Date and Darwen have proposed a theoretical foundation that uses OOP as a kind of customizabletype systemto support RDBMSs, but it forbids objects containing pointers to other objects.[70] Inresponsibility-driven design, classes are built around what they need to do and the information they share, in the form of a contract. This is different fromdata-driven design, where classes are built based on the data they need to store. According to Wirfs-Brock and Wilkerson, the originators of responsibility-driven design, responsibility-driven design is the better approach.[71] SOLIDis a set of five rules for designing good software, created by Michael Feathers: GRASP(General Responsibility Assignment Software Patterns) is another set of software design rules, created byCraig Larman, that helps developers assign responsibilities to different parts of a program:[72] In object-oriented programming, objects are things that exist while a program is running. An object can represent anything, like a person, a place, a bank account, or a table of data. Many researchers have tried to formally define how OOP works.Recordsare the basis for understanding objects. They can represent fields, and also methods, iffunction literalscan be stored. However,inheritancepresents difficulties, particularly with the interactions between open recursion and encapsulated state. Researchers have usedrecursive typesandco-algebraic data typesto incorporate essential features of OOP.[73]Abadi and Cardelli defined several extensions ofSystem F<:that deal with mutable objects, allowing bothsubtype polymorphismandparametric polymorphism(generics), and were able to formally model many OOP concepts and constructs.[74]Although far from trivial, static analysis of object-oriented programming languages such as Java is a mature field,[75]with several commercial tools.[76]
https://en.wikipedia.org/wiki/Object-oriented_programming
Insoftware engineering, asoftware design patternordesign patternis a general,reusablesolution to a commonly occurring problem in many contexts insoftware design.[1]A design pattern is not a rigid structure to be transplanted directly intosource code. Rather, it is a description or a template for solving a particular type of problem that can be deployed in many different situations.[2]Design patterns can be viewed as formalizedbest practicesthat the programmer may use to solve common problems when designing a software application or system. Object-orienteddesign patterns typically show relationships and interactions betweenclassesorobjects, without specifying the final application classes or objects that are involved.[citation needed]Patterns that imply mutable state may be unsuited forfunctional programminglanguages. Some patterns can be rendered unnecessary in languages that have built-in support for solving the problem they are trying to solve, and object-oriented patterns are not necessarily suitable for non-object-oriented languages.[citation needed] Design patterns may be viewed as a structured approach tocomputer programmingintermediate between the levels of aprogramming paradigmand a concretealgorithm.[citation needed] Patterns originated as anarchitectural conceptbyChristopher Alexanderas early as 1977 inA Pattern Language(cf. his article, "The Pattern of Streets," JOURNAL OF THE AIP, September, 1966, Vol. 32, No. 5, pp. 273–278). In 1987,Kent BeckandWard Cunninghambegan experimenting with the idea of applying patterns to programming – specificallypattern languages– and presented their results at theOOPSLAconference that year.[3][4]In the following years, Beck, Cunningham and others followed up on this work. Design patterns gained popularity incomputer scienceafter the bookDesign Patterns: Elements of Reusable Object-Oriented Softwarewas published in 1994 by the so-called "Gang of Four" (Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides), which is frequently abbreviated as "GoF". That same year, the firstPattern Languages of ProgrammingConference was held, and the following year thePortland Pattern Repositorywas set up for documentation of design patterns. The scope of the term remains a matter of dispute. Notable books in the design pattern genre include: Although design patterns have been applied practically for a long time, formalization of the concept of design patterns languished for several years.[5] Design patterns can speed up the development process by providing proven development paradigms.[6]Effective software design requires considering issues that may not become apparent until later in the implementation. Freshly written code can often have hidden, subtle issues that take time to be detected; issues that sometimes can cause major problems down the road. Reusing design patterns can help to prevent such issues,[7]and enhance code readability for those familiar with the patterns. Software design techniques are difficult to apply to a broader range of problems.[citation needed]Design patterns provide general solutions,documentedin a format that does not require specifics tied to a particular problem. In 1996, Christopher Alexander was invited to give aKeynote Speechto the 1996 OOPSLA Convention. Here he reflected on how his work on Patterns in Architecture had developed and his hopes for how the Software Design community could help Architecture extend Patterns to create living structures that use generative schemes that are more like computer code. A pattern describes adesign motif, a.k.a.prototypical micro-architecture, as a set of program constituents (e.g., classes, methods...) and their relationships. A developer adapts the motif to their codebase to solve the problem described by the pattern. The resulting code has structure and organization similar to the chosen motif. Efforts have also been made to codify design patterns in particular domains, including the use of existing design patterns as well as domain-specific design patterns. Examples includeuser interfacedesign patterns,[8]information visualization,[9]secure design,[10]"secure usability",[11]Web design[12]and business model design.[13] The annualPattern Languages of ProgrammingConference proceedings[14]include many examples of domain-specific patterns. Object-orienteddesign patterns typically show relationships and interactions betweenclassesorobjects, without specifying the final application classes or objects that are involved. Patterns that imply mutable state may be unsuited forfunctional programminglanguages. Some patterns can be rendered unnecessary in languages that have built-in support for solving the problem they are trying to solve, and object-oriented patterns are not necessarily suitable for non-object-oriented languages. Design patterns can be organized into groups based on what kind of problem they solve.Creational patternscreate objects.Structural patternsorganize classes and objects to form larger structures that provide new functionality.Behavioral patternsdescribe collaboration between objects. J2EE Patterns[17]PoEAA[18] Can be unsafe when implemented in some language/hardware combinations. It can therefore sometimes be considered ananti-pattern. The documentation for a design pattern describes the context in which the pattern is used, the forces within the context that the pattern seeks to resolve, and the suggested solution.[27]There is no single, standard format for documenting design patterns. Rather, a variety of different formats have been used by different pattern authors. However, according toMartin Fowler, certain pattern forms have become more well-known than others, and consequently become common starting points for new pattern-writing efforts.[28]One example of a commonly used documentation format is the one used byErich Gamma,Richard Helm,Ralph Johnson, andJohn Vlissidesin their bookDesign Patterns. It contains the following sections: Some suggest that design patterns may be a sign that features are missing in a given programming language (JavaorC++for instance).Peter Norvigdemonstrates that 16 out of the 23 patterns in theDesign Patternsbook (which is primarily focused on C++) are simplified or eliminated (via direct language support) inLisporDylan.[29]Related observations were made by Hannemann and Kiczales who implemented several of the 23 design patterns using anaspect-oriented programming language(AspectJ) and showed that code-level dependencies were removed from the implementations of 17 of the 23 design patterns and that aspect-oriented programming could simplify the implementations of design patterns.[30]See alsoPaul Graham'sessay "Revenge of the Nerds".[31] Inappropriate use of patterns may unnecessarily increase complexity.[32]FizzBuzzEnterpriseEditionoffers a humorous example of over-complexity introduced by design patterns.[33] By definition, a pattern must be programmed anew into each application that uses it. Since some authors see this as a step backward fromsoftware reuseas provided bycomponents, researchers have worked to turn patterns into components. Meyer and Arnout were able to provide full or partial componentization of two-thirds of the patterns they attempted.[34] In order to achieve flexibility, design patterns may introduce additional levels ofindirection, which may complicate the resulting design and decreaseruntimeperformance. Software design patterns offer finer granularity compared to software architecture patterns and software architecture styles, as design patterns focus on solving detailed, low-level design problems within individual components or subsystems. Examples include Singleton, Factory Method, and Observer.[35][36][37] Software Architecture Patternrefers to a reusable, proven solution to a recurring problem at the system level, addressing concerns related to the overall structure, component interactions, and quality attributes of the system.[citation needed]Software architecture patterns operate at a higher level of abstraction than design patterns, solving broader system-level challenges. While these patterns typically affect system-level concerns, the distinction between architectural patterns and architectural styles can sometimes be blurry. Examples includeCircuit Breaker.[35][36][37] Software Architecture Stylerefers to a high-level structural organization that defines the overall system organization, specifying how components are organized, how they interact, and the constraints on those interactions.[citation needed]Architecture styles typically include a vocabulary of component and connector types, as well as semantic models for interpreting the system's properties. These styles represent the most coarse-grained level of system organization. Examples includeLayered Architecture,Microservices, andEvent-Driven Architecture.[35][36][37]
https://en.wikipedia.org/wiki/Software_design_pattern
Thefacade pattern(also spelledfaçade) is asoftware design patterncommonly used inobject-oriented programming. Analogous to afaçadein architecture, it is anobjectthat serves as a front-facing interface masking more complex underlying or structural code. A facade can: Developers often use the facade design pattern when a system is very complex or difficult to understand because the system has many interdependent classes or because its source code is unavailable. This pattern hides the complexities of the larger system and provides a simpler interface to the client. It typically involves a singlewrapper classthat contains a set of members required by the client. These members access the system on behalf of the facade client and hide the implementation details. The Facade[1]design pattern is one of the twenty-three well-knownGoF design patternsthat describe how to solve recurring design problems to design flexible and reusable object-oriented software, that is, objects that are easier to implement, change, test, and reuse. What problems can the Facade design pattern solve?[2] Clients that access a complex subsystem directly refer to (depend on) many different objects having different interfaces (tight coupling), which makes the clients hard to implement, change, test, and reuse. What solution does the Facade design pattern describe? Define aFacadeobject that This enables to work through aFacadeobject to minimize the dependencies on a subsystem.See also the UML class and sequence diagram below. A Facade is used when an easier or simpler interface to an underlying object is desired.[3]Alternatively, anadaptercan be used when the wrapper must respect a particular interface and must supportpolymorphicbehavior. Adecoratormakes it possible to add or alter behavior of an interface at run-time. The facade pattern is typically used when In thisUMLclass diagram, theClientclass doesn't access the subsystem classes directly. Instead, theClientworks through aFacadeclass that implements a simple interface in terms of (by delegating to) the subsystem classes (Class1,Class2, andClass3). TheClientdepends only on the simpleFacadeinterface and is independent of the complex subsystem.[4] The sequence diagram shows the run-time interactions: TheClientobject works through aFacadeobject that delegates the request to theClass1,Class2, andClass3instances that perform the request. This is an abstract example of how a client ("you") interacts with a facade (the "computer") to a complex system (internal computer parts, like CPU and HardDrive).
https://en.wikipedia.org/wiki/Facade_pattern
In a legal dispute, one party has theburden of proofto show that they are correct, while the other party has no such burden and is presumed to be correct. The burden of proof requires a party to produce evidence to establish the truth of facts needed to satisfy all the required legal elements of the dispute. It is also known as theonus of proof. The burden of proof is usually on the person who brings a claim in a dispute. It is often associated with the Latinmaximsemper necessitas probandi incumbit ei qui agit, a translation of which is: "the necessity of proof always lies with the person who lays charges."[1]In civil suits, for example, the plaintiff bears the burden of proof that the defendant's action or inaction caused injury to the plaintiff, and the defendant bears the burden of proving anaffirmative defense. The burden of proof is on the prosecutor forcriminal cases, and thedefendantispresumed innocent. If the claimant fails to discharge the burden of proof to prove their case, the claim will be dismissed. A "burden of proof" is a party's duty to prove a disputed assertion or charge, and includes the burden of production (providing enough evidence on an issue so that the trier-of-fact decides it rather than in a peremptory ruling like a directed verdict) and the burden of persuasion (standard of proof such as preponderance of the evidence).[2][3] A "burden of persuasion" or "risk of non-persuasion"[4]is an obligation that remains on a single party for the duration of the court proceeding.[5]Once the burden has been entirely discharged to the satisfaction of thetrier of fact, the party carrying the burden will succeed in its claim. For example, thepresumption of innocencein a criminal case places a legal burden upon the prosecution to prove all elements of the offense (generally beyond a reasonable doubt), and to disprove all the defenses except foraffirmative defensesin which the proof of non-existence of all affirmative defense(s) is not constitutionally required of the prosecution.[6] The burden of persuasion should not be confused with theevidential burden, or burden of production, or duty of producing (or going forward with evidence)[7]which is an obligation that may shift between parties over the course of the hearing or trial. The evidential burden is the burden to adduce sufficient evidence to properly raise an issue at court. There is no burden of proof with regard to motive or animus in criminal cases in the United States. The intent surrounding an offense is nevertheless crucial to the elements of the offense in a first-degree-murder conviction.[8]This brings up the ethical dilemma of whether or not a death sentence should be imposed when the defendant's motives or intentions are the contingent factors in sentencing. However, in some cases such as defamation suits with a public figure as the defamed party, the public figure must prove actual malice. Burden of proof refers most generally to the obligation of a party to prove its allegations at trial. In a civil case, the plaintiff sets forth its allegations in a complaint, petition or other pleading. The defendant is then required to file a responsive pleading denying some or all of the allegations and setting forth anyaffirmative facts in defense. Each party has the burden of proof of its allegations. PerSuperintendent v. Hill(1985), in order to take away a prisoner'sgood conduct timefor a disciplinary violation, prison officials need only have "some evidence", i.e., "a modicum of evidence"; however, the sentencing judge is under no obligation to adhere to good/work time constraints, nor are they required to credit time served.[9] "Reasonable indication (also known as reasonable suspicion) is substantially lower than probable cause; factors to consider are those facts and circumstances a prudent investigator would consider, but must include facts or circumstances indicating a past, current, or impending violation; an objective factual basis must be present, a mere 'hunch' is insufficient."[10] The reasonable indication standard is used in interpreting trade law in determining if the United States has been materially injured.[11] Reasonable suspicion is a low standard of proof to determine whether abriefinvestigative stop or search by a police officer or any government agent is warranted. This stop or search must be brief; its thoroughness is proportional to, and limited by, the low standard of evidence. A more definite standard of proof (oftenprobable cause) would be required to justify a more thorough stop/search. InTerry v. Ohio,392U.S.1(1968), theSupreme Courtruled that reasonable suspicion requires specific, articulable, and individualized suspicion that crime is afoot. A mere guess or "hunch" is not enough to constitute reasonable suspicion.[12] An investigatory stop is a seizure under theFourth Amendment.[12]The state must justify the seizure by showing that the officer conducting the stop had a reasonable articulable suspicion that criminal activity was afoot.[12]The important point is that officers cannot deprive a citizen of liberty unless the officer can point to specific facts and circumstances and inferences therefrom that would amount to a reasonable suspicion.[12]The officer must be prepared to establish that criminal activity was a logical explanation for what they perceived. The requirement serves to prevent officers from stopping individuals based merely on hunches or unfounded suspicions.[12]The purpose of the stop and detention is to investigate to the extent necessary to confirm or dispel the original suspicion.[12]If the initial confrontation with the person stopped dispels suspicion of criminal activity the officer must end the detention and allow the person to go about their business.[12]If the investigation confirms the officer's initial suspicion or reveals evidence that would justify continued detention the officer may require the person detained to remain at the scene until further investigation is complete, and may give rise to the level of probable cause.[12] InArizona v. Gant(2009), the United States Supreme Court arguably defined a new standard, that of "reasonable to believe". This standard applies only to vehicle searches after the suspect has been placed under arrest. The Court overruledNew York v. Belton(1981) and concluded that police officers are allowed to go back and search a vehicle incident to a suspect's arrest only where it is "reasonable to believe" that there is more evidence in the vehicle of the crime for which the suspect was arrested. There is still an ongoing debate as to the exact meaning of this phrase. Some courts have said it should be a new standard while others have equated it with the "reasonable suspicion" of theTerrystop. Most courts have agreed it is somewhere less than probable cause. Probable cause is a higher standard of proof than reasonable suspicion, which is used in the United States to determine whether a search, or an arrest, is unreasonable. It is also used bygrand juriesto determine whether to issue anindictment. In the civil context, this standard is often used where plaintiffs are seeking a prejudgementremedy. In the criminal context, the U.S. Supreme Court inUnited States v. Sokolow,490U.S.1(1989), determined that probable cause requires "a fairprobabilitythat contraband or evidence of a crime will be found". The primary issue was whetherDrug Enforcement Administrationagents had a reason to execute a search. Courts have traditionally interpreted the idea of "a fair probability" as meaning whether a fair-minded evaluator would have reason to find it more likely than not that a fact (or ultimate fact) is true, which is quantified as a 51% certainty standard (using whole numbers as the increment of measurement). Some courts and scholars have suggested probable cause could, in some circumstances, allow for a fact to be established as true to a standard of less than 51%,[13]but as of August 2019, the United States Supreme Court has never ruled that the quantification of probable cause is anything less than 51%. Probable cause can be contrasted with "reasonable articulable suspicion" which requires a police officer to have an unquantified amount of certainty the courts say is well below 51% before briefly detaining a suspect (without consent) to pat them down and attempt to question them.[12]The "beyond reasonable doubt" standard, used by criminal juries in the United States to determine guilt for a crime, also contrasts with probable cause which courts hold requires an unquantified level of proof well above that of probable cause's 51%.[citation needed]Though it is beyond the scope of this topic, when courts review whether 51% probable cause certainty was a reasonable judgment, the legal inquiry is different for police officers in the field than it would be for grand jurors. InFranks v. Delaware(1978), the U.S. Supreme Court held that probable cause requires that there not be "reckless disregard for the truth" of the facts asserted.[14] Examples of a police officer's truth-certainty standards in the field and their practical consequences are offered below: Some credible evidence is one of the least demanding standards of proof. This proof standard is often used in administrative law settings and in some states to initiateChild Protective Services(CPS) proceedings. This proof standard is used where short-term intervention is needed urgently, such as when a child is arguably in immediate danger from a parent or guardian. The "some credible evidence" standard is used as a legal placeholder to bring some controversy before a trier of fact, and into a legal process. It is on the order of the factual standard of proof needed to achieve a finding of "probable cause" used inex partethreshold determinations needed before a court will issue a search warrant.[citation needed]It is a lower standard of proof than the "preponderance of the evidence" standard. The standard does not require the fact-finder to weigh conflicting evidence, and merely requires the investigator or prosecutor to present the bare minimum of material credible evidence to support the allegations against the subject, or in support of the allegation; seeValmonte v. Bane,18 F.3d 992 (2nd Cir. 1994). In some Federal Appellate Circuit Courts, such as the Second Circuit, the "some credible evidence" standard has been found constitutionally insufficient to protect liberty interests of the parties in controversy at CPS hearings.[citation needed] Preponderance of the evidence (American English), also known as balance of probabilities (British English), is the standard required in civil cases, includingfamily courtdeterminations solely involving money, such aschild supportunder theChild Support Standards Act, and inchild custodydeterminations between parties having equal legal rights respecting a child. It is also the standard of proof by which the defendant must proveaffirmative defensesormitigating circumstancesin civil or criminal court in the United States. In civil courts,aggravating circumstancesalso only have to be proven by a preponderance of the evidence, as opposed to beyond reasonable doubt (as in criminal court). The standard is met if the proposition is more likely to be true than not true. Another high-level way of interpreting that is that the plaintiff's case (evidence) be 51% likely. A more precise statement is that "the weight [of the evidence, including in calculating such a percentage] is determined not by the amount of evidence, but by its quality."[15]The author goes on to affirm that preponderance is "merely enough to tip the scales" towards one party; however, that tilt need only be so slight as the weight of a "feather." Until 1970, it was also the standard used in juvenile court in theUnited States.[16]Compared to the criminal standard of "proof beyond a reasonable doubt," the preponderance of the evidence standard is "a somewhat easier standard to meet."[15] Preponderance of the evidence is also the standard of proof used inUnited States administrative law. In at least one case, there is a statutory definition of the standard. While there is no federal definition, such as by definition of the courts or by statute applicable to all cases, TheMerit Systems Protection Board's has codified their definition at 5 CFR 1201.56(c)(2). MSPB defines the standard as "The degree of relevant evidence that a reasonable person, considering the record as a whole, would accept as sufficient to find that a contested fact is more likely to be true than untrue." One author highlights the phrase "more likely to be true than untrue" as the critical component of the definition.[15] From 2013 to 2020, theDepartment of Educationrequired schools to use a preponderance of evidence standard in evaluating sexual assault claims.[17] Clear and convincing evidence is a higher level of burden of persuasion than "preponderance of the evidence", but less than "beyond reasonable doubt". It is employed intra-adjudicatively in administrative court determinations, as well as inciviland certaincriminal procedurein the United States. For example, a prisoner seekinghabeas corpusrelief fromcapital punishmentmust prove his factual innocence by clear and convincing evidence.[18]New York State uses this standard when a court must determine whether to involuntarily hospitalize a mentally ill patient or to issue anAssisted Outpatient TreatmentOrder.[19]This standard was also codified by the United States Supreme Court in all mental health civil commitment cases.[20] This standard is used in many types ofequitycases, includingpaternity,persons in need of supervision,child custody, theprobateof both wills andliving wills, petitions to remove a person fromlife support("right to die" cases),[21]mental hygiene and involuntary hospitalizations, and many similar cases. Clear and convincing evidence is the standard of proof used for immunity from prosecution under Florida'sstand-your-ground law.[22][non-primary source needed][original research?]Once raised by the defense, the state must present its evidence in a pre-trial hearing, showing that the statutory prerequisites have not been met, and then request that the court deny a motion for declaration of immunity. The judge must then decide from clear and convincing evidence whether to grant immunity.[23]This is a lower burden than "beyond a reasonable doubt", the threshold a prosecutor must meet at any proceeding criminal trial,[24]but higher than the "probable cause" threshold generally required forindictment. Clear and convincing proof means that the evidence presented by a party during the trial must be highly and substantially more probable to be true than not and the trier of fact must have a firm belief or conviction in its factuality.[25]In this standard, a greater degree of believability must be met than the common standard of proof in civil actions (i.e. preponderance of the evidence), which only requires that the facts as a threshold be more likely than not to prove the issue for which they are asserted. This standard is also known as "clear, convincing, and satisfactory evidence"; "clear, cognizant, and convincing evidence", and is applied in cases or situations involving an equitable remedy or where a presumptive civil liberty interest exists. For example, this is the standard or quantum of evidence use toprobatealast will and testament. This is the highest standard used as the burden of proof in Anglo-American jurisprudence and typically only applies in juvenile delinquency proceedings, criminal proceedings, and when consideringaggravating circumstancesin criminal proceedings. It has been described, in negative terms, as a proof having been met if there is no plausible reason to believe otherwise. If there is a real doubt, based upon reason and common sense after careful and impartial consideration of all the evidence, or lack of evidence, in a case, then the level of proof has not been met. Proof beyond a reasonable doubt, therefore, is proof of such a convincing character that one would be willing to rely and act upon it without hesitation in the most important of one's own affairs. However, it does not mean an absolute certainty. The standard that must be met by the prosecution's evidence in a criminal prosecution is that no other logical explanation can be derived from the facts except that the defendant committed the crime, thereby overcoming the presumption that a person is innocent unless and until proven guilty. If the trier of fact has no doubt as to the defendant's guilt, or if their only doubts are unreasonable doubts, then the prosecutor has proved the defendant's guilt beyond a reasonable doubt and the defendant should be pronounced guilty. The term connotes that evidence establishes a particular point to a moral certainty which precludes the existence of any reasonable alternatives. It does not mean that no doubt exists as to the accused's guilt, but only that noreasonabledoubt is possible from the evidence presented.[26]Further to this notion of moral certainty, where the trier of fact relies on proof that is solely circumstantial,i.e., when conviction is based entirely oncircumstantial evidence, certain jurisdictions specifically require the prosecution's burden of proof to be such that the facts proved must exclude to a moral certainty every reasonable hypothesis or inference other than guilt. The main reason that this high level of proof is demanded in criminal trials is that such proceedings can result in the deprivation of a defendant's liberty or even in their death. These outcomes are far more severe than in civil trials, in which monetary damages are the common remedy. Another noncriminal instance in which proof beyond a reasonable doubt is applied isLPS conservatorship. In the three jurisdictions of the UK (Northern Ireland;England and Wales; and Scotland) there are only two standards of proof in trials. There are others which are defined in statutes, such as those relating to police powers. The criminal standard was formerly described as "beyond reasonable doubt". That standard remains,[citation needed]and the words commonly used,[citation needed]though the Judicial Studies Board guidance is that juries might be assisted by being told that to convict they must be persuaded "so that you are sure". The civil standard is 'the balance of probabilities', often referred to in judgments as "more likely than not".Lord Denning, inMiller v. Minister of Pensions, worded the standard as "more probable than not".[27] The civil standard is also used in criminal trials in relation to those defences which must be proven by the defendant (for example, the statutory defence todrunk in chargethat there was no likelihood of the accused driving while still over the alcohol limit[28]). However, where the law does not stipulate a reverse burden of proof, the defendant need only raise the issue and it is then for the prosecution to negate the defence to the criminal standard in the usual way (for example, that of self-defence[29]). Prior to the decision of the House of Lords inRe B (A Child)[2008] UKHL 35[30]there had been some confusion – even at the Court of Appeal – as to whether there was some intermediate standard, described as the 'heightened standard'. The House of Lords found that there was not. As the above description of the American system shows, anxiety by judges about making decisions on very serious matters on the basis of the balance of probabilities had led to a departure from the common law principles of just two standards.Baroness Halesaid: 70. ... Neither the seriousness of the allegation nor the seriousness of the consequences should make any difference to the standard of proof to be applied in determining the facts. The inherent probabilities are simply something to be taken into account, where relevant, in deciding where the truth lies. 72. ... there is no logical or necessary connection between seriousness and probability. Some seriously harmful behaviour, such as murder, is sufficiently rare to be inherently improbable in most circumstances. Even then there are circumstances, such as a body with its throat cut and no weapon to hand, where it is not at all improbable. Other seriously harmful behaviour, such as alcohol or drug abuse, is regrettably all too common and not at all improbable. Nor are serious allegations made in a vacuum. Consider the famous example of the animal seen in Regent's Park. If it is seen outside the zoo on a stretch of greensward regularly used for walking dogs, then of course it is more likely to be a dog than a lion. If it is seen in the zoo next to the lions' enclosure when the door is open, then it may well be more likely to be a lion than a dog. The task for the tribunal then when faced with serious allegations is to recognize that their seriousness generally means they are inherently unlikely, such that to be satisfied that a fact is more likely than not the evidence must be of a good quality. But the standard of proof remains 'the balance of probabilities'. In Australia, two standards of proof are applied at common law: the criminal standard and the civil standard.[31]It is possible for other standards of proof to be applied where required by law.[citation needed] The criminal standard in Australia is 'beyond reasonable doubt'.[32]An offence against a Commonwealth law, with a term of imprisonment in excess of 12 months is an 'indictable offence';[33]and is constitutionally required to be tried before jury of 12 people.[34][35]Offences that do not carry a term of imprisonment exceeding 12 months are called 'Summary Offences'. Some offences (with a term of imprisonment <10 years) may be heard by a court of summary jurisdiction,a.k.a.Magistrates Court with the consent of all parties; however the court may not impose a sentence greater than 12 months. Juries are required to make findings of guilt 'beyond reasonable doubt' for criminal matters.[32] The Australian constitution does not expressly provide that criminal trials must be 'fair', nor does it set out the elements of a fair trial, but it may by implication protect other attributes.[36]The High Court has moved toward, but not yet, entrenched procedural fairness as a constitutional right. If it did so, this would have the potential to constitutionalise the 'beyond reasonable doubt' standard in criminal proceedings.[37] State offences are not subject to the constitution's section 80 requirement for a jury. However, the case ofKirkconstrains the way that State courts may operate during criminal trials per theKable Doctrine.[38] In Australia, the civil standard is termed the 'balance of probabilities'.[39]In Australia, the 'balance of probabilities' involves considerations that the evidence required to establish a fact at the civil standard will vary with the seriousness of what is being alleged.[40]Although it has been noted a similar approach is taken in Canada.[41][42]In the United Kingdom the evidential requirements of the civil standard of proof don't vary with the seriousness of an allegation.[30] The case law that establishes this isBriginshaw v Briginshaw, which is the fifth most cited decision of Australia's High Court.[43]The case has since been incorporated into the uniform evidence law.[44]TheBriginshawprinciple was articulated by Dixon in that case in these terms:[45] ...it is enough that the affirmative of an allegation is made out to the reasonable satisfaction of the tribunal. But reasonable satisfaction is not a state of mind that is attained or established independently of the nature and consequence of the fact or facts to be proved. The seriousness of an allegation made, the inherent unlikelihood of an occurrence of a given description, or the gravity of the consequences flowing from a particular finding are considerations which must affect the answer to the question whether the issue has been proved to the reasonable satisfaction of the tribunal. In such matters "reasonable satisfaction" should not be produced by inexact proofs, indefinite testimony, or indirect inferences. Everyone must feel that, when, for instance, the issue is on which of two dates an admitted occurrence took place, a satisfactory conclusion may be reached on materials of a kind that would not satisfy any sound and prudent judgment if the question was whether some act had been done involving grave moral delinquency TheBriginshawprinciple is sometimes incorrectly referred to as theBriginshawstandard of proof,[39]inQantas Airways Limited v. GamaJustices French and Jacobson stated the "Briginshaw test does not create any third standard of proof between the civil and the criminal."[46] In theHigh Courtcase ofG v. HJustices Deane, Dawson and Gaudron stated "Not every case involves issues of importance and gravity in theBriginshaw v. Briginshawsense. The need to proceed with caution is clear if, for example, there is an allegation of fraud or an allegation of criminal or moral wrongdoing..".[47] An example of theBriginshawprinciple applied in practice is the case ofBen Roberts-Smithwhere, due to the gravity of the allegations,Fairfax Mediawas required to rely on stronger proof than in the context of a normal allegation to win their case.[48][Note 1]In the end, despite the high burden of proof required, Fairfax won the trial, with Besanko ruling that it was proven he "broke the moral and legal rules of military engagement and is therefore a criminal".[49][50][51] Melbourne Law SchoolprofessorJeremy Gans, has noted that for particularly serious allegations, such as sexual assault, "It's hard to see how theBriginshawprinciple is much different to beyond reasonable doubt".[52]The decision has also been noted for affecting the ability of litigants to seek redress in anti-discrimination lawsuits, due to the seriousness of such allegations.[39] The "air of reality" is a standard of proof used inCanadato determine whether a criminal defense may be used. The test asks whether a defense can be successful if it is assumed that all the claimed facts are to be true. In most cases, the burden of proof rests solely on the prosecution, negating the need for a defense of this kind. However, when exceptions arise and the burden of proof has been shifted to the defendant, they are required to establish a defense that bears an "air of reality". Two instances in which such a case might arise are, first, when aprima faciecase has been made against the defendant or, second, when the defense mounts anaffirmative defense, such as theinsanity defense. This is similar to the concept ofsummary judgmentin the United States, though not identical.[53] Depending on the legal venue or intra-case hearing, varying levels of reliability of proof are considered dispositive of the inquiry being entertained. If the subject threshold level of reliability has been met by the presentation of the evidence, then the thing is considered legally proved for that trial, hearing or inquest. For example, in California, several evidentiary presumptions are codified, including a presumption that the owner of legal title is the beneficial owner (rebuttable only by clear and convincing evidence).[54] Criminalcases usually place the burden of proof on theprosecutor(expressed in theLatinbrocardei incumbit probatio qui dicit, non qui negat, "the burden of proof rests on who asserts, not on who denies"). This principle is known as thepresumption of innocence, and is summed up with "innocent until proven guilty", but is not upheld in all legal systems orjurisdictions. Where it is upheld, the accused will be found not guilty if this burden of proof is not sufficiently shown by the prosecution.[55]The presumption of innocence means three things: For example, if the defendant (D) is charged with murder, the prosecutor (P) bears the burden of proof to show the jury that D did indeed murder someone. However, in England and Wales, theMagistrates' Courts Act 1980, s.101 stipulates that where a defendant relies on some "exception, exemption, proviso, excuse or qualification" in their defence in a summary trial, the legal burden of proof as to that exception falls on the defendant, though only on the balance of probabilities. For example, a person charged with beingdrunk in chargeof a motor vehicle can raise the defense that there was no likelihood of their driving while drunk.[58]The prosecution has the legal burden of proof beyond reasonable doubt that the defendant exceeded the legal limit of alcohol and was in control of a motor vehicle. Possession of the keys is usually sufficient to prove control, even if the defendant is not in the vehicle and is perhaps in a nearby bar. That being proved, the defendant has the legal burden of proof on the balance of probabilities that they were not likely to drive.[59] In 2002, such practice in England and Wales was challenged as contrary to theEuropean Convention on Human Rights(ECHR), art.6(2) guaranteeing right to a fair trial. TheHouse of Lordsheld that:[59][60] In some cases, there is areverse onuson the accused. A typical example is that of ahit-and-runcharge prosecuted under the CanadianCriminal Code. The defendant is presumed to have fled the scene of a crash, to avoid civil or criminal liability, if the prosecution can prove the remaining essential elements of the offense. Incivil lawcases, such as a dispute over a contract or a claim about an accidentalinjury, the burden of proof usually requires the plaintiff to convince the trier of fact (whether judge or jury) of the plaintiff's entitlement to the relief sought. This means that the plaintiff must prove each element of the claim, or cause of action, in order to recover. This rule is not absolute in civil lawsuits; unlike with criminal offenses, laws may establish a different burden of proof, or the burden in an individual case may be reversed as a matter of fairness.[61]For example, if a bank or government agency has alegal dutyto keep certain records, and a lawsuit alleges that the proper records were not kept, then the plaintiff may not be required toprove a negative; instead, the respondent could be required to prove to the court that the records were kept. InKeyes v. Sch. Dist. No. 1, theUnited States Supreme Courtstated: "There are no hard-and-fast standards governing the allocation of the burden of proof in every situation. The issue, rather, 'is merely a question of policy and fairness based on experience in the different situations'."[62]For support, the Court cited 9 John H. Wigmore, Evidence § 2486, at 275 (3d ed. 1940). InKeyes, the Supreme Court held that if "school authorities have been found to have practiced purposeful segregation in part of a school system", the burden of persuasion shifts to the school to prove that it did not engage in such discrimination in other segregated schools in the same system.[62] InDirector, Office of Workers' Compensation Programs v. Greenwich Collieries, the Supreme Court explained that "burden of proof" is ambiguous because it has historically referred to two distinct burdens: theburden of persuasion, and theburden of production.[63] The Supreme Court discussed how courts should allocate the burden of proof (i.e., the burden of persuasion) inSchaffer ex rel. Schaffer v. Weast.[61]The Supreme Court explained that if a statute is silent about the burden of persuasion, the court will "begin with the ordinary default rule that plaintiffs bear the risk of failing to prove their claims".[61]In support of this proposition, the Court cited 2 J. Strong,McCormick on Evidence§ 337, 412 (5th ed. 1999), which states: The burdens of pleading and proof with regard to most facts have been and should be assigned to the plaintiff who generally seeks to change the present state of affairs and who therefore naturally should be expected to bear the risk of failure of proof or persuasion.[61] At the same time, the Supreme Court also recognized "The ordinary default rule, of course, admits of exceptions. ... For example, the burden of persuasion as to certain elements of a plaintiff's claim may be shifted to defendants, when such elements can fairly be characterized as affirmative defenses or exemptions. ... Under some circumstances this Court has even placed the burden of persuasion over an entire claim on the defendant. ... [Nonetheless,] [a]bsent some reason to believe that Congress intended otherwise, therefore, [the Supreme Court] will conclude that the burden of persuasion lies where it usually falls, upon the party seeking relief."[61]
https://en.wikipedia.org/wiki/Burden_of_proof_(law)
Compartmentalization, ininformation security, whether public or private, is the limiting ofaccess to informationto persons or other entities on aneed-to-knowbasis to perform certain tasks. It originated in the handling ofclassified informationinmilitaryandintelligenceapplications. It dates back toantiquity, and was successfully used to keep the secret ofGreek fire.[1] The basis for compartmentalization is the idea that, if fewer people know the details of a mission or task, the risk or likelihood that such information will be compromised or fall into the hands of the opposition is decreased. Hence, varying levels of clearance within organizations exist. Yet, even if someone has the highest clearance, certain "compartmentalized" information, identified bycodewordsreferring to particular types of secret information, may still be restricted to certain operators, even with a lower overall security clearance. Information marked this way is said to becodeword–classified. One famous example of this was theUltrasecret, where documents were marked "Top Secret Ultra": "Top Secret" marked its security level, and the "Ultra" keyword further restricted its readership to only those cleared to read "Ultra" documents.[2] Compartmentalization is now also used in commercialsecurity engineeringas a technique to protect information such asmedical records. An example of compartmentalization was theManhattan Project. Personnel atOak Ridgeconstructed and operatedcentrifugesto isolateuranium-235from naturally occurring uranium, but most did not know exactly what they were doing. Those that knew did not know why they were doing it. Parts of the weapon were separately designed by teams who did not know how the parts interacted.[citation needed]
https://en.wikipedia.org/wiki/Compartmentalization_(information_security)
Aduty to warnis a concept that arises in thelawoftortsin a number of circumstances, indicating that apartywill be held liable for injuries caused to another, where the party had the opportunity to warn the other of a hazard and failed to do so. In the United States, two landmark legal cases established therapists' legal obligations to breach confidentiality if they believe a client poses a risk to himself or others. The first wasTarasoff v. Regents of the University of California(1976), where a therapist failed to inform a young woman and her parents of specific death threats made by a client. The other case wasJablonski by Pahls v. United States(1983), which further extended the responsibilities of duty to warn by including the review of previous records that might include a history of violent behavior. The duty to warn arises inproduct liabilitycases, asmanufacturerscan be held liable for injuries caused by their products if the product causes an injury to a consumer and the manufacturer fails to supply adequatewarningsabout the risks of using the product (such asside effectsfrom pharmacy prescriptions) or if they fail to supply adequateinstructionsfor the proper use of the product (such as a precaution to use safety glasses when using a drill).[1]If the manufacturer fails to supply these warnings, the law will consider the product itself to be defective. A lawsuit by a party injured by a product, where the manufacturer failed to properly warn, is usually brought as a "negligence" action, but it could be filed as a "strict liability" claim or as a "breach ofwarranty of merchantability" case.[2] Not long after launching itsNote 7 smartphonein August 2016, Samsung got many reports of burning phones. Samsung had no choice other than recalling all the Galaxy Note 7, which had cost the company around $5.3bn.[3]Following the recall, the Federal Aviation Administration prohibited people from turning Galaxy Note 7 on, packing it in the checked luggage, and charging it while on the plane.[4]On October 11, 2016 Samsung stopped the production and issued a warning for people to turn the Galaxy Note 7 off and to not use it any longer. Samsung also told all of its global partners to stop selling the phone because of concerns about the product's safety.[5]After testing 200,000 devices and 30,000 batteries, Samsung found that the overheating and the burning phones was resulted from the error in designing and manufacturing the batteries of its two suppliers.[6] An issue in product liability cases is whether the product warranted a duty to warn about known dangers.[7] In the popularized 1994Liebeck v. McDonald's Restaurantscase where the individual Liebeck sued McDonald's for damages for injuries due to spilling hot coffee on her lap. McDonald's was cited not to have properly warned consumers about the inherent danger of their coffee product, which was heated way beyond the average chain coffee's temperature .[8]In addition, McDonald's was aware of previous injuries from hot coffee injuries and had not properly warned the consumers, which resulted in the court awarding Liebeck $640,000 in damages, which was later settled for an undisclosed amount.[9] Most notably, a property owner has a duty to warn persons on the property of various hazards, depending on the status of the person on the property. For example, the property owner must warn an anticipated or discoveredtrespasserof deadly conditions known to the property owner, but that would be hidden from the trespasser. The property owner must warnlicenseesofallknown hazards (whether deadly or not), and must warninviteesof all dangers that the property owner can discover through a reasonable inspection of the property.[10][11] Inclinical psychologicalpractice in theUnited States, duty to warn requires a clinician who has reasonable grounds to believe that a client may be in imminent danger of harming themselves or others to warn the possible victims.[12]Duty to warn is among the few exceptions to aclient's right to confidentialityand the therapist's ethical obligation to maintain confidential information related in the context of thetherapeutic relationship. In theAmerican Psychological Association'sEthical Principles of Psychologists and Code of Conduct, the therapist's duty to warn is implicitly contained within the guidelines for disclosure of confidential information without the consent of the client: "Psychologists disclose confidential information without the consent of the individual only as mandated by law, or where permitted by law for a valid purpose such as to … protect the client/patient, psychologist, or others from harm."[13]In situations when there is cause for serious concern about a client harming someone, the clinician must breach confidentiality to warn the identified victim/third party about imminent danger.[14][page needed]Although laws vary somewhat in different states, in general, the danger must be imminent and the breach of confidentiality should be made to someone who is in a position to reduce the risk of the danger.[12]People who would be appropriate recipients of such information would include the intended victim and law enforcement. Duty to warn is embedded in the historical context of two rulings (1974 and 1976) of theCalifornia Supreme Courtin the case ofTarasoff v. Regents of the University of California.[15][page needed][16]The court held thatmental health professionalshave aduty to protectindividuals who are being threatened with bodily harm by a patient. The original 1974 decision mandated warning the threatened individual, but a 1976 rehearing of the case by the California Supreme Court called for a "duty to protect" the intended victim. Explicit in the court's decision was the principle that the confidentiality of the therapeutic relationship is subordinate to the safety of society and its members.[16]Despite the value and importance of protecting the client and their feelings, and thus thephysician-client relationship, the court decided that the clinician'sdutyto society as a citizen of that society places certain limitations on the clinician's loyalty to a client's secrets, divulged in the context of the therapeutic relationship. Limitations to confidentiality are a critical concern for clinicians, because a relationship of trust between the therapist and client is the prerequisite context for therapeutic growth.[16]Without the client's expectation that the therapist will honor the client's confidences divulged in the therapeutic dialogue, the client will not have the freedom to unveil the most troublesome and private issues that are matters of the utmost concern and need for intervention. Some argue that if clients cannot depend on confidentiality in all matters that are related in therapy, potentially dangerous clients, who may be most in need of psychological services, will avoid therapy, thus missing the opportunity for intervention.[12] Other cases similar to the issues addressed in the Tarasoff case have been brought to the attention of the courts, such as theJablonski by Pahls v. United States. The conclusion of that case extended the responsibility entailed in the duty to warn with the judgment that the clinician may be liable for failure to review previous records, which may contain a history of previous violent behavior, a predictor of potential future violence. Recent[when?]consideration of applying the duty to warn has raised questions regarding therapists' responsibility to breach confidentiality in order to report clients' nonviolent behaviors which may pose danger to others, as in the case of clients withHIV/AIDS.[12] The existence and extent of a contractual duty to warn inconstructioncases is discussed in the England and Wales High Court (Technology and Construction Court) case of Cleightonhills v Bembridge Marine Ltd and Others (2012).[17] InJane Doe No. 14 v. Internet Brands, Inc., the Jane Doe plaintiff alleged thatInternet Brands, Inc.'s failure to warn users of its networking website, modelmayhem.com, caused her to be a victim of a rape scheme. She alleged that defendant Internet Brands knew about the rapists but did not warn her or the website's other users. She filed an action against Internet Brands alleging liability for negligence under California law based on that failure to warn. On May 31, 2016, the US Court of Appeals for the 9th Circuit ruled that theCommunications Decency Actdoes not bar Jane Doe's failure to warn claim.[18] In the early morning hours of August 24, 1986, a woman who lived in a second-floor apartment inTorontowas raped at knifepoint byPaul Callow, who had broken into her apartment from a balcony. At the time, the plaintiff was the fifth victim of similar crimes by Callow, who would become known as the "balcony rapist". In 1998, this woman was successful inher lawsuitagainst the Metropolitan Toronto Police Force for damages on the grounds that the police force had conducted a negligent investigation and failed to warn women of the risk of an attack by Callow.[19] In December 2012, a woman, who later became a Jane Doe plaintiff, was attacked by Sofyan Boalag in St. John's, Newfoundland. This assault was the last of six assaults between September and December 2012. Boalag was charged with 23 criminal offences in relation to complaints from multiple victims. In 2016, he was convicted of multiple offenses including robbery, three counts of sexual assault with a weapon, and choking Doe until she passed out. In January 2016, Doe commenced a lawsuit against theRoyal Newfoundland Constabulary, alleging police failed to properly warn the public that a predator was stalking young women. According to the statement of claim, all of the attacks took place in a similar part of the city and involved people with similar characteristics—six young women, including one girl under 16 years of age.[20][21] In 1986, 19-year-oldJeanne Clery was raped and murderedin herLehigh Universitydorm room. Her parents claimed that there was a lack of information provided to students and families about the rapid increase of violent and non-violent incidents on campuses and that university administrators had failed to warn students and the public.[22]A result of these claims was the passing of theClery Actwhich requires colleges and universities in the United States to publish campus crime reports.[23]In 2008,Eastern Michigan Universitywas fined $357,500 for violating the Clery Act.[24][25]US federal officials cited the university for "an egregious violation" for failing to notify the public of themurder of Laura Dickinsonin her residence hall room.[26] In July 2015, then–Director of National IntelligenceJames Clapperformally issued a directive to the agencies of theUnited States Intelligence Communitythat they had a "duty to warn" both U.S. and non-U.S. persons of impending harm against them. The directive included exemptions for occasions that required the protection of sensitive "sources and methods," cases where the intended victim was a member of a terrorist group or a violent criminal, or if the intended victim was already aware of the threat. Many U.S. intelligence agencies had informally observed such a practice for decades before Clapper's directive.[27] In 2019, theCommittee to Protect Journalistssued theTrump administrationfor information on whether the U.S. government had followed its "duty to warn" principle in the case of the murdered Saudi-American journalistJamal Khashoggi.[28]In August 2021, a U.S. appeals court ruled that U.S. intelligence agencies were not required to disclose whether they had information about threats to Khashoggi's life before his assassination.[29] Before theJanuary 3, 2024, Kerman bombings, a terrorist attack carried out byISIS-Ksuicide bombers that killed 94 people and injured 284 others, the U.S. intelligence community provided Iran, oftenconsidered an adversary of the U.S., with an early warning under its "duty to warn" policy. U.S. officials noted that the information given was sufficiently specific regarding the location and timely enough that it may have proved useful to Tehran in thwarting the attack.[30] In March 2024, the United States privately warned Russian officials of the danger of an impending attack fromIslamic State – Khorasan Province(IS-KPor ISIS–K), from intelligence gathered earlier in March, under the US intelligence community's "duty to warn" requirement.[31]Later that month the group would carry out theCrocus City Hall attackwhich killed 139 people.[32]
https://en.wikipedia.org/wiki/Duty_to_warn
Freedom of information lawsallow access by the general public to data held by national governments and, where applicable, by state and local governments. The emergence offreedom of informationlegislation was a response to increasing dissatisfaction with the secrecy surrounding government policy development and decision making.[1]In recent yearsAccess to Information Acthas also been used. They establish a "right-to-know" legal process by which requests may be made for government-held information, to be received freely or at minimal cost, barring standard exceptions. Also variously referred to asopen records, orsunshine laws(in theUnited States), governments are typically bound by a duty to publish and promote openness. In many countries there are constitutional guarantees for the right of access to information, but these are usually unused if specific support legislation does not exist. Additionally, the United NationsSustainable Development Goal 16has a target to ensure public access to information and the protection of fundamental freedoms as a means to ensure accountable, inclusive and just institutions.[2] Over 100 countries around the world have implemented some form offreedom of informationlegislation.[3][4][5]Sweden'sFreedom of the Press Actof 1766 is the oldest in the world.[6][7] Most freedom of information laws exclude the private sector from their jurisdiction thus information held by the private sector cannot be accessed as a legal right. This limitation has serious implications because the private sector performs many functions which were previously the domain of the public sector. As a result, information that was previously public is now within the private sector, and the private contractors cannot be forced to disclose information.[8] Other countries are working towards introducing such laws, and many regions of countries with national legislation have local laws. For example, all U.S. states have laws governing access to public documents belonging to the state and local taxing entities. Additionally, the U.S. Freedom of Information Act governs record management of documents in the possession of the federal government. A related concept isopen meetingslegislation, which allows access to government meetings, not just to the records of them. In many countries,privacyordata protectionlaws may be part of the freedom of information legislation; the concepts are often closely tied together in political discourse. A basic principle behind most freedom of information legislation is that theburden of prooffalls on the bodyaskedfor information, not the personaskingfor it. The person making the request does not usually have to give an explanation for their actions, but if the information is not disclosed a valid reason has to be given. In 2015 TheUNESCOGeneral Conference voted to designate 28 Sep as “International Day for the Universal Access to Information” or, as it is more commonly known,Access to Information Day. The date had previously been celebrated as “Right to Know Day” since 2002. The UNESCO resolution recommends approval by theUN General Assembly.[9] InAlbania, the constitution of 1998 guarantees the right of access to information; the legislation for supporting this is Law no. 119/2014 "On the right to information" (Ligji nr. 119/2014 "Për të drejtën e informimit"). The law regulates the right of access to information being produced or held by public sector. The rules contained in this law are designated to ensure the public access to information, in the framework of assuming the rights and freedoms of the individual in practice, as well as establishing views on the state and society situation. This law aims also at encouraging integrity, transparency and accountability of the public sector bodies. Every person shall, where deemed that the rights provided for in this law have been violated, be entitled to file a complaint administratively to the Information and Data Protection Commissioner's Office.[10] InArgentina, the Access to public information Act (Ley 27.275) was adopted in 2016. The Law on Freedom of Information[11]was unanimously approved by the Parliament on 23 September 2003 and went into force in November 2003. InAustralia, theFreedom of Information Act 1982was passed at the federal level in 1982, applying to all "ministers, departments and public authorities" of the Commonwealth. The act was amended in 2010 under the Rudd Government, establishing the government office of the information commissioner, to further promote freedom of information. There is similar legislation in all states and territories:[12] "Austria’s government has frequently been criticized for inadequate transparency. Official secrecy remains enshrined in the constitution, and Austria’s overall legal framework on access to information is weak" writes theNGOFreedom Housein its 2022 and 2023 reports.[21][22]Reporters without Borders (RSF): "In Austria,press freedomhas been undermined by various political pressures or restrictions on access to information."[23] In the context of a newly proposed public access law that has yet to be passed byparliament,Transparency Internationalwrites: "More than 110 countries have already created freedom of information – Nonsense that this should not be possible in Austria."[24] InAzerbaijan, a Law on Access to Information was approved in 2005. It has gone into effect. Previously in 1998 there was accepted Law on Freedom on Information, but the Law of 2005 provided more detailed and secured regulation for access to official information. On 21 October 2008, theCaretaker Government of Bangladeshissued in the Bangladesh Gazette the Right to Information Ordinance (No. 50 of 2008), based loosely on the IndianRight to Information Act, 2005.[25]The Ordinance was passed by the current government of Bangladesh in the first session of this parliament on 29 March 2009. TheA2iprogramme is a part of theVision 2021, apolitical manifestoof theBangladesh Awami Leagueparty before winning theNational Elections of 2008. Article 32 of the Constitution was amended in 1993 to include a right of access to documents held by the government. InBelize, theFreedom of Information Actwas passed in 1998 was amended in 2000 and is currently in force, though a governmental commission noted that "not much use has been made of the Act".[26] The National Assembly of Bhutan passed an RTI Bill in February 2014. Its purpose is to curb corruption by providing the public with the right to access information. Bosnia and Herzegovina (BiH) was the first country in the Balkan region to adopt a Freedom of Information Act.Freedom of Access to Information Actor FOIA – was adopted by the Parliament Assembly of Bosnia and Herzegovina on 17 November 2000. Both federal entities – the Republika Srpska and the Federation of Bosnia and Herzegovina – passed freedom of information laws in 2001, theFreedom of Access to Information Act for the Republika SrpskaandFreedom of Access to Information Act for the Federation of Bosnia and Herzegovinarespectively. The FOIA Act changed on the BiH state level two times. The first alteration was passed in 2006, enabling stronger legal protection within the framework of administrative law of BiH. The second alteration was passed in December 2009, which enforced legal penalties for prescribed violations. InBrazil, the Article 5, XXXIII, of the Constitution sets that "everyone shall have the right to receive information of his own interest or of public interest from public entities, which shall be given within the time prescribed by law". Also, article 22 of the Federal law nº 8.159/1991 grants the right to "full access to public documents". A statute passed in 2011 and that will enter into force in 2012 (Federal Law 12.527/2011, promulgated on 28 November 2011) regulates the manner and the timetable for the information to be given by the State. InBulgaria, theAccess to Public Information Act(APIA) was passed in 2000, following a 1996 recommendation from the Constitutional Court to implement such a law. The act defined public information as any information related to the social life in the Republic of Bulgaria. It allows citizens of Bulgaria access to public information created by state bodies and provides principles under which the information may be accessed, as well as when access can be denied.[27] The Access to Public Information Act was amended in 2005, 2007, 2008, 2011, 2015, and 2018. Several amendments, particularly those made in 2007 and 2018, faced backlash from government organizations, media, journalists, and information advocates. The 2007 amendments to the act were criticized for limiting access by extending reply times from 14 to 20 business days, removing the obligation for public authorities to provide partial access and allowing fees to be charged for information requests. Despite widespread criticism, all of the 2007 amendments were passed.[28] In 2008, the authorities obligated to provide information were expanded, and the obligation for proactive publishing of information online was introduced. Additional focus was placed on access to information related to trade secrets.[29] 2015 brought extensive changes to the APIA with a focus on the digital aspects of information access, such as the publication of information online and the acceptance of e-requests. Amendments included: allowing citizens to submit e-requests for information with no need for electronic signatures, clarifying the definition of a “public law organization” expanding the organizations that comply with the APIA, requiring public sector bodies to publish their material in machine readable formats with all appropriate metadata, the calculation of fees and information reuse, and expanding categories of information required to be proactively made available online.[30]The amendments also discuss third party consent and dissent, allowing public agencies to provide partial access to information to a requestor if a third party does not respond within 14 days.[30] In 2018, amendments were introduced to Article 40 of the APIA which states that request or denial of access to information may be appealed in front of the Administrative or Supreme Court .[27]The amendment to Article 40 in 2018 made information requests unable to be subjected to a cassation appeal.[31] InCanada, theAccess to Information Actallows citizens to demand records from federal bodies. The act came into force in 1983, under thePierre Trudeaugovernment, permitting Canadians to retrieve information from government files, establishing what information could be accessed, mandating timelines for response.[32]This is enforced by theInformation Commissioner of Canada. There is also a complementaryPrivacy Actthat was introduced in 1983. The purpose of thePrivacy Actis to extend the present laws of Canada that protect theprivacyof individuals with respect to personal information about themselves held by a federal government institution and that provide individuals with a right of access to that information. It is aCrown copyright. Complaints for possible violations of the Act may be reported to thePrivacy Commissioner of Canada. Canadian access to information laws distinguish between access to records generally and access to records that containpersonal informationabout the person making the request. Subject to exceptions, individuals have a right of access to records that contain their own personal information under thePrivacy Actbut the general public does not have a right of access to records that contain personal information about others under theAccess to Information Act. Each province and territory in Canada has its own access to information legislation. In all cases, this is also the provincial public sector privacy legislation. For example: From 1989 to 2008, requests made to the federal government were catalogued in theCoordination of Access to Information Requests System. A 393-page report released in September 2008, sponsored by several Canadian newspaper groups, compares Canada's Access to Information Act to the FOI laws of the provinces and of 68 other nations.[33] In 2009,The Walrus (magazine)published a detailed history of FOI in Canada.[34] The Freedom of Information Law in theCayman Islandswas passed in 2007 and was brought into force in January 2009. The act applies to public authorities and grants citizens the right to access information created by those public authorities.[35]The act was last revised in January 2021 and includes six sections: preliminary, right of access, repealed, internal review, information managers, miscellaneous.[36] In the Cayman Islands, all information requests are processed by information managers working in public authorities. A pdf of all public authorities, Information Managers, and contact information as of 2025 is available on the Cayman Island Government website. Part 1, Preliminary, contains the citation for the Act and definitions of chief officer, consent, information manager, personal information, and public access. Part 2, Right of Access, covers general information such as applications by third parties, provisions to access, reasonable search, receipt and acknowledgment of requests, access to record during working hours, personal information, and third party rights and fees. Part 3, Repealed, contains three acts that have since been repealed and removed from the act. Part 4, Internal Review, states that an internal review can be conducted by a person of higher or equal rank to whoever made an initial decision about an information request. Part 5, Information Managers, outlines the role of information managers, their part in internal reviews, and what information they need to register and monitor information requests. Finally, Part 6, Miscellaneous, discusses what to do if a minor places an information request. It states that a child does not need parental consent to place a request but that the information manager may decide to withhold access depending on the content of the request.[36] InChile, article 8 of theConstitutionprovides for the freedom of information. A law titled Law on Access to Public Information (Ley de Acceso a la Información Pública) took effect on 20 April 2009.[37] In April 2007, theState Council of the People's Republic of Chinapromulgated the "Regulations of the People's Republic of China on Open Government Information" (中华人民共和国政府信息公开条例), which came into effect on 1 May 2008.[38] TheColombianconstitution grants the right of access to public information throughLaw 57 of 1985which thereby mandates the publishing of acts and official documents. This is implemented and applies to documents that belong to official facilities (offices or the like). Additionally, there is the anticorruptionstatement ofLaw 190 of 1955also known asanti corruption actwhich in its 51st article mandates public offices to list in visible area all the contracts and purchases made by month. The latter taking place slowly. A more modern law, the "Ley de transparencia y del derecho de acceso a la información pública nacional" it's at its final stages.[39] Article 23 of theconstitutionstates that "Every person has the right to present petitions to the authorities for the general or private interest and to secure their prompt resolution. The legislative body may regulate the presentation of petitions to private organisations in order to guarantee fundamental rights."[40] This article justifies the existence of a jurisdictional mechanism known a petition action. This action is regulated by the law 1755 of 2015 and is considered by the Colombian Judicial Doctrine as a fundamental human right. According to the law all petitions should be fully addressed in 15 business days. If not addressed the official in charge of resolving the petition may be charged with misconduct.[41] Access to official information is governed by theOfficial Information Act 2008. The law is based heavily on theNew Zealand legislation. InCroatia, theZakon o pravu na pristup informacijama(Act on the Right of Access to Information) first introduced in 2003 extends to all public authorities.[42] The right of access to information in Cyprus is guaranteed in constitutional provisions on freedom of expression. The No. 184(I)/2017 law on access to information in the southern part of the Republic of Cyprus of the country has been published on 22 December 2017. A law that falls below Council of Europe standards in the Northern occupied part of Cyprus.[43]The right to access to public information is provided in different ways in the two parts of the island, in which Cyprus is de facto divided. As to 2011, research by the Open Cyprus Project showed that there was a level of 75% of administrative silence island-wide, in response to information requests.[44]Over half of the respondents to this survey stated that, in practice, access to key documents is not possible.[44] Since late 2013, a draft law on the Right to Access Public Information was being discussed in the Parliament of the Republic of Cyprus. On 22 December 2017 the law has finally been approved (Law number 184(I)/2017 Law on the Right of Access to Information of the Public Sector). In theCzech Republic, theZákon č. 106/1999 Sb., o svobodném přístupu k informacím(Act No. 106/1999 Coll. on Free Access to Information) covers the "state agencies, territorial self-administration authorities and public institutions managing public funds" as well as anybody authorized by the law to reach legal decisions relating to the public sector, to the extent of such authorisation.[45] Access to Public Administration Files Act of 1985 is aDanishact passed by theFolketingconcerning public access to governmental records. The Act came into force in 1987 and repealed the Public Records Act of 1970.[46]New version of the Act came into force on 1 January 2014.[47]Denmark is considered to be a historic pioneer in the field of FOI along with Sweden, Finland and Norway.[48]There is no constitutional basis in theConstitution of Denmarkfor the right of the public to information.[49]Denmark scores 64 points in Global Right to Information Rating.[50] According to the Act of 1985, Section 4 Part 1 states that “any person may ask to see documents received or issued by an administrative authority.”[51]Information concerning administrative matters of the public administration; electricity and heating utilities as well as private bodies receiving public funding or performing public function can be acquired. Yet, the information concerning activities of judicial branch and legislators is not accessible.[52][53] Reasons do not have to be given while making a request; however, the authorities can ask for additional information regarding document.[53]The requests are supposed to be handled as soon as possible; if within period of 10 days response to an application was not provided, the authority has to inform on reasons for the delay as well as expected date for a decision.[54]More detailed procedures are not laid down in the Act.[53] Access to information is limited by “the obligation to maintain secrecy.”[55]: Ch.4, S.14Considerations of State security, defense, foreign policy, external economic interests as well as public financial interests can limit the granting of access to the information.[55]: Ch.3, S.13Registers and records processed electronically are excluded from the administrative documents that can be given access to.[55]: Ch.2, S.5.2Section 10 outlines other areas excluded from access, such as records of meetings of theCouncil of State, minutes, as well as documents prepared for such meetings; correspondence between ministries concerning legislation and material used for scientific research or public statistics.[55]: Ch.3, S.10 Decision to grant or not to grant access can be appealed.[56][55]: Ch.4, S.15.2Decisions can also be appealed externally to Folketingets Ombudsman.[56][57]Ombudsman can also deliver opinions and review decisions; however, these are not binding even though generally followed.[57]Ombudsman receives 200–300 complaints annually; approximately 15 percent of complaints are ruled in favor of appellants.[57] The exemption regarding EU documents was taken out of the Act in 1991.[58]Amendments were also made in 2000; they concerned data on the employees of the Government.[58]In January 2014 new Public Records Act was enforced.[59]The new act was highly debated since it was considered to limit transparency in the Government and legislative proceedings; Denmark received one point less in the category of Political Environment when compared with the Freedom of the Press report of 2015.[60]The new legislation caused demonstrations and protests.[60]It can be regarded as a response to the 9/11 terrorist attacks.[60]After the Public Records Act of 2013 came into effect, public access to information regarding theIntelligence Servicesinstead of falling under the Public Records Act is now managed by the Act on the Security and Intelligence Service as well as the Act on the Defense Intelligence Service.[60]In addition, the access to legislative process was further restricted. According to the new Act documents in the drafting stage are not to be accessed as well as “other corresponding political activities,” so restriction is not concerning only Bills.[60]In the future, it will not be possible to find the calendars of ministers being published.[60]Nevertheless, the Act was created while keeping in mind the strengthening the project of the Open Government; the list of institutions covered by the Act was extended as well as list of public-private institutions and companies.[60] Hipólito Mejía approvedLey No.200-04 – Ley General de Libre Acceso a la Información Pública[61](Law number 200-04 – Law on Access to Information) on 28 July 2004, which allows public access to information from the government and private organisations that receive public money to conduct state business. Rough drafts and projects that are not part of an administrative procedure are not included. InEcuador, theTransparency and Access to Information Lawof 2004 declares that the right of access to information is guaranteed by the state. InEl Salvador, theLaw on Access to Public Informationwas given assent by The Legislative Assembly of El Salvador on 3 March 2011.[62]The act ensures the right to access information is guaranteed by the state and that all organizations and institutions receiving funding from the government are required to set up a website listing "bylaws, regulations, plans, directories, staff salaries, services provided, collective bargain contracts, budgets, auditing results, contracts, acquisitions, credits and loans, among other reports"[63] InEstonia, thePublic Information Act[64]of 2000 seeks to "ensure that the public and every person has the opportunity to access information intended for public use, based on the principles of a democratic and social rule of law and an open society, and to create opportunities for the public to monitor the performance of public duties". It extends to all "holders of information", covering all state and local government bodies,legal persons in public lawandlegal personsin private law if they are performing public duties (providing health, education etc.). In matters concerning the local, national and transboundary environment, theAarhus conventiongrants the public rights regarding access to information, public participation and access to justice in governmentaldecision-makingprocesses. It focuses on interactions between the public and public authorities. The recognition of the right to access to public information underArticle 10(including "freedom (..) to receive (..) information") of theEuropean Convention on Human Rightswas one of subjects inGuerra v. Italycase before the European Court of Human Rights in 1998. The majority considered Article 10 was not applicable to the complaint. However, the court found that in the specific case, which included living near a high-risk factory, not providing information was in violation ofArticle 8(respect to private and family life). Besides, two judges expressed a dissent on applicability of Article 10, and further six judges reserved a possibility, that in other circumstances, right to access to information could be protected by Article 10.[65] TheParliamentary Assembly of the Council of Europehas considered in 1996, that "public access to clear and full information on this subject [Chernobyl disaster]—and many others for that matter—must be viewed as a basic human right".[66]In 2009, CoE Convention on Access to Official Documents was opened for signature.[67] Article 42CFRandArticle 15TFEUgive ″[a]ny citizen of the Union, and any natural or legal person residing or having its registered office in a Member State, [...] a right of access to documents of the institutions, bodies, offices and agencies of the Union, whatever their medium." It follows from Article 15 TFEU that this right is "subject to the principles and the conditions to be defined" in legislation. Regulation (EC) No 1049/2001 of the European Parliament and the Council of 30 May 2001 regarding public access to European Parliament, Council and Commission documents[68]further defines this right of access to documents of the three institutions; for most other EU bodies and agencies, there is a provision in the legal act establishing them which makes Regulation No 1049/2001 applicable to them as well.[69]In some other cases, specific rules apply (e.g. to theEESC,[70]theCoR,[71]theCourt of Justice,[72]theCourt of Auditors[73]and theECB).[74]"Document" is defined broadly and it is assumed that all documents, even if classified, may be subject to right of access unless it falls under one of the exceptions. If access is refused, the applicant is allowed a confirmatory request. A complaint against a refusal can be made with the European Ombudsman and/or an appeal can be brought before the EuropeanGeneral Court. In addition,Directive 2003/98/EC of the European Parliament and the Council of 17 November 2003 on the re-use of public sector information[75]sets out the rules and practices for accessing public sector information resources for further exploitation. This directive has been reviewed in 2013 byDirective 2013/37/EU of the European Parliament and the Council of 26 June 2013 amending Directive 2003/98/EC on the re-use of public sector information[76] Since 2008, theEuropean Commissionoperates the Register of Interest representatives, a voluntary register of lobbyists at the European union.[77] Directive 2003/4/ECof the European Parliament and Council provides for citizens of each country to have freedom of access to information on the environment, in line with the requirements of theAarhus Convention. Governments are required to transcribe the directive into national legislation (for example, in the United Kingdom, theEnvironmental Information Regulations 2004). Directive 95/46/EC, theData Protection directive, provides a variety of rights in relation to personal data, including a right of access. This has been transcribed into national legislation through, for example, theData Protection Act 1998(United Kingdom) and the Data Protection 2003 (Ireland). InFinland, theLaki yleisten asiakirjain julkisuudesta 9.2.1951/83(Act on the Openness of Public Documentsof 1951) established the openness of all records and documents in the possession of officials of the state, municipalities, and registered religious communities. Exceptions to the basic principle could only be made by law, or by an executive order for specific enumerated reasons such as national security. The openness of unsigned draft documents was not mandated, but up to the consideration of the public official. This weakness of the law was removed when the law was revised in the 1990s. The revised law, theLaki viranomaisten toiminnan julkisuudesta 21.5.1999/621(Act on the Openness of Government Activitiesof 1999), called in short "Publicity Act" (Finnish:Julkisuuslaki) also extended the principle of openness to corporations that perform legally mandated public duties, such as pension funds and public utilities, and to computer documents.[78] The Publicity Act establishes a process by which any person may access any record in possession of an authority. The person may ask the authority for the document in person or in writing. When making the request, the requester needs to specify the document so that it can be identified. However, the authority is liable to assist the person with its document registers and indices in this task. After receiving the request, the authority has two weeks to give the document. If the decision is negative, and document is withheld, the requester may appeal to the administrative court. The document may be given orally, for reading and copying in the authority's premises or as an electronic or paper copy, as requested by the person. However, the copying may be declined if it would be unfeasible because of the large number of documents or otherwise technically difficult. There are also a number of limitations on the release of electronic documents designed for the protection of the individual privacy.[79]: §§13, 14, 15 The reasons for withholding a document are listed in the article 24 of the Act. They may be grouped to three categories: automatic non-openness, conditional non openness or conditional openness. The documents where automatic non-openness is prescribed remain withheld in all cases. In the case of conditional non-openness, the reasonability of the non-openness is reviewed case-by-case by the authority and, if appeals are made, by the court. In the third category, openness is a rule, and the reason for non-openness needs to be established by the authority.[79]: §24 The absolute reasons for non-openness are (subpoint of Article 24 in captions)[79]: §24 Conditional non-openness is mandated for the following categories of documents, unless it is "obviously clear" that the protected interest is not endangered[79]: §24.1 Conditional openness is prescribed for the following categories of information:[79]: §24.1 Non-open information remains non-open for 25 years after it was created or obtained by an authority. Documents that are non-open to protect the privacy of an individual remain non-open for 50 years after the protected individual has died.[79]: §31.2, 31, 5 If information is still, after 25 years, valid and describes a security measure of a building, facility, system or method or it is still part of a plan used for national defence or civil defence, it remains non-open as long as the information is pertinent for the purpose. The same indefinite non-openness applies to all documents under international security obligations, if the release might still affect Finnish foreign relations negatively. The non-openness of other documents may be prolonged up to 55 years by theCouncil of State, if necessary to safeguard a protected interest.[79]: §31.3–4 InFrance, the accountability of public servants is a constitutional right, according to theDeclaration of the Rights of Man and of the Citizen. The implementing legislation is theLoi n°78–753 du 17 juillet 1978 portant diverses mesures d'amélioration des relations entre l'administration et le public et diverses dispositions d'ordre administratif, social et fiscal(Act No. 78-753 of 17 July 1978).On various measures for improved relations between the Civil Service and the public and on various arrangements of administrative, social and fiscal nature). It sets as a general rule that citizens can request a copy of any administrative document (in paper, digitised or other form), and establishes the Commission d’Accès aux Documents Administratifs, an independent administrative authority, to oversee the process, although no administration is required to accept those request.[80] InGeorgia, the General Administrative Code contains aLaw on Freedom of Information. InGermany, the federal government passed a freedom of information law on 5 September 2005; it was last updated on 7 August 2013.[81]The law grants each person an unconditional right to access official federal information. No legal, commercial, or any other kind of justification is necessary. Thirteen of the sixteenBundesländer—Baden-Württemberg,Berlin,Brandenburg,Bremen,Hamburg,Hesse,Mecklenburg-Vorpommern,Nordrhein-Westfalen,Rheinland-Pfalz,Saarland,Sachsen-Anhalt,Schleswig-HolsteinandThüringen—have approved individual "Informationsfreiheitsgesetze" (Freedom of Information laws). InGreece, the 1975 Greek Constitution guaranteed the right of access to administrative documents and the right of citizens to obtain information. However it was not until 1986 that the first law was passed to provide for access to information.[82] Article 16 (Right to Access Administrative Documents—Δικαίωμα γνώσης διοικητικών εγγράφων) of Law 1599/1986 (State-citizenry Relationship—Σχέσεις Κράτους-πολίτη) introduced the right of all citizens to read most administrative documents. This right is now codified as article 5 (Access to documents—Πρόσβαση σε έγγραφα) of the Administrative Procedural Code (Κώδικας Διοικητικής Διαδικασίας), Law 2690/1999. Under this article, citizens have a right to know the content of administrative documents. Administrative documents are defined as those produced by public sector entities, such as reports, studies, minutes, statistical data, circulars, instructions, responses, consultatory responses, and decisions. In addition, citizens with a legitimate interest may also accessprivatedocuments stored by public services.[83]The right cannot be exercised if the document concerns the private or family lives of others, or if the document's confidentiality is safeguarded by specific legal provisions. Furthermore, the public body can refuse access if the document refers to discussions in the Cabinet, or if accessing the document can seriously hamper criminal or administrative violation investigations carried out by judicial, police, or military authorities.[84] Citizens may study the documents at the place where they are archived, or they may obtain a copy at their own cost. Access to one's own medical data is provided with the help of a doctor. Access to documents should take into account whether they be covered by copyright, patent, or trade secret regulations. In addition, Law 3448/2006, on the reuse of public sector information, harmonizes the national laws with the requirements on theEuropean Union Directive 2003/98/EC.[85] Guyana has a freedom of information act, which came into force in 2013, but it has relatively weak provisions. A commission tasked with ensuring asset declarations by government officials has begun functioning since 2018.Guyana also entered into the EITI, which guarantees the transparency of the proceeds of oil reserves of countries.[86] InHong Kongthere are no laws specifically enacted to guarantee the freedom of information. Since March 1995, theGovernment of Hong Konghas promulgated a "Code on Access to Information" to serve a similar purpose. This code, like other internal regulations of the Government, was not legislated by theLegislative Counciland has a minimal legal status. It requires government agencies listed in its appendix to appoint Access to Information Officers to answer citizens' requests for governmental records. A fee may be charged prior to the release of information. The code does not require the government to archive information.[87] InHungary, theAct on the Protection of Personal Data and Public Access to Data of Public Interestof 1992 extends a right of access to all data of public interest, defined as any information processed by a body performing a governmental function. Complaints and contested applications may be appealed to the Data Protection Commissioner (until 2011) or to the court.[88] In 2005 the Parliament adopted theAct on the Freedom of Information by Electronic Means(Act XC of 2005). The Act has three basic parts: 1. electronic disclosure of certain data by public sector bodies, 2. publicity of legislation and 3. openness of Court decisions. From 2010 on theSecond Orbán Governmenthave changed considerable parts of the legislation, changing the constitution and by releasing a completely rewritten law (Act CXII of 2011on the right to information self-determination and freedom of information). The move discontinued the Data Protection Commissioner office (in January 2012 theEuropean Commissionlaunched infringement proceedings against Hungary for the abolition of the position and for violation of doing it mid-term), and moved data protection into theNational Authority of Data Protection and Freedom of Information(NAIH) government body, run a leader loyal to the government; the results were that controversial data is withheld without merit and needs to be forced out by lengthy and costly court process. Legally the law withholds openness of public data (Section III and IV) and protection of personal data (section II). InIcelandthe Information Act (Upplýsingalög) Act no. 50/1996[89]gives access to public information. TheRight to Information Act(RTI Act) was passed byParliamenton 11 May 2005 and was published in the gazette of India on 15 June 2005. It came into effect on 12 October 2005[90][91]replacing the erstwhile Freedom of information Act, 2002. The Supreme Court of India had, in several Judgments prior to enactment of both Acts, interpreted Indian Constitution to read Right to Information as the Fundamental Right as embodied in Right to Freedom of Speech and Expression and also in Right to Life. RTI Act laid down a procedure to guarantee this right. Under this law all Government Bodies or Government funded agencies have to designate a Public Information Officer (PIO). The PIO's responsibility is to ensure that information requested is disclosed to the petitioner within 30 days or within 48 hours in case of information concerning the life or liberty of a person. The law was inspired by previous legislation from select states (among themTamil Nadu(1997),Goa(1997),Rajasthan(2000),Karnataka(2000),Delhi(2001),Maharashtra(2002) etc.) that allowed the right to information (to different degrees) to citizens about activities of any State Government body. 12. Question No.115 Starred 28 November 2019 India Justice Report 2019 Legal Aid to Poor A number of high-profile disclosures revealed corruption in various government schemes such scams inPublic Distribution Systems(ration stores), disaster relief, construction of highways etc. The law itself has been hailed as a landmark in India's drive towards more openness and accountability. However the RTI has certain weaknesses that hamper implementation. There have been questions on the lack of speedy appeal to non-compliance to requests. The lack of a central PIO makes it difficult to pin-point the correct PIO to approach for requests. There is also a criticism of the manner in which the Information Commissioners are appointed to head the information commission. It is alleged by RTI Activists that bureaucrats working in close proximity with the government are appointed in the RTI Commissions in a non-transparent manner.[92]The PIO, being an officer of the relevant Government institution, may have a vested interest in not disclosing damaging information on activities of his/her Institution, This therefore creates a conflict of interest. In the state of Maharashtra it was estimated that only 30% of the requests are actually realised under the Maharashtra Right to Information act. The law does not allow disclosure of information that affects national security, defence, and other matters that are deemed of national interest.[93][94][95][96][97][98][99][100][101] The Law on Dissemination of and Free Access to Information was approved by Iranian Parliament in 2008. Its English and Arabic renditions were officially released as part of the government's efforts to promote Freedom of Information (FOI) in October 2018.[102] In 2023 Iranian government charged Etemad after publishing information on denied news by the government around hijab watch guards law obtained by Foia, the government claimed it was top secret.[103] InIreland, the Freedom of Information Act 1997 came into effect in April 1998, one year after its enactment.[104]It provided for members of the public to access information specifically about themselves, amend incorrect information, and request an explanation behind administrative decisions concerning themselves, as well as allowing any person to access records generated by a list of specified public bodies. The Act is seen as having led to a sea-change in the relationship between the citizen, journalists,government departmentsandpublic bodies. Disclosure is the default assumption of the Act; bodies can withhold information only by citing exemptions specified in the legislation. Decisions of public bodies in relation to requests for information may be reviewed by theOffice of the Information Commissioner. The 2014 Act was amended by the Freedom of Information (Amendment) Act 2003.[105]The amendments introduced fees for non-personal requests and restricted the kinds of material which could be accessed. The Freedom of Information Act 2014 repealed the 1997 and 2003 Acts, removing most of the restrictions introduced in 2003 and widening the range of bodies covered to all public bodies, unless specifically exempt.[106]It also allowed for the government to prescribe (or designate) other bodies receiving significant public funds, so that the FOI legislation would also apply to them. InIsrael, the Freedom of Information Law, 5758–1998, supported by the Freedom of Information Regulations, 5759–1999, controls freedom of information. It defines the bodies subject to the legislation by a set of listed categories – essentially, most public bodies – and provides for the government to publish a list of all affected bodies. However, this list does not seem to have been made publicly available, if indeed it was ever compiled.[neutralityisdisputed]Many public bodies are not obliged to follow the law, which limits the potential for use by the public. The Israeli Freedom of Information Law has, in some cases, actually achieved the opposite intended result.[citation needed]some Government agencies now take the position that a citizen may only request information via FOIL—i.e., an official letter designated as such and including the 95shekelfee. Thus an Israeli citizen in many cases cannot simply write a letter asking a question, and can be asked to file a FOIL application with a fee and wait the minimum statutory 30 days for a reply, which the agency can extend to 60 days. In many cases FOIL letters are simply ignored,[citation needed]or some laconic response is sent stating the request is either unclear, unspecific, too vague or some other legalese, anything in order to keep the information away from the public.[citation needed]When the 60 days are up, if the anticipated result usually yield nothing significant,[citation needed]the applicant must petition the District Court to compel disclosure, a procedure that requires attorneys to draft pleadings and a payment of (approximately) $420 court fee. A judgement in such FOIL appeals in Israel can take many months, and again the agency can easily[neutralityisdisputed]avoid disclosure by simply not complying, although risking being charged with contempt of court. While there are some successes in courts compelling Israeli government agencies to disclose information, they are usually in non-controversial areas. The law provides for the expected[neutralityisdisputed]"security" exemption and an applicant applying for such information can expect not to benefit from FOIL (and also have his or her court appeal rejected). Applicants can sometimes be helped byThe Movement for Freedom of Information.[107] WhileItalydoes not have a freedom of information act, it has several legislations over the past 35 years. Chapter V of Law No. 241 of 7 August 1990, which provides access to administrative documents, was the first Italian law to allow information requests. Chapter V of Law No. 241 of 7 August 1990 provides for access to administrative documents. However, the right to access is limited. The law states that those requesting information must have a legal interest. The 1992 regulations require "a personal concrete interest to safeguard in legally relevant situations."[108]The act was amended in 2005, inserting the principle of transparency into the law and rewrote article 22 of the law to state that access to administrative documents is to promote transparency and participation.[109] In 2013, Article 5, d.l. 33/2013, aka the transparency decree, was written into law and expanded the limited access granted by Law No. 241 Chapter 5. The article does not replace Law No. 241, Chapter 5. The article defined transparency as, “total accessibility (of data and documents held by public administrations, in order to protect citizens' rights, promote the participation of data subjects in administrative activity and) encourage widespread forms of control over the pursuit of institutional functions and the use of public resources.”[110]In 2016 Legislative Decree No. 97 amended Article 5, d.l. 33/2013. Under the 2016 legislation, any person has a right to obtain access to documents, information and data that public entities hold.[111]No particular interest is required in this case, but the law states specific limits for this right, mainly to balance it with other public and private rights. In some cases, these limits are absolutes and in other cases they are subject to discretion.[112]The legislation also outlines general civic access and its limitations, as well as how to submit information requests to.[113] The last update to the Transparency Decree was made in 2022, with Legislative Decree no. 104/2022. The act expands to include information requests between that of employee and employer and was applicable to all employment relationships as of August 1, 2021.[114]It requires specific and complete information related to employment contracts be mandatorily given between employer and employee. It provides protection for employees in their right to request access to information from employers and the employees right to stability of employment, work planning, multiple employments, and mandatory probationary and training periods.[114] In Jamaica, the relevant legislation is theAccess to Information Act, 2002.[115] InJapan, the "Law Concerning Access to Information Held by Administrative Organs" (行政機関の保有する情報の公開に関する法律) was promulgated in 1999. The law was enforced in 2001. Small town governments, rather than the federal government, were the first to take measures to enact freedom of information as the national government was "not...as eager as local governments to deal with freedom of information legislation"[116] Local efforts in some ways predate national efforts; In many local governments, regulations about information disclosure (情報公開条例) were established starting from the latter half of the 1980s.[117] The Constitution of Latvia states: "Article 100. Everyone has the right to freedom of expression, which includes the right to freely receive, keep and distribute information and to express his or her views. Censorship is prohibited." The right to access state held information has been repeatedly recognized by the Constitutional Court of Latvia, most notably in its judgment "On Conformity of the Cabinet of Ministers 21 January 1997 Regulations No.46 "On Government Agreements" with the 20 November 1998 "Information Accessibility Law"[118][119] The Law on Freedom of Information was signed into law by the State President in November 1998 and has been amended a number of times recently. Any person can ask for information in "any technically feasible form" without having to show a reason. The request can be oral or written. Bodies must respond in 15 days. On 1 September 2012, Legal Notice 156 of 2012 brought the Freedom of Information Act (Chapter 496 of the Laws of Malta) fully into force, allowing the public (resident citizens of Malta, the EU and the EEA) to submit requests for documents/information held by the Government. FOI requests are submitted free of charge but processing of documents by public authorities may require the public to pay fees which never exceed Eur 40. When access to documents is refused, the FOIA in Malta provides for a complaint and appeal mechanism that can be ultimately resolved through the Courts of Appeal. PresidentEllen Johnson Sirleafsigned the Freedom of Information Act of 2010 into law in October 2010.Liberiabecame only the fourth country inAfrica, and the first inWest Africa, to pass such legislation.[120]The law allows both the media and individual citizens to demand information from any public authority or any private authority that carries out government functions.[121] Article 16 of the Constitution of North Macedonia guarantees "access to information and the freedom of reception and transmission of information". The Law on Free Access to Information of Public Character was adopted on 25 January 2006. It is scheduled to go into force in September 2006.The law allows any natural or legal person to obtain information from state and municipal bodies and natural and legal persons who are performing public functions. The requests can be oral, written or electronic. Requests must be responded to in 10 days. The state ofSelangorpassed the Freedom of Information Enactment (Selangor) 2010 on 1 April 2011, allowing the Malaysian public an access to the state documents including that of local councils, city halls and state government-linked companies.[122]Subsequently, the state ofPenangpassed the Freedom of Information bill on 4 November 2011, allowing the public to access to state documents.[123]Both states are under the ruling of the federal oppositionPakatan Rakyat. The Maldives passed the Right to Information Act (RTI) on 12 January 2014.[124] The Constitution was amended in 1977 to include a right of freedom of information. Article 6 says in part, "the right of information shall be guaranteed by the state." The Supreme Court made a number of decisions further enhancing that right. The Federal Law of Transparency and Access to Public Government Information was unanimously approved by Congress in April 2002 and signed by President Fox in June 2002. It went into effect in June 2003. Article 34 of the Constitution provides for a right of access to information. The Law of the Republic of Moldova on Access to Information[125]was approved by Parliament in May 2000 and went into force in August 2000. Under the law, citizens and residents of Moldova can demand information from state institutions, organisations financed by the public budget and individuals and legal entities that provide public services and hold official information. A freedom of information law was passed in Montenegro late in 2005, after a process of several years. Nepal Government passed a draft of information act in September 2007 on behalf of freedom. Based on that draft, the government enacted a specific law to regulate right to information on 18 July 2007. However, in February 2009 for the protection, promotion and execution of Right to Information in Nepal National Information Commission formedRight to Information Act, 2007.[126] Article 110 of the Constitution states: "In the exercise of their duties government bodies shall observe the principle of transparency in accordance with the rules to be prescribed by Act of Parliament." The Dutch act on public access to government information entered into force in 1980 and is updated several times later. Under the act known as theWet Openbaarheid van Bestuur[nl], orWobfor short, any person can demand information (calledwobbing) related to an administrative matter if it is contained in documents held by public authorities or companies carrying out work for a public authority. The request can either be written or oral. The authority has two (on environmental issues) or four weeks to respond. The act also obliges the government to provide informationunsolicitedas it is in the interest of good and democratic governance. In New Zealand, the relevant legislation is theOfficial Information Act 1982. This implemented a general policy of openness regarding official documents and replaced the Official Secrets Act. Former PresidentGoodluck Jonathansigned into law the Freedom of Information (FoI) Bill, awaited for 12 years by media proprietors and practitioners alike, during which the Villa got knocks for filibustering and lawmakers complained of bombardment by campaigners. The House of Representatives passed the Bill on 24 February 2011, and the Senate dialed up integrity on 16 March as it delivered on promise to pass it. The harmonized version was passed by both Chambers on 26 May 2011.It was conveyed to Jonathan on 27 May, and he signed it on 28 May 2011, according to a statement Aso Rock issued on Tuesday.[127] Two states in Nigeria (namely Ekiti and Lagos State) have adopted the Freedom of Information Act at State level but they have extended the response date at State level from 7 days to 14 days. More states are expected to adopt the bill and come up with their own version. The current freedom of information legislation was enacted 19 May. 2006,[128]and superseded the previous law of 1970[129]by 1 January 2009. Article 100 of the Constitution gives access to public documents.[130]The basic principle of the law is everyone has the right to access to State and municipal documents and to be present at sittings of courts and elected assemblies. PresidentPervez Musharrafpromulgated the Freedom of Information Ordinance 2002 in October 2002.[131]The law allows any citizen access to public records held by a public body of the federal government including ministries, departments, boards, councils, courts and tribunals. It does not apply to government owned corporations or provincial governments. The bodies must respond within 21 days. More recently, by virtue of the 18th Amendment of 2010, article 19A has been inserted in theConstitution of Pakistan.[132]It gives the right to access to information the status of a fundamental constitutional right. Article 19A "Right to Information" reads: "Every citizen shall have the right to have access to information in all matters of public importance subject to regulation and reasonable restrictions imposed by law". The National Constitution ofParaguay[133]enacted in 1992, guarantees the right to be informed and to receive true, responsible, and equitable information (Art. 28). The same article states that public sources of information are free, and that a law will regulate the modalities, time periods, and sanctions "in order to make this right effective". In practice, this last provision delayed the recognition of the right due to the absence of a law making it "effective". Congress, government agencies and Courts were reluctant to enforce the right to access public sources of information until 2013. A Supreme Court judgment (No. 1306 of 15 October 2013),[134]marked the beginning of what has been called a "Transparency Spring".[135] The ruling from the Supreme Court was made in the context of anAmparofiled by a citizen called Jose Daniel Vargas Tellez, after the San Lorenzo Municipality denied him access to the information about the names, the job descriptions and the wages of all the employees that were working in that public office. The Court of First Instance and the Court of Appeals rejected the Amparo on the grounds that information of that type was considered sensitive by the Data Protection and Privacy Act (Law 1682/02 and 1969/02). The latter rulings were challenged on constitutional grounds and the Supreme Court ruled in favor of Vargas Tellez holding that while this information relating to the identity and wages of public employees and officers constitutes personal propriety data, it is nonetheless registered in a "public source of information", which makes it available to any citizen who requests it. The right to access to this information is recognized under the Constitution and international instruments such as theAmerican Convention on Human Rights(Art. 13); TheInternational Covenant on Civil and Political Rights(Art. 19); and theUnited Nations Convention against Corruption(Art. 13). Following the Supreme Court's decision, and with the support of the civil society and PresidentHoracio Cartes, the first Transparency law was enacted (Law No. 5189/14) requiring all public offices to disclose information regarding the use of public funds to pay salaries. In addition, The Freedom of Information and Government Transparency Law (Law 5282/2014) was enacted in 2014 and a final regulation of 2015 (Executive Decree 4064/15) set the final step in the road to Transparency. These rules expressly recognize that the right to access public information is a human right, which improves the State, promotes citizen participation and public accountability, and serves as a tool to combat corruption. Currently, all requests to access public information can be done online through a single portal, and government offices are obliged to respond within 15 days. Paraguay became internationally committed to promote transparency, empower citizens, fight corruption, and harness new technologies to strengthen governance after becoming a member of theOpen Government Partnership. Presently, most government offices have Transparency offices and can provide information to citizens and receive reports of corruption. The main Executive agency in charge of promoting Electronic Government is the SENATICS. Art 28 of the Constitution also states that any person affected by the diffusion of a false, distorted, or ambiguous information has the right to demand its rectification or its clarification by the same means and under the same conditions in which it was divulged, without prejudice to the other compensatory rights. There is also a specific law that regulatesHabeas Data, and any citizen can request a copy of publicly or privately held information relating to them, and can demand that any inaccurate data found be destroyed. On 23 July 2016, Philippine presidentRodrigo Dutertesigned theexecutive order on freedom of informationto be implemented effectively in all offices under the executive branch of government.[136] Section 13(4) of theConstitution of the Pitcairn Islandsprovides that "Freedom of information in Pitcairn shall be provided by Ordinance, which shall reflect thefreedom of information legislation of the United Kingdomadapted to the circumstances of Pitcairn".[137] TheFreedom of Information Ordinance 2012implements this requirement.[138] Article 61 of the Constitution provides for the right to information and mandates that Parliament enact a law setting out this right. The Law on Access to Public Information was approved in September 2001 and went into effect in January 2002. The Act allows anyone to demand access to public information, public data and public assets held by public bodies, private bodies that exercise public tasks, trade unions and political parties. The requests can be oral or written. The bodies must respond within 14 days. ThePortuguese Constitutionguarantees the right of access to administrative documents in its Article 268, titled "Citizens’ rights and guarantees [before the Administration]". Its paragraphs (1), (2) and (6) read as following: "1. Citizens have the right to be informed by the Administration, whenever they so request, as to the progress of the procedures and cases in which they are directly interested, together with the right to be made aware of the definitive decisions that are taken in relation to them. 2. Without prejudice to the law governing matters concerning internal and external security, criminal investigation and personal privacy, citizens also have the right of access to administrative files and records. [...] 6. For the purposes of paragraphs (1) and (2) the law shall lay down a maximum time limit for responses by the Administration."[139] The rule enshrined in Art. 268, par. (2) of the Constitution is known as the "principle ofopen Administration"[140]and it is regulated by Law no. 26/2016 (Lei n.º 26/2016, de 22 de Agosto[141]) which also enacts into national law theEuropean Directivesno.2003/4/ECand2003/98/EC. Art. 15 of this law requires public entities to respond to each request within 10 days and the law's Chapter 3 created an independent watchdog to keep track of compliance with its rules, the Commission for Access to Administrative Documents (Comissão de Acesso aos Documentos Administrativos). Since 2001 there is one law on Freedom of Information and one on transparent decision-making processes in public administration (asunshine law).[142][143] The law Relating to Access to Information was passed on 8 February 2013. It puts forth the purpose of the law, recognises the right to access to information, the procedures for accessing information, and compliance related issues.available athttp://www.humanrightsinitiative.org/postoftheday/2013/18/Rwanda_ATI_Law_March2013_NewDelhi_SatbirS.pdf In Serbia, theAccess to Public Information Actgives access to documents of public authorities. The President of the Republic, Mr. Danny Faure assented to the Access to Information Act in July 2018. The Access to Information Bill 2018 was published in the Official Gazette on 24 March 2017. The Right of Access to Information is guaranteed under Article 28 of the Constitution of the Republic of Seychelles. This Act gives the public with the constitutional right of access to information held by public authorities performing a governmental function. The Act will is administered and applied by an independent Information Commission, the setting of which has been cleared with the enactment of the Law. The commission is appointed by the President in consultation with the Speaker of the National Assembly on the recommendation of the Constitutional Appointments Authority (CAA).The Information Commission strives to promote awareness, educate and popularise the right to access to information and fosters good governance by enhancing transparency, accountability and integrity in the Public Service and Administration.https://www.infocom.sc/ Slovakia passed the Freedom of Information Act in May 2000 (Num. law: 211/2000 Z. z.). Under the law, everybody can demand information from state institutions, organisations, from municipalities, individuals and legal entities financed by the public budget.[144] Slovenia passed the Access to Public Information Act in March 2003.[145]The Act governs the procedure which ensures everyone free access to public information held by state bodies, local government bodies, public agencies, public funds and other entities of public law, public powers holders and public service contractors.[146] Section 32 of theConstitution of South Africaguarantees "the right of access to any information held by the state; and any information that is held by another person and that is required for the exercise or protection of any rights." This right is implemented through the Promotion of Access to Information Act, which was enacted on 2 February 2000. The right of access toprivatelyheld information is an interesting feature, as most freedom of information laws only cover governmental bodies. The Constitutional Court ruled in 1989 that there is a constitutional right to information "as an aspect of the right of freedom of expression and specific implementing legislation to define the contours of the right was not a prerequisite to its enforcement." The Act on Disclosure of Information by Public Agencies was enacted in 1996 and went into effect in January 1998. It allows citizens to demand information held by public agencies. Sri Lanka's Right to Information Act No 12 of 2016 was certified on 4 August 2016. After much debate and many amendments to the draft Bill, the final Act comprising 44 Sections was certified in early August 2016. The implementation of the Act is expected to take time due to the necessity of establishing cadre positions in government institutions to provide information to the general public. The Act is considered to hold many strengths and positive features that would effectively authorize citizens to be actively involved in the process of governance. Moreover, Article 14A(1) introduced by virtue of 19th Amendment to the 1978 Constitution of Sri Lanka has paved the way for the recognition of right to information as a fundamental right. InSweden, theSwedish Freedom of the Press Actgrants public access to official documents and is included in theConstitution of Sweden. Dating back to 1766, it is the first freedom of information legislation in the modern sense. In modern times the right has become known as the Principle of Public Access (Swedish:offentlighetsprincipen).[147] The Principle of Public Access means that the general public is guaranteed insight into activities pursued by government agencies. All official documents handled by government agencies are public unless they contain information specified as secret under thePublic Access to Information and Secrecy Act. Each request to take part of official documents is handled individually and classifying documents or information as secret is subject to appeal. The constitution also grants the right for government employees to pass on information without risk of criminal charges or repercussions and the right to attend court proceedings and meetings of legislative assemblies like theRiksdag. There are a number of exemptions to this principle when the information concerns: Switzerland is a federal state. Access to federal documents is governed by theSwiss Federal Act on the Principle of Freedom of Information in the Administration, and supervised by theFederal Data Protection and Information Commissioner.[149]Access to documents at thecantonal levelis governed by cantonal laws, which are mostly similar to the federal law. As of 2018, the cantons ofAppenzell Innerrhoden,Glarus,Lucerne,Nidwalden,ObwaldenandThurgaudo not have freedom of information legislation.[150] The "Freedom of Government Information Law" (政府資訊公開法), enacted by theLegislative Yuanof theROCgovernment in Taiwan, has been in force since 28 December 2005.[151] Tanzania's Access to Information Act was passed in 2016. In Thailand, the relevant legislation is theOfficial Information Act of 1997. InTrinidad and Tobago, the relevant legislation is theFreedom of Information Act, 1999. Tunisia adopted a freedom of information law after the revolution, in 2016. However the law was criticized for security related exemptions. A 2018 law requiring public officials revealing their assets was a step forward to transparency.[152] InTurkey, theTurkish Law on the Right to Information(Bilgi Edinme Hakkı Kanunu) was signed on 24 October 2003, and it came into effect 6 months later on 24 April 2004. InUganda, theAccess to Information Act(ATI) was approved in 2005 but its regulations were not passed until 2011. The laws states that citizen and especially journalists can demand accountability from a government official. The Hub for Investigative Media (HIM) in Uganda offers training programs that teaches East-African journalists in matters of fact-checking and digital security. HIM also has made government officials are of the ATI law and its provision. They have also conducted a nationwide campaign to train journalists on the knowledge and application of the ATI laws as right holders.[153] The 1996Constitutiondoes not include a specific general right of access to information but contains a general right of freedom of collect and disseminate information and rights of access to personal and environmental information. The Art. 5 of The Law on Information of 1992 (revised in 2011) provides the term «right for information» which includes the possibility of free collection, usage, distribution, storage and protection of information necessary for the exercise of person's rights, freedoms and legitimate interests.[154] Law on Access to Public Information was adopted 13 January 2011 and go into force from 9 May 2011. It widens the range of subjects, obliged to provide information, gives legislative definition of public information and makes public information accessible with statutory restrictions.[155][156] TheFreedom of Information Act 2000(2000 c. 36) is the implementation of freedom of information legislation in theUnited Kingdomon a national level, with the exception of Scottish bodies, which are covered by theFreedom of Information (Scotland) Act 2002(2002 asp. 13). Environmental information is covered by further legislationEnvironmental Information Regulations 2004.Tony Blair, the UK Prime Minister who introduced the Freedom of Information Act, later expressed regret over the Act, claiming that the Act impeded the ability of officials to deliberate "with a reasonable level of confidentiality".[157] In the United States theFreedom of Information Actwas signed into law by PresidentLyndon B. Johnsonon 4 July 1966, and went into effect the following year.Ralph Naderhas been credited with the impetus for creating this act, among others.[158]The Electronic Freedom of Information Act Amendments were signed by PresidentBill Clintonon 2 October 1996.[159] The Act applies only tofederal agencies. However, all of the states, as well as the District of Columbia and some territories, have enacted similar statutes to require disclosures by agencies of the state and of local governments, though some are significantly broader than others. Some state and local government agencies attempt to get around state open records laws by claiming copyright for their works and then demanding high fees to license the public information.[160]: 441–42Some states expand government transparency throughopen meeting laws, which require government meetings to be announced in advance and held publicly. The Act was enacted in 2008 under President Vazquez's Administration and is mainly implemented by the Judiciary. InZimbabwe, theAccess to Information and Privacy Act (AIPPA)was signed by their PresidentRobert Mugabein February 2002.
https://en.wikipedia.org/wiki/Freedom_of_information_laws_by_country
Mushroom managementis themanagementof acompanywhere thecommunicationchannels between theemployersand the employees do not work effectively,[1]and where employees are 'kept in the dark' by management in regards to business decisions that affect their work and employment. Mushroom management is a style ofmanagementin which the personnel are not familiar with the ideas or the general state of the company, and are given work without knowing the purpose of this work, in contrast withopen-book management. Mushroom management means that workers' curiosity and self-expression are not supported. The employees often have no idea what the company's overall situation is, because the leaders tend to make all the decisions on their own, without asking anyone else to give their opinion.[2]This problem can occur when the manager does not understand the employees' work (in a software company, for example) and therefore cannot communicate effectively with the employees.[3] In 1981, the practice of mushroom management was documented in the bookThe Soul of a New Machine. The key feature of mushroom management is that the employees have limited responsibility over the company. The importance of the decisions they have to make is minimal, which can often reduceworkplace-related stress.[3] The consequences of mushroom management can be extremely detrimental for everyone involved in the company. If the flow of information within a company is insufficient, the people involved often have a limited understanding of how to react in situations that require quick assessment and promptdecision making.[4]For example, a company that makes and sells shoes might research their customers' preferences and discover that these preferences have changed. However, if this piece of information is not passed on to the sales manager of an individual shop, then the shop will still display the "old" shoes and will not attract the customers' attention effectively. At the end of this process, the blame is sometimes even attributed to the shop assistants, because they are the employees in a direct contact with the customers.[3]Mushroom management includes the following problems:[5] During thebankruptcy of Lehman Brothersin 2008, considerable information about the bank's management was revealed, including the wayRichard S. Fuld, Jr., the former CEO, organised the bank. The bank had started to concentrate more and more on excessively risky mortgages; however, neither the employees nor the public were aware of the bank's financial situation.[6]Fuld, together with other managers, had kept a significant amount of essential information secret, as well as lying to the investors and to all other involved parties. Everybody else had thought that Lehman Brothers were involved with a variety of investments, including both safe and risky investments; in reality, though, they had been working with a much more risky portfolio than was appropriate.[7]After the bank became bankrupt, Fuld refused to take the blame for any of these events, even though he was responsible for the concealment of the information.[6] Mushroom management can also occur during the handling of one-off, individual situations. When the RMSTitanichit an iceberg, only a few members of the crew were aware that the ship was going to sink. Most of the crewmen were not informed about the seriousness of the situation by the captain, which resulted in chaos and disorganisation.The captainattempted to act on his own, without incorporating the officers into his decisions.[8] Managers should learn how to distribute information and how to communicate with the people they are responsible for.[2]The best way to avoid mushroom management istransparency.[9] Sometimes, mushroom management can be very helpful if it is handled carefully. This method involves the company's employees being divided into various groups, each of which has all the information which it specifically needs but nothing more, similar to aneed to knowapproach taken in the military to control access to sensitive material. Meanwhile, the manager is in charge of giving each group the required information. This kind of management is extremely difficult, though, and requires considerable skill.[10]
https://en.wikipedia.org/wiki/Mushroom_management
Thehacking of consumer electronicsis a common practice that users perform to customize and modify their devices beyond what is typically possible. This activity has a long history, dating from the days of early computer, programming, and electronics hobbyists. The process of consumer electronics hacking is usually accomplished through modification of the system software, either anoperating systemorfirmware, buthardwaremodifications are not uncommon. The legality of hacking consumer electronics has been challenged over the years, with an example of this being the cracking ofencryption keysused inHigh-bandwidth Digital Content Protection, where detractors have been threatened under the basis of legal action. However, some companies have encouraged hardware hacking, such as Google'sNexusandPixelseries of smartphones. Many modern consumer electronics run either anoperating systemorfirmware. When this is stored in a mutable storage device, these files can be modified to add functionality to the operating system, or to replace it entirely. Multiple methods are used in order to successfully hack the target device, such as gainingshellaccess, gathering information about the device hardware and software, before using the obtained information to manipulate the operating system.[1] Getting access to a shell allows the user to runcommandsto interact with the operating system. Typically, a root shell is aimed for, which grantsadministrative privileges, to let the user modify operating system files. Root access can be obtained through the use ofsoftware exploits(i.e. bugs), through thebootloaderconsole, or over aserial portembedded in the device, such as aJTAGorUARTinterface.[1] In the case of gaining root privileges on an Android device, the process is known asrooting. On some Android devices, the bootloader is locked for security to prevent installation of other operating systems.[2]Unlocking it is required before another OS can be installed. On Android devices,Fastboot(Odin modeon Samsung devices) allowsflashingof operating systems onto storage.[3] Das U-Bootis a bootloader commonly used in embedded devices such as routers and Chromebooks. Getting information on the device's hardware and software is vital because exploits can be identified, which is subsequently used to either gain shell access, port an operating system to the device, etc. A lot of device manufacturers include open source software in their products.[4]When the software used is licensed under a copyleft license, a manufacturer is obliged to provide the source code of the open source components. An instance of this was whenNaomi Wurequested theGPLv2licensed source code of the Linux Kernel branch of a smartphone vendor.[5] A good share of consumer devices run on a modifiedLinux kernel,[4]which isforkedbefore applying device-specific changes.[6]Android is an example of OS which makes use of the Linux kernel. Device manufacturers often include countermeasures to hinder hardware hacking, one of which is the use ofcryptographyto prevent unauthorized code from being executed. For example,Nvidiagraphics cards havesigned firmwareto prevent tampering or hacking. WhistleblowerEdward SnowdenshowedWiredcorrespondentShane Smithhow to remove thecamerasand microphones from a smartphone.[7] One of the reasons hacking is done is to add or unlock features in an operating system. Examples include: Another reason hacking is done is to allow unsupported operating systems to be installed. Ageneral purpose computerhas historically been open by design. However,Apple'sApple siliconbasedMachardware is based on theARM architecture family, making it difficult to install a third-party operating system. There are many reasonsvideo game consolesmay be hacked. Game consoles are often restricted in a way that may disallow unofficial games to be run on it (seeVideo game console § Licensing), and hacking is undertaken to allow unlicensed games to run on it, includingpirated games. Another reason is to allow features to be added, such as using the console as a multimedia player. An example of this isXbox Media Player, which was made to allow pictures and movies to be shown on anXbox. Some devices—most commonly open source—are built forhomebrewpurposes, and encourage hacking as an integral part of their existence. iOS jailbreakingwas often considered illegal in the United States until a recent[when?]ruling by theU.S. Copyright Officedeclaring that jailbreaking an iPhone or other mobile device would no longer violate copyright law.[17]However, simultaneously, there is ongoing prosecution against hackers of videogame consoles underanti-circumventionviolations of theDMCA. A main complication, in many cases, is the profiting from selling jailbroken or rooted equipment as a value-added service. At least some accused deny these charges and claim only to be making back-ups of legally purchased games.[18][19] In around 2010, theHigh-bandwidth Digital Content Protectionencryption system, which encrypts data running between cable boxes,Blu-rayplayers, and other similar devices and displays was cracked, and a copy of the master key needed to decrypt HDCP protected streams was posted on the internet.Intel, which created and now licenses HDCP technology, has stated that HDCP is sufficient to keep most users from circumventing it, but indicated that it may threaten legal action against more determined users under theDMCA.[20] Also in around 2010, on the issue of the hacking of its then new interactive game controller theKinect, Microsoft initially condemned and threatened legal action against those who hacked it, but soon after, it reversed this position and instead stated that it had intentionally left the device open, and would in fact not prosecute those who modified it.[21]
https://en.wikipedia.org/wiki/Hacking_of_consumer_electronics
Rooting[1]is the process by which users ofAndroiddevices can attainprivileged control(known asroot access) over various subsystems of the device, usually smartphones andtablets. Because Android is based on a modified version of theLinux kernel,rootinganAndroiddevice gives access to administrative (superuser) permissions similar to those onLinuxor any otherUnix-likeoperating systemsuch asFreeBSDormacOS. Rooting is often performed to overcome limitations thatcarriersandhardwaremanufacturers put on some devices. Thus, rooting allows the users to alter or replacesystem applicationsand settings, run specializedapplications("apps") that require administrator-level permissions, or perform other operations that are otherwise inaccessible to a normalAndroid user. On some devices, rooting can also facilitate the complete removal and replacement of the device's operating system, usually with a more recent release of its current operating system. Root accessis sometimes compared tojailbreakingon devices running the AppleiOSoperating system. However, these are different concepts: jailbreaking is the bypass of several types of Apple prohibitions for theend user, including modifying the operating system (enforced by a "lockedbootloader"), installing non-officially approved (not available on theApp Store) applications viasideloading, and granting the user elevated administration-level privileges (rooting). Many vendors such asHTC,Sony,OnePlus,Asus,Xiaomi, andGoogleexplicitly provide the ability to unlock devices and even replace the operating system entirely.[1][2][3][4]Similarly, the ability to sideload applications is typically permissible on Android devices without root permissions. Thus, it is primarily the third aspect of iOS jailbreaking (giving users administrative privileges) that most directly correlates withAndroid rooting. Rooting is distinct fromSIM unlockingandbootloader unlocking. The former allows for the removal of theSIM cardlock on a phone, while the latter allows rewriting thephone'sboot partition (for example, to install or replace the operating system).[5] Rooting lets all user-installed applications run privileged commands typically unavailable to the devices in the stock configuration. Rooting is required for more advanced and potentially dangerous operations including modifying or deleting system files, removingpre-installed applications, and low-level access to the hardware itself (rebooting, controlling status lights, or recalibrating touch inputs.) A typical rooting installation also installs theSuperuserapplication, which supervises applications that are granted root or superuser rights by requesting approval from the user before granting said permissions. A secondary operation, unlocking the device'sbootloaderverification, is required to remove or replace the installed operating system. In contrast toiOS jailbreaking, rooting is not needed to run applications distributed outside of the Google Play Store, sometimes calledsideloading. The Android OS supports this feature natively in two ways: through the "Unknown sources" option in the Settings menu and through theAndroid Debug Bridge. However, some UScarriers, includingAT&T, have prevented the installation of applications not on the Play Store infirmware,[6]although several devices are not subject to this rule, including theSamsung Infuse 4G;[7]AT&T lifted the restriction on most devices by the middle of 2011.[8] As of 2011[update], the AmazonKindle Firedefaults to theAmazon Appstoreinstead ofGoogle Play, though like most other Android devices, Kindle Fire allows sideloading of applications from unknown sources,[9]and the "easy installer" application on the Amazon Appstore makes this easy. Other vendors of Android devices may look to other sources in the future. Access to alternate apps may require rooting but rooting is not always necessary. Advantages of rooting include the possibility for complete control over the appearance, feel, and behaviour of the device. As a superuser has access to the device's system files, all aspects of the operating system can be customized with the only real limitation being the level of coding expertise.[10]Immediately expectable advantages of rooted devices include the following:[11][12] Some disadvantages of rooting include: Rooting allows the user to obtain privileged access to a phone. It does not allow a user to install a new OS (custom firmwareor customROM) or recovery image, and it doesn't allow a phone that is locked to a certain carrier to be used on another one. Related operations allow these. Bootloader unlocking is sometimes a first step used to root the device; however, it is not the same as rooting the device.[24]Most devices come with a locked bootloader, which prevents users from installing a new boot image, which is often flashed when rooting a device or using a custom ROM.[25]The bootloader runs on device start-up and is in charge of loading the operating system on the phone.[26]It is generally in charge of verifying that phone system information hasn't been tampered with and is genuine. Nonetheless, people still perform this operation, as unlocking the bootloader allows users to install custom ROMs.[27] The first step to do this is to generally to set up OEM unlocking,[28]and then to follow manufacturer specific instructions.[24]Not all devices can be bootloader unlocked, and some can only be unlocked with an exploit which usually needs aprivilege escalationbug in order to remove software locks, which includes mostLG V20models andVerizon-soldGoogle Pixeldevices.[29][30] The process of unlocking the bootloader might involve a factory reset, erasing all user data, third-party applications, and configuration.[31][32] SIM unlocking allows a phone that is locked to a certain carrier to be used on a different carrier. The instructions vary per device and carrier, but this might be done by first requesting the carrier to unlock the phone or purchasing an unlock code online.[33] Some rooting methods involve the use of acommand promptand a development interface called theAndroid Debug Bridge(also known as ADB), while other methods may use existing vulnerabilities in devices. Due to similarly modeled devices often having a multitude of changes, rooting methods for one device when used for a different variant can result inbrickingthe device. "Systemless root" is a variant of rooting in which the underlying device file system is not modified. Systemless root uses various techniques to gain root access without modifying the systempartitionof a device. Some root applications may include a "hiding" function, which makes attempts to mask the effects and results of rooting, often by whitelisting certain applications for the root or blocking access to affected files.[34]Systemless rooting has the advantage of not triggering the software-based version ofSafetyNet, an Android feature that works by monitoring changes to system files and is used by applications such as Google Pay to detect whether a device has been tampered with such as by rooting. However, hardware-backed SafetyNet versions may be triggered by systemless rooting, as well as in unrooted devices shipped withoutGoogle Mobile Services (GMS).[35][36][37][38][39] The distinction between "soft rooting" through a security vulnerability and "hard-rooting" byflashingasubinaryexecutable varies from exploit to exploit, and manufacturer to manufacturer. Soft-rooting requires that a device be vulnerable toprivilege escalation, or replacing executable binaries. Hard-rooting is supported by the manufacturer, and it is generally only exposed for devices the manufacturer allows.[40]If a phone can be soft-rooted, it is also inherently vulnerable to malware.[40] The process of rooting varies widely by manufacturer and device but sometimes includesexploitingone or more security bugs in the firmware (i.e., in the version of the Android OS installed on) of the device.[40]Once an exploit is discovered, a custom recovery image that will skip thedigital signaturecheck of firmware updates can be flashed. Then a modified firmware update that typically includes the utilities needed to run apps as root can be installed. For example, thesubinary (such as an open-source one paired with the Superuser[41]or SuperSU application[42]) can be copied to a location in the current process'PATH(e.g.,/system/xbin/) and granted executable permissions with thechmodcommand. A third-party supervisor application, like Superuser or SuperSU, can then regulate and log elevated permission requests from other applications. Many guides, tutorials, and automatic processes exist for popular Android devices facilitating a fast and easy rooting process. The process of rooting a device may be simple or complex, and it even may depend upon serendipity. For example, shortly after the release of the HTC Dream (HTC G1), it was discovered that anything typed using the keyboard was being interpreted as a command in a privileged (root) shell. Although Google quickly released a patch to fix this, a signed image of the old firmware leaked, which gave users the ability to downgrade and use the original exploit to gain root access. Installable apps have managed to unlock immediate root access on some early 2010s Samsung smartphones. This has also been referred to as "one-click rooting".[43] A security researcher, Grant Hernandez, demonstrated a use-after-free exploit in Binder, Android's IPC framework, to gainroot privileges.[44]This exploit, tagged CVE-2019-2215, was alleged to be sold by theNSO Group.[45] Some manufacturers, includingOnePlusandMotorola, provide official support for unlocking the bootloader, allowing for rooting without exploiting a vulnerability.[46]However, the support may be limited only to certain phones – for example,LGreleased its bootloader unlock tool only for certain models of its phones.[47]Also, a manufacturer could discontinue bootloader unlocking support, as was the case with LG[48]andHuawei.[49] TheGoogle NexusandPixelline of devices can have their bootloader unlocked by simply connecting the device to a computer while in bootloader mode and running theFastbootprotocol with the commandfastboot oem unlockon older devices,[50]orfastboot flashing unlockon newer devices.[51]After a warning is accepted, the bootloader is unlocked, so a new system image can be written directly to flash without the need for an exploit. Additionally, Pixel phones sold via certain carriers likeVerizondisallow bootloader unlocking,[52]while others such asT-Mobilerequire a phone to be paid off and SIM unlocked before the bootloader can be unlocked.[citation needed] In the past, many manufacturers have tried to make non-rootable phones with more elaborate protections (like theDroid X), but exploits are usually still found eventually. There may be no root exploit available for new, or outdated phones.[53] Until 2010, tablet and smartphone manufacturers, as well as mobile carriers, were mainly unsupportive of third-party firmware development. Manufacturers had expressed concern about improper functioning of devices running unofficial software[54]and related support costs. Moreover, firmware such asOmniROMandCyanogenModsometimes offer features for which carriers would otherwise charge a premium, such astethering. Due to that, technical obstacles such as locked bootloaders and restricted access to root permissions have commonly been introduced in many devices. For example, in late December 2011,Barnes & NobleandAmazon.com, Inc.began pushing automatic,over-the-airfirmware updates, 1.4.1 toNook Tabletsand 6.2.1 to Kindle Fires, that removed one method to gain root access to the devices. The Nook Tablet 1.4.1 update also removed users' ability tosideloadapps from sources other than the official Barnes & Noble app store (withoutmodding).[55][56] However, as community-developed software began to grow popular in the late 2009 to early 2010,[57][58]and following a statement by the Copyright Office and Librarian of Congress (US) allowing the use of "jailbroken" mobile devices,[59][60]manufacturers and carriers have softened their position regarding CyanogenMod and other unofficial firmware distributions. Some manufacturers, including HTC,[61]Samsung,[62]Motorola[63]andSony,[64]actively provide support and encourage development. In 2011, the need to circumvent hardware restrictions to install unofficial firmware lessened as an increasing number of devices shipped with unlocked or unlockable bootloaders, similar to the Nexus and Pixel series of phones. Device manufacturer HTC has announced that it will support aftermarket software developers by making the bootloaders of all new devices unlockable.[54] In 2014, Samsung released a security feature calledKnox, which verifies whether system and boot files were modified. If custom firmware was flashed, the eFuse is set to 0x1, permanently voiding the warranty and disabling Knox-enabled features such asSamsung Pay.[65]Additionally, certain Samsung devices lack the ability to flash custom software, namely Samsung phones and tablets released in North America after 2015, with an exception for devices lacking a cellular modem,[66]although there are exploits that can unlock the bootloader on some affected devices running olderOne UIversions.[67] International treaties have influenced the development of laws affecting rooting. The 1996World Intellectual Property Organization (WIPO) Copyright Treatyrequires nations party to the treaties to enact laws againstdigital rights management(DRM) circumvention. The American implementation is theDigital Millennium Copyright Act(DMCA), which includes a process for establishing exemptions for non-copyright-infringing purposes such as rooting. The 2001European Copyright Directiveimplemented the treaty in Europe, requiring member states of theEuropean Unionto implement legal protections for technological protection measures. The Copyright Directive includes exceptions to allow breaking those measures for non-copyright-infringing purposes, such as to run alternative software,[68]but member states vary on the implementation of the directive. In 2010,Electronic Frontiers Australiasaid that it is unclear whether rooting is legal in Australia, and that anti-circumvention laws may apply.[69]These laws were strengthened by theCopyright Amendment Act 2006. In November 2012, Canadaamended its Copyright Actwith new provisions prohibiting tampering with digital locks, with exceptions including software interoperability.[70]Rooting a device to run alternative software is a form of circumventing digital locks for the purpose of software interoperability. There had been several efforts from 2008 to 2011 to amend the Copyright Act (Bill C-60,Bill C-61, andBill C-32) to prohibit tampering with digital locks, along with initial proposals for C-11 that were more restrictive,[71]but those bills were set aside. In 2011,Michael Geist, a Canadian copyright scholar, cited iPhone jailbreaking as a non-copyright-related activity that overly broad Copyright Act amendments could prohibit.[72] TheFree Software Foundation Europeargues that it is legal to root or flash any device. According to the European Directive 1999/44/EC, replacing the original operating system with another does not void the statutory warranty that covers the hardware of the device for two years unless the seller can prove that the modification caused the defect.[73] The lawCopyright and Related Rights Regulations 2003makes circumventing DRM protection measures legal for the purpose of interoperability but not copyright infringement. Rooting may be a form of circumvention covered by that law, but this has not been tested in court.[68][74]Competition laws may also be relevant.[75] India's copyright lawpermits circumventing DRM for non-copyright-infringing purposes.[76][77]Indian Parliamentintroduced a bill including this DRM provision in 2010 and passed it in 2012 as Copyright (Amendment) Bill 2012.[78]India is not a signatory to the WIPO Copyright Treaty that requires laws against DRM circumvention, but being listed on the USSpecial 301 Report"Priority Watch List" applied pressure to develop stricter copyright laws in line with the WIPO treaty.[76][77] New Zealand's copyright lawallows the circumvention of technological protection measure (TPM) as long as the use is for legal, non-copyright-infringing purposes.[79][80]This law was added to theCopyright Act 1994as part of theCopyright (New Technologies) Amendment Act 2008. Rooting might be legal in Singapore if done to provide interoperability and not circumvent copyright, but that has not been tested in court.[81] TheUnlocking Consumer Choice and Wireless Competition Actguarantees that consumers can unlock or let others unlock their phones. Under the Digital Millennium Copyright Act (DMCA) rooting was illegal in the United States except by exemption. TheU.S. Copyright Officegranted an exemption to this law "at least through 2015".[82] In 2010, in response to a request by theElectronic Frontier Foundation, the U.S. Copyright Office explicitly recognized an exemption to the DMCA to permit rooting.[83][84]In their ruling, the Library of Congress affirmed on July 26, 2010, that rooting is exempt from DMCA rules with respect to circumventing digital locks. DMCA exemptions must be reviewed and renewed every three years or else they expire. On October 28, 2012, the US Copyright Office updated their exemption policies. The rooting of smartphones continues to be legal "where circumvention is accomplished for the sole purpose of enabling interoperability of [lawfully obtained software] applications with computer programs on the telephone handset". However, the U.S. Copyright office refused to extend this exemption to tablets, arguing that the term "tablets" is broad and ill-defined, and an exemption to this class of devices could have unintended side effects.[85][86][87]The Copyright Office also renewed the 2010 exemption for unofficially unlocking phones to use them on unapproved carriers, but restricted this exemption to phones purchased before January 26, 2013.[86] Tim Wu, a professor atColumbia Law School, argued in 2007 that jailbreaking is "legal, ethical, and just plain fun".[88]Wu cited an explicit exemption issued by theLibrary of Congressin 2006 for personal unlocking, which notes that locks "are used by wireless carriers to limit the ability of subscribers to switch to other carriers, a business decision that has nothing whatsoever to do with the interests protected by copyright" and thus do not implicate the DMCA.[89]Wu did not claim that this exemption applies to those who help others unlock a device or "traffic" in software to do so.[88]In 2010 and 2012, the U.S. Copyright Office approved exemptions to the DMCA that allow users to root their devices legally.[90]It is still possible to employ technical countermeasures to prevent rooting or prevent rooted phones from functioning.[91]It is also unclear whether it is legal to traffic in the tools used to make rooting easy.[91]
https://en.wikipedia.org/wiki/Rooting_(Android_OS)
Incomputer security, asandboxis a security mechanism for separating running programs, usually in an effort to mitigate system failures and/or softwarevulnerabilitiesfrom spreading. Thesandboxmetaphor derives from the concept of a child's sandbox—a play area where children can build, destroy, and experiment without causing any real-world damage.[1]It is often used to kill untested or untrusted programs or code, possibly from unverified or untrusted third parties, suppliers, users or websites, without risking harm to the host machine oroperating system.[2]A sandbox typically provides a tightly controlled set of resources for guest programs to run in, such as storage and memoryscratch space. Network access, the ability to inspect the host system, or read from input devices are usually disallowed or heavily restricted. In the sense of providing a highly controlled environment, sandboxes may be seen as a specific example ofvirtualization. Sandboxing is frequently used to test unverified programs that may contain avirusor othermalicious codewithout allowing the software to harm the host device.[3] A sandbox is implemented by executing the software in a restricted operating system environment, thus controlling the resources (e.g.file descriptors, memory, file system space, etc.) that a process may use.[4] Examples of sandbox implementations include the following: Some of the use cases for sandboxes include the following:
https://en.wikipedia.org/wiki/Sandbox_(computer_security)
Acall gateis a mechanism in Intel'sx86 architecturefor changing theprivilege levelof a process when it executes a predefinedfunction callusing a CALL FAR instruction. Call gates are intended to allow less privileged code to call code with a higher privilege level. This type of mechanism is essential in modern operating systems that employmemory protectionsince it allows user applications to usekernelfunctions andsystem callsin a way that can be controlled by theoperating system. Call gates use a special selector value to reference a descriptor accessed via theGlobal Descriptor Tableor theLocal Descriptor Table, which contains the information needed for the call across privilege boundaries. This is similar to the mechanism used forinterrupts. Assuming a call gate has been set up already by theoperating systemkernel, code simply does a CALL FAR with the necessarysegment selector(the offset field is ignored). The processor will perform a number of checks to make sure the entry is valid and the code was operating at sufficient privilege to use the gate. Assuming all checks pass, a new CS/EIPis loaded from thesegment descriptor, and continuation information is pushed onto the stack of the new privilege level (old SS, old ESP, old CS, old EIP, in that order). Parameters may also be copied from the old stack to the new stack if needed. The number of parameters to copy is located in the call gate descriptor. The kernel may return to the user space program by using a RET FAR instruction which pops the continuation information off the stack and returns to the outer privilege level. Multicswas the first user of call gates. TheHoneywell 6180had call gates as part of the architecture, but Multics simulated them on the olderGE 645. OS/2was an early user of Intel call gates to transfer betweenapplication coderunning in ring 3, privileged code running in ring 2, and kernel code in ring 0. Windows 95 executes drivers and process switching in ring 0, while applications, including API DLL such as kernel32.dll and krnl386.exe are executed in ring 3. Driver VWIN32.VXD provides key operating system primitives at ring 0. It allows calling of driver functions from 16-bit applications (MSDOS and Win16). This address is obtained by calling INT 2Fh, with 1684h in the AX register. To identify which VxD an entry point is being requested for, the BX register is set to the 16-bit VxD ID. Upon return from the INT instruction, the ES.DI registers contain a far pointer that can be called to transfer control to the VxD running at ring 0. The descriptor pointed by ES is actually a call gate.[1]32-bit applications, however, when they need to access Windows 95 driver code, call undocumented VxDCall function in KERNEL32.DLL which essentially calls INT 30h, which changes ring mode. Modern x86 operating systems are transitioning away from CALL FAR call gates. With the introduction of x86 instructions forsystem call(SYSENTER/SYSEXIT by Intel and SYSCALL/SYSRET by AMD), a new faster mechanism was introduced for control transfers for x86 programs. As most other architectures do not support call gates, their use was rare even before these new instructions, as software interrupts ortrapswere preferred for portability, even though call gates are significantly faster than interrupts. Call gates are more flexible than the SYSENTER/SYSEXIT and SYSCALL/SYSRET instructions since unlike the latter two, call gates allow for changing from an arbitrary privilege level to an arbitrary (albeit higher or equal) privilege level. The fast SYS* instructions only allow control transfers fromring3 to 0 and vice versa. To preserve system security, the Global Descriptor Table must be held in protected memory, otherwise any program will be able to create its own call gate and use it to raise its privilege level. Call gates have been used in softwaresecurity exploits, when ways have been found around this protection.[2]One example of this is the e-mailwormGurong.A, written to exploit theMicrosoft Windowsoperating system, which uses \Device\PhysicalMemory to install a call gate.[3]
https://en.wikipedia.org/wiki/Call_gate_(Intel)
In computing,protected mode, also calledprotected virtual address mode,[1]is an operational mode ofx86-compatiblecentral processing units(CPUs). It allowssystem softwareto use features such assegmentation,virtual memory,pagingand safemulti-taskingdesigned to increase an operating system's control overapplication software.[2][3] When a processor that supports x86 protected mode is powered on, it begins executing instructions inreal mode, in order to maintainbackward compatibilitywith earlier x86 processors.[4]Protected mode may only be entered after the system software sets up one descriptor table and enables the Protection Enable (PE)bitin thecontrol register0 (CR0).[5] Protected mode was first added to thex86architecture in 1982,[6]with the release ofIntel's80286(286) processor, and later extended with the release of the80386(386) in 1985.[7]Due to the enhancements added by protected mode, it has become widely adopted and has become the foundation for all subsequent enhancements to the x86 (IA-32) architecture,[8]although many of those enhancements, such as added instructions and new registers, also brought benefits to the real mode. The first x86 processor, theIntel 8086, had a 20-bitaddress busfor itsmemory, as did itsIntel 8088variant.[9]This allowed them to access 220bytesof memory, equivalent to 1megabyte.[9]At the time, 1 megabyte was considered a relatively large amount of memory,[10]so the designers of theIBM Personal Computerreserved the first 640kilobytesfor use by applications and the operating system andthe remaining 384 kilobytesfor theBIOS(Basic Input/Output System) and memory foradd-on devices.[11] As the cost of memory decreased and memory use increased, the 1 MB limitation became a significant problem.Intelintended to solve this limitation along with others with the release of the 286.[11] The initial protected mode, released with the 286, was not widely used;[11]for example, it was used byCoherent(from 1982),[12]MicrosoftXenix(around 1984)[13]andMinix.[14]Several shortcomings such as the inability to make BIOS and DOS calls due to inability to switch back to real mode without resetting the processor prevented widespread usage.[15]Acceptance was additionally hampered by the fact that the 286 allowed memory access in 64kilobytesegments, addressed by its four segment registers, meaning that only4 × 64 KB, equivalent to 256 KB, could be accessed at a time.[11]Because changing a segment register in protected mode caused a 6-byte segment descriptor to be loaded into the CPU from memory, the segment register load instruction took many tens of processor cycles, making it much slower than on the 8086 and 8088; therefore, the strategy of computing segment addresses on-the-fly in order to access data structures larger than 128kilobytes(the combined size of the two data segments) became impractical, even for those few programmers who had mastered it on the 8086 and 8088. The 286 maintained backward compatibility with the 8086 and 8088 by initially enteringreal modeon power up.[4]Real mode functioned virtually identically to the 8086 and 8088, allowing the vast majority of existingsoftwarefor those processors to run unmodified on the newer 286. Real mode also served as a more basic mode to set up andbootstrapinto protected mode. To access the extended functionality of the 286, the operating system would set up some tables in memory that controlled memory access in protected mode, set the addresses of those tables into some special registers of the processor, and then set the processor into protected mode. This enabled 24-bit addressing, which allowed the processor to access 224bytes of memory, equivalent to 16megabytes.[9] With the release of the 386 in 1985,[7]many of the issues preventing widespread adoption of the previous protected mode were addressed.[11]The 386 was released with an address bus size of 32 bits, which allows for 232bytes of memory accessing, equivalent to 4gigabytes.[16]The segment sizes were also increased to 32 bits, meaning that the full address space of 4 gigabytes could be accessed without the need to switch between multiple segments.[16]In addition to the increased size of the address bus and segment registers, many other new features were added with the intention of increasing operational security and stability.[17]Protected mode is now used in virtually all modernoperating systemswhich run on the x86 architecture, such asMicrosoft Windows,Linux, and many others.[18] Furthermore, learning from the failures of the 286 protected mode to satisfy the needs formultiuser DOS, Intel added a separatevirtual 8086 mode,[19]which allowed multiple virtualized 8086 processors to be emulated on the 386.Hardware x86 virtualizationrequired for virtualizing the protected mode itself, however, had to wait for another 20 years.[20] With the release of the 386, the following additional features were added to protected mode:[2] Until the release of the 386, protected mode did not offer a direct method to switch back into real mode once protected mode was entered.IBMdevised a workaround (implemented in theIBM AT) which involved resetting the CPU via the keyboard controller and saving the system registers,stack pointerand often the interrupt mask in the real-time clock chip's RAM. This allowed the BIOS to restore the CPU to a similar state and begin executing code before the reset.[clarification needed]Later, atriple faultwas used to reset the 286 CPU, which was a lot faster and cleaner than the keyboard controller method. To enter protected mode, theGlobal Descriptor Table(GDT) must first be created with a minimum of three entries: a null descriptor, a code segment descriptor and data segment descriptor. Then, the PE bit must be set in the CR0 register and a far jump must be made to clear theprefetch input queue.[22][23]Also, on an IBM-compatible machine, in order to enable the CPU to access all 16 MB of the address space (instead of only the 8 even megabytes), theA20 line(21st address line) must be enabled. (A20 is disabled at power-up, causing each odd megabyte of the address space to be aliased to the previous even megabyte, in order to guarantee compatibility with older software written for the Intel 8088-basedIBM PCandPC/XTmodels).[24]Enabling A20 is not strictly required to run in protected mode; the CPU will operate normally in protected mode with A20 disabled, only without the ability to access half of the memory addresses. With the release of the 386, protected mode could be exited by loading the segment registers with real mode values, disabling the A20 line and clearing the PE bit in the CR0 register, without the need to perform the initial setup steps required with the 286.[25] Protected mode has a number of features designed to enhance an operating system's control over application software, in order to increase security and system stability.[3]These additions allow the operating system to function in a way that would be significantly more difficult or even impossible without proper hardware support.[26] In protected mode, there are four privilege levels orrings, numbered from 0 to 3, with ring 0 being the most privileged and 3 being the least. The use of rings allows for system software to restrict tasks from accessing data,call gatesor executing privileged instructions.[27]In most environments, the operating system and somedevice driversrun in ring 0 and applications run in ring 3.[27] According to theIntel 80286 Programmer's Reference Manual,[28] the 80286 remains upwardly compatible with most 8086 and 80186 application programs. Most 8086 application programs can be re-compiled or re-assembled and executed on the 80286 in Protected Mode. For the most part, the binary compatibility with real-mode code, the ability to access up to 16 MB of physical memory, and 1 GB ofvirtual memory, were the most apparent changes to application programmers.[29]This was not without its limitations. If an application utilized or relied on any of the techniques below, it would not run:[30] In reality, almost allDOSapplication programs violated these rules.[32]Due to these limitations,virtual 8086 modewas introduced with the 386. Despite such potential setbacks,Windows 3.0and its successors can take advantage of the binary compatibility with real mode to run many Windows 2.x (Windows 2.0andWindows 2.1x) applications in protected mode, which ran in real mode in Windows 2.x.[33] With the release of the 386, protected mode offers what the Intel manuals callvirtual 8086 mode. Virtual 8086 mode is designed to allow code previously written for the 8086 to run unmodified and concurrently with other tasks, without compromising security or system stability.[34] Virtual 8086 mode, however, is not completely backward compatible with all programs. Programs that require segment manipulation, privileged instructions, direct hardware access, or useself-modifying codewill generate anexceptionthat must be served by the operating system.[35]In addition, applications running in virtual 8086 mode generate atrapwith the use of instructions that involveinput/output(I/O), which can negatively impact performance.[36] Due to these limitations, some programs originally designed to run on the 8086 cannot be run in virtual 8086 mode. As a result, system software is forced to either compromise system security or backward compatibility when dealing withlegacy software. An example of such a compromise can be seen with the release ofWindows NT, which dropped backward compatibility for "ill-behaved" DOS applications.[37] In real mode each logical address points directly into a physical memory location, every logical address consists of two 16-bit parts: The segment part of the logical address contains the base address of a segment with a granularity of 16 bytes, i.e. a segment may start at physical address 0, 16, 32, ..., 220− 16. The offset part of the logical address contains an offset inside the segment, i.e. the physical address can be calculated as physical_address = segment_part × 16 + offset, if the addressline A20is enabled, or (segment_part × 16 + offset) mod 220, if A20 is off.[clarification needed]Every segment has a size of 216bytes. In protected mode, thesegment_partis replaced by a 16-bitselector, in which the 13 upper bits (bit 3 to bit 15) contain the index of anentryinside adescriptor table. The next bit (bit 2) specifies whether the operation is used with the GDT or the LDT. The lowest two bits (bit 1 and bit 0) of the selector are combined to define the privilege of the request, where the values of 0 and 3 represent the highest and the lowest privilege, respectively. This means that the byte offset of descriptors in the descriptor table is the same as the 16-bit selector, provided the lower three bits are zeroed. The descriptor table entry defines the reallinearaddress of the segment, a limit value for the segment size, and some attribute bits (flags). The segment address inside the descriptor table entry has a length of 24 bits so every byte of the physical memory can be defined as bound of the segment. The limit value inside the descriptor table entry has a length of 16 bits so segment length can be between 1 byte and 216byte. The calculated linear address equals the physical memory address. The segment address inside the descriptor table entry is expanded to 32 bits so every byte of the physical memory can be defined as bound of the segment. The limit value inside the descriptor table entry is expanded to 20 bits and completed with a granularity flag (G-bit, for short): The 386 processor also uses 32 bit values for the address offset. For maintaining compatibility with 286 protected mode a new default flag (D-bit, for short) was added. If the D-bit of a code segment is off (0) all commands inside this segment will be interpreted as 16-bit commands by default; if it is on (1), they will be interpreted as 32-bit commands. Where: In addition to adding virtual 8086 mode, the 386 also added paging to protected mode.[39]Through paging, system software can restrict and control a task's access to pages, which are sections of memory. In many operating systems, paging is used to create an independent virtual address space for each task, preventing one task from manipulating the memory of another. Paging also allows for pages to be moved out ofprimary storageand onto a slower and largersecondary storage, such as ahard disk drive.[40]This allows for more memory to be used than physically available in primary storage.[40] The x86 architecture allows control of pages through twoarrays: page directories andpage tables. Originally, a page directory was the size of one page, four kilobytes, and contained 1,024 page directory entries (PDE), although subsequent enhancements to the x86 architecture have added the ability to use larger page sizes. Each PDE contained apointerto a page table. A page table was also originally four kilobytes in size and contained 1,024 page table entries (PTE). Each PTE contained a pointer to the actual page's physical address and are only used when the four-kilobyte pages are used. At any given time, only one page directory may be in active use.[41] Through the use of the rings, privilegedcall gates, and theTask State Segment(TSS), introduced with the 286,preemptive multitaskingwas made possible on the x86 architecture. The TSS allows general-purpose registers, segment selector fields, and stacks to all be modified without affecting those of another task. The TSS also allows a task's privilege level, and I/O port permissions to be independent of another task's. In many operating systems, the full features of the TSS are not used.[42]This is commonly due to portability concerns or due to the performance issues created with hardware task switches.[42]As a result, many operating systems use both hardware and software to create a multitasking system.[43] Operating systems likeOS/21.x try to switch the processor between protected and real modes. This is both slow and unsafe, because a real mode program can easilycrasha computer. OS/2 1.x defines restrictive programming rules allowing aFamily APIorboundprogram to run in either real or protected mode. Some earlyUnixoperating systems,OS/21.x, and Windows used this mode. Windows 3.0was able to run real mode programs in 16-bit protected mode; when switching to protected mode, it decided to preserve the single privilege level model that was used in real mode, which is why Windows applications and DLLs can hook interrupts and do direct hardware access. That lasted through theWindows 9xseries. If a Windows 1.x or 2.x program is written properly and avoids segment arithmetic, it will run the same way in both real and protected modes. Windows programs generally avoid segment arithmetic because Windows implements a software virtual memory scheme, moving program code and data in memory when programs are not running, so manipulating absolute addresses is dangerous; programs should only keephandlesto memory blocks when not running. Starting an old program while Windows 3.0 is running in protected mode triggers a warning dialog, suggesting to either run Windows in real mode or to obtain an updated version of the application. Updating well-behaved programs using the MARK utility with the MEMORY parameter avoids this dialog. It is not possible to have some GUI programs running in 16-bit protected mode and other GUI programs running in real mode. InWindows 3.1, real mode was no longer supported and could not be accessed. In modern 32-bit operating systems,virtual 8086 modeis still used for running applications, e.g.DPMIcompatibleDOS extenderprograms (throughvirtual DOS machines) or Windows 3.x applications (through theWindows on Windowssubsystem) and certain classes ofdevice drivers(e.g. for changing the screen-resolution using BIOS functionality) inOS/22.0 (and later OS/2) and 32-bitWindows NT, all under control of a 32-bit kernel. However, 64-bit operating systems (which run inlong mode) no longer use this, since virtual 8086 mode has been removed from long mode.
https://en.wikipedia.org/wiki/Protected_mode
CONFIG.SYSis the primaryconfiguration filefor theDOSandOS/2operating systems. It is a specialASCIItext file that contains user-accessible setup or configuration directives evaluated by the operating system'sDOS BIOS(typically residing inIBMBIO.COMorIO.SYS) during boot. CONFIG.SYS was introduced with DOS 2.0.[nb 1] The directives in this file configure DOS for use with devices and applications in the system. The CONFIG.SYS directives also set up the memory managers in the system. After processing the CONFIG.SYS file, DOS proceeds to load and execute thecommand shellspecified in theSHELLline of CONFIG.SYS, orCOMMAND.COMif there is no such line. The command shell in turn is responsible for processing theAUTOEXEC.BATfile. CONFIG.SYS is composed mostly ofname=valuedirectives which look like variable assignments. In fact, these will either define some tunable parameters often resulting in reservation of memory, or load files, mostlydevice driversandterminate-and-stay-resident programs(TSRs), into memory. In DOS, CONFIG.SYS is located in theroot directoryof the drive from which the system was booted. The filename is also used byDisk Control Program[de](DCP), an MS-DOS derivative by the former East-GermanVEB Robotron.[1] Some versions of DOS will probe for alternative filenames taking precedence over the default CONFIG.SYS filename if they exist: While older versions ofConcurrent DOS3.2 to 4.1 did not support CONFIG.SYS files at all, later versions ofConcurrent DOS 386andConcurrent DOS XM, as well asMultiuser DOS,System ManagerandREAL/32will probe forCCONFIG.SYS(with "C" derived from "Concurrent") instead of CONFIG.SYS. Some versions of Multiuser DOS use a filename ofCCONFIG.INIinstead,[2][3]whereas REAL/32 is known to look forMCONFIG.SYS. These operating systems support many additional and different configuration settings (likeINIT_INSTALL) not known under MS-DOS/PC DOS, but they are stored in the binary repository namedCCONFIG.BINrather than inCCONFIG.INI.[2][3]Both files are typically modified through a configuration utility namedCONFIG.EXEonly.[2][3] UnderDR DOS3.31,PalmDOS1.0,Novell DOS7,OpenDOS7.01, and DR-DOS 7.02 and higher, a file namedDCONFIG.SYS(with "D" derived from "DR DOS"), if present, will take precedence over CONFIG.SYS.[4][5][6][7]Since DR DOS 6.0 this was used in conjunction with disk compression software, where the original boot drive C: would become drive D: after loading the compression driver (and the "D" in the file name came in handy as well), but it is commonly used to help maintain multiple configuration files in multi-boot scenarios. In addition to this, OpenDOS 7.01 and DR-OpenDOS 7.02 will look for a file namedODCONFIG.SYS,[8][9][6]whereas some issues of DR-DOS 7.02 and higher will instead also look forDRCONFIG.SYS.[6]Further, under DR DOS 6.0 and higher, theSYS /DR:extcommand can be used to change the default file extensions.[8][10][7]For example, withSYS /L /DR:703the writtenVolume Boot Recordwould look for a renamed and modified IBMBIO.703 system file (instead of the defaultIBMBIO.COM) and the IBMBIO.703 would look for IBMDOS.703 and [D]CONFIG.703 (instead ofIBMDOS.COMand [D]CONFIG.SYS), so that multiple parallel sets of files can coexist in the same root directory and be selected via a boot-loader like LOADER, supplied with Multiuser DOS and DR-DOS 7.02/7.03.[4]TheSHELLdirective is enhanced to provide means to specify alternative AUTOEXEC.BAT files via/P[:filename.ext]and in this specific scenario, COMMAND.COM will accept file extensions other than ".BAT" as well (both features are also supported by4DOS).[11]Under DR DOS 6.0 and higher, the CONFIG.SYS directiveCHAIN=filespeccan be used to continue processing in the named file, which does not necessarily need to reside in the root directory of the boot drive.[4][6]DR-DOS 7.02 and higher optionally support an additional parameter as inCHAIN=filespec,labelto jump to a specific:labelin the given file.[8][9][6]DR-DOS 7.03 and higher support a newSYS /Aparameter in order to copy the corresponding CONFIG.SYS and AUTOEXEC.BAT files along with the system files.[7] FreeDOSimplements a similar feature with itsFDCONFIG.SYSconfiguration file.RxDOS7.24 and higher useRXCONFIG.SYSinstead.[12]PTS-DOSusesCONFIG.PTS. Both CONFIG.SYS and AUTOEXEC.BAT can be found included in theroot folderofWindows 95, andWindows 98boot drives, as they are based on DOS. Typically, these files are left empty, with no content. Windows Medoes not even parse the CONFIG.SYS file during the Windows boot process,[13]loadingenvironment variablesfrom theWindows Registryinstead: UnderFlexOS, CONFIG.SYS is a binary file defining the resource managers and device drivers loaded. An example CONFIG.SYS for MS-DOS 5: The system can still boot if this file is missing or corrupted. However, this file, along withAUTOEXEC.BAT, is essential for the complete bootup process to occur with the DOS operating system. These files contain information that is used to customize the operating system for personal use. They also contain the requirements of different software application packages. A DOS system would require troubleshooting if either of these files became damaged or corrupted. If CONFIG.SYS does not contain aSHELLdirective (or the file is corrupt or missing), DOS typically searches for COMMAND.COM in the root directory of the boot drive.[19]If this is not found, versions of DOS before 6.0 will not start up. MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7 and higher will instead display a prompt to enter the path and filename of a command processor. This recovery prompt is also displayed when the primary command processor is aborted due to faults or if it is exited deliberately.[4](In the case of COMMAND.COM, the internalEXITcommand is disabled only when the shell was started with/P.) This also provides limited means to replace the shell atruntimewithout having to reboot the system. Since the MS-DOS 7.0 and higher COMMAND.COM executable is incompatible with DR-DOS,[21]but typically resides in the root of drive C: in dual-boot scenarios with DR-DOS, DR-DOS 7.02 and higher no longer allow to bypassSHELLdirectives in (Ctrl+)F5/F7/F8"skip"/"trace"/"step" modes.[8][19][21](Some later issues added (Ctrl+)F6to reinvoke the formerF5"skip" behaviour in order to allow recovery from problems with invalidSHELLarguments as well.[19]) Also, if noSHELLdirective could be found when skipping CONFIG.SYS processing via (Ctrl+)F5(and also with (Ctrl+)F7/F8, when the default file extension has been changed withSYS /DR:ext),[7]the user is prompted to enter a valid shell file namebeforetrying to load COMMAND.COM from the root.[8][21]Pressing↵ Enterwithout specifying a file will assume the former default.[8] Depending on the version, the size of the CONFIG.SYS file is limited to a few kilobytes under MS-DOS/PC DOS (up to 64 KB in most recent versions), whereas the file's size is unlimited under DR-DOS.[4][19]This is because the former operating systems (since DOS 3.0[22]) will compile the file into some tokenized in-memory representation[22]before they sort and regroup the directives to be processed in a specific order (with device drivers always being loaded before TSRs), whereas DR-DOS interprets the file and executes most directives line-by-line, thereby giving full control over the load order of drivers and TSRs viaDEVICEandINSTALL(for example to solve load order conflicts or to load a program debugger before a device driver to be debugged)[8][19]and allowing to adapt the user interaction and change the flow through the file based on conditions like processor types installed, any type of keys pressed, load or input errors occurring, or return codes given by loaded software.[4][8]This becomes particularly useful sinceINSTALLcan also be used to run non-resident software under DR-DOS, so that temporary external programs can be integrated into the CONFIG.SYS control flow.[4][11][8] In MS-DOS/PC DOS 2.0 through 4.01, the length of theSHELLline was limited to 31 characters, whereas up to 128 characters are possible in later versions.[4][11]DR-DOS even accepts up to 255 characters.[4][11]CONFIG.SYS directives do not acceptlong filenames. When installingWindows 95over a preexisting DOS/Windows install, CONFIG.SYS and AUTOEXEC.BAT are renamed toCONFIG.DOSand AUTOEXEC.DOS. This is intended to ease dual booting between Windows 9x and DOS. When booting into DOS, they are temporarily renamed CONFIG.SYS and AUTOEXEC.BAT. Backups of the Windows 95 versions are made asCONFIG.W40and AUTOEXEC.W40 files. When Caldera DR-DOS 7.02/7.03 is installed on a system already containing Windows 95, Windows' CONFIG.SYS and AUTOEXEC.BAT retain those names. DR-DOS' startup files are installed as DCONFIG.SYS (a name already used in earlier versions of DR DOS) and AUTODOS7.BAT.[5] OS/2uses the CONFIG.SYS file extensively for setting up its configuration, drivers and environment before the graphical part of the system loads. In the OS/2 subsystem ofWindows NT, what appeared as CONFIG.SYS to OS/2 programs was actually stored in the registry. There are many undocumented or poorly documented CONFIG.SYS directives used by OS/2.[23] CONFIG.SYS continues to be used by the OS/2 derivativeseComStation[24]andArcaOS.[25]
https://en.wikipedia.org/wiki/IOPL_(CONFIG.SYS_directive)
In memory addressing forIntelx86computer architectures,segment descriptorsare a part of the segmentation unit, used for translating alogical addressto a linear address. Segment descriptors describe thememory segmentreferred to in the logical address.[1]The segment descriptor (8 bytes long in 80286 and later) contains the following fields:[2] The x86 and x86-64 segment descriptor has the following form:[3] What the fields stand for: Thiscomputer hardwarearticle is astub. You can help Wikipedia byexpanding it.
https://en.wikipedia.org/wiki/Segment_descriptor
ASupervisor Call instruction(SVC) is a hardwareinstructionused by theSystem/360family ofIBM mainframecomputers up to contemporaryzSeries, theAmdahl470V/5, 470V/6, 470V/7, 470V/8, 580, 5880, 5990M, and 5990A, and others; Univac90/60, 90/70 and 90/80, and possibly others; the Fujitsu M180 (UP)[1]and M200 (MP), and others; and is also used in theHerculesopen sourcemainframeemulation software. It causes an interrupt to request a service from theoperating system. The system routine providing the service is called anSVC routine. SVC is asystem call. IBM mainframes in the System/360 and successor families operate in one of two states:problem stateorsupervisor stateand in one of sixteen storage access keys (0 to 15). Inproblem state, a large set of general purposenon-privilegedinstructions are available to a user program. Insupervisor state, system programs are additionally able to use a small set ofprivilegedinstructions which are generally intended for supervisory functions. These functions may affect other users, other processors, or the entire computer system. In storage key 0 a program is able to access all addressable[a]storage, otherwise it is limited to storage areas with a matching key. A program is only allowed to access specific supervisory functions after thorough authorization checking by the operating system: DEBCHK (SVC 117), TESTAUTH (SVC 119), and possibly additional tests. Programs which fail any of these tests are ABENDed, that isabnormally terminatedand immediately cease processing. Some of these tests were not available in OS/360, but were added inOS/VS1,SVSorMVS/370, but all were available in MVS/370 or subsequent releases, and are still available to this day. InOS/VS1,OS/VS2 (SVS),MVS/370and subsequent versions of the OS, the MODESET function (SVC 107) obviated the need for many user-written SVCs as this system SVC accommodated both changes in mode (problem state to supervisor state) and key (8-15 [ user ] to 0-7 [ system ] ) in a single operation, and many user-written SVCs were originally intended for simple mode and key changes, anyway, and subsequently the only special requirement was that the jobstep be APF authorized[b][c]and that the MODESET-invoking program be resident in a concatenation of libraries all of which were identified as authorized, and this secure approach was completely under the installation's control. This approach generally simplified user controls over authorization, although some simple changes to the application were thereby required. In general, user installations favored this approach, and the overall reliability of the system was significantly improved thereby. Although mainframe applications are typicallysynchronousprocesses, the operating system itself is naturallyasynchronous, although the system also supports many processes which are naturallysynchronous. When an application requests a system service which is naturallyasynchronous, such as input/output processing, a mechanism for synchronizing the application and the operating system must be employed. This essential mechanism is through functions which are built into the operating system, or are specifically supported by it, including: WAIT (temporarily halt application processing until an external event has occurred); POST (indicate occurrence of an external event so application processing may continue); and SYNCH (change system processing mode—supervisor to user and system key to user key—while preserving system integrity, and synchronously perform a function on behalf of the application, after which supervisor processing may continue). TheOS/360 SVCstable below indicates the conditions under which these synchronizing facilities may be employed. SVC is a two byte instruction with thehexadecimaloperation code0A; the second byte of the instruction, theSVC number, indicates the specific request.[2]The SVC number can be any value from 0 to 255, with the particular SVC number being up to the implementer of the operating system, e.g. on IBM's MVS, SVC 3 is used to terminate a program, while on the UNIVAC VS/9 and Fujitsu BS2000 operating systems, SVC 9 was used for the same purpose. When a program issues an SVC, an interrupt occurs. The PSW, an 8-byte (on the System 360 and S/370) or 16 byte (on the z/System), privileged register containing, among other things, the current address of the instruction to be executed, the privilege bit (1 if privileged), and storage key, is saved at a real[d]address. This is locations 32-39 on the 360 and 370; 320-335 on the z/System. The PSW is then loaded from a different real[d]address ; it is 96-103 on the 360 and 370, 448-463 on the z/system. Execution resumes at the address that was loaded into the PSW. Bits 24-31 of the saved PSW (real[d]address 35 on the 360 and 370, 323 on the z/System) contain the Supervisor call number. SVC invokes a supervisory function—usually implemented as a "closed subroutine" of the system's SVCinterrupt handler. Information passed to and from the SVC routines is passed ingeneral purpose registersor in memory. UnderOS/360 and successors, return from an SVC routine is, for type 2, 3 and 4 SVC routines, via an SVC 3 (EXIT) invocation, and for other SVC types by the privilegedLoad PSW(LPSW) instruction, and which is executed on behalf of the SVC routine by the control program'sdispatcheror SVC interrupt handler. On non-IBM developed operating systems such asMUSIC/SPdeveloped byMcGill Universityin Montreal, Canada for IBM mainframes, and for non-IBM mainframes,VS/9, developed by Univac (from theTSOSoperating system for theRCA Spectra 70series computers) for theUNIVAC Series 90mainframe line, and the B800 operating system (also developed from the TSOS operating system) forFujitsu's mainframes, all use the LPSW instruction to exit from a Supervisor Call. The choice on whether to have a supervisor call return to the calling program directly through an LPSW instruction or through some other means such as a subroutine return instruction or a supervisor call itself, is a matter of design. There is no obvious "right" way to do this; there can be reasons for both methods. Using an LPSW instruction to exit an SVC routine allows for faster execution, but means actual testing of the routine has to be done on a dedicated machine running the code as part of an actual operating system supervisor. If the code was written as an ordinary subroutine it can be tested in the same manner as any ordinary program and potentially deployed without having to modify it. It also would allow metrics to be measured, as to how long a supervisor call routine took to complete its task, allowing for analysis of routines that are excessively long in execution time (or, ones that are very fast). In OS/360 and later incarnations of the OS, branch and link entry points are alternatives to SVC invocations for some supervisor mode routines. In MVS/SP V1R3 and later incarnations of the OS, Program Call (PC) entries have augmented SVCs for invocations of many supervisory functions by both authorized and unauthorized programs; and some functions may only be invoked by branch or PC entries, e.g.STARTIO. (This also has the advantage of preventing IBM operating systems from being run on non-IBM hardware.) Different IBM operating systems have little compatibility in the specific codes used or in the supervisor services which may be invoked.VM/370 and z/VMsystems use the DIAG instruction in a similar manner, and leave SVC for the use by operating systems running in virtual machines. Most OS/360 SVCs have been maintained for "legacy" programs, but some SVCs have been "extended" over the passage of time. In OS/360 and successor systems SVC numbers 0 through approximately 127 are defined by IBM, and 255 downwards are available for use by an installation's systems programming staff. z/OS changed this to SVC numbers 0 through approximately 200 for IBM, and 255 downwards for the installation, as additional system services, primarily in support of encryption/decryption, were being implemented by IBM using SVCs. SVC routines must have module names in a specific format beginning with IGC. By system design, the term "disabled" means disabled for all interruptions except for machine check interruptions in pre-MVS/370 systems, and with the "local lock" being held, but not "disabled" for any interruptions in MVS/370 and all later systems. The former is physical disablement, the latter is logical disablement, as an address space's "local lock" has the same impact within its address space as physical disablement, but it has no impact on other address spaces. OS/360 defined four types of SVC routines, called "Type 1" through "Type 4"; MVS/370 added an additional "Type 6", which is similar to "Type 1" except that the SVC routine is physically disabled. "Type 5" was neither defined nor implemented. The following information, part of a table for OS/360, augmented for MVS/370 and successor systems, gives an idea of the considerations involved in writing an SVC routine. The size restrictions on types 3 and 4 SVC routines are necessary because they are loaded into designated "transient areas" (PLPA in post-MVT) when invoked. OS/360 did not, in general, have any way of restricting the use of SVCs. Consequently, there were quite a number of unintentional system- and data-integrity exposures which were possible by employing certain sequences of SVCs and other instructions. It became common practice for curious users to attempt to discover these exposures, but some system programmers used these exposures rather than develop their own user-written SVCs. Beginning with MVS/370, IBM considered it aproduct defectif a system design error would allow an application program to enter supervisor state without authorization. They mandated that all IBM SVCs be protected to close all system- and data-integrity exposures. They "guaranteed" to close such exposures as these were discovered. By Release 3.7 of MVS/370 in 1977 nearly every such exposure had indeed been identified and closed, at the cost of 100,000 Authorized Program Analysis Reports (APARs) and relatedProgram temporary fixes(PTFs). This was a remarkable achievement, as system "up time" was thereafter measured inyears, rather than indaysor even inhours.
https://en.wikipedia.org/wiki/Supervisor_Call_instruction
System Management Mode(SMM, sometimes calledring −2in reference toprotection rings)[1][2]is an operating mode ofx86central processor units(CPUs) in which all normal execution, including theoperating system, is suspended. An alternate software system which usually resides in the computer'sfirmware, or a hardware-assisteddebugger, is then executed with high privileges. It was first released with theIntel 386SL.[3][4]While initially special SL versions were required for SMM, Intel incorporated SMM in its mainline 486 and Pentium processors in 1993.AMDimplemented Intel's SMM with theAm386processors in 1991.[5]It is available in all latermicroprocessorsin the x86architecture.[6] InARM architecturethe Exception Level 3 (EL3) mode is also referred as Secure Monitor Mode or System Management Mode.[7] SMM is a special-purpose operating mode provided for handling system-wide functions like power management, system hardware control, or proprietary OEM designed code. It is intended for use only by system firmware (BIOSorUEFI), not by applications software or general-purpose systems software. The main benefit of SMM is that it offers a distinct and easily isolated processor environment that operates transparently to the operating system or executive and software applications.[citation needed] In order to achieve transparency, SMM imposes certain rules. The SMM can only be entered through SMI (System Management Interrupt). The processor executes the SMM code in a separate address space (SMRAM) that has to be made inaccessible to otheroperating modesof the CPU by thefirmware.[8] System Management Mode can address up to 4 GB memory ashuge real mode. Inx86-64processors, SMM can address >4 GB memory as real address mode.[9] Initially, System Management Mode was used for implementing power management and hardware control features likeAdvanced Power Management(APM). However, BIOS manufacturers and OEMs have relied on SMM for newer functionality likeAdvanced Configuration and Power Interface(ACPI).[10][11] Some uses of the System Management Mode are: System Management Mode can also be abused to run high-privilegedrootkits, as demonstrated atBlack Hat2008[15]and 2015.[16] SMM is entered via the SMI (system management interrupt), which is invoked by: By entering SMM, the processor looks for the first instruction at the address SMBASE (SMBASE register content) + 8000h (by default 38000h), using registers CS = 3000h and EIP = 8000h. The CS register value (3000h) is due to the use of real-mode memory addresses by the processor when in SMM. In this case, the CS is internally appended with 0h on its rightmost end. By design, the operating system cannot override or disable the SMI. Due to this fact, it is a target for malicious rootkits to reside in,[19][20]includingNSA's "implants",[21]which have individualcode namesfor specific hardware, like SOUFFLETROUGH forJuniper Networksfirewalls,[22]SCHOOLMONTANAforJ-series routersof the same company,[23]DEITYBOUNCEfor DELL,[24]orIRONCHEFfor HPProliantservers.[25] Improperly designed and insufficiently tested SMM BIOS code can make the wrong assumptions and not work properly when interrupting some other x86 operating modes likePAEor 64-bitlong mode.[26]According to the documentation of theLinux kernel, around 2004, such buggy implementations of the USB legacy support feature were a common cause of crashes, for example, on motherboards based on the IntelE7505chipset.[12] Since the SMM code (SMI handler) is installed by the system firmware (BIOS), the OS and the SMM code may have expectations about hardware settings that are incompatible, such as different ideas of how theAdvanced Programmable Interrupt Controller(APIC) should be set up. Operations in SMM take CPU time away from the applications, operating-system kernel andhypervisor, with the effects magnified for multicore processors, since each SMI causes all cores to switch modes.[27]There is also some overhead involved with switching in and out of SMM, since the CPU state must be stored to memory (SMRAM) and any write-back caches must be flushed. This can destroy real-time behavior and causeclock ticksto get lost. The Windows and Linux kernels define an "SMI Timeout" setting – a period within which SMM handlers must return control to the operating system, or it will "hang" or "crash". The SMM may disrupt the behavior ofreal-timeapplications with constrained timing requirements. Alogic analyzermay be required to determine whether the CPU has entered SMM (checking state ofSMIACT#pin of CPU).[17]Recovering the SMI handler code to analyze it for bugs, vulnerabilities and secrets requires a logic analyzer or disassembly of the system firmware.
https://en.wikipedia.org/wiki/System_Management_Mode
Analphanumeric brand nameis abrand namecomposed only of letters and numbers (alphanumericals). Examples include7 Up,Saks Fifth Avenue,Audi A4,CanonA75.[1][2]They may serve as abbreviations (e.g.3M, formerly known as the Minnesota Mining and Manufacturing Company), indicate model extensions (iPhone 3G,iPhone 4, etc.), symbolize physical product attributes (the V-shapedV8 engine), incorporate technical attributes (AMD32 chips use32-bitprocessors), refer to inventory codes or internal design numbers (e.g.,Levi's501).[3] Kunter Gunasti and William T. Ross (2010) define two dimensions of alphanumeric brand names: "link", or the connection between the brand name and a specific product feature or the product as a whole; and "alignability", or whether the preferences for a product can be aligned with the numbers included in the brand names in an ascending or descending trend.[1] Selcan Kara, Gunasti and Ross (2015) delineated the number and letter components of alphanumeric brands and observed that for new brand extensions firms can either change the letters or numbers of their parent brand names. Altering the number components of brand names (e.g.Audi A3vs.A4vs.A6vs.A8) led to more favorable consumer reactions compared to changing the letter components (e.g.MercedesC350 vs. E350 vs. S350).[4] Gunasti and Timucin Ozcan (2016) further categorized alphanumeric brand names as either "round" or "non-round". They showed that use of "round numbers" in brand names is pervasive because this practice increases the tendency of consumers to perceive products as more complete (including all necessary attributes). For example, labeling an identical product with an "S200" brand (round number) as opposed to an "S198" or "S203" brand can make consumers believe that the product is superior and more well-rounded. They also found that the presence of competitor alphanumeric brand name (e.g.Garmin370) can affectconsumer choicesamong the focal brand (e.g.TomTom350 vs. TomTom 360).[5]Gunasti and Berna Devezer (2016) observed that this effect occurs only for competing firms' products.[6] Thismarketing-related article is astub. You can help Wikipedia byexpanding it.
https://en.wikipedia.org/wiki/Alphanumeric_brand_names
Inhacking, ashellcodeis a small piece of code used as thepayloadin theexploitationof a softwarevulnerability. It is called "shellcode" because it typically starts acommand shellfrom which the attacker can control the compromised machine, but any piece of code that performs a similar task can be called shellcode. Because the function of a payload is not limited to merely spawning a shell, some have suggested that the name shellcode is insufficient.[1]However, attempts at replacing the term have not gained wide acceptance. Shellcode is commonly written inmachine code. When creating shellcode, it is generally desirable to make it both small and executable, which allows it to be used in as wide a variety of situations as possible.[2]In assembly code, the same function can be performed in a multitude of ways and there is some variety in the lengths of opcodes that can be used for this purpose; good shellcode writers can put these small opcodes to use to create more compact shellcode.[3]Some have reached the smallest possible size while maintaining stability.[4] Shellcode can either belocalorremote, depending on whether it gives an attacker control over the machine it runs on (local) or over another machine through a network (remote). Localshellcode is used by an attacker who has limited access to a machine but can exploit a vulnerability, for example abuffer overflow, in a higher-privileged process on that machine. If successfully executed, the shellcode will provide the attacker access to the machine with the same higher privileges as the targeted process. Remoteshellcode is used when an attacker wants to target a vulnerable process running on another machine on alocal network,intranet, or aremote network. If successfully executed, the shellcode can provide the attacker access to the target machine across the network. Remote shellcodes normally use standardTCP/IPsocketconnections to allow the attacker access to the shell on the target machine. Such shellcode can be categorized based on how this connection is set up: if the shellcode establishes the connection it is called a "reverse shell", or aconnect-backshellcode because the shellcodeconnects backto the attacker's machine. On the other hand, if the attacker establishes the connection, the shellcode is called abindshellbecause the shellcodebindsto a certain port on the victim's machine. There's a peculiar shellcode namedbindshell random portthat skips the binding part and listens on a random port made available by theoperating system. Because of that, thebindshell random portbecame the smallest stable bindshell shellcode forx86_64available to this date. A third, much less common type, issocket-reuseshellcode. This type of shellcode is sometimes used when an exploit establishes a connection to the vulnerable process that is not closed before the shellcode is run. The shellcode can thenre-usethis connection to communicate with the attacker. Socket re-using shellcode is more elaborate, since the shellcode needs to find out which connection to re-use and the machine may have many connections open.[5] Afirewallcan be used to detect outgoing connections made by connect-back shellcode as well as incoming connections made by bindshells. They can, therefore, offer some protection against an attacker, even if the system is vulnerable, by preventing the attacker from connecting to the shell created by the shellcode. One reason why socket re-using shellcode is sometimes used is that it does not create new connections and, therefore, is harder to detect and block. Download and executeis a type of remote shellcode thatdownloadsandexecutessome form of malware on the target system. This type of shellcode does not spawn a shell, but rather instructs the machine to download a certain executable file off the network, save it to disk and execute it. Nowadays, it is commonly used indrive-by downloadattacks, where a victim visits a malicious webpage that in turn attempts to run such a download and execute shellcode in order to install software on the victim's machine. A variation of this type of shellcode downloads andloadsalibrary.[6][7]Advantages of this technique are that the code can be smaller, that it does not require the shellcode to spawn a new process on the target system, and that the shellcode does not need code to clean up the targeted process as this can be done by the library loaded into the process. When the amount of data that an attacker can inject into the target process is too limited to execute useful shellcode directly, it may be possible to execute it in stages. First, a small piece of shellcode (stage 1) is executed. This code then downloads a larger piece of shellcode (stage 2) into the process's memory and executes it. This is another form ofstagedshellcode, which is used if an attacker can inject a larger shellcode into the process but cannot determine where in the process it will end up. Smallegg-huntshellcode is injected into the process at a predictable location and executed. This code then searches the process's address space for the larger shellcode (theegg) and executes it.[8] This type of shellcode is similar toegg-huntshellcode, but looks for multiple small blocks of data (eggs) and recombines them into one larger block (theomelette) that is subsequently executed. This is used when an attacker can only inject a number of small blocks of data into the process.[9] An exploit will commonly inject a shellcode into the target process before or at the same time as it exploits a vulnerability to gain control over theprogram counter. The program counter is adjusted to point to the shellcode, after which it gets executed and performs its task. Injecting the shellcode is often done by storing the shellcode in data sent over the network to the vulnerable process, by supplying it in a file that is read by the vulnerable process or through the command line or environment in the case of local exploits. Because most processes filter or restrict the data that can be injected, shellcode often needs to be written to allow for these restrictions. This includes making the code small, null-free oralphanumeric. Various solutions have been found to get around such restrictions, including: Sinceintrusion detectioncan detect signatures of simple shellcodes being sent over the network, it is often encoded, made self-decrypting orpolymorphicto avoid detection. Exploits that target browsers commonly encode shellcode in a JavaScript string usingpercent-encoding, escape sequence encoding "\uXXXX" orentity encoding.[10]Some exploits also obfuscate the encoded shellcode string further to prevent detection byIDS. For example, on theIA-32architecture, here's how twoNOP(no-operation) instructions would look, first unencoded: This instruction is used inNOP slides. Most shellcodes are written without the use ofnullbytes because they are intended to be injected into a target process throughnull-terminated strings. When a null-terminated string is copied, it will be copied up to and including the first null but subsequent bytes of the shellcode will not be processed. When shellcode that contains nulls is injected in this way, only part of the shellcode would be injected, making it incapable of running successfully. To produce null-free shellcode from shellcode that containsnullbytes, one can substitute machine instructions that contain zeroes with instructions that have the same effect but are free of nulls. For example, on theIA-32architecture one could replace this instruction: which contains zeroes as part of the literal (1expands to0x00000001) with these instructions: which have the same effect but take fewer bytes to encode and are free of nulls. Analphanumeric shellcodeis a shellcode that consists of or assembles itself on execution into entirelyalphanumericASCIIorUnicodecharacters such as 0–9, A–Z and a–z.[11][12]This type of encoding was created byhackersto hide workingmachine codeinside what appears to be text. This can be useful to avoid detection of the code and to allow the code to pass through filters that scrub non-alphanumeric characters from strings (in part, such filters were a response to non-alphanumeric shellcode exploits). A similar type of encoding is calledprintable codeand uses allprintablecharacters (0–9, A–Z, a–z, !@#%^&*() etc.). A similarly restricted variant isECHOable codenot containing any characters which are not accepted by theECHOcommand. It has been shown that it is possible to create shellcode that looks like normal text in English.[13]Writing alphanumeric or printable code requires good understanding of theinstruction set architectureof the machine(s) on which the code is to be executed. It has been demonstrated that it is possible to write alphanumeric code that is executable on more than one machine,[14]thereby constitutingmulti-architecture executablecode. In certain circumstances, a target process will filter any byte from the injected shellcode that is not aprintableoralphanumericcharacter. Under such circumstances, the range of instructions that can be used to write a shellcode becomes very limited. A solution to this problem was published by Rix inPhrack57[11]in which he showed it was possible to turn any code into alphanumeric code. A technique often used is to create self-modifying code, because this allows the code to modify its own bytes to include bytes outside of the normally allowed range, thereby expanding the range of instructions it can use. Using this trick, a self-modifying decoder can be created that initially uses only bytes in the allowed range. The main code of the shellcode is encoded, also only using bytes in the allowed range. When the output shellcode is run, the decoder can modify its own code to be able to use any instruction it requires to function properly and then continues to decode the original shellcode. After decoding the shellcode the decoder transfers control to it, so it can be executed as normal. It has been shown that it is possible to create arbitrarily complex shellcode that looks like normal text in English.[13] Modern programs useUnicodestrings to allow internationalization of text. Often, these programs will convert incomingASCIIstrings to Unicode before processing them. Unicode strings encoded inUTF-16use two bytes to encode each character (or four bytes for some special characters). When anASCII(Latin-1in general) string is transformed into UTF-16, a zero byte is inserted after each byte in the original string. Obscou proved inPhrack61[12]that it is possible to write shellcode that can run successfully after this transformation. Programs that can automatically encode any shellcode into alphanumeric UTF-16-proof shellcode exist, based on the same principle of a small self-modifying decoder that decodes the original shellcode. Most shellcode is written inmachine codebecause of the low level at which the vulnerability being exploited gives an attacker access to the process. Shellcode is therefore often created to target one specific combination ofprocessor,operating systemandservice pack, called aplatform. For some exploits, due to the constraints put on the shellcode by the target process, a very specific shellcode must be created. However, it is not impossible for one shellcode to work for multiple exploits, service packs, operating systems and even processors.[15][16][17]Such versatility is commonly achieved by creating multiple versions of the shellcode that target the various platforms and creating a header that branches to the correct version for the platform the code is running on. When executed, the code behaves differently for different platforms and executes the right part of the shellcode for the platform it is running on. Shellcode cannot be executed directly. In order to analyze what a shellcode attempts to do it must be loaded into another process. One common analysis technique is to write a small C program which holds the shellcode as a byte buffer, and then use a function pointer or use inline assembler to transfer execution to it. Another technique is to use an online tool, such as shellcode_2_exe, to embed the shellcode into a pre-made executable husk which can then be analyzed in a standard debugger. Specialized shellcode analysis tools also exist, such as the iDefense sclog project which was originally released in 2005 as part of the Malcode Analyst Pack. Sclog is designed to load external shellcode files and execute them within an API logging framework. Emulation-based shellcode analysis tools also exist such as thesctestapplication which is part of the cross-platform libemu package. Another emulation-based shellcode analysis tool, built around the libemu library, isscdbgwhich includes a basic debug shell and integrated reporting features.
https://en.wikipedia.org/wiki/Alphanumeric_shellcode
Thetechnology ofcomputer keyboardsincludes many elements. Many different keyboard technologies have been developed for consumer demands and optimized for industrial applications. The standard full-size (100%) computer alphanumeric keyboard typically uses 101 to 105 keys; keyboards integrated inlaptop computersare typically less comprehensive. Virtual keyboards, which are mostly accessed via atouchscreeninterface, have no physical switches and provide artificial audio andhaptic feedbackinstead. This variety of keyboard can prove useful, as it is not limited by the rigid nature of physical computer keyboards. The majority of modern keyboards include a control processor and indicator lights to provide feedback to the user (and to thecentral processor) about what state the keyboard is in.Plug-and-playtechnology means that its "out of the box"layoutcan be notified to the system, making the keyboard immediately ready to use without the need for further configuration, unless the user so desires. This also enables manufacture of generic keyboards for a variety of language markets, that differ only in the symbols engraved on the keytops. A common membrane design consists of three layers. The top and bottom layer have exposed electrical matrix traces, and the middle layer is a spacer to prevent current from passing through the top and bottom conductive traces passively. When pressure is applied to the top membrane, it bridges the top and bottom conductive contact pads, allowing current to transfer. Two of the most common types of membrane keyboards include full-travel rubber dome over membrane and flat-panel membrane keyboards. Flat-panel membrane keyboards are most often found on appliances likemicrowave ovensorphotocopiers. Full-travel rubber dome over membrane keyboards are the most common keyboard design manufactured today. In these keyboards, a rubber dome sheet is placed above the membranes, ensuring that the domes align with the contact pads. The rubber dome serves a dual purpose: it acts as a tactile return spring and provides a soft surface to transfer force onto the top membrane. To bridge the connection between the two contact pads, the rubber dome must be fully depressed. Rubber dome over membrane keyboards became very popular with computer manufacturers as they sought to reduce costs while PC prices declined. A common, compact variant of rubber dome over membrane is the scissor-switch, based on thescissors mechanism. Due to the requirement of many notebooks to be slim, they require the keyboards to be low-profile. Therefore, this technology is most commonly featured on notebooks. The keys are attached to the keyboard via two plastic pieces that interlock in a "scissor"-like fashion and snap to the keyboard and the keycap. These keyboards are generally quiet and the keys require little force to press. Scissor-switch keyboards are typically slightly more expensive. They are harder to clean (due to the limited movement of the keys and their multiple attachment points) but also less likely to get debris in them as the gaps between the keys are often smaller (as there is no need for extra room to allow for the 'wiggle' in the key, as typically found on a membrane keyboard).[1] Flat-panel membrane keyboards are often used in harsh environments where water or leak-proofing is desirable. They can have non-tactile, polydome tactile and metal dome tactile keys. Polydome tactile membrane switches use polyester, or PET, and is formed to create a stiff plastic dome. When the stiff polydome is pressed, the conductive ink on the back of the polydome connects with the bottom layer of the circuit. Metal dome membrane switches are made of stainless steel and offer enhanced durability and reliability and can feature custom dome designs.[2]Non-tactile flat-panel membrane keyboards have little to no keypress feel and often issue a beep or flash of light on actuation. Although this keyboard design was commonly used in the early days of thepersonal computer(on theSinclair ZX80,ZX81, andAtari 400), they have been supplanted by more responsive and modern designs. Computer keyboards made of flexible silicone or polyurethane materials can roll up in a bundle. This type of keyboard can take advantage of the thin flexible plastic membranes, but still pose the risk of damage. When they are completely sealed in rubber, they are water resistant. Roll-up keyboards provide relatively little tactile feedback. Because these keyboards are typically made of silicone, they unfavorably tend to attract dirt, dust, and hair.[3] Keyboards which have metal contact switches typically use discrete modules for each key. This type of switch are usually composed of a housing, a spring, and a slider, and sometimes other parts such as a separate tactile leaf or clickbar. At rest, the metal contacts inside of the switch are held apart. As the switch is pressed down, the contacts are held together to conduct current for actuation. Many switch designs use gold for contact material to prolong the lifetime of the switch by preventing switch failure from oxidization. Most designs use a metal leaf, where the movable contact is a leaf spring. A major producer of discrete metal contact switches isCherry, who has manufactured theCherry MXfamily of switches since the 1980s. Cherry's color-coding system of categorizing switches has been imitated by other switch manufacturers, such as Gateron and Kailh among many others.[4][5] Keyboards which utilize this technology are commonly referred to as "mechanical keyboards", but there is not a universally agreed-upon clear-cut definition for this term.[6] Hot-swappablekeyboards are keyboards in which switches can be pulled out and replaced without requiring the typicalsolderconnection.[7][8]Instead of theswitchpins being directly soldered to the keyboard'sPCB, hot-swapsocketsare instead soldered on. Hot-swap sockets can allow users to change different switches out of the keyboard without having the tools or knowledge required to solder. The reed module in a reed switch consists of two metal contacts inside of a glass bubble usually sealed with some inert gas like nitrogen to help prevent particle build-up. The slider in the housing pushes a magnet down in front of the reed capsule and the magnetic field causes the reed contacts to become attracted to each other and make contact. The reed switch mechanism was originally invented in 1936 by W B Ellwood atBell Telephone Laboratories. Although reed switches use metal leaf contacts, they are considered separate from all other forms of metal contact switch because the contacts are operated magnetically instead of using physical force from a slider to be pressed together. In a capacitive mechanism, pressing a key changes the capacitance of a pattern of capacitor pads. The pattern consists of two D-shaped capacitor pads for each switch, printed on aprinted circuit board(PCB) and covered by a thin, insulating film ofsoldermaskwhich acts as adielectric. For the most common, foam and foil implementation of this technology, the movable part ends with a flat foam element about the size of anaspirin tablet, finished with aluminum foil. Opposite the switch is a PCB with the capacitor pads. When the key is pressed, the foil tightly clings to the surface of the PCB, forming adaisy chainof two capacitors betweencontact padsand itself separated with a thin soldermask, and thus "shorting" thecontact padswith an easily detectable drop ofcapacitive reactancebetween them. Usually, this permits a pulse or pulse train to be sensed. An advantage of the capacitive technology is that the switch is not dependent on the flow of current through metal contacts to actuate. There is nodebouncingnecessary. The sensor tells enough about the distance of the keypress to allow the user to adjust the actuation point (key sensitivity). This adjustment can be done with the help of the bundled software and individually for each key, if so implemented.[9]A keyboard which utilizes these abilities include the Real Force RGB. IBM'sModel F keyboardis a design consisting of a buckling spring over a capacitive PCB, similar to the later Model M keyboard, but instead used membrane sensing in place of a PCB. TheTopre Corporationdesign for switches uses a conical spring below a rubber dome. The dome provides resistance, while the spring does the capacitive action.[10] Hall effectkeyboards useHall effect sensorsto detect the movement of a magnet by the potential difference in voltage. When a key is depressed, it moves a magnet that is detected by a solid-state sensor. Because they require no physical contact for actuation, Hall-effect keyboards are extremely reliable and can accept millions of keystrokes before failing. They are used for ultra-high reliability applications such as nuclear power plants, aircraft cockpits, and critical industrial environments. They can easily be made totally waterproof, and can resist large amounts of dust and contaminants. Because a magnet and sensor are required for each key, as well as custom control electronics, they are expensive to manufacture. Ahall switchworks through magnetic fields. Every switch has a small magnet fixed inside it. When the electricity passes through the main circuit, it creates a magnetic flux. Every time a key is pressed, the magnetic intensity changes. This change is noticed by the circuit and the sensors send the information to the motherboard.[11] Optical switch technology was introduced in 1962 by Harley E. Kelchner for use in a typewriter machine with the purpose of reducing the noise generated by typewriter keys. An optical keyboard technology utilizeslight-emitting devicesandphoto sensorsto optically detect actuated keys. Most commonly the emitters and sensors are located at the perimeter, mounted on a smallPCB. Thelightis directed from side to side of the keyboard interior, and it can only be blocked by the actuated keys. Most optical keyboards require at least two beams (most commonly a vertical beam and a horizontal beam) to determine the actuated key. Some optical keyboards use a special key structure that blocks the light in a certain pattern, allowing only one beam per row of keys (most commonly a horizontal beam). The mechanism of the optical keyboard is very simple – a light beam is sent from the emitter to the receiving sensor, and the actuated key blocks,reflects,refractsor otherwise interacts with the beam, resulting in an identified key. A major advantage of optical switch technology is that it is very resistant to moisture, dust, and debris because there are no metal contacts that can corrode. The specialistDataHandkeyboard uses optical technology to sense keypresses with a single light beam and sensor per key. The keys are held in their rest position bymagnets; when the magnetic force is overcome to press a key, the optical path is unblocked and the keypress is registered. A laser projection device approximately the size of a computer mouse projects the outline of keyboard keys onto a flat surface, such as a table or desk. This type of keyboard is portable enough to be easily used withPDAsand cellphones, and many models have retractable cords and wireless capabilities. However, this design is prone to error, as accidental disruption of the laser will generate unwanted keystrokes. This type of keyboard's inherent lack of tactile feedback makes it often undesirable. Thebuckling springmechanism (expiredU.S. patent 4,118,611) atop the switch is responsible for the clicky response of the keyboard. This mechanism controls a small hammer that strikes a capacitive or membrane switch.[12] IBM'sModel F keyboardseries was the first to employ buckling spring key-switches, which used capacitive sensing to actuate. The original patent was never employed in an actual production keyboard but it establishes the basic premise of a buckling spring. The IBMModel Mis a large family of computer keyboards created by IBM that began in late 1983 when IBM patented a membrane buckling spring key-switch design. The main intent of this design was to halve the production cost of the Model F.[13]The most well known full-size Model M is known officially as the IBM Enhanced Keyboard. In 1993, two years after spawningLexmark,IBMtransferred its keyboard operations to the daughter company. NewModel M keyboardscontinued to be manufactured for IBM by Lexmark until 1996, whenUnicompwas established and purchased the keyboard patents and tooling equipment to continue their production. IBM continued to make Model M's in their Scotland factory until 1999.[14] When a key is pressed, it oscillates (bounces) against its contacts several times before settling. When released, it oscillates again until it comes to rest. Although it happens on a scale too small to be visible to the naked eye, it can be enough to register multiple keystrokes. To resolve this, the processor in a keyboarddebouncesthe keystrokes, by averaging the signal over time to produce one "confirmed" keystroke that (usually) corresponds to a single press or release. Early membrane keyboards had limited typing speed because they had to do significant debouncing. This was a noticeable problem on theZX81.[citation needed] Keycapsare used on full-travel keyboards. While modern keycaps are typically surface-printed, they can also bedouble-shot molded,laser marked,dye sublimation printed,engraved, or made of transparent material with printed paper inserts. There are also keycaps which utilize thin shells that are placed over key bases, which were used on several IBM PC keyboards. Switches allow for the removal and replacement of keycaps with a common stem type. Almost all keyboards which utilize keys two or more units in length (such as the typical space bar or enter key) use stabilizers. Various lubricants and padding techniques can be used to reduce the rattle of components. A modern PC keyboard typically includes a control processor and indicator lights to provide feedback to the user about what state the keyboard is in. Depending on the sophistication of the controller's programming, the keyboard may also offer other special features. The processor is usually a single chip8048microcontrollervariant. The keyboard switch matrix is wired to its inputs and it processes the incoming keystrokes and sends the results down a serial cable (the keyboard cord) to a receiver in the main computer box. It also controls the illumination of the "caps lock", "num lock" and "scroll lock" lights. A common test for whether the computer has crashed is pressing the "caps lock" key. The keyboard sends the key code to thekeyboard driverrunning in the main computer; if the main computer is operating, it commands the light to turn on. All the other indicator lights work in a similar way. The keyboard driver also tracks theshift,altandcontrolstate of the keyboard.[citation needed] The keyboard switch matrix is often drawn with horizontal wires and vertical wires in a grid which is called amatrix circuit. It has a switch at some or all intersections, much like amultiplexed display. Almost all keyboards have only theswitch(but no diode) at each intersection, which causes "ghost keys" and "key jamming" when multiple keys are pressed (rollover). Certain, often more expensive, keyboards have a diode between each intersection, allowing the keyboard microcontroller to accurately sense any number of simultaneous keys being pressed, without generating erroneous ghost keys.[15] Optical character recognition(OCR) is preferable to rekeying for converting existing text that is already written down but not in machine-readable format (for example, aLinotype-composed book from the 1940s). In other words, to convert the text from an image to editable text (that is, a string of character codes), a person could re-type it, or a computer could look at the image and deduce what each character is. OCR technology has already reached an impressive state (for example,Google Book Search) and promises more for the future. Speech recognitionconverts speech into machine-readable text (that is, a string of character codes). This technology has also reached an advanced state and is implemented invarious software products. For certain uses (e.g., transcription of medical or legal dictation; journalism; writing essays or novels) speech recognition is starting to replace the keyboard. However, the lack of privacy when issuing voice commands and dictation makes this kind of input unsuitable for many environments. Pointing devicescan be used to enter text or characters in contexts where using a physical keyboard would be inappropriate or impossible. These accessories typically present characters on a display, in a layout that provides fast access to the more frequently used characters or character combinations. Popular examples of this kind of input areGraffiti,Dasherand on-screenvirtual keyboards. UnencryptedBluetoothkeyboards are known to be vulnerable to signal theft for keylogging by other Bluetooth devices in range.Microsoftwireless keyboards 2011 and earlier are documented to have this vulnerability.[16] Keystroke logging(often called keylogging) is a method of capturing and recording user keystrokes. While it can be used legally to measure employee activity, or by law enforcement agencies to investigate suspicious activities, it is also used byhackersfor illegal or malicious acts. Hackers use keyloggers to obtain passwords or encryption keys. Keystroke logging can be achieved by both hardware and software means. Hardware key loggers are attached to the keyboard cable or installed inside standard keyboards. Software keyloggers work on the target computer's operating system and gain unauthorized access to the hardware, hook into the keyboard with functions provided by the OS, or use remote access software to transmit recorded data out of the target computer to a remote location. Some hackers also use wireless keylogger sniffers to collect packets of data being transferred from a wireless keyboard and its receiver, and then they crack the encryption key being used to secure wireless communications between the two devices. Anti-spywareapplications are able to detect many keyloggers and remove them. Responsible vendors of monitoring software support detection by anti-spyware programs, thus preventing abuse of the software. Enabling afirewalldoes not stop keyloggers per se, but can possibly prevent transmission of the logged material over the net if properly configured.Network monitors(also known as reverse-firewalls) can be used to alert the user whenever an application attempts to make a network connection. This gives the user the chance to prevent the keylogger from "phoning home" with his or her typed information. Automatic form-filling programs can prevent keylogging entirely by not using the keyboard at all. Most keyloggers can be fooled by alternating between typing the login credentials and typing characters somewhere else in the focus window.[17][needs update] Keyboards are also known to emit electromagnetic signatures that can be detected using special spying equipment to reconstruct the keys pressed on the keyboard. Neal O'Farrell, executive director of the Identity Theft Council, revealed to InformationWeek that "More than 25 years ago, a couple of former spooks showed me how they could capture a user's ATM PIN, from a van parked across the street, simply by capturing and decoding the electromagnetic signals generated by every keystroke," O'Farrell said. "They could even capture keystrokes from computers in nearby offices, but the technology wasn't sophisticated enough to focus in on any specific computer."[18] The use of a keyboard may cause serious injury (such ascarpal tunnel syndromeor otherrepetitive strain injuries) to the hands, wrists, arms, neck or back.[19]The risks of injuries can be reduced by taking frequent short breaks to get up and walk around a couple of times every hour. Users should also vary tasks throughout the day, to avoid overuse of the hands and wrists. When typing on a keyboard, a person should keep the shoulders relaxed with the elbows at the side, with the keyboard and mouse positioned so that reaching is not necessary. The chair height and keyboard tray should be adjusted so that the wrists are straight, and the wrists should not be rested on sharp table edges.[20]Wrist or palm rests should not be used while typing.[21] Someadaptive technologyranging from special keyboards, mouse replacements and pen tablet interfaces to speech recognition software can reduce the risk of injury. Pause software reminds the user to pause frequently. Switching to a much more ergonomic mouse, such as avertical mouseor joystick mouse may provide relief. By using atouchpador a stylus pen with agraphic tablet, in place of a mouse, one can lessen the repetitive strain on the arms and hands.[22]
https://en.wikipedia.org/wiki/Alphanumeric_keyboard
Abinary-to-text encodingisencodingofdatainplain text. More precisely, it is an encoding of binary data in a sequence ofprintable characters. These encodings are necessary for transmission of data when thecommunication channeldoes not allow binary data (such asemailorNNTP) or is not8-bit clean.PGPdocumentation (RFC9580) uses the term "ASCII armor" for binary-to-text encoding when referring toBase64. The basic need for a binary-to-text encoding comes from a need to communicate arbitrarybinary dataover preexistingcommunications protocolsthat were designed to carry only English languagehuman-readabletext. Those communication protocols may only be 7-bit safe (and within that avoid certain ASCII control codes), and may requireline breaksat certain maximum intervals, and may not maintainwhitespace. Thus, only the 94printable ASCII charactersare "safe" to use to convey data. TheASCIItext-encoding standard uses 7 bits to encode characters. With this it is possible to encode 128 (i.e. 27) unique values (0–127) to represent the alphabetic, numeric, and punctuation characters commonly used inEnglish, plus a selection ofControl characterswhich do not represent printable characters. For example, the capital letterAis represented in 7 bits as 100 00012, 0x41 (1018) , the numeral2is 011 001020x32 (628), the character}is 111 110120x7D (1758), and theControl characterRETURNis 000 110120x0D (158). In contrast, most computers store data in memory organized in eight-bitbytes. Files that contain machine-executable code and non-textual data typically contain all 256 possible eight-bit byte values. Many computer programs came to rely on this distinction between seven-bittextand eight-bitbinarydata, and would not function properly if non-ASCII characters appeared in data that was expected to include only ASCII text. For example, if the value of the eighth bit is not preserved, the program might interpret a byte value above 127 as a flag telling it to perform some function. It is often desirable, however, to be able to send non-textual data through text-based systems, such as when one might attach an image file to an e-mail message. To accomplish this, the data is encoded in some way, such that eight-bit data is encoded into seven-bit ASCII characters (generally using only alphanumeric and punctuation characters—the ASCII printable characters). Upon safe arrival at its destination, it is then decoded back to its eight-bit form. This process is referred to as binary to text encoding. Many programs perform this conversion to allow for data-transport, such asPGPandGNU Privacy Guard. Binary-to-text encoding methods are also used as a mechanism for encodingplain text. For example: By using a binary-to-text encoding on messages that are already plain text, then decoding on the other end, one can make such systems appear to be completelytransparent. This is sometimes referred to as 'ASCII armoring'. For example, the ViewState component ofASP.NETusesbase64encoding to safely transmit text via HTTP POST, in order to avoiddelimiter collision. The table below compares the most used forms of binary-to-text encodings. The efficiency listed is the ratio between the number of bits in the input and the number of bits in the encoded output. "A Convention forHuman-readable128-bit Keys". A series of small English words is easier for humans to read, remember, and type in than decimal or other binary-to-text encoding systems.[12]Each 64-bit number is mapped to six short words, of one to four characters each, from a public 2048-word dictionary.[11] The 95isprintcodes 32 to 126 are known as theASCII printable characters. Some older and today uncommon formats include BOO,BTOA, and USR encoding. Most of these encodings generate text containing only a subset of allASCIIprintable characters: for example, thebase64encoding generates text that only contains upper case and lower case letters, (A–Z, a–z), numerals (0–9), and the "+", "/", and "=" symbols. Some of these encoding (quoted-printable and percent encoding) are based on a set of allowed characters and a singleescape character. The allowed characters are left unchanged, while all other characters are converted into a string starting with the escape character. This kind of conversion allows the resulting text to be almost readable, in that letters and digits are part of the allowed characters, and are therefore left as they are in the encoded text. These encodings produce the shortest plain ASCII output for input that is mostly printable ASCII. Some other encodings (base64,uuencoding) are based on mapping all possible sequences of sixbitsinto different printable characters. Since there are more than 26= 64 printable characters, this is possible. A given sequence of bytes is translated by viewing it as a stream of bits, breaking this stream in chunks of six bits and generating the sequence of corresponding characters. The different encodings differ in the mapping between sequences of bits and characters and in how the resulting text is formatted. Some encodings (the original version of BinHex and the recommended encoding forCipherSaber) use four bits instead of six, mapping all possible sequences of 4 bits onto the 16 standardhexadecimaldigits. Using 4 bits per encoded character leads to a 50% longer output than base64, but simplifies encoding and decoding—expanding each byte in the source independently to two encoded bytes is simpler than base64's expanding 3 source bytes to 4 encoded bytes. Out ofPETSCII's first 192 codes, 164 have visible representations when quoted: 5 (white), 17–20 and 28–31 (colors and cursor controls), 32–90 (ascii equivalent), 91–127 (graphics), 129 (orange), 133–140 (function keys), 144–159 (colors and cursor controls), and 160–192 (graphics).[13]This theoretically permits encodings, such as base128, between PETSCII-speaking machines.
https://en.wikipedia.org/wiki/Binary-to-text_encoding
Mathematical Alphanumeric Symbolsis aUnicode blockcomprising styled forms ofLatinandGreekletters and decimaldigitsthat enable mathematicians to denote different notions with different letter styles. The letters in various fonts often have specific, fixed meanings in particular areas of mathematics. By providing uniformity over numerous mathematical articles and books, these conventions help to read mathematical formulas. These also may be used to differentiate between concepts that share a letter in a single problem. Unicodenow includes many such symbols (in the range U+1D400–U+1D7FF). The rationale behind this is that it enables design and usage of special mathematical characters (fonts) that include all necessary properties to differentiate from other alphanumerics, e.g. in mathematics anitalicletter "𝐴" can have a different meaning from aromanletter "A". Unicode originally included a limited set of such letter forms in itsLetterlike Symbolsblock before completing the set of Latin and Greek letter forms in this block beginning in version 3.1. Unicode expressly recommends that these characters not be used in general text as a substitute forpresentational markup;[3]the letters are specifically designed to be semantically different from each other. Unicode doesnotinclude a set of normal serif letters in the set.[a]Still they have found some usage onsocial media, for example by people who want a stylized user name,[4]and inemail spam, in an attempt to bypassfilters. All these letter shapes may be manipulated withMathML's attribute mathvariant. The introduction date of some of the more commonly used symbols can be found in theTable of mathematical symbols by introduction date. These tables show all styled forms of Latin and Greek letters, symbols and digits in the Unicode Standard, with the normal unstyled forms of these characters shown with a cyan background (the basic unstyled letters may be serif or sans-serif depending upon the font). The styled characters are mostly located in the Mathematical Alphanumeric Symbols block, but the 24 characters in cells with a pink background are located in theletterlike symbolsblock, for example, ℛ (script capital r) is at U+211B rather than the expected U+1D4AD which is reserved. In the code charts for the Unicode Standard, the reserved code points corresponding to the pink cell are annotated with the name and code point of the correct character.[5]There are a few characters which have names that suggest that they should belong in the tables below, but in fact do not because their official character names are misnomers: The Unicode values of the characters in the tables below, except those shown withpink backgroundsor index values of '–', are obtained by adding the base values from the "U+" header row to the index values in the left column (both values are hexadecimal). The Unicode values of the characters in the tables below, except those shown withyellow backgroundsor index values of '–', are obtained by adding the base values from the "U+" header row to the index values in the left column (both values are hexadecimal). The Unicode values of the characters in the tables below are obtained by adding the hexadecimal base values from the "U+" header row to the index values in the left column. Variation selectorsmay be used to specifychancery(U+FE00) vsroundhand(U+FE01) forms, if acomputer fontis available that supports them: The following Unicode-related documents record the purpose and process of defining specific characters in the Mathematical Alphanumeric Symbols block:
https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols
Anexploit kitis a tool used for automatically managing and deployingexploitsagainst a target computer. Exploit kits allow attackers to delivermalwarewithout having advanced knowledge of the exploits being used.Browser exploitsare typically used, although they may also include exploits targeting common software, such asAdobe Reader, or theoperating systemitself. Most kits are written inPHP.[1] Exploit kits are often sold on theblack market, both as standalone kits, and as aservice. Some of the first exploit kits wereWebAttackerandMPack, both created in 2006. They were sold on black markets, enabling attackers to use exploits without advanced knowledge ofcomputer security.[2][3] TheBlackhole exploit kitwas released in 2010, and could either be purchased outright, or rented for a fee.[4]Malwarebytes stated that Blackhole was the primary method of delivering malware in 2012 and much of 2013.[5]After the arrest of the authors in late 2013, use of the kit sharply declined.[5][6][7] Neutrino was first detected in 2012,[8]and was used in a number ofransomwarecampaigns. It exploited vulnerabilities inAdobe Reader, theJava Runtime Environment, andAdobe Flash.[9]Following a joint-operation betweenCisco TalosandGoDaddyto disrupt a Neutrinomalvertisingcampaign,[10]the authors stopped selling the kit, deciding to only provide support and updates to previous clients. Despite this, development of the kit continued, and new exploits were added.[11]As of April 2017, Neutrino activity ceased.[12]On June 15, 2017,F-Securetweeted "R.I.P. Neutrino exploit kit. We'll miss you (not)." with a graph showing the complete decline of Neutrino detections.[13] From 2017 onwards, the usage of exploit kits has dwindled. There are a number of factors which may have caused this, including arrests of cybercriminals, improvements in security making exploitation harder, and cybercriminals turning to other method of malware delivery, such asMicrosoft Officemacrosandsocial engineering.[14] There are many systems that work to protect against attacks from exploit kits. These includegateway anti-virus, intrusion prevention, and anti-spyware. There are also ways for subscribers to receive these prevention systems on a continuous basis, which helps them to better defend themselves against attacks.[15] The general process of exploitation by an exploit kit is as follows: Exploit kits employ a variety ofevasion techniquesto avoid detection. Some of these techniques includeobfuscatingthe code,[17]and usingfingerprintingto ensure malicious content is only delivered to likely targets.[18][1] Modern exploit kits include features such asweb interfacesand statistics, tracking the number of visitors and victims.[1]
https://en.wikipedia.org/wiki/Exploit_kit
InDOS memory management,conventional memory, also calledbase memory, is the first 640kilobytesof the memory onIBM PCor compatible systems. It is the read-write memory directly addressable by the processor for use by the operating system and application programs. As memory prices rapidly declined, this design decision became a limitation in the use of large memory capacities until the introduction of operating systems and processors that made it irrelevant. The640 KB barrieris an architectural limitation ofIBM PC compatiblePCs. TheIntel 8088CPU, used in theoriginal IBM PC, was able to address 1 MB (220bytes), since the chip offered 20address lines. In the design of the PC, the memory below 640 KB was forrandom-access memoryon the motherboard or on expansion boards, and it was called the conventional memory area.The first memory segment (64 KB) of the conventional memory area is namedlower memoryorlow memory area. The remaining 384 KB beyond the conventional memory area, called theupper memory area(UMA), was reserved for system use and optional devices. UMA was used for theROM BIOS, additionalread-only memory, BIOS extensions for fixed disk drives and video adapters, video adapter memory, and othermemory-mapped input and output devices. The design of the original IBM PC placed theColor Graphics Adapter(CGA) memory map in UMA. The need for more RAM grew faster than the needs of hardware to utilize the reserved addresses, which resulted in RAM eventually being mapped into these unused upper areas to utilize all available addressable space. This introduced a reserved "hole" (or several holes) into the set of addresses occupied by hardware that could be used for arbitrary data. Avoiding such a hole was difficult and ugly and not supported byDOSor most programs that could run on it. Later, space between the holes would be used as upper memory blocks (UMBs). To maintain compatibility with older operating systems and applications, the 640 KB barrier remained part of the PC design even after the 8086/8088 had been replaced with theIntel 80286processor, which could address up to 16 MB of memory inprotected mode. The 1 MB barrier also remained as long as the 286 was running inreal mode, since DOS required real mode which uses the segment and offset registers in an overlapped manner such that addresses with more than 20 bits are not possible. It is still present in IBM PC compatibles today if they are running in real mode such as used by DOS. Even the most modern Intel PCs still have the area between 640 and 1024KBreserved.[3][4]This however is invisible to programs (or even most of the operating system) on newer operating systems (such asWindows,Linux, orMac OS X) that usevirtual memory, because they have no awareness of physical memory addresses at all. Instead they operate within a virtual address space, which is defined independently of available RAM addresses.[5] Some motherboards feature a "Memory Hole at 15 Megabytes" option required for certain VGA video cards that require exclusive access to one particular megabyte for video memory. Later video cards using theAGP(PCI memory space) bus can have 256 MB memory with 1 GBaperture size. One technique used on earlyIBM XTcomputers was to install additional RAM into the video memory address range and push the limit up to the start of theMonochrome Display Adapter(MDA). Sometimes software or a customaddress decoderwas required for this to work. This moved the barrier to 704 KB (with MDA/HGC) or 736 KB (with CGA).[6][7] Memory managerson386-basedsystems (such asQEMMor MEMMAX (+V) inDR-DOS) could achieve the same effect, adding conventional memory at 640 KB and moving the barrier to 704 KB (up to segment B000, the start of MDA/HGC) or 736 KB (up to segment B800, the start of the CGA).[7]Only CGA could be used in this situation, becauseEnhanced Graphics Adapter(EGA) video memory was immediately adjacent to the conventional memory area below the 640 KB line; the same memory area could not be used both for theframe bufferof the video card and for transient programs. All Computers' piggy-back add-onmemory management unitsAllCardfor XT-[8][9]andChargecard[10]for 286/386SX-class computers, as well as MicroWay's ECM (Extended Conventional Memory) add-on-board[11]allowed normal memory to be mapped into the A0000–EFFFF (hex) address range, giving up to 952 KB for DOS programs. Programs such asLotus 1-2-3, which accessed video memory directly, needed to bepatchedto handle this memory layout. Therefore, the 640 KB barrier was removed at the cost of hardware compatibility.[10] It was also possible to useconsole redirection[12](either by specifying an alternative console device likeAUX:when initially invokingCOMMAND.COMor by usingCTTYlater on) to direct output to and receive input from adumb terminalor another computer running aterminal emulator. Assuming theSystem BIOSstill permitted the machine to boot (which is often the case at least with BIOSes for embedded PCs), the video card in a so calledheadless computercould then be removed completely, and the system could provide a total of 960 KB of continuous DOS memory for programs to load. Similar usage was possible on many DOS- but not IBM-compatible computers with a non-fragmented memory layout, for exampleSCPS-100 bussystems equipped with their8086CPU card CP-200B and up to sixteen SCP 110A memory cards (with 64 KB RAM on each of them) for a total of up to 1024 KB (without video card, but utilizing console redirection, and after mapping out the boot/BIOS ROM),[13]theVictor 9000/Sirius 1which supported up to 896 KB, or theApricot PCwith more continuous DOS memory to be used under its custom version of MS-DOS. Most standard programs written for DOS did not necessarily need 640 KB or more of memory. Instead, driver software and utilities referred to asterminate-and-stay-resident programs(TSRs) could be used in addition to the standard DOS software. These drivers and utilities typically used some conventional memory permanently, reducing the total available for standard DOS programs. Some very common DOS drivers and TSRs using conventional memory included: As can be seen above, many of these drivers and TSRs could be considered practically essential to the full-featured operation of the system. But in many cases a choice had to be made by the computer user, to decide whether to be able to run certain standard DOS programs or have all their favorite drivers and TSRs loaded. Loading the entire list shown above is likely either impractical or impossible, if the user also wants to run a standard DOS program as well. In some cases drivers or TSRs would have to be unloaded from memory to run certain programs, and then reloaded after running the program. For drivers that could not be unloaded, later versions of DOS included a startup menu capability to allow the computer user to select various groups of drivers and TSRs to load before running certain high-memory-usage standard DOS programs. As DOS applications grew larger and more complex in the late 1980s and early 1990s, it became common practice to free up conventional memory by moving the device drivers and TSR programs into upper memory blocks (UMBs) in theupper memory area(UMA) at boot, in order to maximize the conventional memory available for applications. This had the advantage of not requiring hardware changes, and preserved application compatibility. This feature was first provided by third-party products such asQEMM, before being built intoDR DOS 5.0in 1990 thenMS-DOS 5.0in 1991. Most users used the accompanyingEMM386driver provided in MS-DOS 5, but third-party products from companies such asQEMMalso proved popular. At startup, drivers could be loaded high using the "DEVICEHIGH=" directive, while TSRs could be loaded high using the "LOADHIGH", "LH" or "HILOAD" directives. If the operation failed, the driver or TSR would automatically load into the regular conventional memory instead. CONFIG.SYS, loading ANSI.SYS into UMBs, no EMS support enabled: AUTOEXEC.BAT, loading MOUSE, DOSKEY, and SMARTDRV into UMBs if possible: The ability of DOS versions 5.0 and later to move their own system core code into thehigh memory area(HMA) through theDOS=HIGH command gave another boost to free memory. Hardware expansion boards could use any of the upper memory area for ROM addressing, so the upper memory blocks were of variable size and in different locations for each computer, depending on the hardware installed. Some windows of upper memory could be large and others small. Loading drivers and TSRs high would pick a block and try to fit the program into it, until a block was found where it fit, or it would go into conventional memory. An unusual aspect of drivers and TSRs is that they would use different amounts of conventional and/or upper memory, based on the order they were loaded. This could be used to advantage if the programs were repeatedly loaded in different orders, and checking to see how much memory was free after each permutation. For example, if there was a 50 KB UMB and a 10 KB UMB, and programs needing 8 KB and 45 KB were loaded, the 8 KB might go into the 50 KB UMB, preventing the second from loading. Later versions of DOS allowed the use of a specific load address for a driver or TSR, to fit drivers/TSRs more tightly together. In MS-DOS 6.0, Microsoft introducedMEMMAKER, which automated this process of block matching, matching the functionality third-partymemory managersoffered. This automatic optimization often still did not provide the same result as doing it by hand, in the sense of providing the greatest free conventional memory. Also in some cases third-party companies wrote special multi-function drivers that would combine the capabilities of several standard DOS drivers and TSRs into a single very compact program that used just a few kilobytes of memory. For example, the functions of mouse driver, CD-ROM driver, ANSI support, DOSKEY command recall, and disk caching would all be combined together in one program, consuming just 1 – 2 kilobytes of conventional memory for normal driver/interrupt access, and storing the rest of the multi-function program code in EMS or XMS memory. The barrier was only overcome with the arrival ofDOS extenders, which allowed DOS applications to run in 16-bit or 32-bitprotected mode, but these were not very widely used outside ofcomputer gaming. With a 32-bit DOS extender, a game could benefit from a 32-bit flat address space and the full 32-bit instruction set without the 66h/67h operand/address override prefixes. 32-bit DOS extenders required compiler support (32-bit compilers) whileXMSandEMSworked with an old compiler targeting 16-bit real-mode DOS applications. The two most common specifications for DOS extenders wereVCPI- and laterDPMI-compatible with Windows 3.x. The most notable DPMI-compliant DOS extender may beDOS/4GW, shipping withWatcom. It was very common in games for DOS. Such a game would consist of either a DOS/4GW 32-bit kernel, or a stub which loaded a DOS/4GW kernel located in the path or in the same directory and a 32-bit "linear executable". Utilities are available which can strip DOS/4GW out of such a program and allow the user to experiment with any of the several, and perhaps improved, DOS/4GW clones. Prior to DOS extenders, if a user installed additional memory and wished to use it under DOS, they would first have to install and configure drivers to support eitherexpanded memoryspecification (EMS) orextended memoryspecification (XMS) and run programs supporting one of these specifications. EMS was a specification available on all PCs, including those based on theIntel 8086andIntel 8088, which allowed add-on hardware to page small chunks of memory in and out (bank switching) of the "real mode" addressing space (0x0400–0xFFFF). This allowed 16-bit real-mode DOS programs to access several megabytes of RAM through a hole in real memory, typically (0xE000–0xEFFF). A program would then have to explicitly request the page to be accessed before using it. These memory locations could then be used arbitrarily until replaced by another page. This is very similar to modern pagedvirtual memory. However, in a virtual memory system, the operating system handles allpagingoperations, while paging was explicit with EMS. XMS provided a basic protocol which allowed a 16-bit DOS programs to load chunks of 80286 or 80386 extended memory in low memory (address 0x0400–0xFFFF). A typical XMS driver had to switch to protected mode in order to load this memory. The problem with this approach is that while in 286 protected mode, direct DOS calls could not be made. The workaround was to implement a callback mechanism, requiring a reset of the 286. On the 286, this was a major problem. TheIntel 80386, which introduced "virtual 8086 mode", allowed the guest kernel to emulate the 8086 and run the host operating system without having to actually force the processor back into "real mode".HIMEM.SYS2.03 and higher usedunreal modeon the 80386 and higher CPUs while HIMEM.SYS 2.06 and higher usedLOADALLto change undocumented internal registers on the 80286, significantly improving interrupt latency by avoiding repeated real mode/protected mode switches.[14] Windows installs its own version of HIMEM.SYS[15]on DOS 3.3 and higher. Windows HIMEM.SYS launches 32-bit protected mode XMS (n).0 services provider for the Windows Virtual Machine Manager, which then provides XMS (n-1).0 services to DOS boxes and the 16-bit Windows machine (e.g. DOS 7 HIMEM.SYS is XMS 3.0 but running 'MEM' command in a Windows 95 DOS window shows XMS 2.0 information).
https://en.wikipedia.org/wiki/Console_redirection
This article listscommandsprovided byMS-DOScompatibleoperating systems, especially as used onIBM PC compatibles. Many unrelated disk operating systems usethe DOS acronymand are not part of the scope of this list. Some commands are implemented asbuilt-into thecommand interpreterwhile others are externalapplications. Over multiple generations, commands were added for additional functions. InWindows, the legacy shellCommand Promptprovides many of these commands. The command interpreter for DOS runs when no application programs are running. When an application exits, if the transient portion of the command interpreter in memory was overwritten, DOS will reload it from disk. Some commands are internal—built into COMMAND.COM; others are external commands stored on disk. When the user types a line of text at the operating system command prompt, COMMAND.COM will parse the line and attempt to match a command name to a built-in command or to the name of an executable program file orbatch fileon disk. If no match is found, an error message is printed, and the command prompt is refreshed. External commands were too large to keep in the command processor, or were less frequently used. Such utility programs would be stored on disk and loaded just like regular application programs but were distributed with the operating system. Copies of these utility command programs had to be on an accessible disk, either on the current drive or on the commandpathset in the command interpreter. In the list below, commands that can accept more than one file name, or a filename including wildcards (* and ?), are said to accept afilespec(file specification) parameter. Commands that can accept only a single file name are said to accept afilenameparameter. Additionally, command line switches, or other parameter strings, can be supplied on the command line. Spaces and symbols such as a "/" or a "-" may be used to allow the command processor to parse the command line into filenames, file specifications, and other options. The command interpreter preserves the case of whatever parameters are passed to commands, but the command names themselves and file names are case-insensitive. Many commands are the same across many DOS systems, but some differ in command syntax or name. A partial list of the most common commands forMS-DOSandIBM PC DOSfollows below. Sets the path to be searched for data files or displays the current search path. The APPEND command is similar to the PATH command that tells DOS where to search for program files (files with a .COM, . EXE, or .BAT file name extension). The command is available in MS-DOS versions 3.2 and later.[1] The command redirects requests for disk operations on one drive to a different drive. It can also display drive assignments or reset all drive letters to their original assignments. The command is available in MS-DOS versions 3 through 5 and IBM PC DOS releases 2 through 5.[1] Lists connections and addresses seen by WindowsATMcall manager. Attrib changes or views the attributes of one or more files. It defaults to display the attributes of all files in the current directory. The file attributes available include read-only, archive, system, and hidden attributes. The command has the capability to process whole folders and subfolders of files and also process all files. The command is available in MS-DOS versions 3 and later.[1] These are commands tobackupand restore files from an external disk. These appeared in version 2, and continued toPC DOS5 and MS-DOS 6 (PC DOS 7 had a deversioned check). In DOS 6, these were replaced by commercial programs (CPBACKUP, MSBACKUP), which allowed files to be restored to different locations.[1] An implementation of theBASICprogramming language for PCs. Implementing BASIC in this way was very common in operating systems on 8- and 16-bit machines made in the 1980s. IBMcomputers had BASIC 1.1 in ROM, and IBM's versions of BASIC used code in this ROM-BASIC, which allowed for extra memory in the code area. BASICA last appeared inIBM PC DOS5.02, and inOS/2(2.0 and later), the version had ROM-BASIC moved into the program code. Microsoft releasedGW-BASICfor machines with no ROM-BASIC. Some OEM releases had basic.com and basica.com as loaders for GW-BASIC.EXE. BASIC was dropped after MS-DOS 4, and PC DOS 5.02. OS/2 (which uses PC DOS 5), has it, while MS-DOS 5 does not. This command is used to instruct DOS to check whether theCtrlandBreakkeys have been pressed before carrying out a program request. The command is available in MS-DOS versions 2 and later.[1] Starts a batch file from within another batch file and returns when that one ends. The command is available in MS-DOS versions 3.3 and later.[1] The CHDIR (or the alternative name CD) command either displays or changes the current workingdirectory. The command is available in MS-DOS versions 2 and later.[1] The command either displays or changes the activecode pageused to displaycharacter glyphsin aconsole window. Similar functionality can be achieved withMODECON: CP SELECT=yyy. The command is available in MS-DOS versions 3.3 and later.[1] CHKDSK verifies a storagevolume(for example, ahard disk,disk partitionorfloppy disk) for file system integrity. The command has the ability to fix errors on a volume and recover information from defectivedisk sectorsof a volume. The command is available in MS-DOS versions 1 and later.[1] The CHOICE command is used in batch files to prompt the user to select one item from a set of single-characterchoices. Choice was introduced as an external command with MS-DOS 6.0;[1][2]Novell DOS7[3]and PC DOS 7.0. Earlier versions ofDR-DOSsupported this function with the built-inswitchcommand (for numeric choices) or by beginning a command with a question mark.[3]This command was formerly called ync (yes-no-cancel). The CLS or CLRSCR command clears theterminal screen. The command is available in MS-DOS versions 2 and later.[1] Start a new instance of the command interpreter. The command is available in MS-DOS versions 1 and later.[1] Show differences between any two files, or any two sets of files. The command is available in MS-DOS versions 3.3 through 5 and IBM PC DOS releases 1 through 5.[1] Makes copies of existing files. The command is available in MS-DOS versions 1 and later.[1] Defines theterminaldevice (for example, COM1) to use for input and output.[4] The command is available in MS-DOS versions 2 and later.[1] Displays thesystem dateand prompts the user to enter a new date. Complements theTIMEcommand. The command is available in MS-DOS versions 1 and later.[1] (Not a command: This is a batch file added to DOS 6.X Supplemental Disks to help create DoubleSpace boot floppies.[5]) Adisk compressionutility supplied with MS-DOS version 6.0 (released in 1993) and version 6.2.[1] A very primitive assembler and disassembler. The command has the ability to analyze the file fragmentation on a disk drive or todefragmenta drive. This command is called DEFRAG in MS-DOS/PC DOS anddiskoptinDR-DOS. The command is available in MS-DOS versions 6 and later.[1] DEL (or the alternative form ERASE) is used to delete one or more files. The command is available in MS-DOS versions 1 and later.[1] Deletes a directory along with all of the files and subdirectories that it contains. Normally, it will ask for confirmation of the potentially dangerous action. Since the RD (RMDIR) command can not delete a directory if the directory is not empty (except in Windows NT & 10), the DELTREE command can be used to delete the whole directory. Thedeltreecommand is included in certain versions ofMicrosoft WindowsandMS-DOSoperating systems. It is specifically available only in versions ofMS-DOS6.0 and higher,[1]and inMicrosoft Windows 9x. In Windows NT, the functionality provided exists but is handled by the commandrdorrmdirwhich has slightly different syntax. This command is not present in Windows 7 and 8. In Windows 10, the command switch isRD /SorRMDIR /S. The DIR command displays the contents of a directory. The contents comprise the disk's volume label and serial number; one directory or filename per line, including the filename extension, the file size in bytes, and the date and time the file was last modified; and the total number of files listed, their cumulative size, and the free space (in bytes) remaining on the disk. The command is one of the few commands that exist from the first versions of DOS.[1]The command can display files in subdirectories. The resulting directory listing can be sorted by various criteria and filenames can be displayed in a chosen format. A command for comparing the complete contents of afloppy diskto another one. The command is available in MS-DOS versions 3.2 and later and IBM PC DOS releases 1 and later.[1] A command for copying the complete contents of a diskette to another diskette. The command is available in MS-DOS versions 2 and later.[1] A command that addscommand history,macrofunctionality, and improved editing features to the command-line interpreter. The command is available in MS-DOS versions 5 and later.[1] Displays how much memory various DOS components occupy.[6] Adisk compressionutility supplied with MS-DOS version 6.22.[1] The ECHO command prints its own arguments back out to the DOS equivalent of thestandard output stream.(Hence the name, ECHO) Usually, this means directly to the screen, but the output ofechocan be redirected, like any other command, to files or devices. Often used inbatch filesto print text out to the user. Another important use of the echo command is to toggle echoing of commands on and off in batch files. Traditionally batch files begin with the@echo offstatement. This says to the interpreter that echoing of commands should be off during the whole execution of the batch file, thus resulting in a "tidier" output (the@symbol declares that this particular command (echo off) should also be executed without echo.) The command is available in MS-DOS versions 2 and later.[1] EDIT is a full-screentext editor, included with MS-DOS versions 5 and 6,[1]OS/2 and Windows NT to 4.0. The corresponding program in Windows 95 and later, and Windows 2000 and later is Edit v2.0. PC DOS 6 and later use theDOSEEditorand DR-DOS usededitorup to version 7. DOS line-editor. It can be used with a script file, like debug, this makes it of some use even today. The absence of a console editor in MS-DOS/PC DOS 1–4 created an after-market for third-party editors. In DOS 5, an extra command "?" was added to give the user much-needed help. DOS 6 was the last version to contain EDLIN; for MS-DOS 6, it's on the supplemental disks,[1]while PC DOS 6 had it in the base install. Windows NT 32-bit, and OS/2 have Edlin. The EMM386 command enables or disables EMM386 expanded-memory support on a computer with an80386or higher processor. The command is available in MS-DOS versions 5 and later.[1] See:DEL and ERASE Converts anexecutable(.exe) file into abinary filewith theextension.com, which is a memory image of the program. The size of the residentcodeanddata sectionscombined in the input .exe file must be less than 64 KB. The file must also have nostack segment. The command is available in MS-DOS versions 1 through 5. It is available separately for version 6 on the Supplemental Disk.[1] Exits the current command processor. If the exit is used at the primary command, it has no effect unless in a DOS window under Microsoft Windows, in which case the window is closed and the user returns to the desktop. The command is available in MS-DOS versions 2 and later.[1] The Microsoft File Expansion Utility is used to uncompress one or more compressedcabinet files(.CAB). The command dates back to 1990 and was supplied on floppy disc for MS-DOS versions 5 and later.[7][1] FAKEMOUS is an IBM PS/2 mouse utility used withAccessDOS. It is included on the MS-DOS 6 Supplemental Disk.[8][9]AccessDOS assists persons with disabilities. Provides information for MS-DOS commands. A command that provides accelerated access to frequently-usedfiles and directories. The command is available in MS-DOS versions 3.3 and later.[1] Show differences between any two files, or any two sets of files. The command is available in MS-DOS versions 2 and later – primarily non-IBM releases.[1] The FDISK command manipulates hard diskpartition tables. The name derives from IBM's habit of calling hard drivesfixed disks. FDISK has the ability to display information about, create, and delete DOS partitions orlogical DOS drive. It can also install a standardmaster boot recordon the hard drive. The command is available in MS-DOS versions 3.2 and later and IBM PC DOS 2.0 releases and later.[1] The FIND command is afilterto find lines in the inputdata streamthat contain or don't contain a specifiedstringand send these to the output data stream. It may also be used as apipe. The command is available in MS-DOS versions 2 and later.[1] The FINDSTR command is a GREP-orientedFIND-like utility. Among its uses is the logical-OR lacking in FIND. Iteration: repeats a command for each out of a specified set of files. The FOR loop can be used toparsea file or the output of a command. The command is available in MS-DOS versions 2 and later.[1] Deletes theFATentries and theroot directoryof the drive/partition, and reformats it for MS-DOS. In most cases, this should only be used on floppy drives or otherremovable media. This command can potentially erase everything on a computer's drive. The command is available in MS-DOS versions 1 and later.[1] TheGotocommand transfers execution to a specified label. Labels are specified at the beginning of a line, with a colon (:likethis). The command is available in MS-DOS versions 2 and later.[1] Used inBatch files. The GRAFTABL command enables the display of an extended character set in graphics mode.[10] The command is available in MS-DOS versions 3 through 5.[1] A TSR program to enable the sending of graphical screen dump to printer by pressing <Print Screen>. The command is available in MS-DOS versions 3.2 and later and IBM PC DOS releases 2 and later.[1] Gives help about DOS commands. The command is available in MS-DOS versions 5 thru Windows XP. Full-screen command help is available in MS-DOS versions 6 and later.[1]Beginning with Windows XP, the command processor "DOS" offers builtin-help for commands by using/?(e.g.COPY /?) IF is a conditional statement, that allows branching of the program execution. It evaluates the specified condition, and only if it is true, then it executes the remainder of the command line. Otherwise, it skips the remainder of the line and continues with next command line. Used inBatch files. The command is available in MS-DOS versions 2 and later.[1] In MS-DOS;filelinkin DR-DOS. Network PCs using anull modemcable orLapLink cable. The server-side version of InterLnk, it also immobilizes the machine it's running on as it is an active app (As opposed to aterminate-and-stay-resident program) which must be running for any transfer to take place. DR-DOS'filelinkis executed on both the client and server. New in PC DOS 5.02, MS-DOS 6.0.[11][1] The JOIN command attaches a drive letter to a specified directory on another drive.[11]The opposite can be achieved via theSUBSTcommand. The command is available in MS-DOS versions 3 through 5. It is available separately for versions 6.2 and later on the Supplemental Disk.[1] The KEYB command is used to select a keyboard layout. The command is available in MS-DOS versions 3.3 and later.[1] From DOS 3.0 through 3.21, there are instead per-country commands, namely KEYBFR, KEYBGR, KEYBIT, KEYBSP and KEYBUK. Changes the label on a logical drive, such as a hard disk partition or a floppy disk. The command is available in MS-DOS versions 3.1 and later and IBM PC DOS releases 3 and later.[1] Used in the CONFIG.SYS file to set the maximum number of drives that can be accessed. The command is available in MS-DOS versions 3.0 and later.[12] Microsoft 8086 Object Linker[13] Loads a program above the first 64K of memory, and runs the program. The command is available in MS-DOS versions 5 and later.[1]It is included only in MS-DOS/PC DOS. DR-DOS usedmemmax, which opened or closed lower, upper, and video memory access, to block the lower 64K of memory.[14] A command that loads a program into the upper memory area. The command is available in MS-DOS versions 5 and later.[1] It is calledhiloadin DR-DOS. Makes a newdirectory. The parent of the directory specified will be created if it does not already exist. The command is available in MS-DOS versions 2 and later.[1] Displays memory usage. It is capable of displaying program size and status, memory in use, and internal drivers. It is an external command. The command is available in MS-DOS versions 4 and later and DR DOS releases 5.0 and later.[1] On earlier DOS versions the memory usage could be shown by runningCHKDSK. In DR DOS the parameter/Acould be used to only show the memory usage. Starting with version 6,[1]MS-DOS included the external program MemMaker which was used to free system memory (especiallyConventional memory) by automatically reconfiguring theAUTOEXEC.BATandCONFIG.SYSfiles. This was usually done by moving TSR programs anddevice driversto theupper memory. The whole process required two system restarts. Before the first restart the user was asked whether to enableEMS Memory, since use of expanded memory required a reserved 64KiB region in upper memory. The first restart inserted the SIZER.EXE program which gauged the memory needed by each TSR or Driver. MemMaker would then calculate the optimal Driver and TSR placement in upper memory and modify the AUTOEXEC.BAT and CONFIG.SYS accordingly, and reboot the second time.[15] MEMMAKER.EXE and SIZER.EXE were developed for Microsoft byHelix Software Companyand were eliminated starting inMS-DOS 7(Windows 95); however, they could be obtained from Microsoft's FTP server as part of the OLDDOS.EXE package, alongside other tools. PC DOS uses another program called RamBoost to optimize memory, working either with PC DOS'sHIMEM/EMM386or a third-party memory manager. RamBoost was licensed to IBM byCentral Point Software. The MIRROR command saves disk storage information that can be used to recover accidentally erased files. The command is available in MS-DOS version 5. It is available separately for versions 6.2 and later on Supplemental Disk.[1] Configures system devices. Changes graphics modes, adjusts keyboard settings, preparescode pages, and sets up port redirection.[16] The command is available in MS-DOS versions 3.2 and later and IBM PC DOS releases 1 and later.[1] The MORE commandpaginatestext, so that one can view files containing more than one screen of text.Moremay also be used as afilter. While viewing MORE text, the return key displays the next line, the space bar displays the next page. The command is available in MS-DOS versions 2 and later.[1] Moves files or renames directories. The command is available in MS-DOS versions 6 and later.[1] DR-DOS used a separate command for renaming directories,rendir. A command that scans the computer for known viruses.[17][18] The command is available in MS-DOS versions 6 and later.[1] The MSBACKUP command is used to backup or restore one or more files from one disk to another. TheNew York Timessaid thatMSBACKUP"is much better and faster than the old BACKUP command used in earlier versions of DOS, but it does lack some of the advanced features found in backup software packages that are sold separately.[19]There is another offering, named MWBACKUP, that isGUI-oriented. It was introduced for Windows for Workgroups (3.11).[20] The MSBACKUP command is available in MS-DOS versions 6 and later.[1] MSCDEX is a driver executable which allowsDOSprograms to recognize, read, and controlCD-ROMs. The command is available in MS-DOS versions 6 and later.[1] The MSD command provides detailed technical information about the computer's hardware and software. MSD was new in MS-DOS 6;[1][21]the PC DOS version of this command is QCONFIG.[22]The command appeared first in Word2, and then in Windows 3.10. The MSHERC.COM (also QBHERC.COM) was a TSR graphics driver supplied with Microsoft QuickC, QuickBASIC, and the C Compiler, to allow use of the Hercules adapter high-resolution graphics capability (720 x 348, 2 colors).[23] Loads extended Nationalization and Localization Support from COUNTRY.SYS, and changed the codepage of drivers and system modules resident in RAM.[citation needed] In later versions of DR-DOS 6, NLSFUNC relocated itself into the HiMem area, thereby freeing a portion of the nearly invaluable lower 640KiB that constituted the ”conventional” memory available to software.[citation needed] The command is available in MS-DOS versions 3.3 and later.[1] Displays or sets a searchpathfor executable files. The command is available in MS-DOS versions 2 and later.[1] Suspends processing of a batch program and displays the messagePress any key to continue. . ., if not given other text to display. The command is available in MS-DOS versions 1 and later.[1] Allows the user to test the availability of a network connection to a specified host. Hostnames are usually resolved to IP addresses.[24] It is not included in many DOS versions; typically ones with network stacks will have it as a diagnostic tool. The POWER command is used to turn power management on and off, report the status of power management, and set levels of power conservation. It is an external command implemented as POWER.EXE.[25] The command is available in MS-DOS versions 6 and later.[1] The PRINT command adds or removes files in theprint queue. This command was introduced in MS-DOS version 2.[1]Before that there was no built-in support for background printing files. The user would usually use the copy command to copy files to LPT1. ThePROMPTcommand allows the user to change the prompt in the command screen. The default prompt is$p(i.e.PROMPT $p), which displays the drive and current path as the prompt, but can be changed to anything.PROMPT $d, displays the current system date as the prompt. TypePROMPT /?in the cmd screen for help on this function. The command is available in MS-DOS versions 2 and later and IBM PC DOS releases 2.1 and later.[1] A utility inspired by the UNIX/XENIXpscommand. It also provides a full-screen mode, similar to thetoputility on UNIX systems.[6] Anintegrated development environmentandBASICinterpreter. The command is available in MS-DOS versions 5 and later.[1] Remove a directory (delete a directory); by default the directories must be empty of files for the command to succeed. The command is available in MS-DOS versions 2 and later.[1] Thedeltreecommand in some versions of MS-DOS and all versions ofWindows 9xremoves non-empty directories. A primitivefilesystemerror recovery utility included in MS-DOS / IBM PC DOS. The command is available in MS-DOS versions 2 through 5.[1] Remark (comment) command, normally used within abatch file, and for DR-DOS, PC/MS-DOS 6 and above, in CONFIG.SYS. This command is processed by the command processor. Thus, its output can be redirected to create a zero-byte file. REM is useful in logged sessions or screen-captures. One might add comments by way of labels, usually starting with double-colon (::). These are not processed by the command processor. The REN command renames a file. Unlike themovecommand, this command cannot be used to rename subdirectories, or rename files across drives. Mass renames can be accomplished by the use of the wildcards characters asterisk (*) and question mark (?).[26] The command is available in MS-DOS versions 1 and later.[1] A command that is used to replace one or more existingcomputer filesor add new files to a targetdirectory. The command is available in MS-DOS versions 3.2 and later.[1] See:BACKUP and RESTORE Disk diagnostic utility. Scandisk was a replacement for thechkdskutility, starting with MS-DOS version 6.2 and later.[1]Its primary advantages overchkdskis that it is more reliable and has the ability to run a surface scan which finds and marks bad clusters on the disk. It also provided mouse point-and-clickTUI, allowing for interactive session to complement command-line batch run.chkdskhad surface scan and bad cluster detection functionality included, and was used again on Windows NT-based operating systems. The SELECT command formats a disk and installs country-specific information and keyboard codes. It was initially only available with IBM PC DOS. The version included with PC DOS 3.0 and 3.1 is hard-coded to transfer the operating system from A: to B:, while from PC DOS 3.2 onward you can specify the source and destination, and can be used to install DOS to the harddisk. The version included with MS-DOS 4 and PC DOS 4 is no longer a simple command-line utility, but a full-fledged installer. The command is available in MS-DOS versions 3.3 and 4 and IBM PC DOS releases 3 through 4.[1] This command is no longer included in DOS Version 5 and later, where it has been replaced by SETUP. Setsenvironment variables. The command is available in MS-DOS versions 2 and later.[1] cmd.exein Windows NT 2000, 4DOS, 4OS2, 4NT, and a number of third-party solutions allow direct entry of environment variables from the command prompt. From at least Windows 2000, thesetcommand allows for the evaluation of strings into variables, thus providinginter aliaa means of performing integer arithmetic.[27] The command is available in MS-DOS versions 5 and later.[1]This command does a computer setup. With all computers running DOS versions 5 and later, it runs the computer setup, such as Windows 95 setup and Windows 98 setup. SetVer is a TSR program designed to return a different value to the version of DOS that is running. This allows programs that look for a specific version of DOS to run under a different DOS. The command is available in MS-DOS versions 5 and later.[1] Installs support for file sharing and locking capabilities. The command is available in MS-DOS versions 3 and later.[1] The SHIFT command increases number ofreplaceable parametersto more than the standard ten for use inbatch files. This is done by changing the position of replaceable parameters. It replaces each of the replacement parameters with the subsequent one (e.g.%0with%1,%1with%2, etc.). The command is available in MS-DOS versions 2 and later.[1] The external command SIZER.EXE is not intended to be started directly from the command prompt. Is used byMemMakerduring the memory-optimization process. The command is available in MS-DOS versions 6 and later.[1] Afilterto sort lines in the input data stream and send them to the output data stream. Similar to the Unix commandsort. Handles files up to 64k. This sort is always case insensitive.[28] The command is available in MS-DOS versions 2 and later.[1] A utility to map a subdirectory to a drive letter.[11]The opposite can be achieved via theJOINcommand. The command is available in MS-DOS versions 3.1 and later.[1] A utility to make a volume bootable. Sys rewrites the Volume Boot Code (the first sector of the partition that SYS is acting on) so that the code, when executed, will look forIO.SYS. SYS also copies the core DOS system files, IO.SYS,MSDOS.SYS, andCOMMAND.COM, to the volume. SYS doesnotrewrite the Master Boot Record, contrary to widely held belief. The command is available in MS-DOS versions 1 and later.[1] The Telnet Client is a tool for developers and administrators to help manage and test network connectivity.[29] Display thesystem timeand waits for the user to enter a new time. Complements theDATEcommand. The command is available in MS-DOS versions 1 and later.[1] Enables a user to change the title of their MS-DOS window. It is an external command, graphically displays the path of each directory and sub-directories on the specified drive. The command is available in MS-DOS versions 3.2 and later and IBM PC DOS releases 2 and later.[1] Internal command that expands the name of a file, directory, or drive, and display its absolute pathname as the result. It will expand relative pathnames,SUBSTdrives, andJOINdirectories, to find the actual directory. For example, in DOS 7.1, if the current directory isC:\WINDOWS\SYSTEM, then The argument does not need to refer to an existing file or directory: TRUENAME will output the absolute pathname as if it did. Also TRUENAME does not search in thePATH.For example, in DOS 5, if the current directory isC:\TEMP, thenTRUENAME command.comwill displayC:\TEMP\COMMAND.COM(which does not exist), notC:\DOS\COMMAND.COM(which does and is in thePATH). This command displays theUNC pathnamesof mapped network or local CD drives. This command is an undocumented DOS command. The help switch "/?" defines it as a "Reserved command name". It is available in MS-DOS version 5.00 and later, including the DOS 7 and 8 in Windows 95/98/ME. The C library functionrealpathperforms this function. The Microsoft Windows NT command processors do not support this command, including the versions of command.com for NT. Displays a file. Themorecommand is frequently used in conjunction with this command, e.g.typelong-text-file| more. TYPE can be used to concatenate files (typefile1 file2>file3); however this won't work for large files[dubious–discuss][citation needed]—use copy command instead. The command is available in MS-DOS versions 1 and later.[1] Restores file previously deleted withdel. By default all recoverable files in the working directory are restored; options are used to change this behavior. If the MS-DOSmirrorTSR program is used, then deletion tracking files are created and can be used byundelete. The command is available in MS-DOS versions 5 and later.[1] MS-DOS version 5 introduced the quick format option (Format /Q) which removes the disk's file table without deleting any of the data. The same version also introduced the UNFORMAT command to undo the effects of a quick format, restoring the file table and making all the files accessible again. UNFORMAT only works if invoked before any further changes have overwritten the drive's contents.[1] An internal DOS command, that reports the DOS version presently running, and since MS-DOS 5, whether DOS is loaded high. The command is available in MS-DOS versions 2 and later.[1] Enables or disables the feature to determine if files have been correctly written to disk (You can enable the verify command by typing "verify on" on Command Prompt and pressing enter. To display the current VERIFY setting, type VERIFY without a parameter. To turn off the feature, type "verify off"). If no parameter is provided, the command will display the current setting.[30] The command is available in MS-DOS versions 2 and later.[1] An internal command that displays the disk volume label and serial number. The command is available in MS-DOS versions 2 and later.[1] A TSR program that continuously monitors the computer for viruses. The command is available in MS-DOS versions 6 and later.[1] Copy entire directory trees. Xcopy is a version of the copy command that can move files and directories from one location to another. XCOPY usage and attributes can be obtained by typingXCOPY /?in the DOS Command line. The command is available in MS-DOS versions 3.2 and later.[1] There are several guides to DOS commands available that are licensed under theGNU Free Documentation License:
https://en.wikipedia.org/wiki/CTTY_(DOS_command)
Serial over LAN(SOL) is a mechanism that enables the input and output of theserial portof a managed system to be redirected overIPon alocal area network(LAN).[1] On some managed systems, notablyblade serversystems, the serial ports on the managed computers are not normally connected to a traditional serial port socket. To allow users to access applications on these computers via the serial port, theinput/outputof the serial port is redirected to the network. For example, a user wishing to access a blade server via the serial port cantelnetto anetwork addressand log in. On the blade server the login will be seen as coming through the serial port. SOL is implemented as a payload type under theRMCP+ protocol inIPMI.[2] Thiscomputer networkingarticle is astub. You can help Wikipedia byexpanding it.
https://en.wikipedia.org/wiki/Serial_over_LAN_redirection
Theremote shell(rsh) is acommand-linecomputer programthat can executeshell commandsas anotheruser, and on another computer across acomputer network. The remote system to whichrshconnects runs thershdaemon(rshd). The daemon typically uses thewell-knownTransmission Control Protocol(TCP)port number513. Rshoriginated as part of theBSD Unixoperating system, along withrcp, as part of therloginpackage on 4.2BSD in 1983. rsh has since been ported to other operating systems. Thershcommand has the same name as another common UNIX utility, therestricted shell, which first appeared inPWB/UNIX; inSystem V Release 4, the restricted shell is often located at/usr/bin/rsh. As otherBerkeley r-commandswhich involve user authentication, the rshprotocolis notsecurefor network use, because it sendsunencrypted informationover the network, among other reasons. Some implementations alsoauthenticateby sending unencryptedpasswordsover the network. rsh has largely been replaced with thesecure shell(ssh) program, even on local networks.[1][2] As an example of rsh use, the following executes the commandmkdir testdiras userremoteuseron the computerhost.example.comrunning a UNIX-like system: After the command has finished rsh terminates. If no command is specified then rsh will log in on the remote system usingrlogin. The network location of the remote computer is looked up using theDomain Name System. Command to install rsh client using apt A remote shell session can be initiated by either a local device (which sends commands) or a remote device (on which commands are executed).[3]In the first case remote shell will be called bind shell, in the second case - reverse shell.[4] Reverse shell can be used when the device on which the command is to be executed is not directly accessible - for example, for remote maintenance of computers located behind NAT that cannot be accessed from the outside. Some exploits create reverse shell from an attacked device back to machines controlled by the attackers (called "reverse shell attack"). The following code demonstrates a reverse shell attack:[5] It opens a TCP socket to attacker IP at port 80 as afile descriptor. It then repeatedly read lines from the socket and run the line, piping bothstdout and stderrback to the socket. In other words, it gives the attacker a remote shell on the machine.
https://en.wikipedia.org/wiki/Remote_Shell
BIOSimplementations provideinterruptsthat can be invoked by operating systems and application programs to use the facilities of the firmware onIBM PC compatible[a]computers. Traditionally, BIOS calls are mainly used byDOSprograms and some other software such asboot loaders(including, mostly historically, relatively simple application software that boots directly and runs without an operating system—especially game software). BIOS runs in thereal address mode (Real Mode)of the x86 CPU, so programs that call BIOS either must also run in real mode or must switch from protected mode to real mode before calling BIOS and then switching back again. For this reason, modernoperating systemsthat use the CPU inProtected modeorLong modegenerally do not use the BIOS interrupt calls to support system functions, although they use the BIOS interrupt calls to probe and initialize hardware duringbooting.[1]Real mode has the 1MB memory limitation, modernboot loaders(e.g.GRUB2,Windows Boot Manager) use theunreal modeorprotected mode(and execute the BIOS interrupt calls in theVirtual 8086 mode, but only for OS booting) to access up to 4GB memory.[2] In all computers, software instructions control the physical hardware (screen, disk, keyboard, etc.) from the moment the power is switched on. In a PC, the BIOS, pre-loaded in ROM on the motherboard, takes control immediately after the CPU is reset, including during power-up, when a hardware reset button is pressed, or when a critical software failure (atriple fault) causes the mainboard circuitry to automatically trigger a hardware reset. The BIOS tests the hardware and initializes its state; finds, loads, and runs the boot program (usually, an OS boot loader, and historicalROM BASIC); and provides basic hardware control to the software running on the machine, which is usually an operating system (with application programs) but may be a directly booting single software application. For IBM's part, they provided all the information needed to use their BIOS fully or to directly utilize the hardware and avoid BIOS completely, when programming the early IBM PC models (prior to the PS/2). From the beginning, programmers had the choice of using BIOS or not, on a per-hardware-peripheral basis. IBM did strongly encourage the authorship of "well-behaved" programs that accessed hardware only through BIOS INT calls (and DOS service calls), to support compatibility of software with current and future PC models having dissimilar peripheral hardware, but IBM understood that for some software developers and hardware customers, a capability for user software to directly control the hardware was a requirement. In part, this was because a significant subset of all the hardware features and functions was not exposed by the BIOS services. For two examples (among many), the MDA and CGA adapters are capable of hardware scrolling, and the PC serial adapter is capable of interrupt-driven data transfer, but the IBM BIOS supports neither of these useful technical features. Today, the BIOS in a new PC still supports most, if not all, of the BIOS interrupt function calls defined by IBM for theIBM AT(introduced in 1984), along with many more newer ones, plus extensions to some of the originals (e.g. expanded parameter ranges) promulgated by various other organizations and collaborative industry groups. This, combined with a similar degree of hardware compatibility, means that most programs written for an IBM AT can still run correctly on a new PC today, assuming that the faster speed of execution is acceptable (which it typically is for all but games that use CPU-based timing). Despite the considerable limitations of the services accessed through the BIOS interrupts, they have proven extremely useful and durable to technological change. BIOS interrupt calls perform hardware control or I/O functions requested by a program, return system information to the program, or do both. A key element of the purpose of BIOS calls is abstraction - the BIOS calls perform generally defined functions, and the specific details of how those functions are executed on the particular hardware of the system are encapsulated in the BIOS and hidden from the program. So, for example, a program that wants to read from a hard disk does not need to know whether the hard disk is anATA,SCSI, orSATAdrive (or in earlier days, anESDIdrive, or anMFMorRLLdrive with perhaps a SeagateST-506controller, perhaps one of the severalWestern Digitalcontroller types, or with a different proprietary controller of another brand). The program only needs to identify the BIOS-defined number of the drive it wishes to access and the address of the sector it needs to read or write, and the BIOS will take care of translating this general request into the specific sequence of elementary operations required to complete the task through the particular disk controller hardware that is connected to that drive. The program is freed from needing to know how to control at a low level every type of hard disk (or display adapter, or port interface, or real-time clock peripheral) that it may need to access. This both makes programming operating systems and applications easier and makes the programs smaller, reducing the duplication of program code, as the functionality that is included in the BIOS does not need to be included in every program that needs it; relatively short calls to the BIOS are included in the programs instead. (In operating systems where the BIOS is not used, service calls provided by the operating system itself generally fulfill the same function and purpose.) The BIOS also frees computer hardware designers (to the extent that programs are written to use the BIOS exclusively) from being constrained to maintain exact hardware compatibility with old systems when designing new systems, in order to maintain compatibility with existing software. For example, the keyboard hardware on theIBM PCjrworks very differently than the keyboard hardware on earlier IBM PC models, but to programs that use the keyboard only through the BIOS, this difference is nearly invisible. (As a good example of the other side of this issue, a significant share of the PC programs in use at the time the PCjr was introduced did not use the keyboard through BIOS exclusively, so IBM also included hardware features in the PCjr to emulate the way theoriginal IBM PCandIBM PC XTkeyboard hardware works. The hardware emulation is not exact, so not all programs that try to use the keyboard hardware directly will work correctly on the PCjr, but all programs that use only the BIOS keyboard services will.) In addition to giving access to hardware facilities, BIOS provides added facilities that are implemented in the BIOS software. For example, the BIOS maintains separate cursor positions for up to eight text display pages and provides forTTY-like output with automatic line wrap and interpretation of basic control characters such as carriage return and line feed, whereas the CGA-compatible text display hardware has only one global display cursor and cannot automatically advance the cursor, use the cursor position to address the display memory (so as to determine which character cell will be changed or examined), or interpret control characters. For another example, the BIOS keyboard interface interprets many keystrokes and key combinations to keep track of the various shift states (left and rightShift,Ctrl, andAlt), to call the print-screen service whenShift+PrtScrnis pressed, to reboot the system whenCtrl+Alt+Delis pressed, to keep track of the lock states (Caps Lock, Num Lock, and Scroll Lock) and, in AT-class machines, control the corresponding lock-state indicator lights on the keyboard, and to perform other similar interpretive and management functions for the keyboard. In contrast, the ordinary capabilities of the standard PC and PC-AT keyboard hardware are limited to reporting to the system each primitive event of an individual key being pressed or released (i.e. making a transition from the "released" state to the "depressed" state or vice versa), performing a commanded reset and self-test of the keyboard unit, and, for AT-class keyboards, executing a command from the host system to set the absolute states of the lock-state indicators (LEDs). Operating systems and other software communicate with the BIOS software, in order to control the installed hardware, via software interrupts. A software interrupt is a specific variety of the general concept of an interrupt. An interrupt is a mechanism by which the CPU can be directed to stop executing the main-line program and immediately execute a special program, called an Interrupt Service Routine (ISR), instead. Once the ISR finishes, the CPU continues with the main program. On x86 CPUs, when an interrupt occurs, the ISR to call is found by looking it up in a table of ISR starting-point addresses (called "interrupt vectors") in memory: theInterrupt vector table(IVT). An interrupt is invoked by its type number, from 0 to 255, and the type number is used as an index into the Interrupt Vector Table, and at that index in the table is found the address of the ISR that will be run in response to the interrupt. A software interrupt is simply an interrupt that is triggered by a software command; therefore, software interrupts function like subroutines, with the main difference that the program that makes a software interrupt call does not need to know the address of the ISR, only its interrupt number. This has advantages for modularity, compatibility, and flexibility in system configuration. BIOS interrupt calls can be thought of as a mechanism for passing messages between BIOS and BIOS client software such as an operating system. The messages request data or action from BIOS and return the requested data, status information, and/or the product of the requested action to the caller. The messages are broken into categories, each with its own interrupt number, and most categories contain sub-categories, called "functions" and identified by "function numbers". A BIOS client passes most information to BIOS in CPU registers, and receives most information back the same way, but data too large to fit in registers, such as tables of control parameters or disk sector data for disk transfers, is passed by allocating a buffer (i.e. some space) in memory and passing the address of the buffer in registers. (Sometimes multiple addresses of data items in memory may be passed in a data structure in memory, with the address of that structure passed to BIOS in registers.) The interrupt number is specified as the parameter of the software interrupt instruction (in Intel assembly language, an "INT" instruction), and the function number is specified in the AH register; that is, the caller sets the AH register to the number of the desired function. In general, the BIOS services corresponding to each interrupt number operate independently of each other, but the functions within one interrupt service are handled by the same BIOS program and are not independent. (This last point is relevant toreentrancy.) The BIOS software usually returns to the caller with an error code if not successful, or with a status code and/or requested data if successful. The data itself can be as small as one bit or as large as 65,536 bytes of whole raw disk sectors (the maximum that will fit into one real-mode memory segment). BIOS has been expanded and enhanced over the years many times by many different corporate entities, and unfortunately the result of this evolution is that not all the BIOS functions that can be called use consistent conventions for formatting and communicating data or for reporting results. Some BIOS functions report detailed status information, while others may not even report success or failure but just return silently, leaving the caller to assume success (or to test the outcome some other way). Sometimes it can also be difficult to determine whether or not a certain BIOS function call is supported by the BIOS on a certain computer, or what the limits of a call's parameters are on that computer. (For some invalid function numbers, or valid function numbers with invalid values of key parameters—particularly with an early IBM BIOS version—the BIOS may do nothing and return with no error code; then it is the [inconvenient but inevitable] responsibility of the caller either to avoid this case by not making such calls, or to positively test for an expected effect of the call rather than assuming that the call was effective. Because BIOS has evolved extensively in many steps over its history, a function that is valid in one BIOS version from some certain vendor may not be valid in an earlier or divergent BIOS version from the same vendor or in a BIOS version—of any relative age—from a different vendor.) Because BIOS interrupt calls use CPU register-based parameter passing, the calls are oriented to being made from assembly language and cannot be directly made from mosthigh-level languages(HLLs). However, a high level language may provide a library of wrapper routines which translate parameters from the form (usually stack-based) used by the high-level language to the register-based form required by BIOS, then back to the HLLcalling conventionafter the BIOS returns. In some variants of C, BIOS calls can be made using inline assembly language within a C module. (Support for inline assembly language is not part of the ANSI C standard but is a language extension; therefore, C modules that use inline assembly language are less portable than pure ANSI standard C modules.) Invoking an interrupt can be done using theINTx86assembly languageinstruction. For example, to print a character to the screen using BIOS interrupt 0x10, the following x86 assembly language instructions could be executed: A list of common BIOS interrupt classes can be found below. Some BIOSes (particularly old ones) do not implement all of these interrupt classes. The BIOS also uses some interrupts to relay hardware event interrupts to programs which choose to receive them or to route messages for its own use. INT 18htraditionally jumped to an implementation ofCassette BASIC(provided by Microsoft) stored inOption ROMs. This call would typically be invoked if the BIOS was unable to identify any bootable disk volumes on startup. At the time the original IBM PC (IBM machine type 5150) was released in 1981, the BASIC in ROM was a key feature. Contemporary popular personal computers such as the Commodore 64 and the Apple II line also had Microsoft Cassette BASIC in ROM (though Commodore renamed their licensed version Commodore BASIC), so in a substantial portion of its intended market, the IBM PC needed BASIC to compete. As on those other systems, the IBM PC's ROM BASIC served as a primitive diskless operating system, allowing the user to load, save, and run programs, as well as to write and refine them. (The original IBM PC was also the only PC model from IBM that, like its aforementioned two competitors, included cassette interface hardware. A base model IBM PC had only 16 KiB of RAM and no disk drives of any kind, so the cassette interface and BASIC in ROM were essential to make the base model usable. An IBM PC with less than 32 KiB of RAM is incapable of booting from disk. Of the five 8 KiB ROM chips in an original IBM PC, totaling 40 KiB, four contain BASIC and only one contains the BIOS; when only 16 KiB of RAM are installed, the ROM BASIC accounts for 4/7ths of the total system memory.) As time went on and BASIC was no longer shipped on all PCs, this interrupt would simply display an error message indicating that no bootable volume was found (such as "No ROM BASIC", or more explanatory messages in later BIOS versions); in other BIOS versions it would prompt the user to insert a bootable volume and press a key, and then after the user pressed a key it would loop back to the bootstrap loader (INT 19h) to try booting again. Digital'sRainbow 100B usedINT 18hto call its BIOS, which was incompatible with the IBM BIOS.Turbo Pascal,Turbo CandTurbo C++repurposed INT 18 for memory allocation and paging. Other programs also reused this vector for their own purposes. On DOS systems,IO.SYSorIBMBIO.COMhooks INT 13 for floppy disk change detection, tracking formatting calls, correcting DMA boundary errors, and working around problems in IBM's ROM BIOS "01/10/84" with model code 0xFC before the first call. Many modern operating systems (such asLinuxandWindows) do not use any BIOS interrupt calls at all after startup, instead choosing to directly interface with the hardware. To do this, they rely upondriversthat are either a part of theOS kernelitself, ship along with the OS, or are provided by hardware vendors. There are several reasons for this practice. Most significant is that modern operating systems run with the processor inprotected(orlong) mode, whereas the BIOS code will only execute inreal mode. This means that if an OS running in protected mode wanted to make a BIOS call, it would have to first switch into real mode, then execute the call and wait for it to return, and finally switch back to protected mode. This would be terribly slow and inefficient. Code that runs in real mode (including the BIOS) is limited to accessing just over 1MiBof memory, due to using 16-bitsegmented memory addressing. Additionally, the BIOS is generally not the fastest way to carry out any particular task. In fact, the speed limitations of the BIOS made it common even in the DOS era for programs to circumvent it in order to avoid its performance limitations, especially for video graphics display and fast serial communication. Beyond the above factors, problems with BIOS functionality include limitations in the range of functions defined, inconsistency in the subsets of those functions supported on different computers, and variations in the quality of BIOSes (i.e. some BIOSes are complete and reliable, others are abridged and buggy). By taking matters into their own hands and avoiding reliance on BIOS, operating system developers can eliminate some of the risks and complications they face in writing and supporting system software. On the other hand, by doing so those developers become responsible for providing "bare-metal" driver software for every different system or peripheral device they intend for their operating system to work with (or for inducing the hardware producers to provide those drivers). Thus it should be apparent that compact operating systems developed on small budgets would tend to use BIOS heavily, while large operating systems built by huge groups of software engineers with large budgets would more often opt to write their own drivers instead of using BIOS—that is, even without considering the compatibility problems of BIOS and protected mode.
https://en.wikipedia.org/wiki/BIOS_interrupt_call
Ralf Brown's Interrupt List(akaRBIL,x86 Interrupt List,MS-DOS Interrupt ListorINTER) is a comprehensive list ofinterrupts,calls,hooks,interfaces,data structures,CMOS settings,memoryandportaddresses, as well as processoropcodesforx86machines from the 1981IBM PCup to 2000 (including manyclones),[1][2][nb 1]most of it still applying toIBM PC compatiblestoday. It also lists somespecial function registersfor theNEC V25and V35microcontrollers. The list coversoperating systems,device drivers, and applicationsoftware; both documented andundocumentedinformation includingbugs, incompatibilities, shortcomings, and workarounds, with version, locale, and date information, often at a detail level far beyond that found in the contemporary literature.[3][4][5]A large part of it coverssystem BIOSesand internals of operating systems such asDOS,OS/2, andWindows, as well as their interactions.[3][6] It has been a widely used resource byIBM PCsystem developers,[7][4][5]analysts,[8]as well as application programmers in the pre-Windowsera.[3][6]Parts of the compiled information have been used for and in the creation of several books on systems programming,[3][6][9][10][11][12]some of which have also been translated into Chinese,[13][14][15][6]Japanese[3]and Russian.[16][17]As such the compilation has proven to be an important resource in developing various closed and open source operating systems, includingLinuxandFreeDOS.[18]Today it is still used as a reference to BIOS calls and to develop programs for DOS as well as other system-level software. The project is the result of the research and collaborative effort of more than 650 listed contributors worldwide over a period of 15 years, of which about 290 provided significant information (and some 55 of them even more than once).[1]The original list was created in January 1985 by Janet Jack and others,[19]and, named "Interrupt List for MS-DOS", it was subsequently maintained and mailed to requestors onUsenetbyRoss M. Greenberguntil 1986.[20][21][22]Since October 1987 it is maintained by Ralf D. Brown,[23]a researcher atCarnegie Mellon University'sLanguage Technologies Institute.[3][6][24]Information from several other interrupt listings was merged into the list in order to establish one comprehensive reference compilation. Over the years, Michael A. Shiels,Timothy Patrick Farley, Matthias R. Paul, Robin Douglas Howard Walker, Wolfgang Lierz and Tamura Jones became major contributors to the project, providing information all over the list.[1]The project was also expanded to include other PC development-related information and therefore absorbed a number of independently maintained lists on PC I/O ports (by Wim Osterholt and Matthias R. Paul), BIOS CMOS memory contents (byAtley Padgett Peterson), processor opcodes (by Alex V. Potemkin) and bugs (by Harald Feldmann).[1][nb 1]Brown and Paul also conducted several systematic surveys on specific hard- and software details among a number of dedicated user groups in order to validate some info and to help fill some gaps in the list.[25][26][27] Originally, the list was distributed in an archive named INTERRUP in various compression formats as well as in the form ofdiffs. The distribution file name was changed to include a version in the form INTERnyy (with n = issue number, and yy = 2-digit release year) in 1988. In mid 1989 the distribution settled to only useZIPcompression.[28]When the archive reached the size of a 360 KBfloppyin June 1991, the distribution split into several files following an INTERrrp.ZIP naming scheme (with rr = revision starting with 26 for version 91.3, and p = part indicator of the package starting with letter A). Officially named "MS-DOS Interrupt List" and "x86 Interrupt List" (abbreviated as "INTER") by its maintainer, the community coined the unofficial name "Ralf Brown's Interrupt List" (abbreviated as "RBIL") in the 1990s. The publication is currently at revision 61 as of 17 July 2000 with almost 8MBofASCIItext including close to9600entries plus about5400tables,[1]fully cross linked, which would result in more than 3700 pages (at 60 lines per page) of condensed information when printed. Of this, the interrupt list itself makes up some 5.5 MB for more than 2500 pages printed.[nb 1] While the project is not officially abandoned and the website is still maintained (as of 2025[update]), new releases have not been forthcoming for a very long time, despite the fact that information was still pending for release even before the INTER61 release in 2000.[29]New releases were planned for at several times in 2001[30][31]and 2002,[32][33][34][35][26][27]but when they did not materialize, portions of the new information on DOS and PC internals provided by Paul were circulated in preliminary form in the development community for peer-review and to assist in operating system development.[31][36][37][33][38][39][40][41][26][42][43][44][45]
https://en.wikipedia.org/wiki/Ralf_Brown%27s_Interrupt_List
This article details versions ofMS-DOS,IBM PC DOS, and at least partiallycompatibledisk operating systems. It does not include the many otheroperating systems called "DOS"which are unrelated toIBM PC compatibles. Originally MS-DOS was designed to be an operating system that could run onanycomputer with a8086-familymicroprocessor. It competed with otheroperating systemswritten for such computers, such asCP/M-86andUCSD Pascal. Each computer would have its own distinct hardware and its own version of MS-DOS, a situation similar to the one that existed forCP/M, with MS-DOS emulating thesame solutionas CP/M to adapt for different hardware platforms. So there were many differentoriginal equipment manufacturer(OEM) versions ofMS-DOSfor different hardware. But the greater speed attainable by direct control of hardware was of particular importance, especially when running computer games. So very soon an IBM-compatible architecture became the goal, and before long all 8086-family computersclosely emulated IBM hardware, and only a single version of MS-DOS for a fixed hardware platform was all that was needed for the market. This specific version of MS-DOS is the version that is discussed here, as all other versions of MS-DOS died out with their respective systems. One version of such ageneric MS-DOS(Z-DOS) is mentioned here, but there were dozens more. All these were for personal computers that used an 8086-family microprocessor, but which were not fullyIBM PC compatible.
https://en.wikipedia.org/wiki/Comparison_of_DOS_operating_systems
Incomputing, theDOS Protected Mode Interface(DPMI) is a specification introduced in 1989 which allows aDOSprogram to run inprotected mode, giving access to many features of the new PC processors of the time not available inreal mode. It was initially developed byMicrosoftforWindows 3.0, although Microsoft later turned control of the specification over to an industry committee with open membership.[1][2]Almost all modernDOS extendersare based on DPMI and allow DOS programs to address all memory available in the PC and to run in protected mode (mostly inring3, least privileged).[3] DPMI stands for DOS Protected Mode Interface. It is anAPIthat allows a program to run inprotected modeon 80286 series and later processors, and do the calls toreal modewithout having to set up these CPU modes manually. DPMI also provides the functions for managing various resources, notablymemory. This allows the DPMI-enabled programs to work inmulti-taskingOSes, allowing an OS kernel to distribute such resources between multiple applications. DPMI provides only the functionality that needs to be implemented insupervisor mode. It can be thought of as a single-taskingmicrokernel. The rest of the functionality is available to DPMI-enabled programs via the calls to real-modeDOSandBIOSservices, allowing the DPMI API itself to remain mostly independent of DOS. Things that make DPMI API DOS-specific, are just 3 functions for managing DOS memory, and the letter "D" in the "DPMI" acronym. A DPMI service can be 16-bit, 32-bit, or "universal" and is called theDPMI kernel,DPMI host, orDPMI server. It is provided either by the host operating system (virtual DPMI host) or by aDOS extender(real DPMI host). The DPMI kernel can be a part of a DOS extender such as inDOS/4GWorDOS/32A, or separate, likeCWSDPMIorHDPMI. The primary use of DPMI API is to allowDOS extendersto provide the host-OS-agnostic environment. DOS extender checks the presence of a DPMI kernel, and installs its own only if the one was not installed already. This allows DOS-extended programs to run either in a multitasking OS that provides its own DPMI kernel, or directly underbare-metalDOS, in which case DOS extender uses its own DPMI kernel. Windows 3.x and 9x'suser-modekernels are built with a DOS extender, so they fully rely on a DPMI API that is provided by Windows's ring-0 kernel. The first DPMI specification drafts were published in 1989 by Microsoft'sRalph Lipe.[4][1]While based on a prototypical version of DPMI forWindows 3.0in 386 enhanced mode, several features of this implementation were removed from the official specification, including a feature namedMS-DOS Extensions[5]orDOS API translationthat had been proposed by Ralph Lipe in the original drafts.[6]Most of it was implementing DOS and BIOS interfaces (due to this history some INT 21h APIs like 4Ch have to be implemented by all DPMI implementations). DPMI version 0.9 was published in 1990 by the newly formedDPMI Committee. The version number 0.9 of the resulting specification was chosen to reflect the stripped-down nature and incomplete status of the standard the members of the DPMI Committee could agree upon.[1]While Windows reports DPMI version 0.9 for compatibility, it actually implements the other parts as well, since they present a vital part of the system.[5][1]This undocumented full nature of DPMI has become known as "true DPMI" in the industry.[7]The DPMI standard was not the only effort to overcome the shortcomings of theVCPI specification. At the same time that Microsoft developed DPMI for Windows 3.0, another industry alliance includingIntel's Software Focus Group,[8][1]Lotus,[8]Digital Research,Interactive Systemsand others developed a specification namedExtended VCPI(XVCPI) to make the memory management and multitasking capabilities of the 386 available for extended DOS applications.[8][1][9]When it turned out that Microsoft's DPMI proposal addressed a number of similar issues and was supported by Windows, these efforts led to the creation of the DPMI Committee in February 1990 during a meeting at Intel in Santa Clara.[8][1] In 1991, the DPMI Committee revised DPMI to version 1.0 in order to incorporate a number of clarifications and extensions, but it still did not include the missing "true DPMI" bits implemented in Windows. In fact, "true DPMI" never became part of the official DPMI specification, and Windows likewise never implemented the DPMI 1.0 extensions (and not many DPMI hosts did). While DPMI is tailored to run extended DOS application software in protected mode and extended memory,[10]it is not particularly well suited for resident system extensions. Another specification namedDPMS,[10]developed byDigital Research/Novellaround 1992, specifically addresses requirements to easily relocate modified DOS driver software into extended memory and run them in protected mode, thereby reducing their conventionalmemory footprintdown to smallstubs. This is also supported byHelix Cloaking. The DPMI "method" is specific to DOS and the IBM PC. Other computer types were upgraded from 16-bit to 32-bit, and the advanced program support was provided by upgrading the operating system with a new 32-bitAPIand new memory management/addressing capabilities. For example, theOS/2core system supports 32-bit programs, and can be run without the GUI. The DPMI solution appears to be mainly needed to address third party need to get DOS protected mode programs running stably on Windows 3.x before the dominant operating system vendor, Microsoft, could or would address the future of 32-bit Windows. In addition, Microsoft didn't see the answer to the 32-bit transition as a 32-bit DOS, but rather a 32-bit Windows with a completely different (and incompatible) API. While Windows 3.0 implements "true DPMI"[5]and reports support for DPMI 0.9,[11]DPMI version 1.0 was never implemented inMicrosoft Windows, so most programs and DOS extenders were mostly only written for version 0.9. Few extenders, however, implement "true DPMI". Beta versions ofQualitas386MAXimplemented "true DPMI" and could run Windows' KRNL386.EXE from the command line, but it was claimed that was disabled in the released product in an internal email.[5]However, DPMIONE (by Bob Smith based on the 386MAX code) can do it. CurrentlyDPMIONEand386MAXis also the only DPMI host which supports DPMI 1.0 completely (e.g. uncommitted memory) and they are the main supporter of DPMI 1.0.[12] The KRNL386.SYS (aka "MultiMAX") ofDR DOS "Panther"and"StarTrek", which has been under development since 1991,[nb 1]and theEMM386.EXEmemory managers ofNovell DOS 7,[10]Caldera OpenDOSandDR-DOS7.02 and higher have built-in support for DPMI when loaded with the/DPMI[=ON]option. KRNL386.SYS even had a command line option/VER=0.9|1.0to provide support for either DPMI 1.0 or 0.9.[13]DOS API translation was referred to as "called interrupt 21 from protected mode".Multiuser DOS,System ManagerandREAL/32support DPMI as well. The most famous separate DPMI kernel is probablyCWSDPMI; it supports DPMI 0.9, but no undocumented "DOS API translation". Another variant called PMODE by "TRAN" akaThomas Pytelwas popular with 32-bit programmers during thedemo sceneof the 1990s. Many games used DOS/4GW, which was developed byRational Systemsas a subset ofDOS/4Gand was distributed with theWatcom C compiler. HDPMI (part ofHX DOS Extender) provides "DOS API translation" and almost complete DPMI 1.0 implementation. The DPMI 1.0 Committee met between 1990 through 1991 and consisted of 12 groups:
https://en.wikipedia.org/wiki/DOS_Protected_Mode_Interface
ADOS extenderis acomputer softwareprogram running underDOSthat enables software to run in aprotected modeenvironment even though the host operating system is only capable of operating inreal mode. DOS extenders were initially developed in the 1980s following the introduction of theIntel 80286processor (and later expanded upon with theIntel 80386), to cope with the memory limitations ofDOS. A DOS extender is a program that "extends" DOS so that programs running in protected mode can transparently interface with the underlyingDOS API. This was necessary because many of the functions provided by DOS require 16-bit segment and offset addresses pointing to memory locations within thefirst 640 kilobytes of memory. Protected mode, however, uses an incompatible addressing method where the segment registers (now called selectors) are used to point to an entry in theGlobal Descriptor Tablewhich describes the characteristics of the segment. The two methods of addressing are mutually exclusive, with the processor having to make costly switches to real (orV86) mode to service non-protected mode requests. In addition to setting up the environment and loading the actual program to be executed, the DOS extender also provides (amongst other things) a translation layer that maintainsbuffersallocated below the 1 MB real mode memory barrier. These buffers are used to transfer data between the underlying real mode operating system and the protected mode program. Since switching between real/V86 mode and protected mode is a relatively time consuming operation, the extender attempts to minimize the number of switches by duplicating the functionality of many real mode operations within its own protected mode environment. As DOS usesinterruptsextensively for communication between the operating system and user level software, DOS extenders intercept many of the common hardware (e.g. thereal-time clockand keyboard controller) and software (e.g. DOS itself and the mouse API) interrupts. Some extenders also handle other common interrupt functions, such as video BIOS routines. Essentially, a DOS extender is like a miniature operating system, handling much of the functionality of the underlying operating system itself. The DOS extender was arguably invented byPhar Lap, but it wasTenberry Software's (formerly Rational Systems) 386 extenderDOS/4GWthat brought protected mode DOS programs to a mass market. Included withWatcom's C, C++, and Fortran compilers for 386 class processors, it soon became a ubiquitous mainstay of PC applications and games such asid Software's successfulDoom. While initially it was the memory-hungry business applications that drove the development of DOS extenders, it would be PC games that truly brought them into the spotlight. As a result of the development of DOS extenders, two new software interfaces were created to take care of the many potential conflicts that could arise from the varied methods of memory management that already existed, as well as provide a uniform interface for client programs. The first of these interfaces was theVirtual Control Program Interface(VCPI), but this was rapidly overshadowed by theDOS Protected Mode Interface(DPMI) specification, which grew from the Windows 3.0 development.[1]They provided an API through which an extended program could interface with real mode software, allocate memory, and handle interrupt services. They also provided an easy method for the extender to set up the switch to protected mode, and allowed multiple protected mode programs to coexist peacefully.
https://en.wikipedia.org/wiki/DOS_extender
TheDOS MZ executableformat is theexecutablefile formatused for .EXEfiles inDOS. The file can be identified by theASCIIstring "MZ" (hexadecimal: 4D 5A) at the beginning of the file (the "magic number"). "MZ" are the initials ofMark Zbikowski, one of the leading developers ofMS-DOS.[1] The MZ DOS executable file is newer than theCOM executable formatand differs from it. The DOS executableheadercontainsrelocationinformation, which allows multiple segments to be loaded at arbitrary memory addresses, and it supports executables larger than 64k; however, the format still requires relatively low memory limits. These limits were later bypassed usingDOS extenders. The environment of an EXE program run by DOS is found in itsProgram Segment Prefix. EXE files normally have separate segments for the code, data, and stack. Program execution begins at address 0 of thecode segment, and the stack pointer register is set to whatever value is contained in the header information (thus if the header specifies a 512 byte stack, the stack pointer is set to 200h). It is possible to not use a separate stack segment and simply use the code segment for the stack if desired. The DS (data segment) register normally contains the same value as the CS (code segment) register and is not loaded with the actual segment address of the data segment when an EXE file is initialized; it is necessary for the programmer to set it themselves, generally done via the following instructions: In the originalDOS 1.x API, it was also necessary to have the CS register pointing to the segment with the PSP at program termination; this was done via the following instructions: Program termination would then be performed by a RETF instruction, which would retrieve the original segment address with the PSP from the stack and then jump to address 0, which contained an INT 20h instruction. TheDOS 2.x APIintroduced a new program termination function, INT 21h Function 4Ch which does not require saving the PSP segment address at the start of the program, and Microsoft advised against the use of the older DOS 1.x method. MZ DOS executables can be run from DOS andWindows 9x-based operating systems. 32-bitWindows NT-based operating systems can execute them using their built-inVirtual DOS machine(although some graphics modes are unsupported). 64-bit versions of Windows cannot execute them. Alternative ways to run these executables includeDOSBoxandDOSEMU. MZ DOS executables can be created bylinkers, likeDigital MarsOptlink,MS linker,VALXorOpen Watcom's WLINK; additionally,FASMcan create them directly.
https://en.wikipedia.org/wiki/DOS_MZ_executable
COMMAND.COMis the defaultcommand-line interpreterforMS-DOS,Windows 95,Windows 98andWindows Me. In the case of DOS, it is the default user interface as well. It has an additional role as the usual first program run afterboot(init process). As a shell, COMMAND.COM has two distinct modes of operation:interactive modeandbatch mode. Internal commands are commands stored directly inside the COMMAND.COMbinary; thus, they are always available, but can only be executed directly from the command interpreter.[citation needed] COMMAND.COM's successor onOS/2andWindows NTsystems iscmd.exe, although COMMAND.COM is available invirtual DOS machinesonIA-32versions of those operating systems as well. TheCOMMAND.COMfilename was also used byDisk Control Program[de](DCP), an MS-DOS derivative by the former East GermanVEB Robotron.[2] COMMAND.COM is a DOS program. Programs launched from COMMAND.COM are DOS programs that use theDOS APIto communicate with the disk operating system. The compatible command processor underFreeDOSis sometimes also calledFreeCom. As a shell, COMMAND.COM has two distinct modes of operation. The first isinteractive mode, in which the user types commands which are then executed immediately. The second isbatch mode, which executes a predefined sequence of commands stored as a text file with the.BATextension. Internal commands are commands stored directly inside the COMMAND.COM binary. Thus, they are always available but can only be executed directly from the command interpreter. All commands are executed after the↵ Enterkey is pressed at the end of the line. COMMAND.COM is not case-sensitive, meaning commands can be typed in any mixture of upper and lower case. Control structuresare mostly used inside batch files, although they can also be used interactively.[4][3] On exit, all external commands submit areturn code(a value between 0 and 255) to the calling program. Most programs have a certain convention for their return codes (for instance, 0 for a successful execution).[5][6][7][8] If a program was invoked by COMMAND.COM, the internal IF command with its ERRORLEVEL conditional can be used to test on error conditions of the last invoked external program.[citation needed] Under COMMAND.COM, internal commands do not establish a new value.[citation needed] Batch files for COMMAND.COM can have four kinds of variables: Because DOS is a single-tasking operating system,pipingis achieved by running commands sequentially, redirecting to and from atemporary file.[citation needed]COMMAND.COM makes no provision for redirecting thestandard errorchannel.[citation needed] Generally, the command line length in interactive mode is limited to 126 characters.[11][12][13]InMS-DOS 6.22, the command line length in interactive mode is limited to 127 characters.[citation needed] [...] Multiple Commands: You can type several commands on the same command line, separated by a caret [^]. For example, if you know you want to copy all of your .TXT files to drive A: and then run CHKDSK to be sure that drive A's file structure is in good shape, you could enter the following command:C:\>COPY*.TXT A:^CHKDSK A:You may put as many commands on the command line as you wish, as long as the total length of the command line does not exceed 511 characters. You can use multiple commands in aliases and batch files as well as at the command line. If you don't like using the default command separator, you can pick another character using theSETDOS /Ccommand or the CommandSep directive in4DOS.INI. [...]SETDOS /C:(Compound character) This option sets the character used for separating multiple commands on the same line. The default is the caret [^]. You cannot use any of the redirection characters [<>|], or the blank, tab, comma, or equal sign as the command separator. The command separator is saved by SETLOCAL and restored by ENDLOCAL. This example changes the separator to a tilde [~]:C:\>SETDOS /C~(You can specify either the character itself, or its ASCII code as a decimal number, or a hexadecimal number preceded by 0x.) [...] CommandSep = c (^): This is the character used to separate multiple commands on the same line. [...] Special Character Compatibility: If you use two or more of our products, or if you want to share aliases and batch files with users of different products, you need to be aware of the differences in three important characters: the Command Separator [...], the Escape Character [...], and the Parameter Character [...]. The default values of each of these characters in each product is shown in the following chart: [...] Product, Separator, Escape Parameter [...] 4DOS: ^, ↑, & [...] 4OS2, 4NT, Take Command: &, ^, $ [...] (The up-arrow [↑] represents the ASCII Ctrl-X character, numeric value 24.) [...] [...] all MS-DOS versions prior to Windows 95 [...] used a COM style COMMAND.COM file which has a special signature at the start of the file [...] queried by the MS-DOS BIOS before it loads the shell, but not by the DR-DOS BIOS [...] COMMAND.COM would [...] check that it is running on the "correct" DOS version, so if you would load their COMMAND.COM under DR-DOS, you would receive a "Bad version" error message and their COMMAND.COM would exit, so DR-DOS would [...] display an error message "Bad or missing command interpreter" (if DR-DOS was trying to load the SHELL= command processor after having finished CONFIG.SYS processing). In this case, you could enter the path to a valid DR-DOS COMMAND.COM (C:\DRDOS\COMMAND.COM) and everything was fine. Now, things have changed since MS-DOS 7.0 [...] COMMAND.COM has internally become an EXE style file, so there is no magic [...] signature [...] to check [...] thus no way for DR-DOS to rule out an incompatible COMMAND.COM. Further, their COMMAND.COM no longer does any version checks, but [...] does not work under DR-DOS [...] just crashes [...] the PC DOS COMMAND.COM works fine under DR-DOS [...]
https://en.wikipedia.org/wiki/COMMAND.COM
Incomputer programming, thereturn type(orresult type) defines and constrains thedata typeof the valuereturnedfrom asubroutineormethod.[1]In manyprogramming languages(especiallystatically-typed programming languagessuch asC,C++,Java) the return type must be explicitly specified when declaring a function. In the Java example: the return type isint. The program can therefore rely on the method returning a value of typeint. Various mechanisms are used for the case where a subroutine does not return any value, e.g., a return type ofvoidis used in some programming languages: A method returns to the code that invoked it when it completes all the statements in the method, reaches a return statement, or throws an exception, whichever occurs first. You declare a method's return type in its method declaration. Within the body of the method, you use the return statement to return the value. Any method declared void doesn't return a value. It does not need to contain a return statement, but it may do so. In such a case, a return statement can be used to branch out of a control flow block and exit the method and is simply used like this: If you try to return a value from a method that is declared void, you will get a compiler error. Any method that is not declared void must contain a return statement with a corresponding return value, like this: The data type of the return value must match the method's declared return type; you can't return an integer value from a method declared to return a boolean. The getArea() method in the Rectangle Rectangle class that was discussed in the sections on objects returns an integer: This method returns the integer that the expressionwidth * heightevaluates to. The getArea method returns a primitive type. A method can also return areference type. For example, in a program to manipulate Bicycle objects, we might have a method like this:
https://en.wikipedia.org/wiki/Return_type
Incomputing, theexit status(alsoexit codeorexit value) of a terminatedprocessis an integer number that is made available to itsparent process(or caller). InDOS, this may be referred to as anerrorlevel. When computer programs are executed, theoperating systemcreates anabstract entitycalled aprocessin which the book-keeping for that program is maintained. In multitasking operating systems such asUnixorLinux, new processes can be created by active processes. The process that spawns another is called aparent process, while those created arechild processes. Child processes run concurrently with the parent process. The technique of spawning child processes is used to delegate some work to a child process when there is no reason to stop the execution of the parent. When the child finishes executing, it exits by calling theexitsystem call. This system call facilitates passing the exit status code back to the parent, which can retrieve this value using thewaitsystem call. The parent and the child can have an understanding about the meaning of the exit statuses. For example, it is common programming practice for a child process to return (exit with) zero to the parent signifying success. Apart from this return value from the child, other information like how the process exited, either normally or by asignalmay also be available to the parent process. The specific set of codes returned is unique to the program that sets it. Typically it indicates success or failure. The value of the code returned by the function or program may indicate a specific cause of failure. On many systems, the higher the value, the more severe the cause of the error.[1]Alternatively, each bit may indicate a different condition, with these beingevaluated by theoroperatortogether to give the final value; for example,fsckdoes this. Sometimes, if the codes are designed with this purpose in mind, they can be used directly as a branch index upon return to the initiating program to avoid additional tests. InAmigaOS,MorphOSandAROS, four levels are defined: Shell scriptstypically execute commands and capture their exit statuses. For the shell's purposes, a command which exits with a zero exit status has succeeded. A nonzero exit status indicates failure. This seemingly counter-intuitive scheme is used so there is one well-defined way to indicate success and a variety of ways to indicate various failure modes. When a command is terminated by a signal whose number is N, a shell sets the variable $? to a value greater than 128. Most shells use 128+N, while ksh93 uses 256+N. If a command is not found, the shell should return a status of 127. If a command is found but is not executable, the return status should be 126.[2]Note that this is not the case for all shells. If a command fails because of an error during expansion or redirection, the exit status is greater than zero. TheCprogramming language allows programs exiting or returning from themain functionto signal success or failure by returning an integer, or returning themacrosEXIT_SUCCESSandEXIT_FAILURE. On Unix-like systems these are equal to 0 and 1 respectively.[3]A C program may also use theexit()function specifying the integer status or exit macro as the first parameter. The return value frommainis passed to theexitfunction, which for values zero,EXIT_SUCCESSorEXIT_FAILUREmay translate it to "an implementation defined form" ofsuccessful terminationorunsuccessful termination.[citation needed] Apart from zero and the macrosEXIT_SUCCESSandEXIT_FAILURE, the C standard does not define the meaning of return codes. Rules for the use of return codes vary on different platforms (see the platform-specific sections). In DOS terminology, anerrorlevelis anintegerexitcodereturned by anexecutable programorsubroutine. Errorlevels typically range from 0 to 255.[4][5][6][7]InDOSthere are only 256 error codes available, butDR DOS 6.0and higher support 16-bit error codes at least inCONFIG.SYS.[6]With4DOSand DR-DOSCOMMAND.COM, exit codes (in batchjobs) can be set byEXITn[6]and (in CONFIG.SYS) throughERROR=n.[6] Exit statuses are often captured bybatch programsthroughIF ERRORLEVELcommands.[4][6]Multiuser DOSsupports a reservedenvironment variable%ERRORLVL%which gets automatically updated on return from applications. COMMAND.COM underDR-DOS 7.02and higher supports a similarpseudo-environment variable%ERRORLVL% as well as%ERRORLEVEL%. In CONFIG.SYS, DR DOS 6.0 and higher supportsONERRORto test the load status and return code of device drivers and the exit code of programs.[6] In Java, any method can callSystem.exit(int status), unless a security manager does not permit it. This will terminate the currently running Java Virtual Machine. "The argument serves as a status code; by convention, a nonzero status code indicates abnormal termination."[8] InOpenVMS, success is indicated by odd values and failure by even values. The value is a 32-bit integer with sub-fields: control bits, facility number, message number and severity. Severity values are divided between success (Success, Informational) and failure (Warning, Error, Fatal).[9] In Plan 9's C, exit status is indicated by a string passed to theexitsfunction, andfunction mainistype void. InUnixand otherPOSIX-compatible systems, the parent process can retrieve the exit status of a child process using thewait()family of system calls defined inwait.h.[10]Of these, thewaitid()[11]call retrieves the full exit status, but the olderwait()andwaitpid()[12]calls retrieve only the least significant 8 bits of the exit status. Thewait()andwaitpid()interfaces set astatusvalue of typeintpacked as abitfieldwith various types of child termination information. If the child terminated by exiting (as determined by theWIFEXITED()macro; the usual alternative being that it died from an uncaughtsignal),SUSspecifies that the low-order 8 bits of the exit status can be retrieved from the status value using theWEXITSTATUS()macro. In thewaitid()system call (added with SUSv1), the child exit status and other information are no longer in a bitfield but in the structure of typesiginfo_t.[13] POSIX-compatible systems typically use a convention of zero for success and nonzero for error.[14]Some conventions have developed as to the relative meanings of various error codes; for example GNU recommend that codes with the high bit set be reserved for serious errors.[3] BSD-derived OS's have defined an extensive set of preferred interpretations: Meanings for 15 status codes 64 through 78 are defined insysexits.h.[15]These historically derive fromsendmailand othermessage transfer agents, but they have since found use in many other programs.[16]It has been deprecated and its use is discouraged.[15] The Advanced Bash-Scripting Guide has some information on the meaning of non-0 exit status codes.[17] Microsoft Windowsuses 32-bit unsigned integers as exit codes,[18][19]although the command interpreter treats them as signed.[20] Exit codes are directly referenced, for example, by the command line interpreterCMD.exein theerrorlevelterminology inherited fromDOS. The.NET Frameworkprocesses and theWindows PowerShellrefer to it as theExitCodeproperty of theProcessobject.
https://en.wikipedia.org/wiki/Exit_status
Inprogramming language theoryandproof theory, theCurry–Howard correspondenceis the direct relationship betweencomputer programsandmathematical proofs. It is also known as theCurry–Howard isomorphismorequivalence, or theproofs-as-programsandpropositions-orformulae-as-types interpretation. It is a generalization of a syntacticanalogybetween systems of formal logic and computational calculi that was first discovered by the AmericanmathematicianHaskell Curryand thelogicianWilliam Alvin Howard.[1]It is the link between logic and computation that is usually attributed to Curry and Howard, although the idea is related to the operational interpretation ofintuitionistic logicgiven in various formulations byL. E. J. Brouwer,Arend HeytingandAndrey Kolmogorov(seeBrouwer–Heyting–Kolmogorov interpretation)[2]andStephen Kleene(seeRealizability). The relationship has been extended to includecategory theoryas the three-wayCurry–Howard–Lambek correspondence.[3][4][5] The beginnings of theCurry–Howard correspondencelie in several observations: The Curry–Howard correspondence is the observation that there is an isomorphism between the proof systems, and the models of computation. It is the statement that these two families of formalisms can be considered as identical. If one abstracts on the peculiarities of either formalism, the following generalization arises:a proof is a program, and the formula it proves is the type for the program. More informally, this can be seen as ananalogythat states that thereturn typeof a function (i.e., the type of values returned by a function) is analogous to a logical theorem, subject to hypotheses corresponding to the types of the argument values passed to the function; and that the program to compute that function is analogous to a proof of that theorem. This sets a form oflogic programmingon a rigorous foundation:proofs can be represented as programs, and especially as lambda terms, orproofs can berun. The correspondence has been the starting point of a large range of new research after its discovery, leading to a new class offormal systemsdesigned to act both as aproof systemand as a typedprogramming languagebased onfunctional programming. This includesMartin-Löf'sintuitionistic type theoryandCoquand'scalculus of constructions(CoC), two calculi in which proofs are regular objects of the discourse and in which one can state properties of proofs the same way as of any program. This field of research is usually referred to as moderntype theory. Suchtyped lambda calculiderived from the Curry–Howard paradigm led to software like Rocq in which proofs seen as programs can be formalized, checked, and run. A converse direction is touse a program to extract a proof, given itscorrectness—an area of research closely related toproof-carrying code. This is only feasible if theprogramming languagethe program is written for is very richly typed: the development of such type systems has been partly motivated by the wish to make the Curry–Howard correspondence practically relevant. The Curry–Howard correspondence also raised new questions regarding the computational content of proof concepts that were not covered by the original works of Curry and Howard. In particular,classical logichas been shown to correspond to the ability to manipulate thecontinuationof programs and the symmetry ofsequent calculusto express the duality between the twoevaluation strategiesknown as call-by-name and call-by-value. Because of the possibility of writing non-terminating programs,Turing-completemodels of computation (such as languages with arbitraryrecursive functions) must be interpreted with care, as naive application of the correspondence leads to an inconsistent logic. The best way of dealing with arbitrary computation from a logical point of view is still an actively debated research question, but one popular approach is based on usingmonadsto segregate provably terminating from potentially non-terminating code (an approach that also generalizes to much richer models of computation,[9]and is itself related to modal logic by a natural extension of the Curry–Howard isomorphism[ext 1]). A more radical approach, advocated bytotal functional programming, is to eliminate unrestricted recursion (and forgoTuring completeness, although still retaining high computational complexity), using more controlledcorecursionwherever non-terminating behavior is actually desired. In its more general formulation, the Curry–Howard correspondence is a correspondence between formalproof calculiandtype systemsformodels of computation. In particular, it splits into two correspondences. One at the level offormulasandtypesthat is independent of which particular proof system or model of computation is considered, and one at the level ofproofsandprogramswhich, this time, is specific to the particular choice of proof system and model of computation considered. At the level of formulas and types, the correspondence says that implication behaves the same as a function type, conjunction as a "product" type (this may be called a tuple, a struct, a list, or some other term depending on the language), disjunction as a sum type (this type may be called a union), the false formula as the empty type and the true formula as a unit type (whose sole member is the null object). Quantifiers correspond todependentfunction space or products (as appropriate). This is summarized in the following table: At the level of proof systems and models of computations, the correspondence mainly shows the identity of structure, first, between some particular formulations of systems known asHilbert-style deduction systemandcombinatory logic, and, secondly, between some particular formulations of systems known asnatural deductionandlambda calculus. Between the natural deduction system and the lambda calculus there are the following correspondences: It was at the beginning a simple remark in Curry and Feys's 1958 book on combinatory logic: the simplest types for the basic combinators K and S ofcombinatory logicsurprisingly corresponded to the respectiveaxiom schemesα→ (β→α) and (α→ (β→γ)) → ((α→β) → (α→γ)) used inHilbert-style deduction systems. For this reason, these schemes are now often called axioms K and S. Examples of programs seen as proofs in a Hilbert-style logic are givenbelow. If one restricts to the implicational intuitionistic fragment, a simple way to formalize logic in Hilbert's style is as follows. Let Γ be a finite collection of formulas, considered as hypotheses. Then δ isderivablefrom Γ, denoted Γ ⊢ δ, in the following cases: This can be formalized usinginference rules, as in the left column of the following table. Typed combinatory logic can be formulated using a similar syntax: let Γ be a finite collection of variables, annotated with their types. A term T (also annotated with its type) will depend on these variables [Γ ⊢ T:δ] when: The generation rules defined here are given in the right-column below. Curry's remark simply states that both columns are in one-to-one correspondence. The restriction of the correspondence tointuitionistic logicmeans that someclassicaltautologies, such asPeirce's law((α→β) →α) →α, are excluded from the correspondence. Seen at a more abstract level, the correspondence can be restated as shown in the following table. Especially, thededuction theoremspecific to Hilbert-style logic matches the process ofabstraction eliminationof combinatory logic. Thanks to the correspondence, results from combinatory logic can be transferred to Hilbert-style logic and vice versa. For instance, the notion ofreductionof terms in combinatory logic can be transferred to Hilbert-style logic and it provides a way to canonically transform proofs into other proofs of the same statement. One can also transfer the notion of normal terms to a notion of normal proofs, expressing that the hypotheses of the axioms never need to be all detached (since otherwise a simplification can happen). Conversely, the non provability in intuitionistic logic ofPeirce's lawcan be transferred back to combinatory logic: there is no typed term of combinatory logic that is typable with type Results on the completeness of some sets of combinators or axioms can also be transferred. For instance, the fact that the combinatorXconstitutes aone-point basisof (extensional) combinatory logic implies that the single axiom scheme which is theprincipal typeofX, is an adequate replacement to the combination of the axiom schemes AfterCurryemphasized the syntactic correspondence between intuitionisticHilbert-style deductionand typedcombinatory logic,Howardmade explicit in 1969 a syntactic analogy between the programs ofsimply typed lambda calculusand the proofs ofnatural deduction. Below, the left-hand side formalizes intuitionistic implicational natural deduction as a calculus ofsequents(the use of sequents is standard in discussions of the Curry–Howard isomorphism as it allows the deduction rules to be stated more cleanly) with implicit weakening and the right-hand side shows the typing rules oflambda calculus. In the left-hand side, Γ, Γ1and Γ2denote ordered sequences of formulas while in the right-hand side, they denote sequences of named (i.e., typed) formulas with all names different. To paraphrase the correspondence, proving Γ ⊢αmeans having a program that, given values with the types listed in Γ, manufactures an object of typeα. An axiom/hypothesis corresponds to the introduction of a new variable with a new, unconstrained type, the→Irule corresponds to function abstraction and the→Erule corresponds tofunction application. Observe that the correspondence is not exact if the context Γ is taken to be a set of formulas as, e.g., the λ-terms λx.λy.xand λx.λy.yof typeα→α→αwould not be distinguished in the correspondence. Examples are givenbelow. Howard showed that the correspondence extends to other connectives of the logic and other constructions of simply typed lambda calculus. Seen at an abstract level, the correspondence can then be summarized as shown in the following table. Especially, it also shows that the notion of normal forms inlambda calculusmatchesPrawitz's notion of normal deduction innatural deduction, from which it follows that the algorithms for thetype inhabitation problemcan be turned into algorithms for decidingintuitionisticprovability. Howard's correspondence naturally extends to other extensions ofnatural deductionandsimply typed lambda calculus. Here is a non-exhaustive list: At the time of Curry, and also at the time of Howard, the proofs-as-programs correspondence concerned onlyintuitionistic logic, i.e. a logic in which, in particular,Peirce's lawwasnotdeducible. The extension of the correspondence to Peirce's law and hence toclassical logicbecame clear from the work of Griffin on typing operators that capture the evaluation context of a given program execution so that this evaluation context can be later on reinstalled. The basic Curry–Howard-style correspondence for classical logic is given below. Note the correspondence between thedouble-negation translationused to map classical proofs to intuitionistic logic and thecontinuation-passing-styletranslation used to map lambda terms involving control to pure lambda terms. More particularly, call-by-name continuation-passing-style translations relates toKolmogorov's double negation translation and call-by-value continuation-passing-style translations relates to a kind of double-negation translation due to Kuroda. A finer Curry–Howard correspondence exists for classical logic if one defines classical logic not by adding an axiom such asPeirce's law, but by allowing several conclusions in sequents. In the case of classical natural deduction, there exists a proofs-as-programs correspondence with the typed programs of Parigot'sλμ-calculus. A proofs-as-programs correspondence can be settled for the formalism known asGentzen'ssequent calculusbut it is not a correspondence with a well-defined pre-existing model of computation as it was for Hilbert-style and natural deductions. Sequent calculus is characterized by the presence of left introduction rules, right introduction rule and a cut rule that can be eliminated. The structure of sequent calculus relates to a calculus whose structure is close to the one of someabstract machines. The informal correspondence is as follows: N. G. de Bruijnused the lambda notation for representing proofs of the theorem checkerAutomath, and represented propositions as "categories" of their proofs. It was in the late 1960s at the same period of time Howard wrote his manuscript; de Bruijn was likely unaware of Howard's work, and stated the correspondence independently (Sørensen & Urzyczyn [1998] 2006, pp 98–99). Some researchers tend to use the term Curry–Howard–de Bruijn correspondence in place of Curry–Howard correspondence. TheBHK interpretationinterprets intuitionistic proofs as functions but it does not specify the class of functions relevant for the interpretation. If one takes lambda calculus for this class of function, then theBHK interpretationtells the same as Howard's correspondence between natural deduction and lambda calculus. Kleene's recursiverealizabilitysplits proofs of intuitionistic arithmetic into the pair of a recursive function and of a proof of a formula expressing that the recursive function "realizes", i.e. correctly instantiates the disjunctions and existential quantifiers of the initial formula so that the formula gets true. Kreisel's modified realizability applies to intuitionistic higher-order predicate logic and shows that thesimply typed lambda terminductively extracted from the proof realizes the initial formula. In the case of propositional logic, it coincides with Howard's statement: the extracted lambda term is the proof itself (seen as an untyped lambda term) and the realizability statement is a paraphrase of the fact that the extracted lambda term has the type that the formula means (seen as a type). Gödel'sdialectica interpretationrealizes (an extension of) intuitionistic arithmetic with computable functions. The connection with lambda calculus is unclear, even in the case of natural deduction. Joachim Lambekshowed in the early 1970s that the proofs of intuitionistic propositional logic and the combinators of typedcombinatory logicshare a common equational theory, the theory ofcartesian closed categories. The expression Curry–Howard–Lambek correspondence is now used by some people[by whom?]to refer to the relationships between intuitionistic logic, typed lambda calculus and cartesian closed categories. Under this correspondence, objects of a cartesian-closed category can be interpreted as propositions (types), and morphisms as deductions mapping a set of assumptions (typing context) to a valid consequent (well-typed term).[12] Lambek's correspondence is a correspondence of equational theories, abstracting away from dynamics of computation such as beta reduction and term normalization, and is not the expression of a syntactic identity of structures as it is the case for each of Curry's and Howard's correspondences: i.e. the structure of a well-defined morphism in a cartesian-closed category is not comparable to the structure of a proof of the corresponding judgment in either Hilbert-style logic or natural deduction. For example, it is not possible to state or prove that a morphism is normalizing, establish a Church-Rosser type theorem, or speak of a "strongly normalizing" cartesian closed category. To clarify this distinction, the underlying syntactic structure of cartesian closed categories is rephrased below. Objects (propositions/types) include Morphisms (deductions/terms) include Equivalently to the annotations above, well-defined morphisms (typed terms) in any cartesian-closed category can be constructed according to the followingtyping rules. The usual categorical morphism notationf:α→β{\displaystyle f:\alpha \to \beta }is replaced withtyping contextnotationα⊢f:β{\displaystyle \alpha \vdash f:\beta }. Identity: Composition: Unit type(terminal object): Cartesian product: Left and right projection: Currying: Application: Finally, the equations of the category are These equations imply the followingη{\displaystyle \eta }-laws: Now, there existstsuch thatα1×…×αn⊢t:β{\displaystyle \alpha _{1}\times \ldots \times \alpha _{n}\vdash t:\beta }iffα1,…,αn⊢β{\displaystyle \alpha _{1},\ldots ,\alpha _{n}\vdash \beta }is provable in implicational intuitionistic logic. Thanks to the Curry–Howard correspondence, a typed expression whose type corresponds to a logical formula is analogous to a proof of that formula. Here are examples. As an example, consider a proof of the theoremα→α. Inlambda calculus, this is the type of the identity functionI=λx.xand in combinatory logic, the identity function is obtained by applyingS=λfgx.fx(gx) twice toK=λxy.x. That is,I= ((SK)K). As a description of a proof, this says that the following steps can be used to proveα→α: In general, the procedure is that whenever the program contains an application of the form (PQ), these steps should be followed: As a more complicated example, let's look at the theorem that corresponds to theBfunction. The type ofBis(β→α) → (γ→β) →γ→α.Bis equivalent to (S(KS)K). This is our roadmap for the proof of the theorem(β→α) → (γ→β) →γ→α. The first step is to construct (KS). To make the antecedent of theKaxiom look like theSaxiom, setαequal to(α→β→γ) → (α→β) →α→γ, andβequal toδ(to avoid variable collisions): Since the antecedent here is justS, the consequent can be detached using Modus Ponens: This is the theorem that corresponds to the type of (KS). Now applySto this expression. TakingSas follows putα=δ,β=α→β→γ, andγ= (α→β) →α→γ, yielding and then detach the consequent: This is the formula for the type of (S(KS)). A special case of this theorem hasδ= (β→γ): This last formula must be applied toK. SpecializeKagain, this time by replacingαwith(β→γ)andβwithα: This is the same as the antecedent of the prior formula so, detaching the consequent: Switching the names of the variablesαandγgives us which was what remained to prove. The diagram below gives proof of(β→α) → (γ→β) →γ→αin natural deduction and shows how it can be interpreted as the λ-expressionλa.λb.λg.(a(bg))of type(β→α) → (γ→β) →γ→α. Recently, the isomorphism has been proposed as a way to define search space partition ingenetic programming.[13]The method indexes sets of genotypes (the program trees evolved by the GP system) by their Curry–Howard isomorphic proof (referred to as a species). As noted byINRIAresearch director Bernard Lang,[14]the Curry-Howard correspondence constitutes an argument against the patentability of software: since algorithms are mathematical proofs, patentability of the former would imply patentability of the latter. A theorem could be private property; a mathematician would have to pay for using it, and to trust the company that sells it but keeps its proof secret and rejects responsibility for any errors. The correspondences listed here go much farther and deeper. For example, cartesian closed categories are generalized byclosed monoidal categories. Theinternal languageof these categories is thelinear type system(corresponding tolinear logic), which generalizes simply-typed lambda calculus as the internal language of cartesian closed categories. Moreover, these can be shown to correspond tocobordisms,[15]which play a vital role instring theory. An extended set of equivalences is also explored inhomotopy type theory. Here,type theoryis extended by theunivalence axiom("equivalence is equivalent to equality") which permits homotopy type theory to be used as a foundation for all of mathematics (includingset theoryand classical logic, providing new ways to discuss theaxiom of choiceand many other things). That is, the Curry–Howard correspondence that proofs are elements of inhabited types is generalized to the notion ofhomotopic equivalenceof proofs (as paths in space, theidentity typeorequality typeof type theory being interpreted as a path).[16]
https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspondence
TheRamanujan machineis a specialised software package, developed by a team of scientists at theTechnion: Israeli Institute of Technology, to discover new formulas in mathematics. It has been named after the Indian mathematicianSrinivasa Ramanujanbecause it supposedly imitates the thought process of Ramanujan in his discovery of hundreds of formulas.[1][2][3][4]The machine has produced several conjectures in the form ofcontinued fractionexpansions of expressions involving some of the most important constants in mathematics likeeandπ (pi). Some of these conjectures produced by the Ramanujan machine have subsequently been proved true. The others continue to remain as conjectures. The software was conceptualised and developed by a group of undergraduates of the Technion under the guidance ofIdo Kaminer[he], an electrical engineering faculty member of Technion. The details of the machine were published online on 3 February 2021 in the journalNature.[3] According toGeorge Andrews, an expert on the mathematics of Ramanujan, even though some of the results produced by the Ramanujan machine are amazing and difficult to prove, the results produced by the machine are not of the caliber of Ramanujan and so calling the software theRamanujan machineis slightly outrageous.[5][6]Doron Zeilberger, an Israeli mathematician, has opined that the Ramanujan machine is a harbinger of a new methodology of doing mathematics.[7] The following are some of the formulas discovered by the Ramanujan machine which have been later proved to be true:[3] The following are some of the many formulas conjectured by the Ramanujan machine whose truth or falsity has not yet been established:[8] In the last expression, the numbers 4, 14, 30, 52, . . . are defined by the sequencean=3n2+7n+4{\displaystyle a_{n}=3n^{2}+7n+4}forn=0,1,2,3,…{\displaystyle n=0,1,2,3,\ldots }and the numbers 8, 72, 288, 800, . . . are generated using the formulabn=2n2(n+1)2{\displaystyle b_{n}=2n^{2}(n+1)^{2}}forn=1,2,3…{\displaystyle n=1,2,3\ldots }.
https://en.wikipedia.org/wiki/Ramanujan_machine
Acomputer-assisted proofis amathematical proofthat has been at least partially generated bycomputer. Most computer-aided proofs to date have been implementations of largeproofs-by-exhaustionof a mathematicaltheorem. The idea is to use a computer program to perform lengthy computations, and to provide a proof that the result of these computations implies the given theorem. In 1976, thefour color theoremwas the first major theorem to be verified using acomputer program. Attempts have also been made in the area ofartificial intelligenceresearch to create smaller, explicit, new proofs of mathematical theorems from the bottom up usingautomated reasoningtechniques such asheuristicsearch. Suchautomated theorem provershave proved a number of new results and found new proofs for known theorems.[citation needed]Additionally, interactiveproof assistantsallow mathematicians to develop human-readable proofs which are nonetheless formally verified for correctness. Since these proofs are generallyhuman-surveyable(albeit with difficulty, as with the proof of theRobbins conjecture) they do not share the controversial implications of computer-aided proofs-by-exhaustion. One method for using computers in mathematical proofs is by means of so-calledvalidated numericsor rigorous numerics. This means computing numerically yet with mathematical rigour. One uses set-valued arithmetic andinclusion principle[clarify]in order to ensure that the set-valued output of a numerical program encloses the solution of the original mathematical problem. This is done by controlling, enclosing and propagating round-off and truncation errors using for exampleinterval arithmetic. More precisely, one reduces the computation to a sequence of elementary operations, say(+,−,×,/){\displaystyle (+,-,\times ,/)}. In a computer, the result of each elementary operation is rounded off by the computer precision. However, one can construct an interval provided by upper and lower bounds on the result of an elementary operation. Then one proceeds by replacing numbers with intervals and performing elementary operations between such intervals of representable numbers.[citation needed] Computer-assisted proofs are the subject of some controversy in the mathematical world, withThomas Tymoczkofirst to articulate objections. Those who adhere to Tymoczko's arguments believe that lengthy computer-assisted proofs are not, in some sense, 'real'mathematical proofsbecause they involve so many logical steps that they are not practicallyverifiableby human beings, and that mathematicians are effectively being asked to replacelogical deductionfrom assumedaxiomswith trust in an empirical computational process, which is potentially affected byerrorsin the computer program, as well as defects in the runtime environment and hardware.[1] Other mathematicians believe that lengthy computer-assisted proofs should be regarded ascalculations, rather thanproofs: the proof algorithm itself should be proved valid, so that its use can then be regarded as a mere "verification". Arguments that computer-assisted proofs are subject to errors in their source programs, compilers, and hardware can be resolved by providing a formal proof of correctness for the computer program (an approach which was successfully applied to thefour color theoremin 2005) as well as replicating the result using different programming languages, different compilers, and different computer hardware. Another possible way of verifying computer-aided proofs is to generate their reasoning steps in amachine readableform, and then use aproof checkerprogram to demonstrate their correctness. Since validating a given proof is much easier than finding a proof, the checker program is simpler than the original assistant program, and it is correspondingly easier to gain confidence into its correctness. However, this approach of using a computer program to prove the output of another program correct does not appeal to computer proof skeptics, who see it as adding another layer of complexity without addressing the perceived need for human understanding. Another argument against computer-aided proofs is that they lackmathematical elegance—that they provide no insights or new and useful concepts. In fact, this is an argument that could be advanced against any lengthy proof by exhaustion. An additional philosophical issue raised by computer-aided proofs is whether they make mathematics into aquasi-empirical science, where thescientific methodbecomes more important than the application of pure reason in the area of abstract mathematical concepts. This directly relates to the argument within mathematics as to whether mathematics is based on ideas, or "merely" anexercisein formal symbol manipulation. It also raises the question whether, if according to thePlatonistview, all possible mathematical objects in some sense "already exist", whether computer-aided mathematics is anobservationalscience like astronomy, rather than an experimental one like physics or chemistry. This controversy within mathematics is occurring at the same time as questions are being asked in the physics community about whether twenty-first centurytheoretical physicsis becoming too mathematical, and leaving behind its experimental roots. The emerging field ofexperimental mathematicsis confronting this debate head-on by focusing on numerical experiments as its main tool for mathematical exploration. Inclusion in this list does not imply that a formal computer-checked proof exists, but rather, that a computer program has been involved in some way. See the main articles for details.
https://en.wikipedia.org/wiki/Computer-aided_proof
Logic programmingis aprogramming,databaseandknowledge representationparadigm based on formallogic. A logic program is a set of sentences in logical form, representing knowledge about some problem domain. Computation is performed by applying logical reasoning to that knowledge, to solve problems in the domain. Major logic programming language families includeProlog,Answer Set Programming(ASP) andDatalog. In all of these languages, rules are written in the form ofclauses: and are read as declarative sentences in logical form: Ais called theheadof the rule,B1, ...,Bnis called thebody, and theBiare calledliteralsor conditions. When n = 0, the rule is called afactand is written in the simplified form: Queries (or goals) have the same syntax as the bodies of rules and are commonly written in the form: In the simplest case ofHorn clauses(or "definite" clauses), all of the A, B1, ..., Bnareatomic formulaeof the form p(t1,..., tm), where p is a predicate symbol naming a relation, like "motherhood", and the tiare terms naming objects (or individuals). Terms include both constant symbols, like "charles", and variables, such as X, which start with an upper case letter. Consider, for example, the following Horn clause program: Given a query, the program produces answers. For instance for a query?- parent_child(X, william), the single answer is Various queries can be asked. For instance the program can be queried both to generate grandparents and to generate grandchildren. It can even be used to generate all pairs of grandchildren and grandparents, or simply to check if a given pair is such a pair: Although Horn clause logic programs areTuring complete,[1][2]for most practical applications, Horn clause programs need to be extended to "normal" logic programs with negative conditions. For example, the definition of sibling uses a negative condition, where thepredicate= is defined by the clauseX = X: Logic programming languages that include negative conditions have the knowledge representation capabilities of anon-monotonic logic. In ASP and Datalog, logic programs have only adeclarativereading, and their execution is performed by means of a proof procedure or model generator whose behaviour is not meant to be controlled by the programmer. However, in the Prolog family of languages, logic programs also have aproceduralinterpretation as goal-reduction procedures. From this point of view, clause A :- B1,...,Bnis understood as: Negative conditions in the bodies of clauses also have a procedural interpretation, known asnegation as failure: A negative literalnot Bis deemed to hold if and only if the positive literalBfails to hold. Much of the research in the field of logic programming has been concerned with trying to develop a logical semantics for negation as failure and with developing other semantics and other implementations for negation. These developments have been important, in turn, for supporting the development offormal methodsfor logic-basedprogram verificationandprogram transformation. The use of mathematical logic to represent and executecomputer programsis also a feature of thelambda calculus, developed byAlonzo Churchin the 1930s. However, the first proposal to use theclausalform of logic for representing computer programs was made byCordell Green.[3]This used an axiomatization of a subset ofLISP, together with a representation of an input-output relation, to compute the relation by simulating the execution of the program in LISP. Foster and Elcock'sAbsys, on the other hand, employed a combination of equations and lambda calculus in an assertional programming language that places no constraints on the order in which operations are performed.[4] Logic programming, with its current syntax of facts and rules, can be traced back to debates in the late 1960s and early 1970s about declarative versus procedural representations of knowledge inartificial intelligence. Advocates of declarative representations were notably working atStanford, associated withJohn McCarthy,Bertram Raphaeland Cordell Green, and inEdinburgh, withJohn Alan Robinson(an academic visitor fromSyracuse University),Pat Hayes, andRobert Kowalski. Advocates of procedural representations were mainly centered atMIT, under the leadership ofMarvin MinskyandSeymour Papert.[5] Although it was based on the proof methods of logic,Planner, developed byCarl Hewittat MIT, was the first language to emerge within this proceduralist paradigm.[6]Planner featured pattern-directed invocation of procedural plans from goals (i.e. goal-reduction orbackward chaining) and from assertions (i.e.forward chaining). The most influential implementation of Planner was the subset of Planner, called Micro-Planner, implemented byGerry Sussman,Eugene CharniakandTerry Winograd. Winograd used Micro-Planner to implement the landmark, natural-language understanding programSHRDLU.[7]For the sake of efficiency, Planner used a backtracking control structure so that only one possible computation path had to be stored at a time. Planner gave rise to the programming languagesQA4,[8]Popler,[9]Conniver,[10]QLISP,[11]and the concurrent language Ether.[12] Hayes and Kowalski in Edinburgh tried to reconcile the logic-based declarative approach to knowledge representation with Planner's procedural approach. Hayes (1973) developed an equational language, Golux, in which different procedures could be obtained by altering the behavior of the theorem prover.[13] In the meanwhile,Alain ColmerauerinMarseillewas working onnatural-language understanding, using logic to represent semantics and using resolution for question-answering. During the summer of 1971, Colmerauer invited Kowalski to Marseille, and together they discovered that the clausal form of logic could be used to representformal grammarsand that resolution theorem provers could be used for parsing. They observed that some theorem provers, like hyper-resolution,[14]behave as bottom-up parsers and others, likeSL resolution(1971)[15]behave as top-down parsers. It was in the following summer of 1972, that Kowalski, again working with Colmerauer, developed the procedural interpretation of implications in clausal form. It also became clear that such clauses could be restricted to definite clauses orHorn clauses, and that SL-resolution could be restricted (and generalised) toSLD resolution. Kowalski's procedural interpretation and SLD were described in a 1973 memo, published in 1974.[16] Colmerauer, with Philippe Roussel, used the procedural interpretation as the basis of Prolog, which was implemented in the summer and autumn of 1972. The first Prolog program, also written in 1972 and implemented in Marseille, was a French question-answering system. The use of Prolog as a practical programming language was given great momentum by the development of a compiler byDavid H. D. Warrenin Edinburgh in 1977. Experiments demonstrated that Edinburgh Prolog could compete with the processing speed of othersymbolic programminglanguages such asLisp.[17]Edinburgh Prolog became thede factostandard and strongly influenced the definition ofISOstandard Prolog. Logic programming gained international attention during the 1980s, when it was chosen by the JapaneseMinistry of International Trade and Industryto develop the software for theFifth Generation Computer Systems(FGCS) project. The FGCS project aimed to use logic programming to develop advancedArtificial Intelligenceapplications on massivelyparallel computers. Although the project initially explored the use of Prolog, it later adopted the use ofconcurrent logic programming, because it was closer to the FGCS computer architecture. However, the committed choice feature of concurrent logic programming interfered with the language's logical semantics[18]and with its suitability for knowledge representation and problem solving applications. Moreover, the parallel computer systems developed in the project failed to compete with advances taking place in the development of more conventional, general-purpose computers. Together these two issues resulted in the FGCS project failing to meet its objectives. Interest in both logic programming and AI fell into world-wide decline.[19] In the meanwhile, more declarative logic programming approaches, including those based on the use of Prolog, continued to make progress independently of the FGCS project. In particular, although Prolog was developed to combine declarative and procedural representations of knowledge, the purely declarative interpretation of logic programs became the focus for applications in the field ofdeductive databases. Work in this field became prominent around 1977, when Hervé Gallaire andJack Minkerorganized a workshop on logic and databases in Toulouse.[20]The field was eventually renamed asDatalog. This focus on the logical, declarative reading of logic programs was given further impetus by the development ofconstraint logic programmingin the 1980s andAnswer Set Programmingin the 1990s. It is also receiving renewed emphasis in recent applications of Prolog[21] TheAssociation for Logic Programming(ALP) was founded in 1986 to promote Logic Programming. Its official journal until 2000, wasThe Journal of Logic Programming. Its foundingeditor-in-chiefwasJ. Alan Robinson.[22]In 2001, the journal was renamedThe Journal of Logic and Algebraic Programming, and the official journal of ALP becameTheory and Practice of Logic Programming, published byCambridge University Press. Logic programs enjoy a rich variety of semantics and problem solving methods, as well as a wide range of applications in programming, databases, knowledge representation and problem solving. The procedural interpretation of logic programs, which uses backward reasoning to reduce goals to subgoals, is a special case of the use of a problem-solving strategy tocontrolthe use of a declarative,logicalrepresentation of knowledge to obtain the behaviour of analgorithm. More generally, different problem-solving strategies can be applied to the same logical representation to obtain different algorithms. Alternatively, different algorithms can be obtained with a given problem-solving strategy by using different logical representations.[23] The two main problem-solving strategies arebackward reasoning(goal reduction) andforward reasoning, also known as top-down and bottom-up reasoning, respectively. In the simple case of a propositional Horn clause program and a top-level atomic goal, backward reasoning determines anand-or tree, which constitutes the search space for solving the goal. The top-level goal is the root of the tree. Given any node in the tree and any clause whose head matches the node, there exists a set of child nodes corresponding to the sub-goals in the body of the clause. These child nodes are grouped together by an "and". The alternative sets of children corresponding to alternative ways of solving the node are grouped together by an "or". Any search strategy can be used to search this space. Prolog uses a sequential, last-in-first-out, backtracking strategy, in which only one alternative and one sub-goal are considered at a time. For example, subgoals can be solved in parallel, and clauses can also be tried in parallel. The first strategy is calledand-paralleland the second strategy is calledor-parallel. Other search strategies, such as intelligent backtracking,[24]or best-first search to find an optimal solution,[25]are also possible. In the more general, non-propositional case, where sub-goals can share variables, other strategies can be used, such as choosing the subgoal that is most highly instantiated or that is sufficiently instantiated so that only one procedure applies.[26]Such strategies are used, for example, inconcurrent logic programming. In most cases, backward reasoning from a query or goal is more efficient than forward reasoning. But sometimes with Datalog and Answer Set Programming, there may be no query that is separate from the set of clauses as a whole, and then generating all the facts that can be derived from the clauses is a sensible problem-solving strategy. Here is another example, where forward reasoning beats backward reasoning in a more conventional computation task, where the goal?- fibonacci(n, Result)is to find the nthfibonacci number: Here the relationfibonacci(N, M)stands for the functionfibonacci(N) = M, and the predicateN is Expressionis Prolog notation for the predicate that instantiates the variableNto the value ofExpression. Given the goal of computing the fibonacci number ofn, backward reasoning reduces the goal to the two subgoals of computing the fibonacci numbers of n-1 and n-2. It reduces the subgoal of computing the fibonacci number of n-1 to the two subgoals of computing the fibonacci numbers of n-2 and n-3, redundantly computing the fibonacci number of n-2. This process of reducing one fibonacci subgoal to two fibonacci subgoals continues until it reaches the numbers 0 and 1. Its complexity is of the order 2n. In contrast, forward reasoning generates the sequence of fibonacci numbers, starting from 0 and 1 without any recomputation, and its complexity is linear with respect to n. Prolog cannot perform forward reasoning directly. But it can achieve the effect of forward reasoning within the context of backward reasoning by means oftabling: Subgoals are maintained in a table, along with their solutions. If a subgoal is re-encountered, it is solved directly by using the solutions already in the table, instead of re-solving the subgoals redundantly.[27] Logic programming can be viewed as a generalisation of functional programming, in which functions are a special case of relations.[28]For example, the function, mother(X) = Y, (every X has only one mother Y) can be represented by the relation mother(X, Y). In this respect, logic programs are similar torelational databases, which also represent functions as relations. Compared with relational syntax, functional syntax is more compact for nested functions. For example, in functional syntax the definition of maternal grandmother can be written in the nested form: The same definition in relational notation needs to be written in the unnested, flattened form: However, nested syntax can be regarded as syntactic sugar for unnested syntax.CiaoProlog, for example, transforms functional syntax into relational form and executes the resulting logic program using the standard Prolog execution strategy.[29]Moreover, the same transformation can be used to execute nested relations that are not functional. For example: The termrelational programminghas been used to cover a variety of programming languages that treat functions as a special case of relations. Some of these languages, such asminiKanren[28]and relational linear programming[30]are logic programming languages in the sense of this article. However, the relational language RML is an imperative programming language[31]whose core construct is a relational expression, which is similar to an expression in first-order predicate logic. Other relational programming languages are based on the relational calculus[32]or relational algebra.[33] Viewed in purely logical terms, there are two approaches to the declarative semantics of Horn clause logic programs: One approach is the originallogical consequencesemantics, which understands solving a goal as showing that the goal is a theorem that is true in allmodelsof the program. In this approach, computation istheorem-provinginfirst-order logic; and bothbackward reasoning, as in SLD resolution, andforward reasoning, as in hyper-resolution, are correct and complete theorem-proving methods. Sometimes such theorem-proving methods are also regarded as providing a separateproof-theoretic (or operational) semanticsfor logic programs. But from a logical point of view, they are proof methods, rather than semantics. The other approach to the declarative semantics of Horn clause programs is thesatisfiabilitysemantics, which understands solving a goal as showing that the goal is true (or satisfied) in someintended (or standard) modelof the program. For Horn clause programs, there always exists such a standard model: It is the uniqueminimal modelof the program. Informally speaking, a minimal model is a model that, when it is viewed as the set of all (variable-free) facts that are true in the model, contains no smaller set of facts that is also a model of the program. For example, the following facts represent the minimal model of the family relationships example in the introduction of this article. All other variable-free facts are false in the model: The satisfiability semantics also has an alternative, more mathematical characterisation as theleast fixed pointof the function that uses the rules in the program to derive new facts from existing facts in one step of inference. Remarkably, the same problem-solving methods of forward and backward reasoning, which were originally developed for the logical consequence semantics, are equally applicable to the satisfiability semantics: Forward reasoning generates the minimal model of a Horn clause program, by deriving new facts from existing facts, until no new additional facts can be generated. Backward reasoning, which succeeds by reducing a goal to subgoals, until all subgoals are solved by facts, ensures that the goal is true in the minimal model, without generating the model explicitly.[34] The difference between the two declarative semantics can be seen with the definitions of addition and multiplication insuccessor arithmetic, which represents the natural numbers0, 1, 2, ...as a sequence of terms of the form0, s(0), s(s(0)), .... In general, the terms(X)represents the successor ofX,namelyX + 1.Here are the standard definitions of addition and multiplication in functional notation: Here are the same definitions as a logic program, usingadd(X, Y, Z)to representX + Y = Z,andmultiply(X, Y, Z)to representX × Y = Z: The two declarative semantics both give the same answers for the same existentially quantified conjunctions of addition and multiplication goals. For example2 × 2 = Xhas the solutionX = 4; andX × X = X + Xhas two solutionsX = 0andX = 2: However, with the logical-consequence semantics, there are non-standard models of the program, in which, for example,add(s(s(0)), s(s(0)), s(s(s(s(s(0)))))),i.e.2 + 2 = 5is true. But with the satisfiability semantics, there is only one model, namely the standard model of arithmetic, in which2 + 2 = 5is false. In both semantics, the goal?-add(s(s(0)),s(s(0)),s(s(s(s(s(0))))))fails. In the satisfiability semantics, the failure of the goal means that the truth value of the goal is false. But in the logical consequence semantics, the failure means that the truth value of the goal is unknown. Negation as failure(NAF), as a way of concluding that a negative conditionnot pholds by showing that the positive conditionpfails to hold, was already a feature of early Prolog systems. The resulting extension ofSLD resolutionis calledSLDNF. A similar construct, called "thnot", also existed inMicro-Planner. The logical semantics of NAF was unresolved untilKeith Clark[35]showed that, under certain natural conditions, NAF is an efficient, correct (and sometimes complete) way of reasoning with the logical consequence semantics using thecompletionof a logic program in first-order logic. Completion amounts roughly to regarding the set of all the program clauses with the same predicate in the head, say: as a definition of the predicate: whereiffmeans "if and only if". The completion also includes axioms of equality, which correspond tounification. Clark showed that proofs generated by SLDNF are structurally similar to proofs generated by a natural deduction style of reasoning with the completion of the program. Consider, for example, the following program: Given the goal of determining whether tom should receive a sanction, the first rule succeeds in showing that tom should be punished: This is because tom is a thief, and it cannot be shown that tom should be rehabilitated. It cannot be shown that tom should be rehabilitated, because it cannot be shown that tom is a minor. If, however, we receive new information that tom is indeed a minor, the previous conclusion that tom should be punished is replaced by the new conclusion that tom should be rehabilitated: This property of withdrawing a conclusion when new information is added, is called non-monotonicity, and it makes logic programming anon-monotonic logic. But, if we are now told that tom is violent, the conclusion that tom should be punished will be reinstated: The completion of this program is: The notion of completion is closely related toJohn McCarthy'scircumscriptionsemantics for default reasoning,[36]and toRay Reiter'sclosed world assumption.[37] The completion semantics for negation is a logical consequence semantics, for which SLDNF provides a proof-theoretic implementation. However, in the 1980s, the satisfiability semantics became more popular for logic programs with negation. In the satisfiability semantics, negation is interpreted according to the classical definition of truth in an intended or standard model of the logic program. In the case of logic programs with negative conditions, there are two main variants of the satisfiability semantics: In thewell-founded semantics, the intended model of a logic program is a unique, three-valued, minimal model, which always exists. The well-founded semantics generalises the notion ofinductive definitionin mathematical logic.[38]XSB Prolog[39]implements the well-founded semantics using SLG resolution.[40] In the alternativestable model semantics, there may be no intended models or several intended models, all of which are minimal and two-valued. The stable model semantics underpinsanswer set programming(ASP). Both the well-founded and stable model semantics apply to arbitrary logic programs with negation. However, both semantics coincide forstratifiedlogic programs. For example, the program for sanctioning thieves is (locally) stratified, and all three semantics for the program determine the same intended model: Attempts to understand negation in logic programming have also contributed to the development ofabstract argumentation frameworks.[41]In an argumentation interpretation of negation, the initial argument that tom should be punished because he is a thief, is attacked by the argument that he should be rehabilitated because he is a minor. But the fact that tom is violent undermines the argument that tom should be rehabilitated and reinstates the argument that tom should be punished. Metaprogramming, in which programs are treated as data, was already a feature of early Prolog implementations.[42][43]For example, the Edinburgh DEC10 implementation of Prolog included "an interpreter and a compiler, both written in Prolog itself".[43]The simplest metaprogram is the so-called "vanilla" meta-interpreter: where true represents an empty conjunction, and (B,C) is a composite term representing the conjunction of B and C. The predicate clause(A,B) means that there is a clause of the form A :- B. Metaprogramming is an application of the more general use of ametalogicormetalanguageto describe and reason about another language, called theobject language. Metalogic programming allows object-level and metalevel representations to be combined, as in natural language. For example, in the following program, the atomic formulaattends(Person, Meeting)occurs both as an object-level formula, and as an argument of the metapredicatesprohibitedandapproved. In his popular Introduction to Cognitive Science,[44]Paul Thagardincludes logic andrulesas alternative approaches to modelling human thinking. He argues that rules, which have the formIF condition THEN action, are "very similar" to logical conditionals, but they are simpler and have greater psychological plausibility (page 51). Among other differences between logic and rules, he argues that logic uses deduction, but rules use search (page 45) and can be used to reason either forward or backward (page 47). Sentences in logic "have to be interpreted asuniversally true", but rules can bedefaults, which admit exceptions (page 44). He states that "unlike logic, rule-based systems can also easily represent strategic information about what to do" (page 45). For example, "IF you want to go home for the weekend, and you have bus fare, THEN you can catch a bus". He does not observe that the same strategy of reducing a goal to subgoals can be interpreted, in the manner of logic programming, as applying backward reasoning to a logical conditional: All of these characteristics of rule-based systems - search, forward and backward reasoning, default reasoning, and goal-reduction - are also defining characteristics of logic programming. This suggests that Thagard's conclusion (page 56) that: Much of human knowledge is naturally described in terms of rules, and many kinds of thinking such as planning can be modeled by rule-based systems. also applies to logic programming. Other arguments showing how logic programming can be used to model aspects of human thinking are presented byKeith StenningandMichiel van Lambalgenin their book, Human Reasoning and Cognitive Science.[45]They show how the non-monotonic character of logic programs can be used to explain human performance on a variety of psychological tasks. They also show (page 237) that "closed–world reasoning in its guise as logic programming has an appealing neural implementation, unlike classical logic." In The Proper Treatment of Events,[46]Michiel van Lambalgen and Fritz Hamm investigate the use of constraint logic programming to code "temporal notions in natural language by looking at the way human beings construct time". The use of logic to represent procedural knowledge and strategic information was one of the main goals contributing to the early development of logic programming. Moreover, it continues to be an important feature of the Prolog family of logic programming languages today. However, many applications of logic programming, including Prolog applications, increasingly focus on the use of logic to represent purely declarative knowledge. These applications include both the representation of generalcommonsenseknowledge and the representation of domain specificexpertise. Commonsense includes knowledge about cause and effect, as formalised, for example, in thesituation calculus,event calculusandaction languages. Here is a simplified example, which illustrates the main features of such formalisms. The first clause states that a fact holds immediately after an event initiates (or causes) the fact. The second clause is aframe axiom, which states that a fact that holds at a time continues to hold at the next time unless it is terminated by an event that happens at the time. This formulation allows more than one event to occur at the same time: Hereholdsis a meta-predicate, similar tosolveabove. However, whereassolvehas only one argument, which applies to general clauses, the first argument ofholdsis a fact and the second argument is a time (or state). The atomic formulaholds(Fact, Time)expresses that theFactholds at theTime. Such time-varying facts are also calledfluents. The atomic formulahappens(Event, Time)expresses that the Event happens at theTime. The following example illustrates how these clauses can be used to reason about causality in a toyblocks world. Here, in the initial state at time 0, a green block is on a table and a red block is stacked on the green block (like a traffic light). At time 0, the red block is moved to the table. At time 1, the green block is moved onto the red block. Moving an object onto a place terminates the fact that the object is on any place, and initiates the fact that the object is on the place to which it is moved: Forward reasoning and backward reasoning generate the same answers to the goalholds(Fact, Time). But forward reasoning generates fluentsprogressivelyin temporal order, and backward reasoning generates fluentsregressively, as in the domain-specific use ofregressionin thesituation calculus.[47] Logic programming has also proved to be useful for representing domain-specific expertise inexpert systems.[48]But human expertise, like general-purpose commonsense, is mostly implicit andtacit, and it is often difficult to represent such implicit knowledge in explicit rules. This difficulty does not arise, however, when logic programs are used to represent the existing, explicit rules of a business organisation or legal authority. For example, here is a representation of a simplified version of the first sentence of the British Nationality Act, which states that a person who is born in the UK becomes a British citizen at the time of birth if a parent of the person is a British citizen at the time of birth: Historically, the representation of a large portion of the British Nationality Act as a logic program in the 1980s[49]was "hugely influential for the development of computational representations of legislation, showing how logic programming enables intuitively appealing representations that can be directly deployed to generate automatic inferences".[50] More recently, the PROLEG system,[51]initiated in 2009 and consisting of approximately 2500 rules and exceptions of civil code and supreme court case rules in Japan, has become possibly the largest legal rule base in the world.[52] The SLD resolution rule of inference is neutral about the order in which subgoals in the bodies of clauses can beselectedfor solution. For the sake of efficiency, Prolog restricts this order to the order in which the subgoals are written. SLD is also neutral about the strategy for searching the space of SLD proofs. Prolog searches this space, top-down, depth-first, trying different clauses for solving the same (sub)goal in the order in which the clauses are written. This search strategy has the advantage that the current branch of the tree can be represented efficiently by astack. When a goal clause at the top of the stack is reduced to a new goal clause, the new goal clause is pushed onto the top of the stack. When the selected subgoal in the goal clause at the top of the stack cannot be solved, the search strategybacktracks, removing the goal clause from the top of the stack, and retrying the attempted solution of the selected subgoal in the previous goal clause using the next clause that matches the selected subgoal. Backtracking can be restricted by using a subgoal, calledcut, written as !, which always succeeds but cannot be backtracked. Cut can be used to improve efficiency, but can also interfere with the logical meaning of clauses. In many cases, the use of cut can be replaced by negation as failure. In fact, negation as failure can be defined in Prolog, by using cut, together with any literal, sayfail, that unifies with the head of no clause: Prolog provides other features, in addition to cut, that do not have a logical interpretation. These include the built-in predicatesassertandretractfor destructively updating the state of the program during program execution. For example, thetoy blocks world example abovecan be implemented without frame axioms using destructive change of state: The sequence of move events and the resulting locations of the blocks can be computed by executing the query: Various extensions of logic programming have been developed to provide a logical framework for such destructive change of state.[53][54][55] The broad range of Prolog applications, both in isolation and in combination with other languages is highlighted in the Year of Prolog Book,[21]celebrating the 50 year anniversary of Prolog in 2022. Prolog has also contributed to the development of other programming languages, includingALF,Fril,Gödel,Mercury,Oz,Ciao,Visual Prolog,XSB, andλProlog. Constraint logic programming(CLP) combines Horn clause logic programming withconstraint solving. It extends Horn clauses by allowing some predicates, declared as constraint predicates, to occur as literals in the body of a clause. Constraint predicates are not defined by the facts and rules in the program, but are predefined by some domain-specific model-theoretic structure or theory. Procedurally, subgoals whose predicates are defined by the program are solved by goal-reduction, as in ordinary logic programming, but constraints are simplified and checked for satisfiability by a domain-specific constraint-solver, which implements the semantics of the constraint predicates. An initial problem is solved by reducing it to a satisfiable conjunction of constraints. Interestingly, the first version of Prolog already included a constraint predicate dif(term1, term2), from Philippe Roussel's 1972 PhD thesis, which succeeds if both of its arguments are different terms, but which is delayed if either of the terms contains a variable.[52] The following constraint logic program represents a toy temporal database ofjohn'shistory as a teacher: Here≤and<are constraint predicates, with their usual intended semantics. The following goal clause queries the database to find out whenjohnboth taughtlogicand was aprofessor: The solution2010 ≤ T, T ≤ 2012results from simplifying the constraints2005 ≤ T, T ≤ 2012, 2010 ≤ T, T < 2014. Constraint logic programming has been used to solve problems in such fields ascivil engineering,mechanical engineering,digital circuitverification,automated timetabling,air traffic control, and finance. It is closely related toabductive logic programming. Datalog is a database definition language, which combines a relational view of data, as inrelational databases, with a logical view, as in logic programming. Relational databases use a relational calculus or relational algebra, withrelational operations, such asunion,intersection,set differenceandcartesian productto specify queries, which access a database. Datalog uses logical connectives, such asor,andandnotin the bodies of rules to define relations as part of the database itself. It was recognized early in the development of relational databases that recursive queries cannot be expressed in either relational algebra or relational calculus, and that this defficiency can be remedied by introducing a least-fixed-point operator.[56][57]In contrast, recursive relations can be defined naturally by rules in logic programs, without the need for any new logical connectives or operators. Datalog differs from more general logic programming by having only constants and variables as terms. Moreover, all facts are variable-free, and rules are restricted, so that if they are executed bottom-up, then the derived facts are also variable-free. For example, consider the family database: Bottom-up execution derives the following set of additional facts and terminates: Top-down execution derives the same answers to the query: But then it goes into an infinite loop. However, top-down execution withtablinggives the same answers and terminates without looping. Like Datalog, Answer Set programming (ASP) is not Turing-complete. Moreover, instead of separating goals (or queries) from the program to be used in solving the goals, ASP treats the whole program as a goal, and solves the goal by generating a stable model that makes the goal true. For this purpose, it uses thestable model semantics, according to which a logic program can have zero, one or more intended models. For example, the following program represents a degenerate variant of the map colouring problem of colouring two countries red or green: The problem has four solutions represented by four stable models: To represent the standard version of the map colouring problem, we need to add a constraint that two adjacent countries cannot be coloured the same colour. In ASP, this constraint can be written as a clause of the form: With the addition of this constraint, the problem now has only two solutions: The addition of constraints of the form:- Body.eliminates models in whichBodyis true. Confusingly,constraints in ASPare different fromconstraints in CLP. Constraints in CLP are predicates that qualify answers to queries (and solutions of goals). Constraints in ASP are clauses that eliminate models that would otherwise satisfy goals. Constraints in ASP are like integrity constraints in databases. This combination of ordinary logic programming clauses and constraint clauses illustrates the generate-and-test methodology of problem solving in ASP: The ordinary clauses define a search space of possible solutions, and the constraints filter out unwanted solutions.[58] Most implementations of ASP proceed in two steps: First they instantiate the program in all possible ways, reducing it to a propositional logic program (known asgrounding). Then they apply a propositional logic problem solver, such as theDPLL algorithmor aBoolean SAT solver. However, some implementations, such as s(CASP)[59]use a goal-directed, top-down, SLD resolution-like procedure without grounding. Abductive logic programming[60](ALP), like CLP, extends normal logic programming by allowing the bodies of clauses to contain literals whose predicates are not defined by clauses. In ALP, these predicates are declared asabducible(orassumable), and are used as inabductive reasoningto explain observations, or more generally to add new facts to the program (as assumptions) to solve goals. For example, suppose we are given an initial state in which a red block is on a green block on a table at time 0: Suppose we are also given the goal: The goal can represent an observation, in which case a solution is an explanation of the observation. Or the goal can represent a desired future state of affairs, in which case a solution is a plan for achieving the goal.[61] We can use the rules for cause and effect presented earlier to solve the goal, by treating thehappenspredicate as abducible: ALP solves the goal by reasoning backwards and adding assumptions to the program, to solve abducible subgoals. In this case there are many alternative solutions, including: Heretickis an event that marks the passage of time without initiating or terminating any fluents. There are also solutions in which the twomoveevents happen at the same time. For example: Such solutions, if not desired, can be removed by adding an integrity constraint, which is like a constraint clause in ASP: Abductive logic programming has been used for fault diagnosis, planning, natural language processing and machine learning. It has also been used to interpret negation as failure as a form of abductive reasoning.[62] Inductive logic programming (ILP) is an approach tomachine learningthatinduceslogic programs as hypothetical generalisations of positive and negative examples. Given a logic program representing background knowledge and positive examples together with constraints representing negative examples, an ILP system induces a logic program that generalises the positive examples while excluding the negative examples. ILP is similar to ALP, in that both can be viewed as generating hypotheses to explain observations, and as employing constraints to exclude undesirable hypotheses. But in ALP the hypotheses are variable-free facts, and in ILP the hypotheses are general rules.[63][64] For example, given only background knowledge of the mother_child and father_child relations, and suitable examples of the grandparent_child relation, current ILP systems can generate the definition of grandparent_child, inventing an auxiliary predicate, which can be interpreted as the parent_child relation:[65] Stuart Russell[66]has referred to such invention of new concepts as the most important step needed for reaching human-level AI. Recent work in ILP, combining logic programming, learning and probability, has given rise to the fields ofstatistical relational learningandprobabilistic inductive logic programming. Concurrent logic programming integrates concepts of logic programming withconcurrent programming. Its development was given a big impetus in the 1980s by its choice for the systems programming language of theJapanese Fifth Generation Project (FGCS).[67] A concurrent logic program is a set of guardedHorn clausesof the form: The conjunctionG1, ... , Gnis called theguardof the clause, and|is the commitment operator. Declaratively, guarded Horn clauses are read as ordinary logical implications: However, procedurally, when there are several clauses whose headsHmatch a given goal, then all of the clauses are executed in parallel, checking whether their guardsG1, ... , Gnhold. If the guards of more than one clause hold, then a committed choice is made to one of the clauses, and execution proceeds with the subgoalsB1, ..., Bnof the chosen clause. These subgoals can also be executed in parallel. Thus concurrent logic programming implements a form of "don't care nondeterminism", rather than "don't know nondeterminism". For example, the following concurrent logic program defines a predicateshuffle(Left, Right, Merge), which can be used to shuffle two listsLeftandRight, combining them into a single listMergethat preserves the ordering of the two listsLeftandRight: Here,[]represents the empty list, and[Head | Tail]represents a list with first elementHeadfollowed by listTail, as in Prolog. (Notice that the first occurrence of|in the second and third clauses is the list constructor, whereas the second occurrence of|is the commitment operator.) The program can be used, for example, to shuffle the lists[ace, queen, king]and[1, 4, 2]by invoking the goal clause: The program will non-deterministically generate a single solution, for exampleMerge = [ace, queen, 1, king, 4, 2]. Carl Hewitthas argued[68]that, because of theindeterminacy of concurrent computation, concurrent logic programming cannot implement general concurrency. However, according to the logical semantics, any result of a computation of a concurrent logic program is a logical consequence of the program, even though not all logical consequences can be derived. Concurrent constraint logic programming[69]combines concurrent logic programming andconstraint logic programming, using constraints to control concurrency. A clause can contain a guard, which is a set of constraints that may block the applicability of the clause. When the guards of several clauses are satisfied, concurrent constraint logic programming makes a committed choice to use only one. Several researchers have extended logic programming withhigher-order programmingfeatures derived fromhigher-order logic, such as predicate variables. Such languages include the Prolog extensionsHiLog[70]andλProlog.[71] Basing logic programming withinlinear logichas resulted in the design of logic programming languages that are considerably more expressive than those based on classical logic. Horn clause programs can only represent state change by the change in arguments to predicates. In linear logic programming, one can use the ambient linear logic to support state change. Some early designs of logic programming languages based on linear logic include LO,[72]Lolli,[73]ACL,[74]and Forum.[75]Forum provides a goal-directed interpretation of all linear logic. F-logic[76]extends logic programming with objects and the frame syntax. Logtalk[77]extends the Prolog programming language with support for objects, protocols, and other OOP concepts. It supports most standard-compliant Prolog systems as backend compilers. Transaction logic[53]is an extension of logic programming with a logical theory of state-modifying updates. It has both a model-theoretic semantics and a procedural one. An implementation of a subset of Transaction logic is available in theFlora-2[78]system. Other prototypes are alsoavailable.
https://en.wikipedia.org/wiki/Logic_programming
Incomputer scienceandmathematical logic, aproof assistantorinteractive theorem proveris a software tool to assist with the development offormal proofsby human–machine collaboration. This involves some sort of interactive proof editor, or otherinterface, with which a human can guide the search for proofs, the details of which are stored in, and some steps provided by, acomputer. A recent effort within this field is making these tools useartificial intelligenceto automate the formalization of ordinary mathematics.[1] A popular front-end for proof assistants is theEmacs-based Proof General, developed at theUniversity of Edinburgh. Coq includes CoqIDE, which is based on OCaml/Gtk. Isabelle includes Isabelle/jEdit, which is based onjEditand the Isabelle/Scalainfrastructure for document-oriented proof processing. More recently,Visual Studio Codeextensions have been developed for Coq,[9]Isabelle by Makarius Wenzel,[10]and for Lean 4 by the leanprover developers.[11] Freek Wiedijk has been keeping a ranking of proof assistants by the amount of formalized theorems out of a list of 100 well-known theorems. As of September 2023, only five systems have formalized proofs of more than 70% of the theorems, namely Isabelle, HOL Light, Rocq, Lean, and Metamath.[12][13] The following is a list of notable proofs that have been formalized within proof assistants.
https://en.wikipedia.org/wiki/Proof_checking
General Problem Solver(GPS) is acomputer programcreated in 1957 byHerbert A. Simon,J. C. Shaw, andAllen Newell(RAND Corporation) intended to work as a universal problemsolvermachine. In contrast to the formerLogic Theoristproject, theGPSworks withmeans–ends analysis.[1] Any problem that can be expressed as a set ofwell-formed formulas(WFFs) orHorn clauses, and that constitutes adirected graphwith one or more sources (that is,hypotheses) and sinks (that is, desired conclusions), can be solved, in principle, by GPS. Proofs in thepredicate logicandEuclidean geometryproblem spaces are prime examples of the domain of applicability of GPS. It was based on Simon and Newell's theoretical work onlogicmachines. GPS was the first computer program that separated itsknowledgeof problems (rules represented as input data) from its strategy of how to solve problems (a generic solverengine). GPS was implemented in the third-order programming language,IPL.[2] While GPS solved simple problems such as theTowers of Hanoithat could be sufficiently formalized, it could not solve any real-world problems because the search was easily lost in thecombinatorial explosion. Put another way, the number of "walks" through the inferential digraph became computationally untenable. (In practice, even a straightforwardstate space searchsuch as the Towers of Hanoi can become computationally infeasible, albeit judicious prunings of the state space can be achieved by such elementary AI techniques asA*andIDA*). The user defined objects and operations that could be done on the objects, and GPS generatedheuristicsbymeans–ends analysisin order to solve problems. It focused on the available operations, finding what inputs were acceptable and what outputs were generated. It then created subgoals to get closer and closer to the goal. The GPS paradigm eventually evolved into theSoararchitecture forartificial intelligence.
https://en.wikipedia.org/wiki/General_Problem_Solver
Metamathis aformal languageand an associated computer program (aproof assistant) for archiving and verifying mathematical proofs.[2]Several databases of proved theorems have been developed using Metamath covering standard results inlogic,set theory,number theory,algebra,topologyandanalysis, among others.[3] By 2023, Metamath had been used to prove 74[4]of the 100 theorems of the "Formalizing 100 Theorems" challenge.[5]At least 19 proof verifiers use the Metamath format.[6]The Metamath website provides a database of formalized theorems which can be browsed interactively.[7] The Metamath language is ametalanguageforformal systems. The Metamath language has no specific logic embedded in it. Instead, it can be regarded as a way to prove that inference rules (asserted as axioms or proven later) can be applied. The largest database of proved theorems follows conventionalfirst-order logicandZFC set theory.[8] The Metamath language design (employed to state the definitions, axioms, inference rules and theorems) is focused on simplicity. Proofs are checked using an algorithm based onvariable substitution. The algorithm also has optional provisos for what variables must remain distinct after a substitution is made.[9] The set of symbols that can be used for constructing formulas is declared using$c(constant symbols) and$v(variable symbols) statements; for example: The grammar for formulas is specified using a combination of$f(floating (variable-type) hypotheses) and$a(axiomatic assertion) statements; for example: Axioms and rules of inference are specified with$astatements along with${and$}for block scoping and optional$e(essential hypotheses) statements; for example: Using one construct,$astatements, to capture syntactic rules, axiom schemas, and rules of inference is intended to provide a level of flexibility similar tohigher order logical frameworkswithout a dependency on a complex type system. Theorems (and derived rules of inference) are written with$pstatements; for example: Note the inclusion of the proof in the$pstatement. It abbreviates the following detailed proof: The "essential" form of the proof elides syntactic details, leaving a more conventional presentation: All Metamath proof steps use a single substitution rule, which is just the simple replacement of a variable with an expression and not the proper substitution described in works onpredicate calculus. Proper substitution, in Metamath databases that support it, is a derived construct instead of one built into the Metamath language itself. The substitution rule makes no assumption about the logic system in use and only requires that the substitutions of variables are correctly done. Here is a detailed example of how this algorithm works. Steps 1 and 2 of the theorem2p2e4in the Metamath Proof Explorer (set.mm) are depicted left. Let's explain how Metamath uses its substitution algorithm to check that step 2 is the logical consequence of step 1 when you use the theoremopreq2i. Step 2 states that( 2 + 2 ) = ( 2 + ( 1 + 1 ) ). It is the conclusion of the theoremopreq2i. The theoremopreq2istates that ifA=B, then(C F A) = (C F B). This theorem would never appear under this cryptic form in a textbook but its literate formulation is banal: when two quantities are equal, one can replace one by the other in an operation. To check the proof Metamath attempts to unify(C F A) = (C F B)with( 2 + 2 ) = ( 2 + ( 1 + 1 ) ). There is only one way to do so: unifyingCwith2,Fwith+,Awith2andBwith( 1 + 1 ). So now Metamath uses the premise ofopreq2i. This premise states thatA=B. As a consequence of its previous computation, Metamath knows thatAshould be substituted by2andBby( 1 + 1 ). The premiseA=Bbecomes2=( 1 + 1 )and thus step 1 is therefore generated. In its turn step 1 is unified withdf-2.df-2is the definition of the number2and states that2 = ( 1 + 1 ). Here the unification is simply a matter of constants and is straightforward (no problem of variables to substitute). So the verification is finished and these two steps of the proof of2p2e4are correct. When Metamath unifies( 2 + 2 )withBit has to check that the syntactical rules are respected. In factBhas the typeclassthus Metamath has to check that( 2 + 2 )is also typedclass. The Metamath program is the original program created to manipulate databases written using the Metamath language. It has a text (command line) interface and is written in C. It can read a Metamath database into memory, verify the proofs of a database, modify the database (in particular by adding proofs), and write them back out to storage. It has aprovecommand that enables users to enter a proof, along with mechanisms to search for existing proofs. The Metamath program can convert statements toHTMLorTeXnotation; for example, it can output themodus ponensaxiom from set.mm as: Many other programs can process Metamath databases, in particular, there are at least 19 proof verifiers for databases that use the Metamath format.[10] The Metamath website hosts several databases that store theorems derived from various axiomatic systems. Most databases (.mmfiles) have an associated interface, called an "Explorer", which allows one to navigate the statements and proofs interactively on the website, in a user-friendly way. Most databases use aHilbert systemof formal deduction though this is not a requirement. The Metamath Proof Explorer (recorded inset.mm) is the main database. It is based on classicalfirst-order logicandZFCset theory (with the addition ofTarski-Grothendieck set theorywhen needed, for example incategory theory). The database has been maintained for over thirty years (the first proofs inset.mmare dated September 1992). The database contains developments, among other fields, of set theory (ordinals and cardinals, recursion, equivalents of the axiom of choice, the continuum hypothesis...), the construction of the real and complex number systems, order theory, graph theory, abstract algebra, linear algebra, general topology, real and complex analysis, Hilbert spaces, number theory, and elementary geometry.[11] The Metamath Proof Explorer references many text books that can be used in conjunction with Metamath.[12]Thus, people interested in studying mathematics can use Metamath in connection with these books and verify that the proved assertions match the literature. This database develops mathematics from a constructive point of view, starting with the axioms ofintuitionistic logicand continuing with axiom systems ofconstructive set theory. This database develops mathematics from Quine'sNew Foundationsset theory. This database starts withhigher-order logicand derives equivalents to axioms of first-order logic and of ZFC set theory. The Metamath website hosts a few other databases which are not associated with explorers but are nonetheless noteworthy. The databasepeano.mmwritten byRobert SolovayformalizesPeano arithmetic. The databasenat.mm[13]formalizesnatural deduction. The databasemiu.mmformalizes theMU puzzlebased on the formal system MIU presented inGödel, Escher, Bach. The Metamath website also hosts a few older databases which are not maintained anymore, such as the "Hilbert Space Explorer", which presents theorems pertaining toHilbert spacetheory which have now been merged into the Metamath Proof Explorer, and the "Quantum Logic Explorer", which developsquantum logicstarting with the theory of orthomodular lattices. Because Metamath has a very generic concept of what a proof is (namely a tree of formulas connected by inference rules) and no specific logic is embedded in the software, Metamath can be used with species of logic as different as Hilbert-style logics or sequents-based logics or even withlambda calculus. However, Metamath provides no direct support fornatural deductionsystems. As noted earlier, the databasenat.mmformalizes natural deduction. The Metamath Proof Explorer (with its databaseset.mm) instead uses a set of conventions that allow the use of natural deduction approaches within a Hilbert-style logic. Using the design ideas implemented in Metamath,Raph Levienhas implemented very small proof checker,mmverify.py, at only 500 lines of Python code. Ghilbert is a similar though more elaborate language based on mmverify.py.[14]Levien would like to implement a system where several people could collaborate and his work is emphasizing modularity and connection between small theories. Using Levien’s seminal work, many other implementations of the Metamath design principles have been implemented for a broad variety of languages. Juha Arpiainen has implemented his own proof checker inCommon Lispcalled Bourbaki[15]and Marnix Klooster has coded a proof checker inHaskellcalledHmm.[16] Although they all use the overall Metamath approach to formal system checker coding, they also implement new concepts of their own. Mel O'Cat designed a system calledMmj2, which provides agraphic user interfacefor proof entry.[17]The initial aim of Mel O'Cat was to allow the user to enter the proofs by simply typing the formulas and lettingMmj2find the appropriate inference rules to connect them. In Metamath on the contrary you may only enter the theorems names. You may not enter the formulas directly.Mmj2has also the possibility to enter the proof forward or backward (Metamath only allows to enter proof backward). MoreoverMmj2has a real grammar parser (unlike Metamath). This technical difference brings more comfort to the user. In particular Metamath sometimes hesitates between several formulas it analyzes (most of them being meaningless) and asks the user to choose. InMmj2this limitation no longer exists. There is also a project by William Hale to add a graphical user interface to Metamath calledMmide.[18]Paul Chapman in its turn is working on a new proof browser, which has highlighting that allows you to see the referenced theorem before and after the substitution was made. Milpgame is a proof assistant and a checker (it shows a message only something gone wrong) with agraphic user interfacefor the Metamath language(set.mm), written by Filip Cernatescu, it is an open source(MIT License) Java application (cross-platform application: Window, Linux, Mac OS). User can enter the demonstration(proof) in two modes : forward and backward relative to the statement to prove. Milpgame checks if a statement is well formed (has a syntactic verifier). It can save unfinished proofs without the use of dummylink theorem. The demonstration is shown as tree, the statements are shown using html definitions (defined in typesetting chapter). Milpgame is distributed as Java .jar(JRE version 6 update 24 written in NetBeans IDE).
https://en.wikipedia.org/wiki/Metamath
Thede Bruijn factoris a measure of how much harder it is to write aformal mathematical proofinstead of aninformal one. It was created by the Dutch computer-proof pioneerNicolaas Govert de Bruijn. De Bruijn computed it as the size of the formal proof over thesize of the informal proof[clarify].[1] Freek Wiedijkrefined the definition to use the compressed size of the formal proof over the compressed size of the informal proof. He called this the "intrinsic de Bruijin Factor". The compression removes the effect that the length of identifiers in the proofs might have.[2]
https://en.wikipedia.org/wiki/De_Bruijn_factor
Incomputer scienceandautomata theory, adeterministic Büchi automatonis a theoretical machine which either accepts or rejects infinite inputs. Such a machine has a set of states and a transition function, which determines which state the machine should move to from its current state when it reads the next input character. Some states are accepting states and one state is the start state. The machine accepts an input if and only if it will pass through an accepting state infinitely many times as it reads the input. Anon-deterministic Büchi automaton, later referred to just as aBüchi automaton, has a transition function which may have multiple outputs, leading to many possible paths for the same input; it accepts an infinite input if and only if some possible path is accepting. Deterministic and non-deterministic Büchi automata generalizedeterministic finite automataandnondeterministic finite automatato infinite inputs. Each are types ofω-automata. Büchi automata recognize theω-regular languages, the infinite word version ofregular languages. They are named after the Swiss mathematicianJulius Richard Büchi, who invented them in 1962.[1] Büchi automata are often used inmodel checkingas an automata-theoretic version of a formula inlinear temporal logic. Formally, adeterministic Büchi automatonis a tupleA= (Q,Σ,δ,q0,F) that consists of the following components: In a (non-deterministic)Büchi automaton, the transition function δ is replaced with a transition relation Δ that returns a set of states, and the single initial stateq0is replaced by a setIof initial states. Generally, the term Büchi automaton without qualifier refers to non-deterministic Büchi automata. For more comprehensive formalism see alsoω-automaton. The set of Büchi automata isclosed underthe following operations. LetA=(QA,Σ,ΔA,IA,FA){\displaystyle \scriptstyle A=(Q_{A},\Sigma ,\Delta _{A},I_{A},{F}_{A})}andB=(QB,Σ,ΔB,IB,FB){\displaystyle \scriptstyle B=(Q_{B},\Sigma ,\Delta _{B},I_{B},{F}_{B})}be Büchi automata andC=(QC,Σ,ΔC,IC,FC){\displaystyle \scriptstyle C=(Q_{C},\Sigma ,\Delta _{C},I_{C},{F}_{C})}be afinite automaton. Büchi automata recognize theω-regular languages. Using the definition of ω-regular language and the above closure properties of Büchi automata, it can be easily shown that a Büchi automaton can be constructed such that it recognizes any given ω-regular language. For converse, seeconstruction of a ω-regular languagefor a Büchi automaton. The class of deterministic Büchi automata does not suffice to encompass all omega-regular languages. In particular, there is no deterministic Büchi automaton that recognizes the language⁠(0∪1)∗0ω{\displaystyle (0\cup 1)^{*}0^{\omega }}⁠, which contains exactly words in which 1 occurs only finitely many times. We can demonstrate it by contradiction that no such deterministic Büchi automaton exists. Let us supposeAis a deterministic Büchi automaton that recognizes⁠(0∪1)∗0ω{\displaystyle (0\cup 1)^{*}0^{\omega }}⁠with final state setF.Aaccepts⁠0ω{\displaystyle 0^{\omega }}⁠. So,Awill visit some state inFafter reading some finite prefix of⁠0ω{\displaystyle 0^{\omega }}⁠, say after the⁠i0{\displaystyle i_{0}}⁠th letter.Aalso accepts the ω-word0i010ω.{\displaystyle 0^{i_{0}}10^{\omega }.}Therefore, for some⁠i1{\displaystyle i_{1}}⁠, after the prefix0i010i1{\displaystyle 0^{i_{0}}10^{i_{1}}}the automaton will visit some state inF. Continuing with this construction the ω-word0i010i110i2…{\displaystyle 0^{i_{0}}10^{i_{1}}10^{i_{2}}\dots }is generated which causes A to visit some state inFinfinitely often and the word is not in⁠(0∪1)∗0ω.{\displaystyle (0\cup 1)^{*}0^{\omega }.}⁠Contradiction. The class of languages recognizable by deterministic Büchi automata is characterized by the following lemma. Model checkingof finite state systems can often be translated into various operations on Büchi automata. In addition to the closure operations presented above, the following are some useful operations for the applications of Büchi automata. Since deterministic Büchi automata are strictly less expressive than non-deterministic automata, there can not be an algorithm for determinization of Büchi automata. But,McNaughton's TheoremandSafra's constructionprovide algorithms that can translate a Büchi automaton into a deterministicMuller automatonor deterministicRabin automaton.[2] The language recognized by a Büchi automaton is non-empty if and only if there is a final state that is both reachable from the initial state, and lies on a cycle. An effective algorithm that can check emptiness of a Büchi automaton: Each of the steps of this algorithm can be done in time linear in the automaton size, hence the algorithm is clearly optimal. Minimizing deterministic Büchi automata (i.e., given a deterministic Büchi automaton, finding a deterministic Büchi automaton recognizing the same language with a minimal number of states) is an NP-complete problem.[3]This is in contrast toDFA minimization, which can be done in polynomial time. Inautomata theory,complementation of a Büchi automatonis the task ofcomplementinga Büchi automaton, i.e., constructing another automaton that recognizes the complement of theω-regular languagerecognized by the given Büchi automaton. Existence of algorithms for this construction proves that the set of ω-regular languages isclosed undercomplementation. This construction is particularly hard relative to the constructions for the otherclosure properties of Büchi automata. The first construction was presented by Büchi in 1962.[4]Later, other constructions were developed that enabled efficient and optimal complementation.[5][6][7][8][9] Büchi presented[4]a doubly exponential complement construction in a logical form. Here, we have his construction in the modern notation used in automata theory. LetA= (Q,Σ,Δ,Q0,F) be a Büchi automaton. Let ~Abe an equivalence relation over elements of Σ+such that for eachv,w∈ Σ+,v~Awif and only if for allp,q∈Q,Ahas a run fromptoqovervif and only if this is possible overwand furthermoreAhas a run viaFfromptoqovervif and only if this is possible overw. Each class of ~Adefines a mapf:Q→ 2Q× 2Qin the following way: for each statep∈Q, we have (Q1,Q2)=f(p), whereQ1= {q∈Q|wcan move automatonAfromptoq} andQ2= {q∈Q|wcan move automatonAfromptoqvia a state inF}. Note thatQ2⊆Q1. Iffis a map definable in this way, we denote the (unique) class definingfbyLf. The following three theorems provide a construction of the complement ofAusing the equivalence classes of ~A. Theorem 1:~Ahas finitely many equivalent classes and each class is aregular language.Proof:Since there are finitely manyf:Q→ 2Q× 2Q, the relation ~Ahas finitely many equivalence classes. Now we show thatLfis a regular language. Forp,q∈Qandi∈ {0,1}, letAi,p,q= ( {0,1}×Q, Σ, Δ1∪Δ2, {(0,p)}, {(i,q)} ) be anondeterministic finite automaton, where Δ1= { ((0,q1),(0,q2)) | (q1,q2) ∈ Δ} ∪ { ((1,q1),(1,q2)) | (q1,q2) ∈ Δ}, and Δ2= { ((0,q1),(1,q2)) |q1∈F∧ (q1,q2) ∈ Δ }. Let Q' ⊆Q. Let αp,Q'= ∩{L(A1,p,q) |q∈ Q'}, which is the set of words that can moveAfrompto all the states in Q' via some state inF. Let βp,Q'= ∩{L(A0,p,q)-L(A1,p,q)-{ε} |q∈ Q'}, which is the set of non-empty words that can moveAfrompto all the states in Q' and does not have a run that passes through any state inF. Let γp,Q'= ∩{ Σ+-L(A0,p,q) |q∈ Q'}, which is the set of non-empty words that cannot moveAfrompto any of the states in Q'. Since the regular languages are closed under finite intersections and under relative complements, every αp,Q', βp,Q', and γp,Q'is regular. By definitions,Lf= ∩{ αp,Q2∩ βp,Q1-Q2∩ γp,Q-Q1| (Q1,Q2)=f(p) ∧p∈Q}. Theorem 2:For eachw∈ Σω, there are ~AclassesLfandLgsuch thatw∈Lf(Lg)ω.Proof:We will use theinfinite Ramsey theoremto prove this theorem. Letw=a0a1... andw(i,j) =ai...aj-1. Consider the set of natural numbersN. Let equivalence classes of ~Abe the colors of subsets ofNof size 2. We assign the colors as follows. For eachi<j, let the color of {i,j} be the equivalence class in whichw(i,j) occurs. By the infinite Ramsey theorem, we can find an infinite setX⊆Nsuch that each subset ofXof size 2 has same color. Let 0 <i0<i1<i2.... ∈X. Letfbe a defining map of an equivalence class such thatw(0,i0) ∈Lf. Letgbe a defining map of an equivalence class such that for eachj>0,w(ij-1,ij) ∈Lg. Thenw∈Lf(Lg)ω. Theorem 3:LetLfandLgbe equivalence classes of ~A. ThenLf(Lg)ωis either a subset ofL(A) or disjoint fromL(A).Proof:Suppose there is a wordw∈L(A) ∩Lf(Lg)ω, otherwise the theorem holds trivially. Letrbe an accepting run ofAover inputw. We need to show that each word w' ∈Lf(Lg)ωis also inL(A), i.e., there exists a run r' ofAover input w' such that a state inFoccurs in r' infinitely often. Sincew∈Lf(Lg)ω, letw0w1w2... =wsuch thatw0∈Lfand for eachi> 0,wi∈Lg. Letsibe the state inrafter consumingw0...wi. LetIbe a set of indices such thati∈Iif and only if the run segment inrfromsitosi+1contains a state fromF.Imust be an infinite set. Similarly, we can split the word w'. Let w'0w'1w'2... = w' such that w'0∈Lfand for eachi> 0, w'i∈Lg. We construct r' inductively in the following way. Let the first state of r' be same asr. By definition ofLf, we can choose a run segment on word w'0to reachs0. By induction hypothesis, we have a run on w'0...w'ithat reaches tosi. By definition ofLg, we can extend the run along the word segment w'i+1such that the extension reaches si+1and visits a state inFifi∈I. The r' obtained from this process will have infinitely many run segments containing states fromF, sinceIis infinite. Therefore, r' is an accepting run and w' ∈L(A). By the above theorems, we can represent Σω-L(A) as finite union ofω-regular languagesof the formLf(Lg)ω, whereLfandLgare equivalence classes of ~A. Therefore, Σω-L(A) is an ω-regular language. We cantranslate the languageinto a Büchi automaton. This construction is doubly exponential in terms of size ofA.
https://en.wikipedia.org/wiki/B%C3%BCchi_automaton
Computation tree logic(CTL) is a branching-timelogic, meaning that its model oftimeis atree-likestructure in which the future is not determined; there are different paths in the future, any one of which might be an actual path that is realized. It is used informal verificationof software or hardware artifacts, typically by software applications known asmodel checkers, which determine if a given artifact possessessafety or liveness properties. For example, CTL can specify that when some initial condition is satisfied (e.g., all program variables are positive or no cars on a highway straddle two lanes), then all possible executions of a program avoid some undesirable condition (e.g., dividing a number by zero or two cars colliding on a highway). In this example, the safety property could be verified by a model checker that explores all possible transitions out of program states satisfying the initial condition and ensures that all such executions satisfy the property. Computation tree logic belongs to a class oftemporal logicsthat includeslinear temporal logic(LTL). Although there are properties expressible only in CTL and properties expressible only in LTL, all properties expressible in either logic can also be expressed inCTL*. CTL was first proposed byEdmund M. ClarkeandE. Allen Emersonin 1981, who used it to synthesize so-calledsynchronisation skeletons,i.eabstractions ofconcurrent programs. Since the introduction of CTL, there has been debate about the relative merits of CTL and LTL. Because CTL is more computationally efficient to model check, it has become more common in industrial use, and many of the most successful model-checking tools use CTL as a specification language.[1] Thelanguageofwell-formed formulasfor CTL is generated by the followinggrammar: wherep{\displaystyle p}ranges over a set ofatomic formulas. It is not necessary to use all connectives – for example,{¬,∧,AX,AU,EU}{\displaystyle \{\neg ,\land ,{\mbox{AX}},{\mbox{AU}},{\mbox{EU}}\}}comprises a complete set of connectives, and the others can be defined using them. For example, the following is a well-formed CTL formula: The following is not a well-formed CTL formula: The problem with this string is thatU{\displaystyle \mathrm {U} }can occur only when paired with anA{\displaystyle \mathrm {A} }or anE{\displaystyle \mathrm {E} }. CTL usesatomic propositionsas its building blocks to make statements about the states of a system. These propositions are then combined into formulas usinglogical operatorsandtemporal operators. Thelogical operatorsare the usual ones: ¬, ∨, ∧, ⇒ and ⇔. Along with these operators CTL formulas can also make use of the boolean constantstrueandfalse. The temporal operators are the following: InCTL*, the temporal operators can be freely mixed. In CTL, operators must always be grouped in pairs: one path operator followed by a state operator. See the examples below.CTL*is strictly more expressive than CTL. In CTL there are minimal sets of operators. All CTL formulas can be transformed to use only those operators. This is useful inmodel checking. One minimal set of operators is: {true, ∨, ¬,EG,EU,EX}. Some of the transformations used for temporal operators are: CTL formulae are interpreted overtransition systems. A transition system is a tripleM=(S,→,L){\displaystyle {\mathcal {M}}=(S,{\rightarrow },L)}, whereS{\displaystyle S}is a set of states,→⊆S×S{\displaystyle {\rightarrow }\subseteq S\times S}is a transition relation, assumed to be serial, i.e. every state has at least one successor, andL{\displaystyle L}is a labelling function, assigning propositional letters to states. LetM=(S,→,L){\displaystyle {\mathcal {M}}=(S,\rightarrow ,L)}be such a transition model, withs∈S{\displaystyle s\in S}, andϕ∈F{\displaystyle \phi \in F}, whereF{\displaystyle F}is the set ofwell-formed formulasover thelanguageofM{\displaystyle {\mathcal {M}}}. Then the relation of semanticentailment(M,s⊨ϕ){\displaystyle ({\mathcal {M}},s\models \phi )}is defined recursively onϕ{\displaystyle \phi }: Rules 10–15 above refer to computation paths in models and are what ultimately characterise the "Computation Tree"; they are assertions about the nature of the infinitely deep computation tree rooted at the given states{\displaystyle s}. The formulaeϕ{\displaystyle \phi }andψ{\displaystyle \psi }are said to be semantically equivalent if any state in any model that satisfies one also satisfies the other. This is denotedϕ≡ψ{\displaystyle \phi \equiv \psi } It can be seen thatA{\displaystyle \mathrm {A} }andE{\displaystyle \mathrm {E} }are duals, being universal and existential computation path quantifiers respectively:¬AΦ≡E¬Φ{\displaystyle \neg \mathrm {A} \Phi \equiv \mathrm {E} \neg \Phi }. Furthermore, so areG{\displaystyle \mathrm {G} }andF{\displaystyle \mathrm {F} }. Hence an instance ofDe Morgan's lawscan be formulated in CTL: It can be shown using such identities that a subset of the CTL temporal connectives is adequate if it containsEU{\displaystyle EU}, at least one of{AX,EX}{\displaystyle \{AX,EX\}}and at least one of{EG,AF,AU}{\displaystyle \{EG,AF,AU\}}and the boolean connectives. The important equivalences below are called theexpansion laws; they allow unfolding the verification of a CTL connective towards its successors in time. Let "P" mean "I like chocolate" and Q mean "It's warm outside." The two following examples show the difference between CTL and CTL*, as they allow for the until operator to not be qualified with any path operator (AorE): Computation tree logic (CTL) is a subset of CTL* as well as of themodal μ calculus. CTL is also a fragment of Alur, Henzinger and Kupferman'salternating-time temporal logic(ATL). Computation tree logic (CTL) andlinear temporal logic(LTL) are both a subset of CTL*. CTL andLTLare not equivalent and they have a common subset, which is a proper subset of both CTL and LTL. CTL has been extended withsecond-orderquantification∃p{\displaystyle \exists p}and∀p{\displaystyle \forall p}toquantified computational tree logic(QCTL).[2]There are two semantics: A reduction from the model-checking problem of QCTL with the structure semantics, to TQBF (true quantified Boolean formulae) has been proposed, in order to take advantage of the QBF solvers.[3]
https://en.wikipedia.org/wiki/Computation_tree_logic
Counterexample-guided abstraction refinement(CEGAR) is a technique forsymbolic model checking.[1][2]It is also applied inmodal logictableau calculialgorithms to optimise their efficiency.[3] In computer-aided verification and analysis of programs, models of computation often consist ofstates. Models for even small programs, however, may have an enormous number of states. This is identified as the state explosion problem.[4]CEGAR addresses this problem with two stages —abstraction, which simplifies a model by grouping states, andrefinement, which increases the precision of the abstraction to better approximate the original model. If a desired property for a program is not satisfied in the abstract model, a counterexample is generated. The CEGAR process then checks whether the counterexample is spurious, i.e., if the counterexample also applies to the under-abstraction but not the actual program. If this is the case, it concludes that the counterexample is attributed to inadequate precision of the abstraction. Otherwise, the process finds a bug in the program. Refinement is performed when a counterexample is found to be spurious.[5]The iterative procedure terminates either if a bug is found or when the abstraction has been refined to the extent that it is equivalent to the original model. To reason about the correctness of a program, particularly those involving the concept of time forconcurrency, state transition models are used. In particular, finite-state models can be used along withtemporal logicin automatic verification.[6]The concept of abstraction is thus founded upon a mapping between twoKripke structures. Specifically, programs can be described withcontrol-flow automata(CFA).[7] Define a Kripke structureM{\displaystyle M}as⟨S,s0,R,L⟩{\displaystyle \langle S,s_{0},R,L\rangle }, where An abstraction ofM{\displaystyle M}is defined by⟨Sα,s0α,Rα,Lα⟩{\displaystyle \langle S_{\alpha },s_{0}^{\alpha },R_{\alpha },L_{\alpha }\rangle }whereα{\displaystyle \alpha }is an abstraction mapping that maps every state inS{\displaystyle S}to a state inSα{\displaystyle S_{\alpha }}.[5] To preserve the critical properties of the model, the abstraction mapping maps the initial state in the original models0{\displaystyle s_{0}}to its counterparts0α{\displaystyle s_{0}^{\alpha }}in the abstract model. The abstraction mapping also guarantees that the transition relations between two states are preserved. In each iteration,model checkingis performed for the abstract model. Bounded model checking, for instance, generates a propositional formula that is then checked forBoolean satisfiabilityby aSAT solver.[5] When counterexamples are found, they are examined to determine if they are spurious examples, i.e., they are unauthentic ones that emerge from the under-abstraction of the model. A non-spurious counterexample reflects the incorrectness of the program, which may be sufficient to terminate the program verification process and conclude that the program is incorrect. The main objective of the refinement process handle spurious counterexamples. It eliminates them by increasing the granularity of the abstraction. The refinement process ensures that the dead-end states and the bad states do not belong to the same abstract state. A dead-end state is a reachable one with no outgoing transition whereas a bad-state is one with transitions causing the counterexample.[2] Sincemodal logicis often interpreted withKripke semantics, where a Kripke frame resembles the structure of state transition systems concerned in program verification, the CEGAR technique is also implemented forautomated theorem proving.[3]
https://en.wikipedia.org/wiki/Counterexample-guided_abstraction_refinement
Inlogic,linear temporal logicorlinear-time temporal logic[1][2](LTL) is amodaltemporal logicwith modalities referring to time. In LTL, one can encodeformulaeabout the future ofpaths, e.g., a condition will eventually be true, a condition will be true until another fact becomes true, etc. It is a fragment of the more complexCTL*, which additionally allows branching time andquantifiers. LTL is sometimes calledpropositional temporal logic(PTL).[3]In terms ofexpressive power, LTL is a fragment offirst-order logic.[4][5] LTL was first proposed for theformal verificationof computer programs byAmir Pnueliin 1977.[6] LTL is built up from a finite set ofpropositional variablesAP, thelogical operators¬ and ∨, and thetemporalmodal operatorsX(some literature usesOorN) andU. Formally, the set of LTL formulas overAPis inductively defined as follows: Xis read as next andUis read asuntil. Other than these fundamental operators, there are additional logical and temporal operators defined in terms of the fundamental operators, in order to write LTL formulas succinctly. The additional logical operators are ∧, →, ↔,true, andfalse. Following are the additional temporal operators. An LTL formula can besatisfiedby an infinite sequence of truth valuations of variables inAP. These sequences can be viewed as a word on a path of aKripke structure(anω-wordoveralphabet2AP). Letw= a0,a1,a2,... be such an ω-word. Letw(i) =ai. Letwi=ai,ai+1,..., which is a suffix ofw. Formally, the satisfaction relation ⊨ between a word and an LTL formula is defined as follows: We say an ω-wordwsatisfies an LTL formulaψwhenw⊨ψ. Theω-languageL(ψ) defined byψis {w|w⊨ψ}, which is the set of ω-words that satisfyψ. A formulaψissatisfiableif there exist an ω-wordwsuch thatw⊨ψ. A formulaψisvalidif for each ω-wordwover alphabet 2AP, we havew⊨ψ. The additional logical operators are defined as follows: The additional temporal operatorsR,F, andGare defined as follows: Some authors also define aweak untilbinary operator, denotedW, with semantics similar to that of the until operator but the stop condition is not required to occur (similar to release).[8]It is sometimes useful since bothUandRcan be defined in terms of the weak until: Thestrong releasebinary operator, denotedM, is the dual of weak until. It is defined similar to the until operator, so that the release condition has to hold at some point. Therefore, it is stronger than the release operator. The semantics for the temporal operators are pictorially presented as follows. Let φ, ψ, and ρ be LTL formulas. The following tables list some of the useful equivalences that extend standard equivalences among the usual logical operators. All the formulas of LTL can be transformed intonegation normal form, where Using the above equivalences for negation propagation, it is possible to derive the normal form. This normal form allowsR,true,false, and ∧ to appear in the formula, which are not fundamental operators of LTL. Note that the transformation to the negation normal form does not blow up the length of the formula. This normal form is useful intranslation from an LTL formula to a Büchi automaton. LTL can be shown to be equivalent to themonadic first-order logic of order, FO[<]—a result known asKamp's theorem—[9]or equivalently tostar-free languages.[10] Computation tree logic(CTL) and linear temporal logic (LTL) are both a subset ofCTL*, but are incomparable. For example, Model checkingand satisfiability against an LTL formula arePSPACE-completeproblems. LTL synthesis and the problem of verification of games against an LTL winning condition is2EXPTIME-complete.[11] Parametric linear temporal logic extends LTL with variables on the until-modality.[14]
https://en.wikipedia.org/wiki/Linear_temporal_logic
Incomputer science,partial order reductionis a technique for reducing the size of thestate-spaceto be searched by amodel checkingorautomated planning and schedulingalgorithm. It exploits the commutativity of concurrently executedtransitionsthat result in the same state when executed in different orders. In explicit state space exploration, partial order reduction usually refers to the specific technique of expanding a representative subset of all enabled transitions. This technique has also been described as model checking with representatives.[1]There are various versions of the method, the so-called stubborn set method,[2]ample set method,[1]and persistent set method.[3] Ample sets are an example of model checking with representatives. Their formulation relies on a separate notion ofdependency. Two transitions are consideredindependentonly if they cannot disable another whenever they are mutually enabled. The execution of both results in a unique state regardless of the order in which they are executed. Transitions that are not independent, are dependent. In practice dependency is approximated usingstatic analysis. Ample sets for different purposes can be defined by giving conditions as to when a set of transitions is "ample" in a given state. C0ample(s)=∅⟺enabled(s)=∅{\displaystyle {ample(s)=\varnothing }\iff {enabled(s)=\varnothing }} C1If a transitionα{\displaystyle \alpha }depends on some transition relation inample(s){\displaystyle ample(s)}, this transition cannot be invoked until some transition in the ample set is executed. Conditions C0 and C1 are sufficient for preserving all the deadlocks in the state space. Further restrictions are needed in order to preserve more nuanced properties. For instance, in order to preserve properties oflinear temporal logic, the following two conditions are needed: C2Ifenabled(s)≠ample(s){\displaystyle enabled(s)\neq ample(s)}, each transition in the ample set is invisible. C3Acycleis not allowed if it contains a state in which some transitionα{\displaystyle \alpha }is enabled, but is never included in ample(s) for any states s on the cycle. These conditions are sufficient for an ample set, but not necessary conditions.[4] Stubborn sets make no use of an explicit independence relation. Instead they are defined solely through commutativity over sequences of actions. A setT(s){\displaystyle T(s)}is (weakly) stubborn at s, if the following hold. D0∀a∈T(s)∀b1,...,bn∉T(s){\displaystyle \forall a\in T(s)\forall b_{1},...,b_{n}\notin T(s)}, if execution of the sequenceb1,...,bn,a{\displaystyle b_{1},...,b_{n},a}is possible and leads to the states′{\displaystyle s'}, then execution of the sequencea,b1,...,bn{\displaystyle a,b_{1},...,b_{n}}is possible and will lead to states′{\displaystyle s'}. D1Eithers{\displaystyle s}is a deadlock, or∃a∈T(s){\displaystyle \exists a\in T(s)}such that∀b1,...,bn∉T(s){\displaystyle \forall b_{1},...,b_{n}\notin T(s)}, the execution ofb1,...,bn,a{\displaystyle b_{1},...,b_{n},a}is possible. These conditions are sufficient for preserving alldeadlocks, just like C0 and C1 are in the ample set method. They are, however, somewhat weaker, and as such may lead to smaller sets. The conditions C2 and C3 can also be further weakened from what they are in the ample set method, but the stubborn set method is compatible with C2 and C3. There are also other notations for partial order reduction. One of the commonly used is the persistent set / sleep set algorithm. Detailed information can be found in Patrice Godefroid's thesis.[3] In symbolic model checking, partial order reduction can be achieved by adding more constraints (guard strengthening). Further applications of partial order reduction involve automated planning.
https://en.wikipedia.org/wiki/Partial_order_reduction
AltaRicais an object-oriented modeling language dedicated to safety analyses. It is a representative of the so-called MBSA (Model-Based Safety Assessment / Analysis) approach inRAMSengineering. Since its version 3.0, it is developed by the non-profit AltaRica Association, which develops jointly the associated modeling environment AltaRica Wizard. The design of AltaRica started at the end of the nineties at the computer science department ofBordeaux University(LaBRI). The rationale for the creation of a new modeling language was to overcome difficulties encountered by safety analysts (in avionics, nuclear, automotive and oil and gas industries) with "classical" modeling formalisms such asfault trees,Markov chainsorstochastic Petri nets. These formalisms lack actually either of expressive power, or of structuring constructs, or both. The first scientific articles.[1][2][3][4]about the language were published from 1998 to 2008.[5][6][7]The original version of the language relied of three technologies:finite-state automatathat were extensively studied by the LaBRI's team working of the formal methods for software verification,[8]structured programming taking inspiration of the modeling languageLustre, and constraint programming.[9]This last technology, though elegant and powerful, proved inefficient in practice. Constraint resolution was too computationally expensive to scale on industrial size systems. The LaBRI team went on working however on this original version, mainly for educational purposes, improving tools over the years.[10][11][12][13]A first turn has been therefore taken with the design of a data-flow version of the language.[14][15]In AltaRica data-flow, variables are updated by propagating values in a fixed order. This order is determined at compile time, from the annotations given in the model. AltaRica Data-Flow raised a significant academic and industrial interest. Integrated modeling environments have been developed for the language: Cecilia OCAS (then Workshop) byDassault Aviation, Simfia v2 byAirbus-Apsys and Safety Designer byDassault Systèmes(this latter tool was initially a clone of Cecilia Workshop, but evolved separately afterward). Successful industrial applications have been realized.[16][17][18][19]For example, AltaRica Data-Flow was used to certify the flight control system of the aircraftFalcon 7X(Dassault Aviation). A number of PhD theses were also dedicated to the language and its use in various contexts.[20][21][22][23][24][25][26][27]In a word, AltaRica Data-Flow reached scientific and industrial[28]maturity. It is still daily used for a wide variety of applications. Experience showed however that AltaRica Data-Flow could be improved in several ways, hence justifying to seriously rework the language. This rework gave eventually raise to AltaRica 3.0[29][30]which improves AltaRica Data-Flow into several directions. The syntax of AltaRica 3.0 is closer toModelicathan to AltaRica data-flow, so to facilitate bridges between multiphysics modeling and simulation and probabilistic risk and safety analyses.Object-orientedand prototype-oriented structuring constructs have been assembled so to give the language a versatile and coherent set of structuring constructs, via S2ML (for System Structure Modeling Language), which is probably the most complete of all existing behavioral modeling languages. Moreover, AltaRica 3.0 semantics has been reinforced, via GTS (for Guarded Transition Systems), which opens new opportunities in terms of assessment of models. Guarded transition systems belong to the family of mathematical models of computation gathered under the generic term of (stochastic) finite-state automata. They have been introduced in 2008[31]and later refined[32] To illustrate the ideas behind guarded transition systems, consider a motor pump that is normally in stand-by, that can be started on demand and stopped when there is no more demand. Assume moreover that this pump may fail in operation, with a certain failure rateλ, and that it can also fail on-demand with a certain probabilityγ, Assume finally that the pump can be repaired, with a certain mean time to repairτ. We can then represent the behavior of this pump by means of a (stochastic) finite state automaton pictured hereafter. From outside, the motor pump can be seen as ablack boxwith an input flow of liquid "in", an input flow of information "demand" and an output flow of liquid "out", i.e. as a transfer function that given the values "in" and "demand" calculates the value "out". In the framework on reliability studies, the behavior of systems must be abstracted out to avoid the combinatorial explosion of situations to look at. Flows are thus typically abstracted as Boolean values, true interpreted as the presence of the flow and false as its absence. The equation linking "in" and "demand" to "out" cannot be written directly since the motor pump has an internal state. Namely, we can consider that the pump can be in three states: "STANDBY", "WORKING" or "FAILED". On the figure before, states are represented as rounded rectangle. The output flow "out" takes the value true if and only if the pump is working and the input flow "in" is true (hence the equation on the right hand side of the figure above). A fundamental abstraction made by finite-state automata consists in considering that the system under study can change of state only under the occurrence of an event. In between two occurrences of events, nothing changes. Occurrences of events are described by means of transitions, represented as arrows on the figure. In guarded transition systems, a transition is labeled with an event, has a certain pre-condition called the guard of the transition and a certain effect called the action of the transition. For instance, the event "failure" can only occur in the state "WORKING". Its effect is to make the pump pass from this state "WORKING" to the state "FAILED". The event "start" can occur if the pump is in the state "STANDBY" and if the input flow "demand" is true. Its effect is to make the pump pass from the state "STANDBY" to the state "WORKING". And so on. Now, some changes of states may take time, while some other happen as soon as they are possible. For instance, a failure takes a certain time before occurring, while the pump is started as soon as needed (at least at the level of abstraction of reliability models). Guarded transition systems associate delays with events, and thus transitions. These delays can be either deterministic as for the event "start", or stochastic as for the event "failure". On the figure, deterministic delays are represented by dashed arrows while stochastic ones are represented by plain arrows. To finish, transitions can be in competition in a state. For instance, the transition "stop" is in competition with the transition "failure" in the state "WORKING". This competition is however not a real one as the transition "stop" is immediately fired (performed) when the input flow "demand" ceases to be true. A real competition occurs between the transitions "start" and "failureOnDemand" in the state "STANDBY". Both are fired immediately when the input flow "demand" becomes true. In guarded transition systems, it is possible to associate a probability of occurrence to each transition in competition, namelyγto "failureOnDemand" and1−γ{\displaystyle 1-\gamma }to "start" in our example. Eventually, the AltaRica code for the guarded transition system we sketched is given in the Figure hereafter. The motor pump is represented as a "block", i.e. as a container for basic elements. The block declares four variables: a state variable "_state" that takes its value in the domain (set of symbolic constants) "MotorPumpState", and three Boolean flow variables "demand", "in", and "out". Initially, "_state" takes the value "STANDBY". The transfer function is represented by means of the assertion. Assertions tell how to calculate the values of output flow variables from the values of input flow variables and the values of state variables. The block "MotorPump" declares also five events and as many transitions. Guards of transitions are Boolean conditions on state and flow variables. Actions of transitions modify the values of state variables. Events are associated with delays and possibly expectations (which are used to calculate probabilities of occurrence of transitions in competition). The description of both delays and expectations may involve parameters. In general, systems under study are not made of a single, simple components as the above motor operated pump. Rather, they consists of a network of such components that interact in an organized in a hierarchical way. To reflect the architecture of the system in the model, one needs dedicated constructs. This is where S2ML (system structure modeling language) comes into the play. S2ML emerged first as the set of structuring constructs for AltaRica 3.0. Then, it has been studied on its own.[33][34]As of today, S2ML gathers in a coherent way a versatile set of structuring constructs stemmed from object-oriented and prototype-oriented programming.[35][36] S2ML consists of height key concepts: the concepts of port, connection, container, prototype, class, cloning, instantiation, inheritance and aggregation. AltaRica 3.0 involves a few other constructs, such as a powerful mechanism to synchronize events. The essential has however been presented above. Adding S2ML on top of a mathematical framework (GTS in the case of AltaRica), makes it possible to pass automatically and at no cost from the model as designed, which reflects the architecture of the system under study, to the model as assessed from which calculations of indicators and simulations can be performed efficiently. The transformation preserves the semantics of the models and is reversible for the most part: results of calculations and simulations are directly interpretable in the model as designed. A recent trend in the AltaRica community is the design of modeling patterns.[38]Patterns are pervasive in engineering. They have been developed for instance in the field of technical system architecture,[39]as well as in software engineering.[40]They are useful in reliability engineering also, as they ease design and maintenance of models. They are also a tool for risk analysts to communicate about the models they develop and share. In industrial practice, AltaRica model uses include four main functions: As these applications require different types of simulations and calculations, several tools have been developed, including:
https://en.wikipedia.org/wiki/AltaRica
TheQED manifestowas a proposal for a computer-based database of allmathematicalknowledge, strictly formalized and with all proofs having beenchecked automatically. (Q.E.D.meansquod erat demonstranduminLatin, meaning "which was to be demonstrated.") The idea for the project arose in 1993, mainly under the impetus ofRobert Boyer. The goals of the project, tentatively namedQED projectorproject QED, were outlined in the QED manifesto, a document first published in 1994, with input from several researchers.[1]Explicit authorship was deliberately avoided. A dedicated mailing list was created, and two scientific conferences on QED took place, the first one in 1994 atArgonne National Laboratoriesand the second in 1995 inWarsaworganized by theMizargroup.[2] The project seems to have dissolved by 1996, never having produced more than discussions and plans. In a 2007 paper, Freek Wiedijk identifies two reasons for the failure of the project.[3]In order of importance: Nonetheless, QED-style projects are regularly proposed. TheMizarMathematical Library formalizes a large portion of undergraduate mathematics, and was considered the largest such library in 2007.[4]Similar projects include theMetamathproof database and the mathlib library written inLean.[5] In 2014 the Twenty years of the QED Manifesto[6]workshop was organized as part of theVienna Summer of Logic.
https://en.wikipedia.org/wiki/QED_manifesto
Prover9is anautomated theorem proverforfirst-order and equational logicdeveloped byWilliam McCune. Prover9 is the successor of theOttertheorem prover also developed byWilliam McCune.[1]: 1Prover9 is noted for producing relatively readable proofs and having a powerful hints strategy.[1]: 11 Prover9 is intentionally paired withMace4, which searches for finite models and counterexamples. Both can be run simultaneously from the same input,[2]with Prover9 attempting to find a proof, while Mace4 attempts to find a (disproving) counter-example. Prover9, Mace4, and many other tools are built on an underlying library named LADR ("Library for Automated Deduction Research") to simplify implementation. Resulting proofs can be double-checked by Ivy, aproof-checkingtool that has been separately verified usingACL2. In July 2006 the LADR/Prover9/Mace4 input language made a major change (which also differentiates it from Otter). The key distinction between "clauses" and "formulas" completely disappeared; "formulas" can now havefree variables; and "clauses" are now a subset of "formulas". Prover9/Mace4 also supports a "goal" type of formula, which is automatically negated for proof. Prover9 attempts to automatically generate a proof by default; in contrast, Otter's automatic mode must be explicitly set. Prover9 was under active development, with new releases every month or every other month, until 2009. Prover9 isfree software, and therefore,open source software; it is released underGPLversion 2 or later. The traditional "all men are mortal", "Socrates is a man", prove "Socrates is mortal" can be expressed this way in Prover9: This will be automatically converted intoclausal form(which Prover9 also accepts): A proof that thesquare root of 2isirrationalcan be expressed this way:[3]
https://en.wikipedia.org/wiki/Prover9
A list of notableelectronic design automation(EDA) companies. Through Upverter Acquisition Through Perception Software Acquisition Through Helic Acquisition Through DfR Solutions Acquisition Through Diakopto Acquisition ThroughMagillem Design ServicesAcquisition Through Semifore Acquisition ThroughAWR CorporationAcquisition Through Integrand Software Acquisition Through CST acquisition ThroughNational InstrumentsAcquisition TARGET 3001!PCB Layout CAD Software Through Cliosoft Acquisition ThroughMentor GraphicsAcquisition Through Austemper Design Systems Acquisition Through UltraSoC Acquisition Through Avatar Integrated Systems Acquisition Through OneSpin Solutions Acquisition Through Fractal Technologies Acquisition Through InsightEDA Acquisition ThroughAltair EngineeringAcquisition Through DownStream Technologies Acquisition For logical FPGA and ASIC designs For physical PCB and ASIC designs SPICE modeling and analog & mixed-signal simulation Custom IC CAD Interconnect modeling Library Platform TCAD Through Coupling Wave Solutions assets' Acquisition Through Polyteda Cloud Acquisition ThroughAvant!Acquisition ThroughMagma Design AutomationAcquisition ThroughSynplicityAcquisition[4] Through Terrain EDA Acquisition[5] Through Dorado Design Automation (Dorado DA) Acquisition Through Silicon Frontline Technology Acquisition
https://en.wikipedia.org/wiki/List_of_EDA_companies
Design flowsare the explicit combination ofelectronic design automationtools to accomplish the design of anintegrated circuit.Moore's lawhas driven the entireICimplementationRTLtoGDSIIdesign flows[clarification needed]from one which uses primarily stand-alonesynthesis,placement, androutingalgorithms to an integrated construction and analysis flows fordesign closure. The challenges of rising interconnect delay led to a new way of thinking about and integrating design closure tools. The RTL to GDSII flow underwent significant changes from 1980 through 2005. The continued scaling of CMOS technologies significantly changed the objectives of the various design steps. The lack of good predictors for delay has led to significant changes in recent design flows. New scaling challenges such as leakage power, variability, and reliability will continue to require significant changes to thedesign closureprocess in the future. Many factors describe what drove the design flow from a set of separate design steps to a fully integrated approach, and what further changes are coming to address the latest challenges. In his keynote at the 40thDesign Automation ConferenceentitledThe Tides of EDA,Alberto Sangiovanni-Vincentellidistinguished three periods of EDA: There are differences between the steps and methods of the design flow for analog and digital integrated circuits. Nonetheless, a typicalVLSIdesign flow consists of various steps like design conceptualization, chip optimization, logical/physical implementation, and design validation and verification.[1][2]
https://en.wikipedia.org/wiki/Design_flow_(EDA)
Runtime application self-protection (RASP)is asecurity technologythat usesruntimeinstrumentationto detect and blockcomputer attacksby taking advantage of information from inside the running software.[1][2]The technology differs from perimeter-based protections such asfirewalls, that can only detect and block attacks by using network information without contextual awareness.[3][4]RASP technology is said to improve the security of software by monitoring its inputs, and blocking those that could allow attacks, while protecting theruntime environmentfrom unwanted changes and tampering.[5]RASP-protected applications rely less on external devices like firewalls to provide runtime security protection. When a threat is detected RASP can prevent exploitation and possibly take other actions, including terminating a user's session, shutting the application down, alerting security personnel and sending a warning to the user.[6][7]RASP aims to close the gap left by application security testing and network perimeter controls, neither of which have enough insight into real-time data and event flows to either prevent vulnerabilities slipping through the review process or block new threats that were unforeseen during development.[8] RASP can be integrated as aframeworkor module that runs in conjunction with a program's codes, libraries and system calls.[5]The technology can also be implemented as avirtualization.[4]RASP is similar tointeractive application security testing(IAST), the key difference is that IAST is focused on identifying vulnerabilities within the applications and RASPs are focused protecting against cybersecurity attacks that may take advantages of those vulnerabilities or other attack vectors.[9] RASP solutions can be deployed in two different ways: monitor or protection mode. In monitor mode, the RASP solution reports on web application attacks but does not block any attack. In protection mode, the RASP solution reports and blocks web application attacks.[10]
https://en.wikipedia.org/wiki/Runtime_application_self-protection
Insoftware project management,software testing, andsoftware engineering,verification and validationis the process of checking that a software engineer system meets specifications and requirements so that it fulfills its intended purpose. It may also be referred to assoftware quality control. It is normally the responsibility ofsoftware testersas part of thesoftware development lifecycle. In simple terms, software verification is: "Assuming we should build X, does our software achieve its goals without any bugs or gaps?" On the other hand, software validation is: "Was X what we should have built? Does X meet the high-level requirements?" Verification and validation are not the same thing, although they are often confused.Boehmsuccinctly expressed the difference as[1] "Building the product right" checks that thespecificationsare correctly implemented by the system while "building the right product" refers back to theuser's needs. In some contexts, it is required to have written requirements for both as well as formal procedures or protocols for determining compliance. Ideally,formal methodsprovide a mathematical guarantee that software meets its specifications. Building the product right implies the use of the Requirements Specification as input for the next phase of the development process, the design process, the output of which is the Design Specification. Then, it also implies the use of the Design Specification to feed the construction process. Every time the output of a process correctly implements its input specification, the software product is one step closer to final verification. If the output of a process is incorrect, the developers have not correctly implemented some component of that process. This kind of verification is called "artifact or specification verification". It would imply to verify if the specifications are met by running the software but this is not possible (e.g., how can anyone know if the architecture/design/etc. are correctly implemented by running the software?). Only by reviewing its associated artifacts, can someone conclude whether or not the specifications are met. The output of each software development process stage can also be subject to verification when checked against its input specification (see the definition by CMMI below). Examples of artifact verification: Software validation checks that the software product satisfies or fits the intended use (high-level checking), i.e., the software meets the user requirements, not as specification artifacts or as needs of those who will operate the software only; but, as the needs of all the stakeholders (such as users, operators, administrators, managers, investors, etc.). There are two ways to perform software validation: internal and external. During internal software validation, it is assumed that the goals of the stakeholders were correctly understood and that they were expressed in the requirement artifacts precisely and comprehensively. If the software meets the requirement specification, it has been internally validated. External validation happens when it is performed by asking the stakeholders if the software meets their needs. Different software development methodologies call for different levels of user and stakeholder involvement and feedback; so, external validation can be a discrete or a continuous event. Successful final external validation occurs when all the stakeholders accept the software product and express that it satisfies their needs. Such final external validation requires the use of anacceptance testwhich is adynamic test. However, it is also possible to perform internal static tests to find out if the software meets the requirements specification but that falls into the scope of static verification because the software is not running. Requirements should be validated before the software product as a whole is ready (the waterfall development process requires them to be perfectly defined before design starts; but iterative development processes do not require this to be so and allow their continual improvement). Examples of artifact validation: According to theCapability Maturity Model(CMMI-SW v1.1),[2] Validation during the software development process can be seen as a form of User Requirements Specification validation; and, that at the end of the development process is equivalent to Internal and/or External Software validation. Verification, from CMMI's point of view, is evidently of the artifact kind. In other words, software verification ensures that the output of each phase of the software development process effectively carries out what its corresponding input artifact specifies (requirement -> design -> software product), while software validation ensures that the software product meets the needs of all the stakeholders (therefore, the requirement specification was correctly and accurately expressed in the first place). Software verification ensures that "you built it right" and confirms that the product, as provided, fulfills the plans of the developers. Software validation ensures that "you built the right thing" and confirms that the product, as provided, fulfills the intended use and goals of the stakeholders. This article has used the strict ornarrowdefinition of verification. From a testing perspective: Both verification and validation are related to the concepts ofqualityand ofsoftware quality assurance. By themselves, verification and validation do not guarantee software quality; planning,traceability, configuration management and other aspects of software engineering are required. Within themodeling and simulation(M&S) community, the definitions of verification, validation and accreditation are similar: The definition of M&S validation focuses on the accuracy with which the M&S represents the real-world intended use(s). Determining the degree of M&S accuracy is required because all M&S are approximations of reality, and it is usually critical to determine if the degree of approximation is acceptable for the intended use(s). This stands in contrast to software validation. Inmission-criticalsoftware systems,formal methodsmay be used to ensure the correct operation of a system. These formal methods can prove costly, however, representing as much as 80 percent of total software design cost. Independent Software Verification and Validation (ISVV)is targeted at safety-criticalsoftwaresystems and aims to increase the quality of software products, thereby reducing risks and costs throughout the operational life of the software. The goal of ISVV is to provide assurance that software performs to the specified level of confidence and within its designed parameters and defined requirements.[4][5] ISVV activities are performed by independent engineering teams, not involved in the software development process, to assess the processes and the resulting products. The ISVV team independency is performed at three different levels: financial, managerial and technical. ISVV goes beyond "traditional" verification and validation techniques, applied by development teams. While the latter aims to ensure that the software performs well against the nominal requirements, ISVV is focused on non-functional requirements such as robustness and reliability, and on conditions that can lead the software to fail. ISVV results and findings are fed back to the development teams for correction and improvement. ISVV derives from the application of IV&V (Independent Verification and Validation) to the software. Early ISVV application (as known today) dates back to the early 1970s when theU.S. Armysponsored the first significant program related to IV&V for the SafeguardAnti-Ballistic MissileSystem.[6]Another example is NASA's IV&V Program, which was established in 1993.[7] By the end of the 1970s IV&V was rapidly becoming popular. The constant increase in complexity, size and importance of the software led to an increasing demand on IV&V applied to software. Meanwhile, IV&V (and ISVV for software systems) consolidated and is now widely used by organizations such as theDoD,FAA,[8]NASA[7]andESA.[9]IV&V is mentioned inDO-178B,ISO/IEC 12207and formalized inIEEE 1012. Initially in 2004-2005, a European consortium led by theEuropean Space Agency, and composed ofDNV,Critical Software SA,TermaandCODA SciSys plccreated the first version of a guide devoted to ISVV, called "ESA Guide for Independent Verification and Validation" with support from other organizations.[10]This guide covers the methodologies applicable to all the software engineering phases in what concerns ISVV. In 2008 the European Space Agency released a second version, having received inputs from many different European Space ISVV stakeholders.[10] ISVV is usually composed of five principal phases, these phases can be executed sequentially or as results of a tailoring process. Software often must meet the compliance requirements of legally regulated industries, which is often guided by government agencies[11][12]or industrial administrative authorities. For instance, theFDArequires software versions andpatchesto be validated.[13]
https://en.wikipedia.org/wiki/Verification_and_validation_(software)
Programming complexity(orsoftware complexity) is a term that includes software properties that affect internal interactions. Several commentators distinguish between the terms "complex" and "complicated". Complicated implies being difficult to understand, but ultimately knowable. Complex, by contrast, describes the interactions between entities. As the number of entities increases, the number of interactions between them increases exponentially, making it impossible to know and understand them all. Similarly, higher levels of complexity in software increase the risk of unintentionally interfering with interactions, thus increasing the risk of introducing defects when changing the software. In more extreme cases, it can make modifying the software virtually impossible. The idea of linking software complexity to software maintainability has been explored extensively byProfessor Manny Lehman, who developed hisLaws of Software Evolution. He and his co-authorLes Beladyexplored numeroussoftware metricsthat could be used to measure the state of software, eventually concluding that the only practical solution is to use deterministic complexity models.[1] The complexity of an existing program determines the complexity of changing the program. Problem complexity can be divided into two categories:[2] Several measures of software complexity have been proposed. Many of these, although yielding a good representation of complexity, do not lend themselves to easy measurement. Some of the more commonly used metrics are Several other metrics can be used to measure programming complexity: Tesler's Lawis anadageinhuman–computer interactionstating that everyapplicationhas an inherent amount of complexity that cannot be removed or hidden. Chidamber and Kemerer[4]proposed a set of programing complexity metrics widely used in measurements and academic articles: weighted methods per class, coupling between object classes, response for a class, number of children, depth of inheritance tree, and lack of cohesion of methods, described below:
https://en.wikipedia.org/wiki/Programming_complexity
Feature creepis the excessive ongoing expansion or addition of newfeaturesin a product,[1]especially incomputer software,video games(where it should not be confused withpower creep) andconsumer and business electronics. These extra features go beyond the basic function of the product and can result insoftware bloatand over-complication, rather than simple design. The definition of what qualifies as "feature creep" varies amongend users, where what is perceived as such by some users may be considered practical functionality by others.[2]Feature creep is one of the most common sources ofcostand schedule overruns.[3][verification needed]It thus endangers and can even kill products and projects. Feature creep may arise from the desire to provide the consumer with a more useful or desirable product in order to increase sales or distribution. Once a product does everything that it is designed to do, the manufacturer may add functions some users might consider unneeded (sometimes at the cost of efficiency) or continue with the original version (at the cost of a perceived lack of improvement). Feature creep may also arise as a result ofcompromise from a committeeimplementing several different viewpoints oruse casesin the same product, even for opportunistic reasons.[4]As more features are added to support each approach, cross-conversion features between the multiple paradigms may further complicate the total features. There are several methods to control feature creep, including: strict limits for allowable features, multiple variations, and pruning excess features. Later feature creep may be avoided by basing initial design on strong software fundamentals, such as logical separation of functionality and data access, e.g. using submenus that are optionally accessible bypower userswho desire more functionality and a higher verbosity of information. It can be actively controlled with rigorouschange managementand by delaying changes to later delivery phases of a project.[5] Another method of controlling feature creep is maintaining multiple variations of products, where features are limited and reduced in the more basic variations, e.g.Microsoft Windowseditions. For softwareuser interfaces, viewing modes or operation modes can be used (e.g. basic mode or expert mode), between which the users can select to match their own needs. Both in manygraphical user interfacesandcommand-line interfaces, users are able to opt in for a higher verbosity manually. In the latter case, in many command-line programs, adding a-vor--verboseoption manually, does show more detailed information that might be less relevant to minimal users, but useful to power users or for debugging and troubleshooting purposes. Because the ever-growing, ever-expanding addition of new features might exceed available resources, a minimal core "basic" version of a product can be maintained separately, to ensure operation in smaller operating environments. Using the "80/20 rule", the more basic product variations might fulfill the needs of the majority (e.g. ~80%) of the users, so they would not be subjected to the complexity (or extra expense) of features requested by the advanced 20% of users. The extra features are still available, but optional and ready to be utilized for those who solicit them, but they have not been implemented into the basic versions of the products. Another solution for feature creep ismodularity. Power users who require more functionality can retrofit needed features by downloading software modules,plug-ins, add-ons (also known as add-ins) and custom themes to match their personal requirements. At some point, the cost of maintaining a particular subset of features might become prohibitive, and pruning can be used. A new product version can omit the extra features, or perhaps a transition period would be used, where old features weredeprecatedbefore eventual removal from the system. If there are multiple variations of products, then some of them might be phased out of use. One major example is theSamsung Galaxy S6, released March 2015, of which significantly many software/menu features and also some hardware features were pruned. A “more functional” variation of it hasn't been released.[citation needed] Occasionally, uncontrolled feature creep can lead to products that surpass the scope of what was originally intended; this is known asscope creep. A common consequence of feature creep is the delay or cancellation of a product, which may become more expensive than was originally intended.[citation needed] Often, a reasonably feature-complete software project, or one with moderate amounts of feature creep, can survive and even thrive through many iterations, but its successor release may suffer substantial delays once a decision is taken to rewrite the whole code base in addition to introducing new technologies. For example, Microsoft'sWindows Vistawas planned to be a minor release betweenWindows XPand its successor codenamedWindows "Blackcomb"(released as Windows 7), but after adapting more and more features from Blackcomb (many of which were eventually cancelled), Vista turned out to become a major release which took five years of development. A similar fate was suffered byNetscape 6, which was originally supposed to beNetscape 5. The 1998 decision by Netscape Communications to open-source its Netscape Navigator browser and Communicator Internet suite (both code-named Mozilla) soon made it obvious that the underlying code was too difficult, and required a complete rewrite of Mozilla, which fostered the creation of theMozilla application framework. This caused significant delays, Netscape 5 was skipped, and the company was purchased by AOL. The subsequent release of Netscape 6.00 in 2000 was widely criticized as alpha-level code, and the project reached stability by Netscape 6.1 in 2001, three years after the decision to rework the Internet suite. By that time, Microsoft's Internet Explorer browser had long-eclipsed Netscape in usage share, which had diminished to single digits. Even after reaching stability and attaining some necessary new features, the open-sourceMozilla Application Suite(then named just Mozilla), on which AOL built Netscape, was viewed as "bloated". Just a year later, a group of Mozilla developers decided to separate the browser component, which eventually becameFirefox. Double Fine Adventures'KickstarterprojectBroken Ageis another example of a project being delayed by feature creep. Originally supposed to have a release date of October 2012, the first half of the game was released in January 2014 while the second half followed late April 2015, and required two separate funding rounds to complete.[6] Feature creep combined with short deadlines will often lead to a"hacky solution". The desired change may be large enough to warrant a redesign of the existing project foundation, but deadline pressure instead requires developers to rush and put out a less-refined product. Thespoonerism"feeping creaturism" was coined to emphasize a developer's dislike of this situation,[7]personifying the scope-crept product as "a misshapen creature of hacks ... prowling about in the dark",[8]and the harbinger of more creep to come.[9]("Feeping" is a jargon synonym of "beeping".)[10]
https://en.wikipedia.org/wiki/Complexity_trap
Acomputer programis asequenceor set[a]of instructions in aprogramming languagefor acomputertoexecute. It is one component ofsoftware, which also includesdocumentationand other intangible components.[1] Acomputer programin itshuman-readableform is calledsource code. Source code needs another computer program toexecutebecause computers can only execute their nativemachine instructions. Therefore, source code may betranslatedto machine instructions using acompilerwritten for the language. (Assembly languageprograms are translated using anassembler.) The resulting file is called anexecutable. Alternatively, source code may execute within aninterpreterwritten for the language.[2] If the executable is requested for execution, then theoperating systemloadsit intomemoryand starts aprocess.[3]Thecentral processing unitwill soonswitchto this process so it canfetch, decode, and then executeeach machine instruction.[4] If the source code is requested for execution, then the operating system loads the corresponding interpreter into memory and starts a process. The interpreter then loads the source code into memory to translate and execute eachstatement. Running the source code is slower than running anexecutable.[5][b]Moreover, the interpreter must be installed on the computer. The"Hello, World!" programis used to illustrate a language's basicsyntax. The syntax of the languageBASIC(1964) was intentionally limited to make the language easy to learn.[6]For example,variablesare notdeclaredbefore being used.[7]Also, variables are automatically initialized to zero.[7]Here is an example computer program, in Basic, toaveragea list of numbers:[8] Once the mechanics of basic computer programming are learned, more sophisticated and powerful languages are available to build large computer systems.[9] Improvements insoftware developmentare the result of improvements incomputer hardware. At each stage in hardware's history, the task ofcomputer programmingchanged dramatically. In 1837,Jacquard's loominspiredCharles Babbageto attempt to build theAnalytical Engine.[10]The names of the components of the calculating device were borrowed from the textile industry. In the textile industry, yarn was brought from the store to be milled. The device had astorewhich consisted of memory to hold 1,000 numbers of 50 decimal digits each.[11]Numbers from thestorewere transferred to themillfor processing. The engine was programmed using two sets of perforated cards. One set directed the operation and the other set inputted the variables.[10][12]However, the thousands of cogged wheels and gears never fully worked together.[13] Ada Lovelaceworked for Charles Babbage to create a description of the Analytical Engine (1843).[14]The description contained Note G which completely detailed a method for calculatingBernoulli numbersusing the Analytical Engine. This note is recognized by some historians as the world's firstcomputer program.[13] In 1936,Alan Turingintroduced theUniversal Turing machine, a theoretical device that can model every computation.[15]It is afinite-state machinethat has an infinitely long read/write tape. The machine can move the tape back and forth, changing its contents as it performs analgorithm. The machine starts in the initial state, goes through a sequence of steps, and halts when it encounters the halt state.[16]All present-day computers areTuring complete.[17] TheElectronic Numerical Integrator And Computer(ENIAC) was built between July 1943 and Fall 1945. It was aTuring complete, general-purpose computer that used 17,468vacuum tubesto create thecircuits. At its core, it was a series ofPascalineswired together.[18]Its 40 units weighed 30 tons, occupied 1,800 square feet (167 m2), and consumed $650 per hour (in 1940s currency) in electricity when idle.[18]It had 20base-10accumulators. Programming the ENIAC took up to two months.[18]Three function tables were on wheels and needed to be rolled to fixed function panels. Function tables were connected to function panels by plugging heavy black cables intoplugboards. Each function table had 728 rotating knobs. Programming the ENIAC also involved setting some of the 3,000 switches. Debugging a program took a week.[19]It ran from 1947 until 1955 atAberdeen Proving Ground, calculating hydrogen bomb parameters, predicting weather patterns, and producing firing tables to aim artillery guns.[20] Instead of plugging in cords and turning switches, astored-program computerloads its instructions intomemoryjust like it loads its data into memory.[21]As a result, the computer could be programmed quickly and perform calculations at very fast speeds.[22]Presper EckertandJohn Mauchlybuilt the ENIAC. The two engineers introduced thestored-program conceptin a three-page memo dated February 1944.[23]Later, in September 1944,John von Neumannbegan working on the ENIAC project. On June 30, 1945, von Neumann published theFirst Draft of a Report on the EDVAC, which equated the structures of the computer with the structures of the human brain.[22]The design became known as thevon Neumann architecture. The architecture was simultaneously deployed in the constructions of theEDVACandEDSACcomputers in 1949.[24][25] TheIBM System/360(1964) was a family of computers, each having the sameinstruction set architecture. TheModel 20was the smallest and least expensive. Customers could upgrade and retain the sameapplication software.[26]TheModel 195was the most premium. Each System/360 model featuredmultiprogramming[26]—having multipleprocessesinmemoryat once. When one process was waiting forinput/output, another could compute. IBM planned for each model to be programmed usingPL/1.[27]A committee was formed that includedCOBOL,FortranandALGOLprogrammers. The purpose was to develop a language that was comprehensive, easy to use, extendible, and would replace Cobol and Fortran.[27]The result was a large and complex language that took a long time tocompile.[28] Computers manufactured until the 1970s had front-panel switches for manual programming.[29]The computer program was written on paper for reference. An instruction was represented by a configuration of on/off settings. After setting the configuration, an execute button was pressed. This process was then repeated. Computer programs also were automatically inputted viapaper tape,punched cardsormagnetic-tape. After the medium was loaded, the starting address was set via switches, and the execute button was pressed.[29] A major milestone in software development was the invention of theVery Large Scale Integration(VLSI) circuit (1964).[30]FollowingWorld War II, tube-based technology was replaced withpoint-contact transistors(1947) andbipolar junction transistors(late 1950s) mounted on acircuit board.[30]During the 1960s, theaerospaceindustry replaced the circuit board with anintegrated circuit chip.[30] Robert Noyce, co-founder ofFairchild Semiconductor(1957) andIntel(1968), achieved a technological improvement to refine theproductionoffield-effect transistors(1963).[31]The goal is to alter theelectrical resistivity and conductivityof asemiconductor junction. First, naturally occurringsilicate mineralsare converted intopolysiliconrods using theSiemens process.[32]TheCzochralski processthen converts the rods into amonocrystalline silicon,boule crystal.[33]Thecrystalis then thinly sliced to form awafersubstrate. Theplanar processofphotolithographythenintegratesunipolar transistors,capacitors,diodes, andresistorsonto the wafer to build a matrix ofmetal–oxide–semiconductor(MOS) transistors.[34][35]The MOS transistor is the primary component inintegrated circuit chips.[31] Originally, integrated circuit chips had their function set during manufacturing. During the 1960s, controlling the electrical flow migrated to programming amatrixofread-only memory(ROM). The matrix resembled a two-dimensional array of fuses.[30]The process to embed instructions onto the matrix was to burn out the unneeded connections.[30]There were so many connections,firmwareprogrammers wrote acomputer programon another chip to oversee the burning.[30]The technology became known asProgrammable ROM. In 1971, Intelinstalled the computer program onto the chipand named it theIntel 4004microprocessor.[36] The termsmicroprocessorandcentral processing unit(CPU) are now used interchangeably. However, CPUs predate microprocessors. For example, theIBM System/360(1964) had a CPU made fromcircuit boards containing discrete components on ceramic substrates.[37] The Intel 4004 (1971) was a 4-bitmicroprocessor designed to run theBusicomcalculator. Five months after its release, Intel released theIntel 8008, an 8-bit microprocessor. Bill Pentz led a team atSacramento Stateto build the firstmicrocomputerusing the Intel 8008: theSac State 8008(1972).[38]Its purpose was to store patient medical records. The computer supported adisk operating systemto run aMemorex, 3-megabyte,hard disk drive.[30]It had a color display and keyboard that was packaged in a single console. The disk operating system was programmed usingIBM's Basic Assembly Language (BAL). The medical records application was programmed using aBASICinterpreter.[30]However, the computer was an evolutionary dead-end because it was extremely expensive. Also, it was built at a public university lab for a specific purpose.[38]Nonetheless, the project contributed to the development of theIntel 8080(1974)instruction set.[30] In 1978, the modernsoftware developmentenvironment began when Intel upgraded theIntel 8080to theIntel 8086. Intel simplified the Intel 8086 to manufacture the cheaperIntel 8088.[39]IBMembraced the Intel 8088 when they entered thepersonal computermarket (1981). Asconsumerdemandfor personal computers increased, so did Intel's microprocessor development. The succession of development is known as thex86 series. Thex86 assembly languageis a family ofbackward-compatiblemachine instructions. Machine instructions created in earlier microprocessors were retained throughout microprocessor upgrades. This enabled consumers to purchase new computers without having to purchase newapplication software. The major categories of instructions are:[c] VLSI circuits enabled theprogramming environmentto advance from acomputer terminal(until the 1990s) to agraphical user interface(GUI) computer. Computer terminals limited programmers to a singleshellrunning in acommand-line environment. During the 1970s, full-screen source code editing became possible through atext-based user interface. Regardless of the technology available, the goal is to program in aprogramming language. Programming languagefeatures exist to provide building blocks to be combined to express programming ideals.[40]Ideally, a programming language should:[40] Theprogramming styleof a programming language to provide these building blocks may be categorized intoprogramming paradigms.[41]For example, different paradigms may differentiate:[41] Each of these programming styles has contributed to the synthesis of differentprogramming languages.[41] Aprogramming languageis a set ofkeywords,symbols,identifiers, and rules by which programmers can communicate instructions to the computer.[42]They follow a set of rules called asyntax.[42] Programming languagesget their basis fromformal languages.[43]The purpose of defining a solution in terms of itsformal languageis to generate analgorithmto solve the underlining problem.[43]Analgorithmis a sequence of simple instructions that solve a problem.[44] The evolution of programming languages began when theEDSAC(1949) used the firststored computer programin itsvon Neumann architecture.[45]Programming the EDSAC was in the firstgeneration of programming language.[46] Imperative languagesspecify a sequentialalgorithmusingdeclarations,expressions, andstatements:[54] FORTRAN(1958) was unveiled as "The IBM Mathematical FORmula TRANslating system". It was designed for scientific calculations, withoutstringhandling facilities. Along withdeclarations,expressions, andstatements, it supported: It succeeded because: However, non-IBM vendors also wrote Fortran compilers, but with a syntax that would likely fail IBM's compiler.[56]TheAmerican National Standards Institute(ANSI) developed the first Fortran standard in 1966. In 1978, Fortran 77 became the standard until 1991. Fortran 90 supports: COBOL(1959) stands for "COmmon Business Oriented Language". Fortran manipulated symbols. It was soon realized that symbols did not need to be numbers, sostringswere introduced.[57]TheUS Department of Defenseinfluenced COBOL's development, withGrace Hopperbeing a major contributor. The statements were English-like and verbose. The goal was to design a language so managers could read the programs. However, the lack of structured statements hindered this goal.[58] COBOL's development was tightly controlled, so dialects did not emerge to require ANSI standards. As a consequence, it was not changed for 15 years until 1974. The 1990s version did make consequential changes, likeobject-oriented programming.[58] ALGOL(1960) stands for "ALGOrithmic Language". It had a profound influence on programming language design.[59]Emerging from a committee of European and American programming language experts, it used standard mathematical notation and had a readable, structured design. Algol was first to define itssyntaxusing theBackus–Naur form.[59]This led tosyntax-directedcompilers. It added features like: Algol's direct descendants includePascal,Modula-2,Ada,DelphiandOberonon one branch. On another branch the descendants includeC,C++andJava.[59] BASIC(1964) stands for "Beginner's All-Purpose Symbolic Instruction Code". It was developed atDartmouth Collegefor all of their students to learn.[8]If a student did not go on to a more powerful language, the student would still remember Basic.[8]A Basic interpreter was installed in themicrocomputersmanufactured in the late 1970s. As the microcomputer industry grew, so did the language.[8] Basic pioneered theinteractive session.[8]It offeredoperating systemcommands within its environment: However, the Basic syntax was too simple for large programs.[8]Recent dialects added structure and object-oriented extensions.Microsoft'sVisual Basicis still widely used and produces agraphical user interface.[7] C programming language(1973) got its name because the languageBCPLwas replaced withB, andAT&T Bell Labscalled the next version "C". Its purpose was to write theUNIXoperating system.[52]C is a relatively small language, making it easy to write compilers. Its growth mirrored the hardware growth in the 1980s.[52]Its growth also was because it has the facilities ofassembly language, but uses ahigh-level syntax. It added advanced features like: Callows the programmer to control which region of memory data is to be stored.Global variablesandstatic variablesrequire the fewestclock cyclesto store. Thestackis automatically used for the standard variabledeclarations.Heapmemory is returned to apointer variablefrom themalloc()function. In the 1970s,software engineersneeded language support to break large projects down intomodules.[67]One obvious feature was to decompose large projectsphysicallyinto separatefiles. A less obvious feature was to decompose large projectslogicallyintoabstract data types.[67]At the time, languages supportedconcrete (scalar)datatypes likeintegernumbers,floating-pointnumbers, andstringsofcharacters. Abstract datatypes arestructuresof concrete datatypes, with a new name assigned. For example, alistof integers could be calledinteger_list. In object-oriented jargon, abstract datatypes are calledclasses. However, aclassis only a definition; no memory is allocated. When memory is allocated to a class andboundto anidentifier, it is called anobject.[68] Object-oriented imperative languagesdeveloped by combining the need for classes and the need for safefunctional programming.[69]A function, in an object-oriented language, is assigned to a class. An assigned function is then referred to as amethod,member function, oroperation.Object-oriented programmingis executingoperationsonobjects.[70] Object-oriented languagessupport a syntax to modelsubset/supersetrelationships. Inset theory, anelementof a subset inherits all the attributes contained in the superset. For example, a student is a person. Therefore, the set of students is a subset of the set of persons. As a result, students inherit all the attributes common to all persons. Additionally, students have unique attributes that other people do not have.Object-oriented languagesmodelsubset/supersetrelationships usinginheritance.[71]Object-oriented programmingbecame the dominant language paradigm by the late 1990s.[67] C++(1985) was originally called "C with Classes".[72]It was designed to expandC'scapabilities by adding the object-oriented facilities of the languageSimula.[73] An object-oriented module is composed of two files. The definitions file is called theheader file. Here is a C++header filefor theGRADE classin a simple school application: Aconstructoroperation is a function with the same name as the class name.[74]It is executed when the calling operation executes thenewstatement. A module's other file is thesource file. Here is a C++ source file for theGRADE classin a simple school application: Here is a C++header filefor thePERSON classin a simple school application: Here is a C++source filefor thePERSON classin a simple school application: Here is a C++header filefor theSTUDENT classin a simple school application: Here is a C++source filefor theSTUDENT classin a simple school application: Here is a driver program for demonstration: Here is amakefileto compile everything: Imperative languageshave one major criticism: assigning an expression to anon-localvariable may produce an unintendedside effect.[75]Declarative languagesgenerally omit the assignment statement and the control flow. They describewhatcomputation should be performed and nothowto compute it. Two broad categories of declarative languages arefunctional languagesandlogical languages. The principle behind afunctional languageis to uselambda calculusas a guide for a well definedsemantic.[76]In mathematics, a function is a rule that maps elements from anexpressionto a range ofvalues. Consider the function: times_10(x) = 10 * x Theexpression10 * xis mapped by the functiontimes_10()to a range ofvalues. Onevaluehappens to be 20. This occurs when x is 2. So, the application of the function is mathematically written as: times_10(2) = 20 Afunctional languagecompiler will not store this value in a variable. Instead, it willpushthe value onto the computer'sstackbefore setting theprogram counterback to the calling function. The calling function will thenpopthe value from the stack.[77] Imperative languagesdo support functions. Therefore,functional programmingcan be achieved in an imperative language, if the programmer uses discipline. However, afunctional languagewill force this discipline onto the programmer through its syntax. Functional languages have a syntax tailored to emphasize thewhat.[78] A functional program is developed with a set of primitive functions followed by a single driver function.[75]Consider thesnippet: function max( a, b ){/* code omitted */} function min( a, b ){/* code omitted */} function range( a, b, c ) { } The primitives aremax()andmin(). The driver function isrange(). Executing: put( range( 10, 4, 7) );will output 6. Functional languagesare used incomputer scienceresearch to explore new language features.[79]Moreover, their lack of side-effects have made them popular inparallel programmingandconcurrent programming.[80]However, application developers prefer theobject-oriented featuresofimperative languages.[80] Lisp(1958) stands for "LISt Processor".[81]It is tailored to processlists. A full structure of the data is formed by building lists of lists. In memory, atree data structureis built. Internally, the tree structure lends nicely forrecursivefunctions.[82]The syntax to build a tree is to enclose the space-separatedelementswithin parenthesis. The following is alistof three elements. The first two elements are themselves lists of two elements: ((A B) (HELLO WORLD) 94) Lisp has functions to extract and reconstruct elements.[83]The functionhead()returns a list containing the first element in the list. The functiontail()returns a list containing everything but the first element. The functioncons()returns a list that is the concatenation of other lists. Therefore, the following expression will return the listx: cons(head(x), tail(x)) One drawback of Lisp is when many functions are nested, the parentheses may look confusing.[78]Modern Lispenvironmentshelp ensure parenthesis match. As an aside, Lisp does support theimperative languageoperations of the assignment statement and goto loops.[84]Also,Lispis not concerned with thedatatypeof the elements at compile time.[85]Instead, it assigns (and may reassign) the datatypes atruntime. Assigning the datatype at runtime is calleddynamic binding.[86]Whereas dynamic binding increases the language's flexibility, programming errors may linger until late in thesoftware development process.[86] Writing large, reliable, and readable Lisp programs requires forethought. If properly planned, the program may be much shorter than an equivalentimperative languageprogram.[78]Lispis widely used inartificial intelligence. However, its usage has been accepted only because it hasimperative languageoperations, making unintended side-effects possible.[80] ML(1973)[87]stands for "Meta Language". ML checks to make sure only data of the same type are compared with one another.[88]For example, this function has one input parameter (an integer) and returns an integer: MLis not parenthesis-eccentric likeLisp. The following is an application oftimes_10(): It returns "20 : int". (Both the results and the datatype are returned.) LikeLisp,MLis tailored to process lists. UnlikeLisp, each element is the same datatype.[89]Moreover,MLassigns the datatype of an element atcompile time. Assigning the datatype at compile time is calledstatic binding. Static binding increases reliability because the compiler checks the context of variables before they are used.[90] Prolog(1972) stands for "PROgramming in LOGic". It is alogic programminglanguage, based on formallogic. The language was developed byAlain Colmerauerand Philippe Roussel in Marseille, France. It is an implementation ofSelective Linear Definite clause resolution, pioneered byRobert Kowalskiand others at theUniversity of Edinburgh.[91] The building blocks of a Prolog program arefactsandrules. Here is a simple example: After all the facts and rules are entered, then a question can be asked: The following example shows how Prolog will convert a letter grade to its numeric value: Here is a comprehensive example:[92] 1) All dragons billow fire, or equivalently, a thing billows fire if the thing is a dragon: 2) A creature billows fire if one of its parents billows fire: 3) A thing X is a parent of a thing Y if X is the mother of Y or X is the father of Y: 4) A thing is a creature if the thing is a dragon: 5) Norberta is a dragon, and Puff is a creature. Norberta is the mother of Puff. Rule (2) is arecursive(inductive) definition. It can be understood declaratively, without the need to understand how it is executed. Rule (3) shows howfunctionsare represented by using relations. Here, the mother and father functions ensure that every individual has only one mother and only one father. Prolog is an untyped language. Nonetheless,inheritancecan be represented by using predicates. Rule (4) asserts that a creature is a superclass of a dragon. Questions are answered usingbackward reasoning. Given the question: Prolog generates two answers : Practical applications for Prolog areknowledge representationandproblem solvinginartificial intelligence. Object-oriented programmingis a programming method to executeoperations(functions) onobjects.[93]The basic idea is to group the characteristics of aphenomenoninto an objectcontainerand give the container a name. Theoperationson the phenomenon are also grouped into the container.[93]Object-oriented programmingdeveloped by combining the need for containers and the need for safefunctional programming.[94]This programming method need not be confined to anobject-oriented language.[95]In an object-oriented language, an object container is called aclass. In a non-object-oriented language, adata structure(which is also known as arecord) may become an object container. To turn a data structure into an object container, operations need to be written specifically for the structure. The resulting structure is called anabstract datatype.[96]However,inheritancewill be missing. Nonetheless, this shortcoming can be overcome. Here is aC programming languageheader filefor theGRADE abstract datatypein a simple school application: Thegrade_new()function performs the same algorithm as the C++constructoroperation. Here is a C programming languagesource filefor theGRADE abstract datatypein a simple school application: In the constructor, the functioncalloc()is used instead ofmalloc()because each memory cell will be set to zero. Here is a C programming languageheader filefor thePERSON abstract datatypein a simple school application: Here is a C programming languagesource filefor thePERSON abstract datatypein a simple school application: Here is a C programming languageheader filefor theSTUDENT abstract datatypein a simple school application: Here is a C programming languagesource filefor theSTUDENT abstract datatypein a simple school application: Here is a driver program for demonstration: Here is amakefileto compile everything: The formal strategy to build object-oriented objects is to:[97] For example: Thesyntaxof acomputer programis alistofproduction ruleswhich form itsgrammar.[98]A programming language's grammar correctly places itsdeclarations,expressions, andstatements.[99]Complementing thesyntaxof a language are itssemantics. Thesemanticsdescribe the meanings attached to various syntactic constructs.[100]A syntactic construct may need a semantic description because a production rule may have an invalid interpretation.[101]Also, different languages might have the same syntax; however, their behaviors may be different. The syntax of a language is formally described by listing the production rules. Whereas the syntax of anatural languageis extremely complicated, a subset of the English language can have this production rule listing:[102] The words inbold-faceare known asnon-terminals. The words in 'single quotes' are known asterminals.[103] From this production rule listing, complete sentences may be formed using a series of replacements.[104]The process is to replacenon-terminalswith either a validnon-terminalor a validterminal. The replacement process repeats until onlyterminalsremain. One valid sentence is: However, another combination results in an invalid sentence: Therefore, asemanticis necessary to correctly describe the meaning of aneatactivity. Oneproduction rulelisting method is called theBackus–Naur form(BNF).[105]BNF describes the syntax of a language and itself has asyntax. This recursive definition is an example of ametalanguage.[100]Thesyntaxof BNF includes: Using BNF, a subset of the English language can have thisproduction rulelisting: Using BNF, a signed-integerhas theproduction rulelisting:[106] Notice the recursive production rule: This allows for an infinite number of possibilities. Therefore, asemanticis necessary to describe a limitation of the number of digits. Notice the leading zero possibility in the production rules: Therefore, asemanticis necessary to describe that leading zeros need to be ignored. Two formal methods are available to describesemantics. They aredenotational semanticsandaxiomatic semantics.[107] Software engineeringis a variety of techniques to producequalitycomputer programs.[108]Computer programmingis the process of writing or editingsource code. In a formal environment, asystems analystwill gather information from managers about all the organization's processes to automate. This professional then prepares adetailed planfor the new or modified system.[109]The plan is analogous to an architect's blueprint.[109] The systems analyst has the objective to deliver the right information to the right person at the right time.[110]The critical factors to achieve this objective are:[110] Achieving performance objectives should be balanced with all of the costs, including:[111] Applying asystems development processwill mitigate the axiom: the later in the process an error is detected, the more expensive it is to correct.[112] Thewaterfall modelis an implementation of asystems development process.[113]As thewaterfalllabel implies, the basic phases overlap each other:[114] Acomputer programmeris a specialist responsible for writing or modifying the source code to implement the detailed plan.[109]A programming team is likely to be needed because most systems are too large to be completed by a single programmer.[116]However, adding programmers to a project may not shorten the completion time. Instead, it may lower the quality of the system.[116]To be effective, program modules need to be defined and distributed to team members.[116]Also, team members must interact with one another in a meaningful and effective way.[116] Computer programmers may beprogramming in the small: programming within a single module.[117]Chances are a module will execute modules located in other source code files. Therefore, computer programmers may beprogramming in the large: programming modules so they will effectively couple with each other.[117]Programming-in-the-large includes contributing to theapplication programming interface(API). Modular programmingis a technique to refineimperative languageprograms. Refined programs may reduce the software size, separate responsibilities, and thereby mitigatesoftware aging. Aprogram moduleis a sequence of statements that are bounded within ablockand together identified by a name.[118]Modules have afunction,context, andlogic:[119] The module's name should be derived first by itsfunction, then by itscontext. Itslogicshould not be part of the name.[119]For example,function compute_square_root( x )orfunction compute_square_root_integer( i : integer )are appropriate module names. However,function compute_square_root_by_division( x )is not. The degree of interactionwithina module is its level ofcohesion.[119]Cohesionis a judgment of the relationship between a module's name and itsfunction. The degree of interactionbetweenmodules is the level ofcoupling.[120]Couplingis a judgement of the relationship between a module'scontextand the elements being performed upon. The levels of cohesion from worst to best are:[121] The levels of coupling from worst to best are:[120] Data flow analysisis a design method used to achieve modules offunctional cohesionanddata coupling.[122]The input to the method is adata-flow diagram. A data-flow diagram is a set of ovals representing modules. Each module's name is displayed inside its oval. Modules may be at the executable level or the function level. The diagram also has arrows connecting modules to each other. Arrows pointing into modules represent a set of inputs. Each module should have only one arrow pointing out from it to represent its single output object. (Optionally, an additional exception arrow points out.) Adaisy chainof ovals will convey an entirealgorithm. The input modules should start the diagram. The input modules should connect to the transform modules. The transform modules should connect to the output modules.[123] Computer programsmay be categorized along functional lines. The main functional categories areapplication softwareandsystem software. System software includes theoperating system, which couplescomputer hardwarewith application software.[124]The purpose of the operating system is to provide an environment where application software executes in a convenient and efficient manner.[124]Both application software and system software executeutility programs. At the hardware level, amicrocode programcontrols the circuits throughout thecentral processing unit. Application software is the key to unlocking the potential of the computer system.[125]Enterprise application softwarebundles accounting, personnel, customer, and vendor applications. Examples includeenterprise resource planning,customer relationship management, andsupply chain management software. Enterprise applications may be developed in-house as a one-of-a-kindproprietary software.[126]Alternatively, they may be purchased asoff-the-shelf software. Purchased software may be modified to providecustom software. If the application is customized, then either the company's resources are used or the resources are outsourced. Outsourced software development may be from the original software vendor or a third-party developer.[127] The potential advantages of in-house software are features and reports may be developed exactly to specification.[128]Management may also be involved in the development process and offer a level of control.[129]Management may decide to counteract a competitor's new initiative or implement a customer or vendor requirement.[130]A merger or acquisition may necessitate enterprise software changes. The potential disadvantages of in-house software are time and resource costs may be extensive.[126]Furthermore, risks concerning features and performance may be looming. The potential advantages of off-the-shelf software are upfront costs are identifiable, the basic needs should be fulfilled, and its performance and reliability have a track record.[126]The potential disadvantages of off-the-shelf software are it may have unnecessary features that confuse end users, it may lack features the enterprise needs, and the data flow may not match the enterprise's work processes.[126] One approach to economically obtaining a customized enterprise application is through anapplication service provider.[131]Specialty companies provide hardware, custom software, and end-user support. They may speed the development of new applications because they possess skilled information system staff. The biggest advantage is it frees in-house resources from staffing and managing complex computer projects.[131]Many application service providers target small, fast-growing companies with limited information system resources.[131]On the other hand, larger companies with major systems will likely have their technical infrastructure in place. One risk is having to trust an external organization with sensitive information. Another risk is having to trust the provider's infrastructure reliability.[131] Anoperating systemis the low-level software that supports a computer's basic functions, such asschedulingprocessesand controllingperipherals.[124] In the 1950s, the programmer, who was also the operator, would write a program and run it. After the program finished executing, the output may have been printed, or it may have been punched onto paper tape or cards for later processing.[29]More often than not the program did not work. The programmer then looked at the console lights and fiddled with the console switches. If less fortunate, a memory printout was made for further study. In the 1960s, programmers reduced the amount of wasted time by automating the operator's job. A program called anoperating systemwas kept in the computer at all times.[132] The termoperating systemmay refer to two levels of software.[133]The operating system may refer to thekernel programthat manages theprocesses,memory, anddevices. More broadly, the operating system may refer to the entire package of the central software. The package includes a kernel program,command-line interpreter,graphical user interface,utility programs, andeditor.[133] The kernel's main purpose is to manage the limited resources of a computer: Originally, operating systems were programmed inassembly; however, modern operating systems are typically written in higher-level languages likeC,Objective-C, andSwift.[k] Autility programis designed to aid system administration and software execution. Operating systems execute hardware utility programs to check the status of disk drives, memory, speakers, and printers.[142]A utility program may optimize the placement of a file on a crowded disk. System utility programs monitor hardware and network performance. When a metric is outside an acceptable range, a trigger alert is generated.[143] Utility programs include compression programs so data files are stored on less disk space.[142]Compressed programs also save time when data files are transmitted over the network.[142]Utility programs can sort and merge data sets.[143]Utility programs detectcomputer viruses.[143] Amicrocode programis the bottom-level interpreter that controls thedata pathof software-driven computers.[144](Advances inhardwarehave migrated these operations tohardware execution circuits.)[144]Microcode instructions allow the programmer to more easily implement thedigital logic level[145]—the computer's real hardware. The digital logic level is the boundary betweencomputer scienceandcomputer engineering.[146] Alogic gateis a tinytransistorthat can return one of two signals: on or off.[147] These five gates form the building blocks ofbinary algebra—the digital logic functions of the computer. Microcode instructions aremnemonicsprogrammers may use to execute digital logic functions instead of forming them in binary algebra. They are stored in acentral processing unit's(CPU)control store.[148]These hardware-level instructions move data throughout thedata path. The micro-instruction cycle begins when themicrosequenceruses its microprogram counter tofetchthe nextmachine instructionfromrandom-access memory.[149]The next step is todecodethe machine instruction by selecting the proper output line to the hardware module.[150]The final step is toexecutethe instruction using the hardware module's set of gates. Instructions to perform arithmetic are passed through anarithmetic logic unit(ALU).[151]The ALU has circuits to perform elementary operations to add, shift, and compare integers. By combining and looping the elementary operations through the ALU, the CPU performs its complex arithmetic. Microcode instructions move data between the CPU and thememory controller. Memory controller microcode instructions manipulate tworegisters. Thememory address registeris used to access each memory cell's address. Thememory data registeris used to set and read each cell's contents.[152] Microcode instructions move data between the CPU and the manycomputer buses. Thedisk controller buswrites to and reads fromhard disk drives. Data is also moved between the CPU and other functional units via theperipheral component interconnect express bus.[153]
https://en.wikipedia.org/wiki/Computer_program
Incomputer science,control flow(orflow of control) is the order in which individualstatements,instructionsorfunction callsof animperativeprogramareexecutedor evaluated. The emphasis on explicit control flow distinguishes animperative programminglanguage from adeclarative programminglanguage. Within an imperativeprogramming language, acontrol flow statementis a statement that results in a choice being made as to which of two or more paths to follow. Fornon-strictfunctional languages, functions andlanguage constructsexist to achieve the same result, but they are usually not termed control flow statements. A set of statements is in turn generally structured as ablock, which in addition to grouping, also defines alexical scope. Interruptsandsignalsare low-level mechanisms that can alter the flow of control in a way similar to asubroutine, but usually occur as a response to some external stimulus or event (that can occurasynchronously), rather than execution of anin-linecontrol flow statement. At the level ofmachine languageorassembly language, control flow instructions usually work by altering theprogram counter. For somecentral processing units(CPUs), the only control flow instructions available are conditional or unconditionalbranchinstructions, also termed jumps. The kinds of control flow statements supported by different languages vary, but can be categorized by their effect: Alabelis an explicit name or number assigned to a fixed position within thesource code, and which may be referenced by control flow statements appearing elsewhere in the source code. A label marks a position within source code and has no other effect. Line numbersare an alternative to a named label used in some languages (such asBASIC). They arewhole numbersplaced at the start of each line of text in the source code. Languages which use these often impose the constraint that the line numbers must increase in value in each following line, but may not require that they be consecutive. For example, in BASIC: In other languages such asCandAda, a label is anidentifier, usually appearing at the start of a line and immediately followed by a colon. For example, in C: The languageALGOL 60allowed both whole numbers and identifiers as labels (both linked by colons to the following statement), but few if any otherALGOLvariants allowed whole numbers. EarlyFortrancompilers only allowed whole numbers as labels. Beginning with Fortran-90, alphanumeric labels have also been allowed. Thegotostatement (a combination of the English wordsgoandto, and pronounced accordingly) is the most basic form of unconditional transfer of control. Although thekeywordmay either be in upper or lower case depending on the language, it is usually written as: The effect of a goto statement is to cause the next statement to be executed to be the statement appearing at (or immediately after) the indicated label. Goto statements have beenconsidered harmfulby many computer scientists, notablyDijkstra. The terminology forsubroutinesvaries; they may alternatively be known as routines, procedures, functions (especially if they return results) or methods (especially if they belong toclassesortype classes). In the 1950s, computer memories were very small by current standards so subroutines were used mainly to reduce program size. A piece of code was written once and then used many times from various other places in a program. Today, subroutines are more often used to help make a program more structured, e.g., by isolating some algorithm or hiding some data access method. If many programmers are working on one program, subroutines are one kind ofmodularitythat can help divide the work. In structured programming, the ordered sequencing of successive commands is considered one of the basic control structures, which is used as a building block for programs alongside iteration, recursion and choice. In May 1966, Böhm and Jacopini published an article[1]inCommunications of the ACMwhich showed that any program withgotos could be transformed into a goto-free form involving only choice (IF THEN ELSE) and loops (WHILE condition DO xxx), possibly with duplicated code and/or the addition of Boolean variables (true/false flags). Later authors showed that choice can be replaced by loops (and yet more Boolean variables). That such minimalism is possible does not mean that it is necessarily desirable; computers theoretically need onlyone machine instruction(subtract one number from another and branch if the result is negative), but practical computers have dozens or even hundreds of machine instructions. Other research showed that control structures with one entry and one exit were much easier to understand than any other form,[citation needed]mainly because they could be used anywhere as a statement without disrupting the control flow. In other words, they werecomposable. (Later developments, such asnon-strict programming languages– and more recently, composablesoftware transactions– have continued this strategy, making components of programs even more freely composable.) Some academics took a purist approach to the Böhm–Jacopini result and argued that even instructions likebreakandreturnfrom the middle of loops are bad practice as they are not needed in the Böhm–Jacopini proof, and thus they advocated that all loops should have a single exit point. This purist approach is embodied in the languagePascal(designed in 1968–1969), which up to the mid-1990s was the preferred tool for teaching introductory programming in academia.[2]The direct application of the Böhm–Jacopini theorem may result in additional local variables being introduced in the structured chart, and may also result in somecode duplication.[3]Pascal is affected by both of these problems and according to empirical studies cited byEric S. Roberts, student programmers had difficulty formulating correct solutions in Pascal for several simple problems, including writing a function for searching an element in an array. A 1980 study by Henry Shapiro cited by Roberts found that using only the Pascal-provided control structures, the correct solution was given by only 20% of the subjects, while no subject wrote incorrect code for this problem if allowed to write a return from the middle of a loop.[2] Most programming languages with control structures have an initial keyword which indicates the type of control structure involved.[clarification needed]Languages then divide as to whether or not control structures have a final keyword. Conditional expressions and conditional constructs are features of aprogramming languagethat perform different computations or actions depending on whether a programmer-specifiedBooleanconditionevaluates to true or false. Less common variations include: Switch statements(orcase statements, ormultiway branches) compare a given value with specified constants and take action according to the first constant to match. There is usually a provision for a default action ("else", "otherwise") to be taken if no match succeeds. Switch statements can allow compiler optimizations, such aslookup tables. Indynamic languages, the cases may not be limited to constant expressions, and might extend topattern matching, as in theshell scriptexample on the right, where the*)implements the default case as aglobmatching any string. Case logic can also be implemented in functional form, as inSQL'sdecodestatement. A loop is a sequence of statements which is specified once but which may be carried out several times in succession. The code "inside" the loop (thebodyof the loop, shown below asxxx) is obeyed a specified number of times, or once for each of a collection of items, or until some condition is met, orindefinitely. When one of those items is itself also a loop, it is called a "nested loop".[4][5][6] Infunctional programminglanguages, such asHaskellandScheme, bothrecursiveanditerativeprocesses are expressed withtail recursiveprocedures instead of looping constructs that are syntactic. Most programming languages have constructions for repeating a loop a certain number of times. In most cases counting can go downwards instead of upwards and step sizes other than 1 can be used. In these examples, if N < 1 then the body of loop may execute once (with I having value 1) or not at all, depending on the programming language. In many programming languages, only integers can be reliably used in a count-controlled loop. Floating-point numbers are represented imprecisely due to hardware constraints, so a loop such as might be repeated 9 or 10 times, depending on rounding errors and/or the hardware and/or the compiler version. Furthermore, if the increment of X occurs by repeated addition, accumulated rounding errors may mean that the value of X in each iteration can differ quite significantly from the expected sequence 0.1, 0.2, 0.3, ..., 1.0. Most programming languages have constructions for repeating a loop until some condition changes. Some variations test the condition at the start of the loop; others test it at the end. If the test is at the start, the body may be skipped completely; if it is at the end, the body is always executed at least once. Acontrol breakis a value change detection method used within ordinary loops to trigger processing for groups of values. Values are monitored within the loop and a change diverts program flow to the handling of the group event associated with them. Several programming languages (e.g.,Ada,D,C++11,Smalltalk,PHP,Perl,Object Pascal,Java,C#,MATLAB,Visual Basic,Ruby,Python,JavaScript,Fortran 95and later) have special constructs which allow implicit looping through all elements of an array, or all members of a set or collection. Scalahasfor-expressions, which generalise collection-controlled loops, and also support other uses, such asasynchronous programming.Haskellhas do-expressions and comprehensions, which together provide similar function to for-expressions in Scala. General iteration constructs such as C'sforstatement andCommon Lisp'sdoform can be used to express any of the above sorts of loops, and others, such as looping over some number of collections in parallel. Where a more specific looping construct can be used, it is usually preferred over the general iteration construct, since it often makes the purpose of the expression clearer. Infinite loopsare used to assure a program segment loops forever or until an exceptional condition arises, such as an error. For instance, an event-driven program (such as aserver) should loop forever, handling events as they occur, only stopping when the process is terminated by an operator. Infinite loops can be implemented using other control flow constructs. Most commonly, in unstructured programming this is jump back up (goto), while in structured programming this is an indefinite loop (while loop) set to never end, either by omitting the condition or explicitly setting it to true, aswhile (true) .... Some languages have special constructs for infinite loops, typically by omitting the condition from an indefinite loop. Examples include Ada (loop ... end loop),[7]Fortran (DO ... END DO), Go (for { ... }), and Ruby (loop do ... end). Often, an infinite loop is unintentionally created by a programming error in a condition-controlled loop, wherein the loop condition uses variables that never change within the loop. Sometimes within the body of a loop there is a desire to skip the remainder of the loop body and continue with the next iteration of the loop. Some languages provide a statement such ascontinue(most languages),skip,[8]cycle(Fortran), ornext(Perl and Ruby), which will do this. The effect is to prematurely terminate the innermost loop body and then resume as normal with the next iteration. If the iteration is the last one in the loop, the effect is to terminate the entire loop early. Some languages, like Perl[9]and Ruby,[10]have aredostatement that restarts the current iteration from the start. Ruby has aretrystatement that restarts the entire loop from the initial iteration.[11] When using a count-controlled loop to search through a table, it might be desirable to stop searching as soon as the required item is found. Some programming languages provide a statement such asbreak(most languages),Exit(Visual Basic), orlast(Perl), which effect is to terminate the current loop immediately, and transfer control to the statement immediately after that loop. Another term for early-exit loops isloop-and-a-half. The following example is done inAdawhich supports bothearly exit from loopsandloops with test in the middle. Both features are very similar and comparing both code snippets will show the difference:early exitmust be combined with anifstatement while acondition in the middleis a self-contained construct. Pythonsupports conditional execution of code depending on whether a loop was exited early (with abreakstatement) or not by using an else-clause with the loop. For example, Theelseclause in the above example is linked to theforstatement, and not the innerifstatement. Both Python'sforandwhileloops support such an else clause, which is executed only if early exit of the loop has not occurred. Some languages support breaking out of nested loops; in theory circles, these are called multi-level breaks. One common use example is searching a multi-dimensional table. This can be done either via multilevel breaks (break out ofNlevels), as in bash[12]and PHP,[13]or via labeled breaks (break out and continue at given label), as in Go, Java and Perl.[14]Alternatives to multilevel breaks include single breaks, together with a state variable which is tested to break out another level; exceptions, which are caught at the level being broken out to; placing the nested loops in a function and using return to effect termination of the entire nested loop; or using a label and a goto statement. C does not include a multilevel break, and the usual alternative is to use a goto to implement a labeled break.[15]Python does not have a multilevel break or continue – this was proposed inPEP 3136, and rejected on the basis that the added complexity was not worth the rare legitimate use.[16] The notion of multi-level breaks is of some interest intheoretical computer science, because it gives rise to what is today called theKosaraju hierarchy.[17]In 1973S. Rao Kosarajurefined thestructured program theoremby proving that it is possible to avoid adding additional variables in structured programming, as long as arbitrary-depth, multi-level breaks from loops are allowed.[18]Furthermore, Kosaraju proved that a strict hierarchy of programs exists: for every integern, there exists a program containing a multi-level break of depthnthat cannot be rewritten as a program with multi-level breaks of depth less thannwithout introducing added variables.[17] One can alsoreturnout of a subroutine executing the looped statements, breaking out of both the nested loop and the subroutine. There are otherproposed control structuresfor multiple breaks, but these are generally implemented as exceptions instead. In his 2004 textbook,David Wattuses Tennent's notion ofsequencerto explain the similarity between multi-level breaks and return statements. Watt notes that a class of sequencers known asescape sequencers, defined as "sequencer that terminates execution of a textually enclosing command or procedure", encompasses both breaks from loops (including multi-level breaks) and return statements. As commonly implemented, however, return sequencers may also carry a (return) value, whereas the break sequencer as implemented in contemporary languages usually cannot.[19] Loop variantsandloop invariantsare used to express correctness of loops.[20] In practical terms, a loop variant is an integer expression which has an initial non-negative value. The variant's value must decrease during each loop iteration but must never become negative during the correct execution of the loop. Loop variants are used to guarantee that loops will terminate. A loop invariant is an assertion which must be true before the first loop iteration and remain true after each iteration. This implies that when a loop terminates correctly, both the exit condition and the loop invariant are satisfied. Loop invariants are used to monitor specific properties of a loop during successive iterations. Some programming languages, such asEiffelcontain native support for loop variants and invariants. In other cases, support is an add-on, such as theJava Modeling Language's specification forloop statementsinJava. SomeLispdialects provide an extensive sublanguage for describing Loops. An early example can be found in Conversional Lisp ofInterlisp.Common Lisp[21]provides a Loop macro which implements such a sublanguage. Many programming languages, especially those favoring more dynamic styles of programming, offer constructs fornon-local control flow. These cause the flow of execution to jump out of a given context and resume at somepredeclaredpoint.Conditions,exceptionsandcontinuationsare three common sorts of non-local control constructs; more exotic ones also exist, such asgenerators,coroutinesand theasynckeyword. The earliestFortrancompilers had statements for testing exceptional conditions. These included theIF ACCUMULATOR OVERFLOW,IF QUOTIENT OVERFLOW, andIF DIVIDE CHECKstatements. In the interest of machine independence, they were not included in FORTRAN IV and the Fortran 66 Standard. However since Fortran 2003 it is possible to test for numerical issues via calls to functions in theIEEE_EXCEPTIONSmodule. PL/Ihas some 22 standard conditions (e.g., ZERODIVIDE SUBSCRIPTRANGE ENDFILE) which can be raised and which can be intercepted by: ONconditionaction; Programmers can also define and use their own named conditions. Like theunstructured if, only one statement can be specified so in many cases a GOTO is needed to decide where flow of control should resume. Unfortunately, some implementations had a substantial overhead in both space and time (especially SUBSCRIPTRANGE), so many programmers tried to avoid using conditions. Common Syntax examples: Modern languages have a specialized structured construct for exception handling which does not rely on the use ofGOTOor (multi-level) breaks or returns. For example, in C++ one can write: Any number and variety ofcatchclauses can be used above. If there is nocatchmatching a particularthrow, control percolates back through subroutine calls and/or nested blocks until a matchingcatchis found or until the end of the main program is reached, at which point the program is forcibly stopped with a suitable error message. Via C++'s influence,catchis the keyword reserved for declaring a pattern-matching exception handler in other languages popular today, like Java or C#. Some other languages like Ada use the keywordexceptionto introduce an exception handler and then may even employ a different keyword (whenin Ada) for the pattern matching. A few languages likeAppleScriptincorporate placeholders in the exception handler syntax to automatically extract several pieces of information when the exception occurs. This approach is exemplified below by theon errorconstruct from AppleScript: David Watt's 2004 textbook also analyzes exception handling in the framework of sequencers (introduced in this article in the section on early exits from loops). Watt notes that an abnormal situation, generally exemplified with arithmetic overflows orinput/outputfailures like file not found, is a kind of error that "is detected in some low-level program unit, but [for which] a handler is more naturally located in a high-level program unit". For example, a program might contain several calls to read files, but the action to perform when a file is not found depends on the meaning (purpose) of the file in question to the program and thus a handling routine for this abnormal situation cannot be located in low-level system code. Watts further notes that introducing status flags testing in the caller, as single-exit structured programming or even (multi-exit) return sequencers would entail, results in a situation where "the application code tends to get cluttered by tests of status flags" and that "the programmer might forgetfully or lazily omit to test a status flag. In fact, abnormal situations represented by status flags are by default ignored!" Watt notes that in contrast to status flags testing, exceptions have the oppositedefault behavior, causing the program to terminate unless the program deals with the exception explicitly in some way, possibly by adding explicit code to ignore it. Based on these arguments, Watt concludes that jump sequencers or escape sequencers are less suitable as a dedicated exception sequencer with the semantics discussed above.[24] In Object Pascal, D, Java, C#, and Python afinallyclause can be added to thetryconstruct. No matter how control leaves thetrythe code inside thefinallyclause is guaranteed to execute. This is useful when writing code that must relinquish an expensive resource (such as an opened file or a database connection) when finished processing: Since this pattern is fairly common, C# has a special syntax: Upon leaving theusing-block, the compiler guarantees that thestmobject is released, effectivelybindingthe variable to the file stream while abstracting from the side effects of initializing and releasing the file. Python'swithstatement and Ruby's block argument toFile.openare used to similar effect. All the languages mentioned above define standard exceptions and the circumstances under which they are thrown. Users can throw exceptions of their own; C++ allows users to throw and catch almost any type, including basic types likeint, whereas other languages like Java are less permissive. C# 5.0 introduced the async keyword for supportingasynchronous I/Oin a "direct style". Generators, also known as semicoroutines, allow control to be yielded to a consumer method temporarily, typically using ayieldkeyword (yield description) . Like the async keyword, this supports programming in a "direct style". Coroutinesare functions that can yield control to each other - a form ofco-operative multitaskingwithout threads. Coroutines can be implemented as a library if the programming language provides either continuations or generators - so the distinction between coroutines and generators in practice is a technical detail. In a spoofDatamationarticle[31]in 1973, R. Lawrence Clark suggested that the GOTO statement could be replaced by theCOMEFROMstatement, and provides some entertaining examples. COMEFROM was implemented in oneesoteric programming languagenamedINTERCAL. Donald Knuth's 1974 article "Structured Programming with go to Statements",[32]identifies two situations which were not covered by the control structures listed above, and gave examples of control structures which could handle these situations. Despite their utility, these constructs have not yet found their way into mainstream programming languages. The following was proposed byDahlin 1972:[33] Ifxxx1is omitted, we get a loop with the test at the top (a traditionalwhileloop). Ifxxx2is omitted, we get a loop with the test at the bottom, equivalent to ado whileloop in many languages. Ifwhileis omitted, we get an infinite loop. The construction here can be thought of as adoloop with the while check in the middle. Hence this single construction can replace several constructions in most programming languages. Languages lacking this construct generally emulate it using an equivalent infinite-loop-with-break idiom: A possible variant is to allow more than onewhiletest; within the loop, but the use ofexitwhen(see next section) appears to cover this case better. InAda, the above loop construct (loop-while-repeat) can be represented using a standard infinite loop (loop-end loop) that has anexit whenclause in the middle (not to be confused with theexitwhenstatement in the following section). Naming a loop (likeRead_Datain this example) is optional but permits leaving the outer loop of several nested loops. This constructwas proposed byZahnin 1974.[34]A modified version is presented here. exitwhenis used to specify the events which may occur withinxxx, their occurrence is indicated by using the name of the event as a statement. When some event does occur, the relevant action is carried out, and then control passes just afterendexit. This construction provides a very clear separation between determining that some situation applies, and the action to be taken for that situation. exitwhenis conceptually similar toexception handling, and exceptions or similar constructs are used for this purpose in many languages. The following simple example involves searching a two-dimensional table for a particular item. One way to attack a piece of software is to redirect the flow of execution of a program. A variety ofcontrol-flow integritytechniques, includingstack canaries,buffer overflow protection, shadow stacks, andvtablepointer verification, are used to defend against these attacks.[35][36][37]
https://en.wikipedia.org/wiki/Control_flow
Adecision-to-decision path, orDD-path, is a path of execution (usually through a flow graph representing a program, such as aflow chart) between two decisions. More recent versions of the concept also include the decisions themselves in their own DD-paths. In Huang's 1975 paper,[1]a decision-to-decision path is defined aspathin a program'sflowchartsuch that all the following hold (quoting from the paper): Jorgensen's more recent textbooks restate it in terms of a program'sflow graph(called a "program graph" in that textbook).[2]First define some preliminary notions: chain and a maximal chain. A chain is defined as a path in which: A maximal chain is a chain that is not part of a bigger chain. A DD-path is a set of nodes in a program graph such that one of the following holds (quoting and keeping Jorgensen's numbering, with comments added in parentheses):[2] According to Jorgensen (2013), in Great Britain andISTQBliterature, the same notion is calledlinear code sequence and jump(LCSAJ).[2][dubious–discuss] From the latter definition (of Jorgensen) we can conclude the following: According to Jorgensen's 2013 textbook, DD-path testing is the best known code-based testing method, incorporated in numerous commercial tools.[2] DD-path testing is also called C2 testing orbranch coverage.[3][4] Thissoftware-engineering-related article is astub. You can help Wikipedia byexpanding it.
https://en.wikipedia.org/wiki/Decision-to-decision_path
Essential complexityis anumerical measuredefined by Thomas J. McCabe, Sr., in his highly cited, 1976 paper better known for introducingcyclomatic complexity. McCabe defined essential complexity as the cyclomatic complexity of the reduced CFG (control-flow graph) after iteratively replacing (reducing) allstructured programmingcontrol structures, i.e. those having a single entry point and a single exit point (for example if-then-else and while loops) with placeholder single statements.[1]: 317[2]: 80 McCabe's reduction process is intended to simulate the conceptual replacement of control structures (and actual statements they contain) with subroutine calls, hence the requirement for the control structures to have a single entry and a single exit point.[1]: 317(Nowadays a process like this would fall under the umbrella term ofrefactoring.) All structured programs evidently have an essential complexity of 1 as defined by McCabe because they can all be iteratively reduced to a single call to a top-level subroutine.[1]: 318As McCabe explains in his paper, his essential complexity metric was designed to provide a measure of how far off this ideal (of being completely structured) a given program was.[1]: 317Thus greater than 1 essential complexity numbers, which can only be obtained for non-structured programs, indicate that they are further away from the structured programming ideal.[1]: 317 To avoid confusion between various notions of reducibility to structured programs, it's important to note that McCabe's paper briefly discusses and then operates in the context of a 1973 paper byS. Rao Kosaraju, which gave a refinement (or alternative view) of thestructured program theorem. The seminal 1966 paper of Böhm and Jacopini showed that all programs can be [re]written using only structured programming constructs, (aka the D structures: sequence, if-then-else, and while-loop), however, in transforming a random program into a structured program additional variables may need to be introduced (and used in the tests) and some code may be duplicated.[3] In their paper, Böhm and Jacopini conjectured, but did not prove that it was necessary to introduce such additional variables for certain kinds of non-structured programs in order to transform them into structured programs.[4]: 236An example of program (that we now know) does require such additional variables is a loop with two conditional exits inside it. In order to address the conjecture of Böhm and Jacopini, Kosaraju defined a more restrictive notion of program reduction than the Turing equivalence used by Böhm and Jacopini. Essentially, Kosaraju's notion of reduction imposes, besides the obvious requirement that the two programs must compute the same value (or not finish) given the same inputs, that the two programs must use the same primitive actions and predicates, the latter understood as expressions used in the conditionals. Because of these restrictions, Kosaraju's reduction does not allow the introduction of additional variables; assigning to these variables would create new primitive actions and testing their values would change the predicates used in the conditionals. Using this more restrictive notion of reduction, Kosaraju proved Böhm and Jacopini's conjecture, namely that a loop with two exits cannot be transformed into a structured programwithout introducing additional variables, but went further and proved that programs containing multi-level breaks (from loops) form a hierarchy, such that one can always find a program with multi-level breaks of depthnthat cannot be reduced to a program of multi-level breaks with depth less thann, again without introducing additional variables.[4][5] McCabe notes in his paper that in view of Kosaraju's results, he intended to find a way to capture the essential properties of non-structured programs in terms of their control-flow graphs.[1]: 315He proceeds by first identifying the control-flow graphs corresponding to the smallest non-structured programs (these include branching into a loop, branching out of a loop, and their if-then-else counterparts) which he uses to formulate a theorem analogous toKuratowski's theorem, and thereafter he introduces his notion of essential complexity in order to give a scale answer ("measure of the structuredness of a program" in his words) rather than a yes/no answer to the question of whether a program's control-flow graph is structured or not.[1]: 315Finally, the notion of reduction used by McCabe to shrink the CFG is not the same as Kosaraju's notion of reducing flowcharts. The reduction defined on the CFG does not know or care about the program's inputs, it is simply agraph transformation.[6] For example, the following C program fragment has an essential complexity of 1, because the innerifstatement and theforcan be reduced, i.e. it is a structured program. The following C program fragment has an essential complexity of four; its CFG is irreducible. The program finds the first row of z which is all zero and puts that index in i; if there is none, it puts -1 in i. The idea of CFG reducibility by successive collapses of sub-graphs (ultimately to a single node for well-behaved CFGs) is also used in modern compiler optimization. However the notion from structured programming of single-entry and single-exit control structure is replaced with that ofnatural loop, which is defined as a "single-entry, multiple-exit loop, with only a single branch back to the entry from within it". The areas of the CFG that cannot be reduced to natural loops are calledimproper regions; these regions end up having a fairly simple definition: multiple-entry, strongly connected components of the CFG. The simplest improper region is thus a loop with two entry points. Multiple exits do not cause analysis problems in modern compilers. Improper regions (multiple-entries into loops) do cause additional difficulties in optimizing code.[7]
https://en.wikipedia.org/wiki/Essential_complexity_(numerical_measure_of_%22structuredness%22)
Halstead complexity measuresaresoftware metricsintroduced byMaurice Howard Halsteadin 1977[1]as part of his treatise on establishing an empirical science of software development. Halstead made the observation that metrics of the software should reflect the implementation or expression of algorithms in different languages, but be independent of their execution on a specific platform. These metrics are therefore computed statically from the code. Halstead's goal was to identify measurable properties of software, and the relations between them. This is similar to the identification of measurable properties of matter (like the volume, mass, and pressure of a gas) and the relationships between them (analogous to thegas equation). Thus his metrics are actually not just complexity metrics. For a given problem, let: From these numbers, several measures can be calculated: The difficulty measure is related to the difficulty of the program to write or understand, e.g. when doingcode review. The effort measure translates into actual coding time using the following relation, Halstead's delivered bugs (B) is an estimate for the number of errors in the implementation. Consider the followingCprogram: The distinct operators (η1{\displaystyle \,\eta _{1}}) are:main,(),{},int,scanf,&,=,+,/,printf,,,; The distinct operands (η2{\displaystyle \,\eta _{2}}) are:a,b,c,avg,"%d %d %d",3,"avg = %d"
https://en.wikipedia.org/wiki/Halstead_complexity_measures
Maintainabilityis the ease of maintaining or providingmaintenancefor a functioning product or service. Depending on the field, it can have slightly different meanings. Inengineering, maintainability is the ease with which a product can be maintained to: In some cases, maintainability involves a system ofcontinuous improvement- learning from the past to improve the ability to maintain systems, or improve the reliability of systems based on maintenance experience. Intelecommunicationsand several other engineering fields, the term maintainability has the following meanings: Insoftware engineering, these activities are known assoftware maintenance(cf.ISO/IEC 9126). Closely related concepts in the software engineering domain are evolvability, modifiability,technical debt, andcode smells. The maintainability index is calculated with certain formulae fromlines-of-code measures,McCabe measuresandHalstead complexity measures. The measurement and tracking of maintainability are intended to help reduce or reverse a system's tendency toward "code entropy" or degraded integrity, and to indicate when it becomes cheaper and/or less risky to rewrite the code than it is to change it. This article incorporatespublic domain materialfromFederal Standard 1037C.General Services Administration. Archived fromthe originalon 2022-01-22.(in support ofMIL-STD-188).
https://en.wikipedia.org/wiki/Maintainability
Elementary comparison testing(ECT) is awhite-box,control-flow,test-designmethodology used insoftware development.[1][2]The purpose of ECT is to enable detailed testing of complex software. Software code orpseudocodeis tested to assess the proper handling of all decision outcomes. As withmultiple-condition coverage[3]andbasis path testing,[1]coverage of all independent and isolated conditions is accomplished throughmodified condition/decision coverage (MC/DC).[4]Isolated conditions are aggregated into connected situations creating formaltest cases. The independence of a condition is shown by changing the condition value in isolation. Each relevant condition value is covered bytest cases. Atest caseconsists of a logical path through one or many decisions from start to end of a process. Contradictory situations are deduced from the test case matrix and excluded. TheMC/DCapproach isolates every condition, neglecting all possible subpath combinations and path coverage.[1]T=n+1{\displaystyle T=n+1}where The decisiondi{\displaystyle d_{i}}consists of a combination of elementary conditions Σ={0,1}C={c0,c1,c2,c3,...,cn}{\displaystyle {\begin{aligned}\Sigma &=\{0,1\}\\C&=\{c_{0},c_{1},c_{2},c_{3},...,c_{n}\}\end{aligned}}}ϵ:C→Σ×C{\displaystyle \epsilon :C\to \Sigma \times C}D⊆C∗;di∈D{\displaystyle D\subseteq C^{*}\,;\;d_{i}\in D} The transition functionα{\displaystyle \alpha }is defined asα:D×Σ∗→Σ×D{\displaystyle \alpha :D\times \Sigma ^{*}\to \Sigma \times D} Given the transition⊢{\displaystyle \vdash }⊢⊆(Σ×D×Σ∗)×(Σ×D×Σ∗){\displaystyle \vdash \subseteq (\Sigma \times D\times \Sigma ^{*})\times (\Sigma \times D\times \Sigma ^{*})} Sj=(bj,dm,vj)⊢(bj+1,dn,vj+1){\displaystyle S_{j}=(b_{j},d_{m},v_{j})\vdash (b_{j+1},d_{n},v_{j+1})}Ej=(aj,cj)⊢(aj+1,ck){\displaystyle E_{j}=(a_{j},c_{j})\vdash (a_{j+1},c_{k})}(bj+1,dn)=α(dm,vj);(bj+1,ck)=ϵ(cj);aj∈Σ,{\displaystyle (b_{j+1},d_{n})=\alpha (d_{m},v_{j});(b_{j+1},c_{k})=\epsilon (c_{j});a_{j}\in \Sigma ,}the isolated test pathPm{\displaystyle P_{m}}consists ofPm=(b0,d0,v0)⊢...⊢(bi,di,vi)⊢∗(bn,dn,vn)=(b0,c0)⊢...⊢(bm,cm)⊢∗(bn,cn){\displaystyle {\begin{aligned}P_{m}&=(b_{0},d_{0},v_{0})\vdash ...\vdash (b_{i},d_{i},v_{i})\vdash ^{*}(b_{n},d_{n},v_{n})\\&=(b_{0},c_{0})\vdash ...\vdash (b_{m},c_{m})\vdash ^{*}(b_{n},c_{n})\end{aligned}}}bi∈Σ;cm∈di;v∈C∗;d0=S;dn=E.{\displaystyle b_{i}\in \Sigma ;c_{m}\in d_{i};v\in C^{*};d_{0}=S;d_{n}=E.} A test case graph illustrates all the necessary independent paths (test cases) to cover all isolated conditions. Conditions are represented by nodes, and condition values (situations) by edges. An edge addresses all program situations. Each situation is connected to one preceding and successive condition. Test cases might overlap due to isolated conditions. The elementary comparison testing method can be used to determine the number of condition paths by inductive proof. There arer=2n{\displaystyle r=2^{n}}possible condition value combinations∀i∈{1,...,n},ci↦{0,1}.{\displaystyle \forall {i}\in \{1,...,n\},\ c_{i}\mapsto \{0,\ 1\}.} When each conditionci{\displaystyle c_{i}}is isolated, the number of required test casesT{\displaystyle T}per decision is:T=log2⁡(r)+1=n+1.{\displaystyle T=\log _{2}(r)+1=n+1.} ∀i∈{1,...,n}{\displaystyle \forall {i}\in \{1,...,n\}}there are0<e<i+1{\displaystyle 0<e<i+1}edges from parent nodesci{\displaystyle c_{i}}ands=2{\displaystyle s=2}edges to child nodes fromci{\displaystyle c_{i}}. Each individual conditionci{\displaystyle c_{i}}connects to at least one path∀i∈{1,...,n−1},ci↦{0,1}{\displaystyle \forall {i}\in \{1,...,n-1\},\ c_{i}\mapsto \{0,\ 1\}}from the maximal possiblen{\displaystyle n}connecting tocn{\displaystyle c_{n}}isolatingcn{\displaystyle c_{n}}. All predecessor conditionsci;i<n{\displaystyle c_{i};\ i<n}and respective paths are isolated. Therefore, when one node (condition) is added, the total number of paths, and required test cases, from start to finish increases by:T=n−1+2=n+1.{\displaystyle T=n-1+2=n+1.}Q.E.D. This example shows ETC applied to a holiday booking system. The discount system offers reduced-price vacations. The offered discounts are−20%{\displaystyle -20\%}for members or for expensive vacations,−10%{\displaystyle -10\%}for moderate vacations with workday departures, and0%{\displaystyle 0\%}otherwise. The example shows the creation of logical and physical test cases for all isolated conditions. Pseudocode Factors T=3×3×4×3=108{\displaystyle T=3\times 3\times 4\times 3=108}possible combinations (test cases). Example inPython: d1=days>15orprice>1000Eurormemberc1=days>15c2=price>1000c3=member{\displaystyle {\begin{aligned}d_{1}&={\text{days}}>15\ {\text{or}}\ {\text{price}}>1000\ {\text{Eur}}\ {\text{or}}\ {\text{member}}\\c_{1}&={\text{days}}>15\\c_{2}&={\text{price}}>1000\\c_{3}&={\text{member}}\\\end{aligned}}}d2=(8<days<15or500<price<1000Eur)andworkdayc4=8<days<15c5=500<price<1000Eurc6=workday{\displaystyle {\begin{aligned}d_{2}&=(8<{\text{days}}<15\ {\text{or}}\ 500<{\text{price}}<1000\ {\text{Eur}})\ {\text{and}}\ {\text{workday}}\\c_{4}&=8<{\text{days}}<15\\c_{5}&=500<{\text{price}}<1000\ {\text{Eur}}\\c_{6}&={\text{workday}}\\\end{aligned}}} The highlighted diagonals in theMC/DCMatrix are describing the isolated conditions:(ci,ci)↦{1,0}{\displaystyle (c_{i},c_{i})\mapsto \{1,0\}}all duplicate situations are regarded as proven and removed. Test cases are formed by tracing decision paths. For every decisiondi;0<i<n+1{\displaystyle d_{i};\ 0<i<n+1}a succeeding and preceding subpath is searched until every connected path has a startS{\displaystyle S}and an endE{\displaystyle E}:T1=(d1,100)⊢(1,E)T2=(d1,000)⊢(0,d2,100)⊢(1,E)T3=(d1,010)⊢(1,E)⋮Tn+1{\displaystyle {\begin{aligned}T_{1}&=(d_{1},100)\vdash (1,E)\\T_{2}&=(d_{1},000)\vdash (0,d_{2},100)\vdash (1,E)\\T_{3}&=(d_{1},010)\vdash (1,E)\\\vdots \\T_{n+1}\end{aligned}}} Physical test cases are created from logical test cases by filling in actual value representations and their respective results. In the example test case graph, all test cases and their isolated conditions are marked by colors, and the remaining paths are implicitly passed.
https://en.wikipedia.org/wiki/Elementary_comparison_testing
Bebugging(orfault seedingorerror seeding) is a popular software engineering technique used in the 1970s to measuretest coverage. Known bugs are randomly added to a program source code and thesoftware testeris tasked to find them. The percentage of the known bugs not found gives an indication of the real bugs that remain. The term "bebugging" was first mentioned inThe Psychology of Computer Programming(1970), whereGerald M. Weinbergdescribed the use of the method as a way of training, motivating, and evaluating programmers, not as a measure of faults remaining in a program. The approach was borrowed from theSAGE system, where it was used to keep operators watching radar screens alert. Here's a quote from the original use of the term: Overconfidence by the programmer could be attacked by a system that introduced random errors into the program under test. The location and nature of these errors would be recorded inside the system but concealed from the programmer. The rate at which he found and removed these known errors could be used to estimate the rate at which he is removing unknown errors. A similar technique is used routinely by surveillance systems in which an operator is expected to spend eight hours at a stretch looking at a radar screen for very rare events—such as the passing of an unidentified aircraft. Tests of performance showed that it was necessary to introduce some nonzero rate of occurrence of artificial events in order to keep the operator in a satisfactory state of arousal. Moreover, since these events were under control of the system, it was able to estimate the current and overall performance of each operator. Although we cannot introduce program bugs which simulate real bugs as well as we can simulate real aircraft on a radar screen, such a technique could certainly be employed both to train and evaluate programmers in program testing. Even if the errors had to be introduced manually by someone else in the project, it would seem worthwhile to try out such a "bebugging" system. It would give the programmer greatly increased motivation, because he now would know: An early application of bebugging wasHarlan Mills's fault seeding approach[1]which was later refined by stratified fault-seeding.[2]These techniques worked by adding a number of known faults to a software system for the purpose of monitoring the rate of detection and removal. This assumed that it is possible to estimate the number of remaining faults in a software system still to be detected by a particular test methodology. Bebugging is a type offault injection.
https://en.wikipedia.org/wiki/Bebugging
Incomputer science,fault injectionis a testing technique for understanding how computing systems behave when stressed in unusual ways. This can be achieved using physical- or software-based means, or using a hybrid approach.[1]Widely studied physical fault injections include the application of high voltages, extreme temperatures andelectromagnetic pulseson electronic components, such ascomputer memoryandcentral processing units.[2][3]By exposing components to conditions beyond their intended operating limits, computing systems can be coerced into mis-executing instructions and corrupting critical data. Insoftware testing, fault injection is a technique for improving thecoverageof a test by introducing faults to test code paths; in particularerror handlingcode paths, that might otherwise rarely be followed. It is often used withstress testingand is widely considered to be an important part of developingrobustsoftware.[4]Robustness testing[5](also known as syntax testing,fuzzingorfuzz testing) is a type of fault injection commonly used to test for vulnerabilities in communication interfaces such as protocols, command line parameters, or APIs. The propagation of a fault through to an observable failure follows a well-defined cycle. When executed, a fault may cause an error, which is an invalid state within a system boundary. An error may cause further errors within the system boundary, therefore each new error acts as a fault, or it may propagate to the system boundary and be observable. When error states are observed at the system boundary they are termed failures. This mechanism is termed the fault-error-failure cycle[6]and is a key mechanism independability. The technique of fault injection dates back to the 1970s[7]when it was first used to induce faults at a hardware level. This type of fault injection is called Hardware Implemented Fault Injection (HWIFI) and attempts to simulate hardware failures within a system. The first experiments in hardware fault involved nothing more than shorting connections on circuit boards and observing the effect on the system (bridging faults). It was used primarily as a test of the dependability of the hardware system. Later specialised hardware was developed to extend this technique, such as devices to bombard specific areas of a circuit board with heavy radiation. It was soon found that faults could be induced by software techniques and that aspects of this technique could be useful for assessing software systems. Collectively these techniques are known as Software Implemented Fault Injection (SWIFI). SWIFI techniques can be categorized into two types: compile-time injection and runtime injection. Compile-time injectionis an injection technique where source code is modified to inject simulated faults into a system. One method is calledmutation testingwhich changes existing lines of code so that they contain faults. A simple example of this technique could be changinga = a + 1toa = a – 1 Code mutation produces faults which are very similar to those unintentionally added by programmers. A refinement of code mutation isCode Insertion Fault Injectionwhich adds code, rather than modifying existing code. This is usually done through the use of perturbation functions which are simple functions which take an existing value and perturb it via some logic into another value, for example In this case, pFunc is the perturbation function and it is applied to the return value of the function that has been called introducing a fault into the system. Runtime Injectiontechniques use a software trigger to inject a fault into a running software system. Faults can be injected via a number of physical methods and triggers can be implemented in a number of ways, such as: Time Based triggers (When the timer reaches a specified time an interrupt is generated and the interrupt handler associated with the timer can inject the fault. ); Interrupt Based Triggers (Hardware exceptions and software trap mechanisms are used to generate an interrupt at a specific place in the system code or on a particular event within the system, for instance, access to a specific memory location). Runtime injection techniques can use a number of different techniques to insert faults into a system via a trigger. These techniques are often based around the debugging facilities provided by computer processor architectures. Complex software systems, especially multi-vendor distributed systems based on open standards, perform input/output operations to exchange data via stateful, structured exchanges known as "protocols." One kind of fault injection that is particularly useful to test protocol implementations (a type of software code that has the unusual characteristic in that it cannot predict or control its input) isfuzzing. Fuzzing is an especially useful form ofBlack-box testingsince the various invalid inputs that are submitted to the software system do not depend on, and are not created based on knowledge of, the details of the code running inside the system. The hardware fault injection method consists in real electrical signals injection into the DUT (devices under testing) in order to disturb it, supposedly well working, at hardware low level, and deceive the control - detection chain (if present) in order to see how and if the fault management strategy is implemented. This technique is based on a nail bed, necessary to contact the electronics of the products, where a specific test pad has been left free (Design for testability of PCB), and properly inject disturbance signals, in order to see the product's control- reaction arm's reaction if present. It's a technique often used to certify and validate reaction to fault in high reliability products, where safety is involved (Military, Medical, Autonomous vehicle). The proper low level physical injection is very critical, not only because the different types of signals should have different types of disturbance (voltage, coupling impedance etc.), but also a very appropriate timing when the disturbance shall be injected, to avoid serious damage to the DUT generation's dangerous short circuit. Any single components present in the DUT (from dipole type resistor, capacitor, diode) to tripolar transistors, CMOS, ECC) up to complex chip (Low voltage converter, power unit, CPU, RAM, ECC), is susceptible to a fault method (short, open, drift ECC) that can be studied during a FMEDA analysis using statistical method (MIL HBK) and determine the most dangerous with a Functional safety approach (ISO 26262 A), then real test shall be executed on any permutation there considered risky. Because of the wide complexity a dedicated and complex tools is necessary. Faults have three main parameters.[8] These parameters create the fault space realm. The fault space realm will increase exponentially by increasing system complexity. Therefore, the traditional fault injection method will not be applicable to use in the modern cyber-physical systems, because they will be so slow, and they will find a small number of faults (less fault coverage). Hence, the testers need an efficient algorithm to choose critical faults that have a higher impact on system behavior. Thus, the main research question is how to find critical faults in the fault space realm which have catastrophic effects on system behavior. Here are some methods that can aid fault injection to efficiently explore the fault space to reach higher fault coverage in less simulation time. Although these types of faults can be injected by hand the possibility of introducing an unintended fault is high, so tools exist to parse a program automatically and insert faults. A number of SWIFI Tools have been developed and a selection of these tools is given here. Six commonly used fault injection tools are Ferrari, FTAPE, Doctor, Orchestra, Xception and Grid-FIT. In contrast to traditional mutation testing where mutant faults are generated and injected into the code description of the model, application of a series of newly defined mutation operators directly to the model properties rather than to the model code has also been investigated.[29]Mutant properties that are generated from the initial properties (or test cases) and validated by the model checker should be considered as new properties that have been missed during the initial verification procedure. Therefore, adding these newly identified properties to the existing list of properties improves the coverage metric of the formal verification and consequently lead to a more reliable design. Fault injection can take many forms. In the testing ofoperating systemsfor example, fault injection is often performed by adriver(kernel-mode software) that interceptssystem calls(calls into the kernel) and randomly returning a failure for some of the calls. This type of fault injection is useful for testing low-level user-mode software. For higher level software, various methods inject faults. Inmanaged code, it is common to useinstrumentation. Although fault injection can be undertaken by hand, a number of fault injection tools exist to automate the process of fault injection.[30] Depending on the complexity of theAPIfor the level where faults are injected, fault injection tests often must be carefully designed to minimize the number of false positives. Even a well designed fault injection test can sometimes produce situations that are impossible in the normal operation of the software. For example, imagine there are two APIfunctions,CommitandPrepareForCommit, such that alone, each of these functions can possibly fail, but ifPrepareForCommitis called and succeeds, a subsequent call toCommitis guaranteed to succeed. Now consider the following code: Often, it will be infeasible for the fault injection implementation to keep track of enough state to make the guarantee that the API functions make. In this example, a fault injection test of the above code might hit theassert, whereas this would never happen in normal operation.
https://en.wikipedia.org/wiki/Fault_injection
Orthogonal defect classification(ODC)[1]turns semantic information in thesoftware defectstream into a measurement on the process.[2]The ideas were developed in the late 1980s and early 1990s by Ram Chillarege[3]atIBM Research. This has led to the development of new analytical methods used for software development and test process analysis. ODC is process model, language and domain independent. Applications of ODC have been reported by several corporations on a variety of platforms and development processes, ranging fromwaterfall, spiral, gated, andagile[4][5]development processes. One of the popular applications of ODC is softwareroot cause analysis. ODC is claimed to reduce the time taken to perform defect analysis by over a factor of 10[citation needed]. The gains come primarily from a different approach to defect analysis, where the ODC data is generated rapidly (in minutes, as opposed to hours per defect) and analytics used for the cause and effect analysis. This shifts the burden of analysis from a purely human method to one that is more data intensive. ODC as proposed in its original papers have specific attribute-value sets that create measurements on the development process. Two of the five more well known categories are thedefect typeanddefect trigger. The defect type captures the changes made in the code as a result of the defect. There are seven values for defect type and they have been empirically established to provide a measurement of the product through the process through their distribution. The concept is that changes in the defect type distribution is a function of the development process model, and thus provides an intrinsic measurement of progress of the product through the process. The defect trigger, similarly provides a measurement of the Testing process. The concept of the trigger is a key contribution that came through ODC and is now fairly widely used in technical and research publications.[6]The software trigger is defined as the force that surfaced the Fault to create the failure. The full set of triggers is available in ODC Documentation. The defect type and trigger collectively provide a large amount of causal information on defects. Additional information from the defect that is captured in standard ODC implementations includes "impact", "source" and "age". ODC training courses report that, once trained, an individual can categorize a defect via ODC in less than 3 minutes when performing the task retrospectively.[7]The time taken is far lower when done in-flight, or in-process. The categorization cannot be directly compared to root-cause-analysis, since ODC data is about "what-is", not "why". However,root cause analysisis very commonly performed using ODC. The analysis that studies ODC data is performing the first pass of root cause analysis, which is confirmed by discussing the results with the development team. This approach has five primary differences between the classical method and the ODC method.[8] Individual defect analysis is just one of the applications of ODC. The original design of ODC was to create a measurement system for software engineering using the defect stream as a source of intrinsic measurements. Thus, the attributes, either singularly, or in conjunction with one of the others provides specific measurements on certain aspects of the engineering process. These measurements can be used for one or more analytical methods, since they were designed with general measurement principles in mind. Todate, several research papers have applied these for a variety of purposes. More recently, there have been research articles that use ODC to assess the methods used for security evaluation, and expanded the scope of ODC.[9]
https://en.wikipedia.org/wiki/Orthogonal_Defect_Classification
Varioussoftware package metricsare used inmodular programming. They have been mentioned byRobert Cecil Martinin his 2002 bookAgile software development: principles, patterns, and practices. The termsoftware packagehere refers to a group of relatedclassesinobject-oriented programming.
https://en.wikipedia.org/wiki/Software_package_metrics
Inmathematics, especially in the field ofring theory, a (right)free ideal ring, orfir, is a ring in which allright idealsarefree moduleswith uniquerank. A ring such that all right ideals with at mostngenerators are free and have unique rank is called ann-fir. Asemifiris a ring in which allfinitely generatedright ideals are free modules of unique rank. (Thus, a ring is semifir if it isn-fir for alln≥ 0.) The semifir property is left-right symmetric, but the fir property is not. It turns out that a left and right fir is adomain. Furthermore, acommutativefir is precisely aprincipal ideal domain, while a commutative semifir is precisely aBézout domain. These last facts are not generally true for noncommutative rings, however (Cohn 1971). Everyprincipal right ideal domainRis a right fir, since every nonzero principal right ideal of a domain is isomorphic toR. In the same way, a rightBézout domainis a semifir. Since all right ideals of a right fir are free, they are projective. So, any right fir is a righthereditary ring, and likewise a right semifir is a rightsemihereditary ring. Becauseprojective modulesoverlocal ringsare free, and because local rings haveinvariant basis number, it follows that a local, right hereditary ring is a right fir, and a local, right semihereditary ring is a right semifir. Unlike a principal right ideal domain, a right fir is not necessarily rightNoetherian, however in the commutative case,Ris aDedekind domainsince it is a hereditary domain, and so is necessarily Noetherian. Another important and motivating example of a free ideal ring are the free associative (unital)k-algebras for division ringsk, also callednon-commutative polynomial rings(Cohn 2000, §5.4). Semifirs haveinvariant basis numberand every semifir is aSylvester domain. Thisabstract algebra-related article is astub. You can help Wikipedia byexpanding it.
https://en.wikipedia.org/wiki/Semifir
Inmathematics, aprincipal right (left) ideal ringis aringRin which every right (left)idealis of the formxR(Rx) for some elementxofR. (The right and left ideals of this form, generated by one element, are calledprincipal ideals.) When this is satisfied for both left and right ideals, such as the case whenRis acommutative ring,Rcan be called aprincipal ideal ring, or simplyprincipal ring. If only thefinitely generatedright ideals ofRare principal, thenRis called aright Bézout ring. Left Bézout rings are defined similarly. These conditions are studied in domains asBézout domains. A principal ideal ring which is also anintegral domainis said to be aprincipal ideal domain(PID). In this article the focus is on the more general concept of a principal ideal ring which is not necessarily a domain. IfRis a principal right ideal ring, then it is certainly a rightNoetherian ring, since every right ideal is finitely generated. It is also a right Bézout ring since all finitely generated right ideals are principal. Indeed, it is clear that principal right ideal rings are exactly the rings which are both right Bézout and right Noetherian. Principal right ideal rings are closed under finitedirect products. IfR=∏i=1nRi{\displaystyle R=\prod _{i=1}^{n}R_{i}}, then each right ideal ofRis of the formA=∏i=1nAi{\displaystyle A=\prod _{i=1}^{n}A_{i}}, where eachAi{\displaystyle A_{i}}is a right ideal ofRi. If all theRiare principal right ideal rings, thenAi=xiRi, and then it can be seen that(x1,…,xn)R=A{\displaystyle (x_{1},\ldots ,x_{n})R=A}. Without much more effort, it can be shown that right Bézout rings are also closed under finite direct products. Principal right ideal rings and right Bézout rings are also closed under quotients, that is, ifIis a proper ideal of principal right ideal ringR, then the quotient ringR/Iis also principal right ideal ring. This follows readily from theisomorphism theoremsfor rings. All properties above have left analogues as well. The principal rings constructed in Example 5 above are alwaysArtinian rings; in particular they are isomorphic to a finite direct product of principal Artinian local rings. A local Artinian principal ring is called aspecial principal ringand has an extremely simple ideal structure: there are only finitely many ideals, each of which is a power of the maximal ideal. For this reason, special principal rings are examples ofuniserial rings. The following result gives a complete classification of principal rings in terms of special principal rings and principal ideal domains. Zariski–Samuel theorem: LetRbe a principal ring. ThenRcan be written as a direct product∏i=1nRi{\displaystyle \prod _{i=1}^{n}R_{i}}, where eachRiis either a principal ideal domain or a special principal ring. The proof applies the Chinese Remainder theorem to a minimal primary decomposition of the zero ideal. There is also the following result, due to Hungerford: Theorem (Hungerford):LetRbe a principal ring. ThenRcan be written as a direct product∏i=1nRi{\displaystyle \prod _{i=1}^{n}R_{i}}, where eachRiis a quotient of a principal ideal domain. The proof of Hungerford's theorem employs Cohen's structure theorems for complete local rings. Arguing as in Example 3. above and using the Zariski-Samuel theorem, it is easy to check that Hungerford's theorem is equivalent to the statement that any special principal ring is the quotient of a discrete valuation ring. Everysemisimple ringRwhich is not just a product of fields is a noncommutative right and left principal ideal ring (it need not be a domain, as the example of n x n matrices over a field shows). Every right and left ideal is a direct summand ofR, and so is of the formeRorRewhereeis anidempotentofR. Paralleling this example,von Neumann regular ringsare seen to be both right and left Bézout rings. IfDis adivision ringandσ{\displaystyle \sigma }is a ring endomorphism which is not anautomorphism, then theskew polynomial ringD[x,σ]{\displaystyle D[x,\sigma ]}is known to be a principal left ideal domain which is not right Noetherian, and hence it cannot be a principal right ideal ring. This shows that even for domains principal left and principal right ideal rings are different.[1]
https://en.wikipedia.org/wiki/B%C3%A9zout_ring
Ananomalous cancellationoraccidental cancellationis a particular kind ofarithmeticprocedural error that gives a numerically correct answer. An attempt is made toreduceafractionby cancelling individualdigitsin thenumeratoranddenominator. This is not a legitimate operation, and does not in general give a correct answer, but in some rare cases the result is numerically the same as if a correct procedure had been applied.[1]The trivial cases of cancelling trailing zeros or where all of the digits are equal are ignored. Examples of anomalous cancellations which still produce the correct result include (these and their inverses are all the cases in base 10 with the fraction different from 1 and with two digits): The article byBoasanalyzes two-digit cases inbasesother thanbase 10, e.g.,⁠32/13⁠=⁠2/1⁠and its inverse are the only solutions in base 4 with two digits.[2] An example of anomalous cancellation with more than two digits is⁠165/462⁠=⁠15/42⁠, and an example with different numbers of digits is⁠98/392⁠=⁠8/32⁠. When the base is prime, no two-digit solutions exist. This can be proven by contradiction: suppose a solution exists.Without loss of generality, we can say that this solution is where the double vertical line indicatesdigit concatenation. Thus, we have Butp>a,b,a−c{\displaystyle p>a,b,a-c}, as they are digits in basep{\displaystyle p}; yetp{\displaystyle p}dividesb(a−c){\displaystyle b(a-c)}, which means thata=c{\displaystyle a=c}. Therefore. the right hand side is zero, which means the left hand side must also be zero, i.e.,a=b{\displaystyle a=b}, a contradiction by the definition of the problem. (Ifa=b{\displaystyle a=b}, the calculation becomesa||ac||a=ac⟹a||aa||a=aa=1{\displaystyle {\frac {a||a}{c||a}}={\frac {a}{c}}\implies {\frac {a||a}{a||a}}={\frac {a}{a}}=1}, which is one of the excluded trivial cases.) Another property is that the numbers of solutions in a basen{\displaystyle n}is oddif and only ifn{\displaystyle n}is an even square. This can be proven similarly to the above: suppose that we have a solution Then, doing the same manipulation, we get Suppose thata>b,c{\displaystyle a>b,c}. Then note thata,b,c→a,a−c,a−b{\displaystyle a,b,c\to a,a-c,a-b}is also a solution to the equation. This almost sets up aninvolutionfrom the set of solutions to itself. But we can also substitute in to get(a−b)2n=b2{\displaystyle (a-b)^{2}n=b^{2}}, which only has solutions whenn{\displaystyle n}is a square. Letn=k2{\displaystyle n=k^{2}}. Taking square roots and rearranging yieldsak=(k+1)b{\displaystyle ak=(k+1)b}. Since thegreatest common divisorofk,(k+1){\displaystyle k,(k+1)}is one, we know thata=(k+1)x,b=kx{\displaystyle a=(k+1)x,b=kx}. Noting thata,b<k2{\displaystyle a,b<k^{2}}, this has precisely the solutionsx=1,2,3,…,k−1{\displaystyle x=1,2,3,\ldots ,k-1}: i.e., it has an odd number of solutions whenn=k2{\displaystyle n=k^{2}}is an even square. Theconverseof the statement may be proven by noting that these solutions all satisfy the initial requirements. The question in a bit more generality was studied by Satvik Saha, Sohom Gupta, Sayan Dutta and Sourin Chatterjee.[3]The number of solutions in different bases are listed inOEIS A366412.
https://en.wikipedia.org/wiki/Anomalous_cancellation
Inalgebra, thepartial fraction decompositionorpartial fraction expansionof arational fraction(that is, afractionsuch that the numerator and the denominator are bothpolynomials) is an operation that consists of expressing the fraction as a sum of a polynomial (possibly zero) and one or several fractions with a simpler denominator.[1] The importance of the partial fraction decomposition lies in the fact that it providesalgorithmsfor various computations withrational functions, including the explicit computation ofantiderivatives,[2]Taylor series expansions,inverse Z-transforms, andinverse Laplace transforms. The concept was discovered independently in 1702 by bothJohann BernoulliandGottfried Leibniz.[3] In symbols, thepartial fraction decompositionof a rational fraction of the formf(x)g(x),{\textstyle {\frac {f(x)}{g(x)}},}wherefandgare polynomials, is the expression of the rational fraction as f(x)g(x)=p(x)+∑jfj(x)gj(x){\displaystyle {\frac {f(x)}{g(x)}}=p(x)+\sum _{j}{\frac {f_{j}(x)}{g_{j}(x)}}} wherep(x)is a polynomial, and, for eachj, thedenominatorgj(x)is apowerof anirreducible polynomial(i.e. not factorizable into polynomials of positive degrees), and thenumeratorfj(x)is a polynomial of a smaller degree than the degree of this irreducible polynomial. When explicit computation is involved, a coarser decomposition is often preferred, which consists of replacing "irreducible polynomial" by "square-free polynomial" in the description of the outcome. This allows replacingpolynomial factorizationby the much easier-to-computesquare-free factorization. This is sufficient for most applications, and avoids introducingirrational coefficientswhen the coefficients of the input polynomials areintegersorrational numbers. LetR(x)=FG{\displaystyle R(x)={\frac {F}{G}}}be arational fraction, whereFandGareunivariate polynomialsin theindeterminatexover a field. The existence of the partial fraction can be proved by applying inductively the following reduction steps. There exist two polynomialsEandF1such thatFG=E+F1G,{\displaystyle {\frac {F}{G}}=E+{\frac {F_{1}}{G}},}anddeg⁡F1<deg⁡G,{\displaystyle \deg F_{1}<\deg G,}wheredeg⁡P{\displaystyle \deg P}denotes thedegreeof the polynomialP. This results immediately from theEuclidean divisionofFbyG, which asserts the existence ofEandF1such thatF=EG+F1{\displaystyle F=EG+F_{1}}anddeg⁡F1<deg⁡G.{\displaystyle \deg F_{1}<\deg G.} This allows supposing in the next steps thatdeg⁡F<deg⁡G.{\displaystyle \deg F<\deg G.} Ifdeg⁡F<deg⁡G,{\displaystyle \deg F<\deg G,}andG=G1G2,{\displaystyle G=G_{1}G_{2},}whereG1andG2arecoprime polynomials, then there exist polynomialsF1{\displaystyle F_{1}}andF2{\displaystyle F_{2}}such thatFG=F1G1+F2G2,{\displaystyle {\frac {F}{G}}={\frac {F_{1}}{G_{1}}}+{\frac {F_{2}}{G_{2}}},}anddeg⁡F1<deg⁡G1anddeg⁡F2<deg⁡G2.{\displaystyle \deg F_{1}<\deg G_{1}\quad {\text{and}}\quad \deg F_{2}<\deg G_{2}.} This can be proved as follows.Bézout's identityasserts the existence of polynomialsCandDsuch thatCG1+DG2=1{\displaystyle CG_{1}+DG_{2}=1}(by hypothesis,1is agreatest common divisorofG1andG2). LetDF=G1Q+F1{\displaystyle DF=G_{1}Q+F_{1}}withdeg⁡F1<deg⁡G1{\displaystyle \deg F_{1}<\deg G_{1}}be theEuclidean divisionofDFbyG1.{\displaystyle G_{1}.}SettingF2=CF+QG2,{\displaystyle F_{2}=CF+QG_{2},}one getsFG=F(CG1+DG2)G1G2=DFG1+CFG2=F1+G1QG1+F2−G2QG2=F1G1+Q+F2G2−Q=F1G1+F2G2.{\displaystyle {\begin{aligned}{\frac {F}{G}}&={\frac {F(CG_{1}+DG_{2})}{G_{1}G_{2}}}={\frac {DF}{G_{1}}}+{\frac {CF}{G_{2}}}\\&={\frac {F_{1}+G_{1}Q}{G_{1}}}+{\frac {F_{2}-G_{2}Q}{G_{2}}}\\&={\frac {F_{1}}{G_{1}}}+Q+{\frac {F_{2}}{G_{2}}}-Q\\&={\frac {F_{1}}{G_{1}}}+{\frac {F_{2}}{G_{2}}}.\end{aligned}}}It remains to show thatdeg⁡F2<deg⁡G2.{\displaystyle \deg F_{2}<\deg G_{2}.}By reducing the last sum of fractions to a common denominator, one getsF=F2G1+F1G2,{\displaystyle F=F_{2}G_{1}+F_{1}G_{2},}and thusdeg⁡F2=deg⁡(F−F1G2)−deg⁡G1≤max(deg⁡F,deg⁡(F1G2))−deg⁡G1<max(deg⁡G,deg⁡(G1G2))−deg⁡G1=deg⁡G2{\displaystyle {\begin{aligned}\deg F_{2}&=\deg(F-F_{1}G_{2})-\deg G_{1}\leq \max(\deg F,\deg(F_{1}G_{2}))-\deg G_{1}\\&<\max(\deg G,\deg(G_{1}G_{2}))-\deg G_{1}=\deg G_{2}\end{aligned}}} Using the preceding decomposition inductively one gets fractions of the formFGk,{\displaystyle {\frac {F}{G^{k}}},}withdeg⁡F<deg⁡Gk=kdeg⁡G,{\displaystyle \deg F<\deg G^{k}=k\deg G,}whereGis anirreducible polynomial. Ifk> 1, one can decompose further, by using that an irreducible polynomial is asquare-free polynomial, that is,1{\displaystyle 1}is agreatest common divisorof the polynomial and itsderivative. IfG′{\displaystyle G'}is the derivative ofG,Bézout's identityprovides polynomialsCandDsuch thatCG+DG′=1{\displaystyle CG+DG'=1}and thusF=FCG+FDG′.{\displaystyle F=FCG+FDG'.}Euclidean division ofFDG′{\displaystyle FDG'}byG{\displaystyle G}gives polynomialsHk{\displaystyle H_{k}}andQ{\displaystyle Q}such thatFDG′=QG+Hk{\displaystyle FDG'=QG+H_{k}}anddeg⁡Hk<deg⁡G.{\displaystyle \deg H_{k}<\deg G.}SettingFk−1=FC+Q,{\displaystyle F_{k-1}=FC+Q,}one getsFGk=HkGk+Fk−1Gk−1,{\displaystyle {\frac {F}{G^{k}}}={\frac {H_{k}}{G^{k}}}+{\frac {F_{k-1}}{G^{k-1}}},}withdeg⁡Hk<deg⁡G.{\displaystyle \deg H_{k}<\deg G.} Iterating this process withFk−1Gk−1{\displaystyle {\frac {F_{k-1}}{G^{k-1}}}}in place ofFGk{\displaystyle {\frac {F}{G^{k}}}}leads eventually to the following theorem. Theorem—Letfandgbe nonzero polynomials over a fieldK. Writegas a product of powers of distinct irreducible polynomials :g=∏i=1kpini.{\displaystyle g=\prod _{i=1}^{k}p_{i}^{n_{i}}.} There are (unique) polynomialsbandaijwithdegaij< degpisuch thatfg=b+∑i=1k∑j=1niaijpij.{\displaystyle {\frac {f}{g}}=b+\sum _{i=1}^{k}\sum _{j=1}^{n_{i}}{\frac {a_{ij}}{p_{i}^{j}}}.} Ifdegf< degg, thenb= 0. The uniqueness can be proved as follows. Letd= max(1 + degf, degg). All together,band theaijhavedcoefficients. The shape of the decomposition defines alinear mapfrom coefficient vectors to polynomialsfof degree less thand. The existence proof means that this map issurjective. As the twovector spaceshave the same dimension, the map is alsoinjective, which means uniqueness of the decomposition. By the way, this proof induces an algorithm for computing the decomposition throughlinear algebra. IfKis the field ofcomplex numbers, thefundamental theorem of algebraimplies that allpihave degree one, and all numeratorsaij{\displaystyle a_{ij}}are constants. WhenKis the field ofreal numbers, some of thepimay be quadratic, so, in the partial fraction decomposition, quotients of linear polynomials by powers of quadratic polynomials may also occur. In the preceding theorem, one may replace "distinct irreducible polynomials" by "pairwise coprimepolynomials that are coprime with their derivative". For example, thepimay be the factors of thesquare-free factorizationofg. WhenKis the field ofrational numbers, as it is typically the case incomputer algebra, this allows to replace factorization bygreatest common divisorcomputation for computing a partial fraction decomposition. For the purpose ofsymbolic integration, the preceding result may be refined into Theorem—Letfandgbe nonzero polynomials over a fieldK. Writegas a product of powers of pairwise coprime polynomials which have no multiple root in an algebraically closed field: g=∏i=1kpini.{\displaystyle g=\prod _{i=1}^{k}p_{i}^{n_{i}}.} There are (unique) polynomialsbandcijwithdegcij< degpisuch thatfg=b+∑i=1k∑j=2ni(cijpij−1)′+∑i=1kci1pi.{\displaystyle {\frac {f}{g}}=b+\sum _{i=1}^{k}\sum _{j=2}^{n_{i}}\left({\frac {c_{ij}}{p_{i}^{j-1}}}\right)'+\sum _{i=1}^{k}{\frac {c_{i1}}{p_{i}}}.}whereX′{\displaystyle X'}denotes the derivative ofX.{\displaystyle X.} This reduces the computation of theantiderivativeof a rational function to the integration of the last sum, which is called thelogarithmic part, because its antiderivative is a linear combination of logarithms. There are various methods to compute decomposition in the Theorem. One simple way is calledHermite's method. First,bis immediately computed by Euclidean division offbyg, reducing to the case where deg(f) < deg(g). Next, one knows deg(cij) < deg(pi), so one may write eachcijas a polynomial with unknown coefficients. Reducing the sum of fractions in the Theorem to a common denominator, and equating the coefficients of each power ofxin the two numerators, one gets asystem of linear equationswhich can be solved to obtain the desired (unique) values for the unknown coefficients. Given two polynomialsP(x){\displaystyle P(x)}andQ(x)=(x−α1)(x−α2)⋯(x−αn){\displaystyle Q(x)=(x-\alpha _{1})(x-\alpha _{2})\cdots (x-\alpha _{n})}, where theαnare distinct constants anddegP<n, explicit expressions for partial fractions can be obtained by supposing thatP(x)Q(x)=c1x−α1+c2x−α2+⋯+cnx−αn{\displaystyle {\frac {P(x)}{Q(x)}}={\frac {c_{1}}{x-\alpha _{1}}}+{\frac {c_{2}}{x-\alpha _{2}}}+\cdots +{\frac {c_{n}}{x-\alpha _{n}}}}and solving for theciconstants, by substitution, byequating the coefficientsof terms involving the powers ofx, or otherwise. (This is a variant of themethod of undetermined coefficients. After both sides of the equation are multiplied by Q(x), one side of the equation is a specific polynomial, and the other side is a polynomial with undetermined coefficients. The equality is possible only when the coefficients of like powers ofxare equal. This yields n equations in n unknowns, the ck.) A more direct computation, which is strongly related toLagrange interpolation, consists of writingP(x)Q(x)=∑i=1nP(αi)Q′(αi)1(x−αi){\displaystyle {\frac {P(x)}{Q(x)}}=\sum _{i=1}^{n}{\frac {P(\alpha _{i})}{Q'(\alpha _{i})}}{\frac {1}{(x-\alpha _{i})}}}whereQ′{\displaystyle Q'}is the derivative of the polynomialQ{\displaystyle Q}. The coefficients of1x−αj{\displaystyle {\tfrac {1}{x-\alpha _{j}}}}are called theresiduesoff/g. This approach does not account for several other cases, but can be modified accordingly: In an example application of this procedure,(3x+ 5)/(1 − 2x)2can be decomposed in the form 3x+5(1−2x)2=A(1−2x)2+B(1−2x).{\displaystyle {\frac {3x+5}{(1-2x)^{2}}}={\frac {A}{(1-2x)^{2}}}+{\frac {B}{(1-2x)}}.} Clearing denominatorsshows that3x+ 5 =A+B(1 − 2x). Expanding and equating the coefficients of powers ofxgives Solving thissystem of linear equationsforAandByieldsA= 13/2 andB= −3/2. Hence, 3x+5(1−2x)2=13/2(1−2x)2+−3/2(1−2x).{\displaystyle {\frac {3x+5}{(1-2x)^{2}}}={\frac {13/2}{(1-2x)^{2}}}+{\frac {-3/2}{(1-2x)}}.} Over the complex numbers, supposef(x) is a rational proper fraction, and can be decomposed into f(x)=∑i(ai1x−xi+ai2(x−xi)2+⋯+aiki(x−xi)ki).{\displaystyle f(x)=\sum _{i}\left({\frac {a_{i1}}{x-x_{i}}}+{\frac {a_{i2}}{(x-x_{i})^{2}}}+\cdots +{\frac {a_{ik_{i}}}{(x-x_{i})^{k_{i}}}}\right).} Letgij(x)=(x−xi)j−1f(x),{\displaystyle g_{ij}(x)=(x-x_{i})^{j-1}f(x),}then according to theuniqueness of Laurent series,aijis the coefficient of the term(x−xi)−1in the Laurent expansion ofgij(x) about the pointxi, i.e., itsresidueaij=Res⁡(gij,xi).{\displaystyle a_{ij}=\operatorname {Res} (g_{ij},x_{i}).} This is given directly by the formulaaij=1(ki−j)!limx→xidki−jdxki−j((x−xi)kif(x)),{\displaystyle a_{ij}={\frac {1}{(k_{i}-j)!}}\lim _{x\to x_{i}}{\frac {d^{k_{i}-j}}{dx^{k_{i}-j}}}\left((x-x_{i})^{k_{i}}f(x)\right),}or in the special case whenxiis a simple root,ai1=P(xi)Q′(xi),{\displaystyle a_{i1}={\frac {P(x_{i})}{Q'(x_{i})}},}whenf(x)=P(x)Q(x).{\displaystyle f(x)={\frac {P(x)}{Q(x)}}.} Partial fractions are used inreal-variableintegral calculusto find real-valuedantiderivativesofrational functions. Partial fraction decomposition of realrational functionsis also used to find theirInverse Laplace transforms. For applications ofpartial fraction decomposition over the reals, see Letf(x){\displaystyle f(x)}be any rational function over thereal numbers. In other words, suppose there exist real polynomials functionsp(x){\displaystyle p(x)}andq(x)≠0{\displaystyle q(x)\neq 0}, such thatf(x)=p(x)q(x){\displaystyle f(x)={\frac {p(x)}{q(x)}}} By dividing both the numerator and the denominator by the leading coefficient ofq(x){\displaystyle q(x)}, we may assumewithout loss of generalitythatq(x){\displaystyle q(x)}ismonic. By thefundamental theorem of algebra, we can write q(x)=(x−a1)j1⋯(x−am)jm(x2+b1x+c1)k1⋯(x2+bnx+cn)kn{\displaystyle q(x)=(x-a_{1})^{j_{1}}\cdots (x-a_{m})^{j_{m}}(x^{2}+b_{1}x+c_{1})^{k_{1}}\cdots (x^{2}+b_{n}x+c_{n})^{k_{n}}} wherea1,…,am{\displaystyle a_{1},\dots ,a_{m}},b1,…,bn{\displaystyle b_{1},\dots ,b_{n}},c1,…,cn{\displaystyle c_{1},\dots ,c_{n}}are real numbers withbi2−4ci<0{\displaystyle b_{i}^{2}-4c_{i}<0}, andj1,…,jm{\displaystyle j_{1},\dots ,j_{m}},k1,…,kn{\displaystyle k_{1},\dots ,k_{n}}are positive integers. The terms(x−ai){\displaystyle (x-a_{i})}are thelinear factorsofq(x){\displaystyle q(x)}which correspond to real roots ofq(x){\displaystyle q(x)}, and the terms(xi2+bix+ci){\displaystyle (x_{i}^{2}+b_{i}x+c_{i})}are theirreducible quadratic factorsofq(x){\displaystyle q(x)}which correspond to pairs ofcomplexconjugate roots ofq(x){\displaystyle q(x)}. Then the partial fraction decomposition off(x){\displaystyle f(x)}is the following: f(x)=p(x)q(x)=P(x)+∑i=1m∑r=1jiAir(x−ai)r+∑i=1n∑r=1kiBirx+Cir(x2+bix+ci)r{\displaystyle f(x)={\frac {p(x)}{q(x)}}=P(x)+\sum _{i=1}^{m}\sum _{r=1}^{j_{i}}{\frac {A_{ir}}{(x-a_{i})^{r}}}+\sum _{i=1}^{n}\sum _{r=1}^{k_{i}}{\frac {B_{ir}x+C_{ir}}{(x^{2}+b_{i}x+c_{i})^{r}}}} Here,P(x) is a (possibly zero) polynomial, and theAir,Bir, andCirare real constants. There are a number of ways the constants can be found. The most straightforward method is to multiply through by the common denominatorq(x). We then obtain an equation of polynomials whose left-hand side is simplyp(x) and whose right-hand side has coefficients which are linear expressions of the constantsAir,Bir, andCir. Since two polynomials are equal if and only if their corresponding coefficients are equal, we can equate the coefficients of like terms. In this way, a system of linear equations is obtained whichalwayshas a unique solution. This solution can be found using any of the standard methods oflinear algebra. It can also be found withlimits(seeExample 5). f(x)=1x2+2x−3{\displaystyle f(x)={\frac {1}{x^{2}+2x-3}}} Here, the denominator splits into two distinct linear factors: q(x)=x2+2x−3=(x+3)(x−1){\displaystyle q(x)=x^{2}+2x-3=(x+3)(x-1)} so we have the partial fraction decomposition f(x)=1x2+2x−3=Ax+3+Bx−1{\displaystyle f(x)={\frac {1}{x^{2}+2x-3}}={\frac {A}{x+3}}+{\frac {B}{x-1}}} Multiplying through by the denominator on the left-hand side gives us the polynomial identity 1=A(x−1)+B(x+3){\displaystyle 1=A(x-1)+B(x+3)} Substitutingx= −3 into this equation givesA= −1/4, and substitutingx= 1 givesB= 1/4, so that f(x)=1x2+2x−3=14(−1x+3+1x−1){\displaystyle f(x)={\frac {1}{x^{2}+2x-3}}={\frac {1}{4}}\left({\frac {-1}{x+3}}+{\frac {1}{x-1}}\right)} f(x)=x3+16x3−4x2+8x{\displaystyle f(x)={\frac {x^{3}+16}{x^{3}-4x^{2}+8x}}} Afterlong division, we have f(x)=1+4x2−8x+16x3−4x2+8x=1+4x2−8x+16x(x2−4x+8){\displaystyle f(x)=1+{\frac {4x^{2}-8x+16}{x^{3}-4x^{2}+8x}}=1+{\frac {4x^{2}-8x+16}{x(x^{2}-4x+8)}}} The factorx2− 4x+ 8 is irreducible over the reals, as itsdiscriminant(−4)2− 4×8 = −16is negative. Thus the partial fraction decomposition over the reals has the shape 4x2−8x+16x(x2−4x+8)=Ax+Bx+Cx2−4x+8{\displaystyle {\frac {4x^{2}-8x+16}{x(x^{2}-4x+8)}}={\frac {A}{x}}+{\frac {Bx+C}{x^{2}-4x+8}}} Multiplying through byx3− 4x2+ 8x, we have the polynomial identity 4x2−8x+16=A(x2−4x+8)+(Bx+C)x{\displaystyle 4x^{2}-8x+16=A\left(x^{2}-4x+8\right)+\left(Bx+C\right)x} Takingx= 0, we see that 16 = 8A, soA= 2. Comparing thex2coefficients, we see that 4 =A+B= 2 +B, soB= 2. Comparing linear coefficients, we see that −8 = −4A+C= −8 +C, soC= 0. Altogether, f(x)=1+2(1x+xx2−4x+8){\displaystyle f(x)=1+2\left({\frac {1}{x}}+{\frac {x}{x^{2}-4x+8}}\right)} The fraction can be completely decomposed usingcomplex numbers. According to thefundamental theorem of algebraevery complex polynomial of degreenhasn(complex) roots (some of which can be repeated). The second fraction can be decomposed to: xx2−4x+8=Dx−(2+2i)+Ex−(2−2i){\displaystyle {\frac {x}{x^{2}-4x+8}}={\frac {D}{x-(2+2i)}}+{\frac {E}{x-(2-2i)}}} Multiplying through by the denominator gives: x=D(x−(2−2i))+E(x−(2+2i)){\displaystyle x=D(x-(2-2i))+E(x-(2+2i))} Equating the coefficients ofxand the constant (with respect tox) coefficients of both sides of this equation, one gets a system of two linear equations inDandE, whose solution is D=1+i2i=1−i2,E=1−i−2i=1+i2.{\displaystyle D={\frac {1+i}{2i}}={\frac {1-i}{2}},\qquad E={\frac {1-i}{-2i}}={\frac {1+i}{2}}.} Thus we have a complete decomposition: f(x)=x3+16x3−4x2+8x=1+2x+1−ix−(2+2i)+1+ix−(2−2i){\displaystyle f(x)={\frac {x^{3}+16}{x^{3}-4x^{2}+8x}}=1+{\frac {2}{x}}+{\frac {1-i}{x-(2+2i)}}+{\frac {1+i}{x-(2-2i)}}} One may also compute directlyA,DandEwith the residue method (see also example 4 below). This example illustrates almost all the "tricks" we might need to use, short of consulting acomputer algebra system. f(x)=x9−2x6+2x5−7x4+13x3−11x2+12x−4x7−3x6+5x5−7x4+7x3−5x2+3x−1{\displaystyle f(x)={\frac {x^{9}-2x^{6}+2x^{5}-7x^{4}+13x^{3}-11x^{2}+12x-4}{x^{7}-3x^{6}+5x^{5}-7x^{4}+7x^{3}-5x^{2}+3x-1}}} Afterlong divisionandfactoringthe denominator, we have f(x)=x2+3x+4+2x6−4x5+5x4−3x3+x2+3x(x−1)3(x2+1)2{\displaystyle f(x)=x^{2}+3x+4+{\frac {2x^{6}-4x^{5}+5x^{4}-3x^{3}+x^{2}+3x}{(x-1)^{3}(x^{2}+1)^{2}}}} The partial fraction decomposition takes the form 2x6−4x5+5x4−3x3+x2+3x(x−1)3(x2+1)2=Ax−1+B(x−1)2+C(x−1)3+Dx+Ex2+1+Fx+G(x2+1)2.{\displaystyle {\frac {2x^{6}-4x^{5}+5x^{4}-3x^{3}+x^{2}+3x}{(x-1)^{3}(x^{2}+1)^{2}}}={\frac {A}{x-1}}+{\frac {B}{(x-1)^{2}}}+{\frac {C}{(x-1)^{3}}}+{\frac {Dx+E}{x^{2}+1}}+{\frac {Fx+G}{(x^{2}+1)^{2}}}.} Multiplying through by the denominator on the left-hand side we have the polynomial identity 2x6−4x5+5x4−3x3+x2+3x=A(x−1)2(x2+1)2+B(x−1)(x2+1)2+C(x2+1)2+(Dx+E)(x−1)3(x2+1)+(Fx+G)(x−1)3{\displaystyle {\begin{aligned}&2x^{6}-4x^{5}+5x^{4}-3x^{3}+x^{2}+3x\\[4pt]={}&A\left(x-1\right)^{2}\left(x^{2}+1\right)^{2}+B\left(x-1\right)\left(x^{2}+1\right)^{2}+C\left(x^{2}+1\right)^{2}+\left(Dx+E\right)\left(x-1\right)^{3}\left(x^{2}+1\right)+\left(Fx+G\right)\left(x-1\right)^{3}\end{aligned}}} Now we use different values ofxto compute the coefficients: {4=4Cx=12+2i=(Fi+G)(2+2i)x=i0=A−B+C−E−Gx=0{\displaystyle {\begin{cases}4=4C&x=1\\2+2i=(Fi+G)(2+2i)&x=i\\0=A-B+C-E-G&x=0\end{cases}}} Solving this we have: {C=1F=0,G=1E=A−B{\displaystyle {\begin{cases}C=1\\F=0,G=1\\E=A-B\end{cases}}} Using these values we can write: 2x6−4x5+5x4−3x3+x2+3x=A(x−1)2(x2+1)2+B(x−1)(x2+1)2+(x2+1)2+(Dx+(A−B))(x−1)3(x2+1)+(x−1)3=(A+D)x6+(−A−3D)x5+(2B+4D+1)x4+(−2B−4D+1)x3+(−A+2B+3D−1)x2+(A−2B−D+3)x{\displaystyle {\begin{aligned}&2x^{6}-4x^{5}+5x^{4}-3x^{3}+x^{2}+3x\\[4pt]={}&A\left(x-1\right)^{2}\left(x^{2}+1\right)^{2}+B\left(x-1\right)\left(x^{2}+1\right)^{2}+\left(x^{2}+1\right)^{2}+\left(Dx+\left(A-B\right)\right)\left(x-1\right)^{3}\left(x^{2}+1\right)+\left(x-1\right)^{3}\\[4pt]={}&\left(A+D\right)x^{6}+\left(-A-3D\right)x^{5}+\left(2B+4D+1\right)x^{4}+\left(-2B-4D+1\right)x^{3}+\left(-A+2B+3D-1\right)x^{2}+\left(A-2B-D+3\right)x\end{aligned}}} We compare the coefficients ofx6andx5on both side and we have: {A+D=2−A−3D=−4⇒A=D=1.{\displaystyle {\begin{cases}A+D=2\\-A-3D=-4\end{cases}}\quad \Rightarrow \quad A=D=1.} Therefore: 2x6−4x5+5x4−3x3+x2+3x=2x6−4x5+(2B+5)x4+(−2B−3)x3+(2B+1)x2+(−2B+3)x{\displaystyle 2x^{6}-4x^{5}+5x^{4}-3x^{3}+x^{2}+3x=2x^{6}-4x^{5}+(2B+5)x^{4}+(-2B-3)x^{3}+(2B+1)x^{2}+(-2B+3)x} which gives usB= 0. Thus the partial fraction decomposition is given by: f(x)=x2+3x+4+1(x−1)+1(x−1)3+x+1x2+1+1(x2+1)2.{\displaystyle f(x)=x^{2}+3x+4+{\frac {1}{(x-1)}}+{\frac {1}{(x-1)^{3}}}+{\frac {x+1}{x^{2}+1}}+{\frac {1}{(x^{2}+1)^{2}}}.} Alternatively, instead of expanding, one can obtain other linear dependences on the coefficients computing some derivatives atx=1,ı{\displaystyle x=1,\imath }in the above polynomial identity. (To this end, recall that the derivative atx=aof (x−a)mp(x) vanishes ifm> 1 and is justp(a) form= 1.) For instance the first derivative atx= 1 gives 2⋅6−4⋅5+5⋅4−3⋅3+2+3=A⋅(0+0)+B⋅(4+0)+8+D⋅0{\displaystyle 2\cdot 6-4\cdot 5+5\cdot 4-3\cdot 3+2+3=A\cdot (0+0)+B\cdot (4+0)+8+D\cdot 0} that is 8 = 4B+ 8 soB= 0. f(z)=z2−5(z2−1)(z2+1)=z2−5(z+1)(z−1)(z+i)(z−i){\displaystyle f(z)={\frac {z^{2}-5}{(z^{2}-1)(z^{2}+1)}}={\frac {z^{2}-5}{(z+1)(z-1)(z+i)(z-i)}}} Thus,f(z) can be decomposed into rational functions whose denominators arez+1,z−1,z+i,z−i. Since each term is of power one, −1, 1, −iandiare simple poles. Hence, the residues associated with each pole, given byP(zi)Q′(zi)=zi2−54zi3,{\displaystyle {\frac {P(z_{i})}{Q'(z_{i})}}={\frac {z_{i}^{2}-5}{4z_{i}^{3}}},}are1,−1,3i2,−3i2,{\displaystyle 1,-1,{\tfrac {3i}{2}},-{\tfrac {3i}{2}},}respectively, and f(z)=1z+1−1z−1+3i21z+i−3i21z−i.{\displaystyle f(z)={\frac {1}{z+1}}-{\frac {1}{z-1}}+{\frac {3i}{2}}{\frac {1}{z+i}}-{\frac {3i}{2}}{\frac {1}{z-i}}.} Limitscan be used to find a partial fraction decomposition.[4]Consider the following example: 1x3−1{\displaystyle {\frac {1}{x^{3}-1}}} First, factor the denominator which determines the decomposition: 1x3−1=1(x−1)(x2+x+1)=Ax−1+Bx+Cx2+x+1.{\displaystyle {\frac {1}{x^{3}-1}}={\frac {1}{(x-1)(x^{2}+x+1)}}={\frac {A}{x-1}}+{\frac {Bx+C}{x^{2}+x+1}}.} Multiplying everything byx−1{\displaystyle x-1}, and taking the limit whenx→1{\displaystyle x\to 1}, we get limx→1((x−1)(Ax−1+Bx+Cx2+x+1))=limx→1A+limx→1(x−1)(Bx+C)x2+x+1=A.{\displaystyle \lim _{x\to 1}\left((x-1)\left({\frac {A}{x-1}}+{\frac {Bx+C}{x^{2}+x+1}}\right)\right)=\lim _{x\to 1}A+\lim _{x\to 1}{\frac {(x-1)(Bx+C)}{x^{2}+x+1}}=A.} On the other hand, limx→1(x−1)(x−1)(x2+x+1)=limx→11x2+x+1=13,{\displaystyle \lim _{x\to 1}{\frac {(x-1)}{(x-1)(x^{2}+x+1)}}=\lim _{x\to 1}{\frac {1}{x^{2}+x+1}}={\frac {1}{3}},} and thus: A=13.{\displaystyle A={\frac {1}{3}}.} Multiplying byxand taking the limit whenx→∞{\displaystyle x\to \infty }, we have limx→∞x(Ax−1+Bx+Cx2+x+1)=limx→∞Axx−1+limx→∞Bx2+Cxx2+x+1=A+B,{\displaystyle \lim _{x\to \infty }x\left({\frac {A}{x-1}}+{\frac {Bx+C}{x^{2}+x+1}}\right)=\lim _{x\to \infty }{\frac {Ax}{x-1}}+\lim _{x\to \infty }{\frac {Bx^{2}+Cx}{x^{2}+x+1}}=A+B,} and limx→∞x(x−1)(x2+x+1)=0.{\displaystyle \lim _{x\to \infty }{\frac {x}{(x-1)(x^{2}+x+1)}}=0.} This impliesA+B= 0and soB=−13{\displaystyle B=-{\frac {1}{3}}}. Forx= 0, we get−1=−A+C,{\displaystyle -1=-A+C,}and thusC=−23{\displaystyle C=-{\tfrac {2}{3}}}. Putting everything together, we get the decomposition 1x3−1=13(1x−1+−x−2x2+x+1).{\displaystyle {\frac {1}{x^{3}-1}}={\frac {1}{3}}\left({\frac {1}{x-1}}+{\frac {-x-2}{x^{2}+x+1}}\right).} Suppose we have the indefiniteintegral: ∫x4+x3+x2+1x2+x−2dx{\displaystyle \int {\frac {x^{4}+x^{3}+x^{2}+1}{x^{2}+x-2}}\,dx} Before performing decomposition, it is obvious we must perform polynomial long division andfactorthe denominator. Doing this would result in: ∫(x2+3+−3x+7(x+2)(x−1))dx{\displaystyle \int \left(x^{2}+3+{\frac {-3x+7}{(x+2)(x-1)}}\right)dx} Upon this, we may now perform partial fraction decomposition. ∫(x2+3+−3x+7(x+2)(x−1))dx=∫(x2+3+A(x+2)+B(x−1))dx{\displaystyle \int \left(x^{2}+3+{\frac {-3x+7}{(x+2)(x-1)}}\right)dx=\int \left(x^{2}+3+{\frac {A}{(x+2)}}+{\frac {B}{(x-1)}}\right)dx}so:A(x−1)+B(x+2)=−3x+7{\displaystyle A(x-1)+B(x+2)=-3x+7}. Upon substituting our values, in this case, where x=1 to solve for B and x=-2 to solve for A, we will result in: A=−133,B=43{\displaystyle A={\frac {-13}{3}}\ ,B={\frac {4}{3}}} Plugging all of this back into our integral allows us to find the answer: ∫(x2+3+−13/3(x+2)+4/3(x−1))dx=x33+3x−133ln⁡(|x+2|)+43ln⁡(|x−1|)+C{\displaystyle \int \left(x^{2}+3+{\frac {-13/3}{(x+2)}}+{\frac {4/3}{(x-1)}}\right)\,dx={\frac {x^{3}}{3}}\ +3x-{\frac {13}{3}}\ln(|x+2|)+{\frac {4}{3}}\ln(|x-1|)+C} The partial fraction decomposition of a rational function can be related toTaylor's theoremas follows. Let P(x),Q(x),A1(x),…,Ar(x){\displaystyle P(x),Q(x),A_{1}(x),\ldots ,A_{r}(x)} be real or complex polynomials assume that Q=∏j=1r(x−λj)νj,{\displaystyle Q=\prod _{j=1}^{r}(x-\lambda _{j})^{\nu _{j}},} satisfiesdeg⁡A1<ν1,…,deg⁡Ar<νr,anddeg⁡(P)<deg⁡(Q)=∑j=1rνj.{\displaystyle \deg A_{1}<\nu _{1},\ldots ,\deg A_{r}<\nu _{r},\quad {\text{and}}\quad \deg(P)<\deg(Q)=\sum _{j=1}^{r}\nu _{j}.} Also define Qi=∏j≠i(x−λj)νj=Q(x−λi)νi,1⩽i⩽r.{\displaystyle Q_{i}=\prod _{j\neq i}(x-\lambda _{j})^{\nu _{j}}={\frac {Q}{(x-\lambda _{i})^{\nu _{i}}}},\qquad 1\leqslant i\leqslant r.} Then we have PQ=∑j=1rAj(x−λj)νj{\displaystyle {\frac {P}{Q}}=\sum _{j=1}^{r}{\frac {A_{j}}{(x-\lambda _{j})^{\nu _{j}}}}} if, and only if, each polynomialAi(x){\displaystyle A_{i}(x)}is the Taylor polynomial ofPQi{\displaystyle {\tfrac {P}{Q_{i}}}}of orderνi−1{\displaystyle \nu _{i}-1}at the pointλi{\displaystyle \lambda _{i}}: Ai(x):=∑k=0νi−11k!(PQi)(k)(λi)(x−λi)k.{\displaystyle A_{i}(x):=\sum _{k=0}^{\nu _{i}-1}{\frac {1}{k!}}\left({\frac {P}{Q_{i}}}\right)^{(k)}(\lambda _{i})\ (x-\lambda _{i})^{k}.} Taylor's theorem (in the real or complex case) then provides a proof of the existence and uniqueness of the partial fraction decomposition, and a characterization of the coefficients. The above partial fraction decomposition implies, for each 1 ≤i≤r, a polynomial expansion PQi=Ai+O((x−λi)νi),forx→λi,{\displaystyle {\frac {P}{Q_{i}}}=A_{i}+O((x-\lambda _{i})^{\nu _{i}}),\qquad {\text{for }}x\to \lambda _{i},} soAi{\displaystyle A_{i}}is the Taylor polynomial ofPQi{\displaystyle {\tfrac {P}{Q_{i}}}}, because of the unicity of the polynomial expansion of orderνi−1{\displaystyle \nu _{i}-1}, and by assumptiondeg⁡Ai<νi{\displaystyle \deg A_{i}<\nu _{i}}. Conversely, if theAi{\displaystyle A_{i}}are the Taylor polynomials, the above expansions at eachλi{\displaystyle \lambda _{i}}hold, therefore we also have P−QiAi=O((x−λi)νi),forx→λi,{\displaystyle P-Q_{i}A_{i}=O((x-\lambda _{i})^{\nu _{i}}),\qquad {\text{for }}x\to \lambda _{i},} which implies that the polynomialP−QiAi{\displaystyle P-Q_{i}A_{i}}is divisible by(x−λi)νi.{\displaystyle (x-\lambda _{i})^{\nu _{i}}.} Forj≠i,QjAj{\displaystyle j\neq i,Q_{j}A_{j}}is also divisible by(x−λi)νi{\displaystyle (x-\lambda _{i})^{\nu _{i}}}, so P−∑j=1rQjAj{\displaystyle P-\sum _{j=1}^{r}Q_{j}A_{j}} is divisible byQ{\displaystyle Q}. Since deg⁡(P−∑j=1rQjAj)<deg⁡(Q){\displaystyle \deg \left(P-\sum _{j=1}^{r}Q_{j}A_{j}\right)<\deg(Q)} we then have P−∑j=1rQjAj=0,{\displaystyle P-\sum _{j=1}^{r}Q_{j}A_{j}=0,} and we find the partial fraction decomposition dividing byQ{\displaystyle Q}. The idea of partial fractions can be generalized to otherintegral domains, say the ring ofintegerswhereprime numberstake the role of irreducible denominators. For example: 118=12−13−132.{\displaystyle {\frac {1}{18}}={\frac {1}{2}}-{\frac {1}{3}}-{\frac {1}{3^{2}}}.}
https://en.wikipedia.org/wiki/Partial_fraction_decomposition
Incomputing,bandwidthis the maximum rate of data transfer across a given path. Bandwidth may be characterized asnetwork bandwidth,[1]data bandwidth,[2]ordigital bandwidth.[3][4] This definition ofbandwidthis in contrast to the field of signal processing, wireless communications, modem data transmission,digital communications, andelectronics,[citation needed]in whichbandwidthis used to refer to thesignal bandwidthmeasured inhertz, meaning the frequency range between lowest and highest attainable frequency while meeting a well-defined impairment level in signal power. The actual bit rate that can be achieved depends not only on the signal bandwidth but also on thenoiseon the channel. The termbandwidthsometimes defines thenet bit ratepeak bit rate,information rate, or physical layeruseful bit rate,channel capacity, or themaximum throughputof a logical or physical communication path in a digital communication system. For example,bandwidth testsmeasure the maximum throughput of a computer network. The maximum rate that can be sustained on a link is limited by theShannon–Hartleychannel capacity for these communication systems, which is dependent on thebandwidthin hertz and the noise on the channel. Theconsumed bandwidthin bit/s, corresponds to achievedthroughputorgoodput, i.e., the average rate of successful data transfer through a communication path. The consumed bandwidth can be affected by technologies such asbandwidth shaping,bandwidth management,bandwidth throttling,bandwidth cap,bandwidth allocation(for examplebandwidth allocation protocolanddynamic bandwidth allocation), etc. A bit stream's bandwidth is proportional to the average consumed signal bandwidth in hertz (the average spectral bandwidth of the analog signal representing the bit stream) during a studied time interval. Channel bandwidthmay be confused with useful data throughput (or goodput). For example, a channel withxbit/s may not necessarily transmit data atxrate, since protocols, encryption, and other factors can add appreciable overhead. For instance, much internet traffic uses thetransmission control protocol(TCP), which requires athree-way handshakefor each transaction. Although in many modern implementations the protocol is efficient, it does add significant overhead compared to simpler protocols. Also, data packets may be lost, which further reduces the useful data throughput. In general, for any effective digital communication, a framing protocol is needed; overhead and effective throughput depends on implementation. Useful throughput is less than or equal to the actual channel capacity minus implementation overhead. Theasymptotic bandwidth(formallyasymptotic throughput) for a network is the measure of maximum throughput for agreedy source, for example when the message size (the number of packets per second from a source) approaches close to the maximum amount.[5] Asymptotic bandwidths are usually estimated by sending a number of very large messages through the network, measuring the end-to-end throughput. As with other bandwidths, the asymptotic bandwidth is measured in multiples of bits per seconds. Since bandwidth spikes can skew the measurement, carriers often use the 95thpercentilemethod. This method continuously measures bandwidth usage and then removes the top 5 percent.[6] Digital bandwidth may also refer to:multimedia bit rateoraverage bitrateafter multimediadata compression(source coding), defined as the total amount of data divided by the playback time. Due to the impractically high bandwidth requirements of uncompresseddigital media, the required multimedia bandwidth can be significantly reduced with data compression.[7]The most widely used data compression technique for media bandwidth reduction is thediscrete cosine transform(DCT), which was first proposed byNasir Ahmedin the early 1970s.[8]DCT compression significantly reduces the amount of memory and bandwidth required for digital signals, capable of achieving adata compression ratioof up to 100:1 compared to uncompressed media.[9] InWeb hosting service, the termbandwidthis often incorrectly used to describe the amount of data transferred to or from the website or server within a prescribed period of time, for examplebandwidth consumption accumulated over a monthmeasured in gigabytes per month.[citation needed][10]The more accurate phrase used for this meaning of a maximum amount of data transfer each month or given period ismonthly data transfer. A similar situation can occur for end-userInternet service providersas well, especially where network capacity is limited (for example in areas with underdeveloped internet connectivity and on wireless networks). Edholm's law, proposed by and named after Phil Edholm in 2004,[11]holds that the bandwidth oftelecommunication networksdouble every 18 months, which has proven to be true since the 1970s.[11][12]The trend is evident in the cases ofInternet,[11]cellular(mobile),wireless LANandwireless personal area networks.[12] TheMOSFET(metal–oxide–semiconductor field-effect transistor) is the most important factor enabling the rapid increase in bandwidth.[13]The MOSFET (MOS transistor) was invented byMohamed M. AtallaandDawon KahngatBell Labsin 1959,[14][15][16]and went on to become the basic building block of moderntelecommunicationstechnology.[17][18]ContinuousMOSFET scaling, along with various advances in MOS technology, has enabled bothMoore's law(transistor countsinintegrated circuitchips doubling every two years) and Edholm's law (communication bandwidth doubling every 18 months).[13]
https://en.wikipedia.org/wiki/Bandwidth_(computing)
Bandwidthis the difference between the upper and lowerfrequenciesin a continuousband of frequencies. It is typically measured inunitofhertz(symbol Hz). It may refer more specifically to two subcategories:Passbandbandwidthis the difference between the upper and lowercutoff frequenciesof, for example, aband-pass filter, acommunication channel, or asignal spectrum.Basebandbandwidthis equal to the upper cutoff frequency of alow-pass filteror baseband signal, which includes a zero frequency. Bandwidth in hertz is a central concept in many fields, includingelectronics,information theory,digital communications,radio communications,signal processing, andspectroscopyand is one of the determinants of the capacity of a givencommunication channel. A key characteristic of bandwidth is that any band of a given width can carry the same amount ofinformation, regardless of where that band is located in thefrequency spectrum.[a]For example, a 3 kHz band can carry a telephone conversation whether that band is at baseband (as in aPOTStelephone line) ormodulatedto some higher frequency. However, wide bandwidths are easier to obtain andprocessat higher frequencies because the§ Fractional bandwidthis smaller. Bandwidth is a key concept in manytelecommunicationsapplications. Inradiocommunications, for example, bandwidth is the frequency range occupied by a modulatedcarrier signal. AnFM radioreceiver'stunerspans a limited range of frequencies. A government agency (such as theFederal Communications Commissionin the United States) may apportion the regionally available bandwidth tobroadcast licenseholders so that theirsignalsdo not mutually interfere. In this context, bandwidth is also known aschannel spacing. For other applications, there are other definitions. One definition of bandwidth, for a system, could be the range of frequencies over which the system produces a specified level of performance. A less strict and more practically useful definition will refer to the frequencies beyond which performance is degraded. In the case offrequency response, degradation could, for example, mean more than 3dBbelow the maximum value or it could mean below a certain absolute value. As with any definition of thewidthof a function, many definitions are suitable for different purposes. In the context of, for example, thesampling theoremandNyquist sampling rate, bandwidth typically refers tobasebandbandwidth. In the context ofNyquist symbol rateorShannon-Hartleychannel capacityfor communication systems it refers topassbandbandwidth. TheRayleigh bandwidthof a simple radar pulse is defined as the inverse of its duration. For example, a one-microsecond pulse has a Rayleigh bandwidth of one megahertz.[1] Theessential bandwidthis defined as the portion of asignal spectrumin the frequency domain which contains most of the energy of the signal.[2] In some contexts, the signal bandwidth inhertzrefers to the frequency range in which the signal'sspectral density(in W/Hz or V2/Hz) is nonzero or above a small threshold value. The threshold value is often defined relative to the maximum value, and is most commonly the3 dB point, that is the point where the spectral density is half its maximum value (or the spectral amplitude, inV{\displaystyle \mathrm {V} }orV/Hz{\displaystyle \mathrm {V/{\sqrt {Hz}}} }, is 70.7% of its maximum).[3]This figure, with a lower threshold value, can be used in calculations of the lowest sampling rate that will satisfy thesampling theorem. The bandwidth is also used to denotesystem bandwidth, for example infilterorcommunication channelsystems. To say that a system has a certain bandwidth means that the system can process signals with that range of frequencies, or that the system reduces the bandwidth of a white noise input to that bandwidth. The 3 dB bandwidth of anelectronic filteror communication channel is the part of the system's frequency response that lies within 3 dB of the response at its peak, which, in the passband filter case, is typically at or near itscenter frequency, and in the low-pass filter is at or near itscutoff frequency. If the maximum gain is 0 dB, the 3 dB bandwidth is the frequency range where attenuation is less than 3 dB. 3 dB attenuation is also where power is half its maximum. This samehalf-power gainconvention is also used inspectral width, and more generally for the extent of functions asfull width at half maximum(FWHM). Inelectronic filterdesign, a filter specification may require that within the filterpassband, the gain is nominally 0 dB with a small variation, for example within the ±1 dB interval. In thestopband(s), the required attenuation in decibels is above a certain level, for example >100 dB. In atransition bandthe gain is not specified. In this case, the filter bandwidth corresponds to the passband width, which in this example is the 1 dB-bandwidth. If the filter shows amplitude ripple within the passband, thexdB point refers to the point where the gain isxdB below the nominal passband gain rather thanxdB below the maximum gain. In signal processing andcontrol theorythe bandwidth is the frequency at which theclosed-loop system gaindrops 3 dB below peak. In communication systems, in calculations of theShannon–Hartleychannel capacity, bandwidth refers to the 3 dB-bandwidth. In calculations of the maximumsymbol rate, theNyquist sampling rate, and maximum bit rate according to theHartley's law, the bandwidth refers to the frequency range within which the gain is non-zero. The fact that in equivalentbasebandmodels of communication systems, the signal spectrum consists of both negative and positive frequencies, can lead to confusion about bandwidth since they are sometimes referred to only by the positive half, and one will occasionally see expressions such asB=2W{\displaystyle B=2W}, whereB{\displaystyle B}is the total bandwidth (i.e. the maximum passband bandwidth of the carrier-modulated RF signal and the minimum passband bandwidth of the physical passband channel), andW{\displaystyle W}is the positive bandwidth (the baseband bandwidth of the equivalent channel model). For instance, the baseband model of the signal would require alow-pass filterwith cutoff frequency of at leastW{\displaystyle W}to stay intact, and the physical passband channel would require a passband filter of at leastB{\displaystyle B}to stay intact. The absolute bandwidth is not always the most appropriate or useful measure of bandwidth. For instance, in the field ofantennasthe difficulty of constructing an antenna to meet a specified absolute bandwidth is easier at a higher frequency than at a lower frequency. For this reason, bandwidth is often quoted relative to the frequency of operation which gives a better indication of the structure and sophistication needed for the circuit or device under consideration. There are two different measures of relative bandwidth in common use:fractional bandwidth(BF{\displaystyle B_{\mathrm {F} }}) andratio bandwidth(BR{\displaystyle B_{\mathrm {R} }}).[4]In the following, the absolute bandwidth is defined as follows,B=Δf=fH−fL{\displaystyle B=\Delta f=f_{\mathrm {H} }-f_{\mathrm {L} }}wherefH{\displaystyle f_{\mathrm {H} }}andfL{\displaystyle f_{\mathrm {L} }}are the upper and lower frequency limits respectively of the band in question. Fractional bandwidth is defined as the absolute bandwidth divided by the center frequency (fC{\displaystyle f_{\mathrm {C} }}),BF=ΔffC.{\displaystyle B_{\mathrm {F} }={\frac {\Delta f}{f_{\mathrm {C} }}}\,.} The center frequency is usually defined as thearithmetic meanof the upper and lower frequencies so that,fC=fH+fL2{\displaystyle f_{\mathrm {C} }={\frac {f_{\mathrm {H} }+f_{\mathrm {L} }}{2}}\ }andBF=2(fH−fL)fH+fL.{\displaystyle B_{\mathrm {F} }={\frac {2(f_{\mathrm {H} }-f_{\mathrm {L} })}{f_{\mathrm {H} }+f_{\mathrm {L} }}}\,.} However, the center frequency is sometimes defined as thegeometric meanof the upper and lower frequencies,fC=fHfL{\displaystyle f_{\mathrm {C} }={\sqrt {f_{\mathrm {H} }f_{\mathrm {L} }}}}andBF=fH−fLfHfL.{\displaystyle B_{\mathrm {F} }={\frac {f_{\mathrm {H} }-f_{\mathrm {L} }}{\sqrt {f_{\mathrm {H} }f_{\mathrm {L} }}}}\,.} While the geometric mean is more rarely used than the arithmetic mean (and the latter can be assumed if not stated explicitly) the former is considered more mathematically rigorous. It more properly reflects the logarithmic relationship of fractional bandwidth with increasing frequency.[5]Fornarrowbandapplications, there is only marginal difference between the two definitions. The geometric mean version is inconsequentially larger. Forwidebandapplications they diverge substantially with the arithmetic mean version approaching 2 in the limit and the geometric mean version approaching infinity. Fractional bandwidth is sometimes expressed as a percentage of the center frequency (percent bandwidth,%B{\displaystyle \%B}),%BF=100ΔffC.{\displaystyle \%B_{\mathrm {F} }=100{\frac {\Delta f}{f_{\mathrm {C} }}}\,.} Ratio bandwidth is defined as the ratio of the upper and lower limits of the band,BR=fHfL.{\displaystyle B_{\mathrm {R} }={\frac {f_{\mathrm {H} }}{f_{\mathrm {L} }}}\,.} Ratio bandwidth may be notated asBR:1{\displaystyle B_{\mathrm {R} }:1}. The relationship between ratio bandwidth and fractional bandwidth is given by,BF=2BR−1BR+1{\displaystyle B_{\mathrm {F} }=2{\frac {B_{\mathrm {R} }-1}{B_{\mathrm {R} }+1}}}andBR=2+BF2−BF.{\displaystyle B_{\mathrm {R} }={\frac {2+B_{\mathrm {F} }}{2-B_{\mathrm {F} }}}\,.} Percent bandwidth is a less meaningful measure in wideband applications. A percent bandwidth of 100% corresponds to a ratio bandwidth of 3:1. All higher ratios up to infinity are compressed into the range 100–200%. Ratio bandwidth is often expressed inoctaves(i.e., as afrequency level) for wideband applications. An octave is a frequency ratio of 2:1 leading to this expression for the number of octaves,log2⁡(BR).{\displaystyle \log _{2}\left(B_{\mathrm {R} }\right).} Thenoise equivalent bandwidth(orequivalent noise bandwidth (enbw)) of a system offrequency responseH(f){\displaystyle H(f)}is the bandwidth of an ideal filter with rectangular frequency response centered on the system's central frequency that produces the same average power outgoingH(f){\displaystyle H(f)}when both systems are excited with awhite noisesource. The value of the noise equivalent bandwidth depends on the ideal filter reference gain used. Typically, this gain equals|H(f)|{\displaystyle |H(f)|}at its center frequency,[6]but it can also equal the peak value of|H(f)|{\displaystyle |H(f)|}. The noise equivalent bandwidthBn{\displaystyle B_{n}}can be calculated in the frequency domain usingH(f){\displaystyle H(f)}or in the time domain by exploiting theParseval's theoremwith the systemimpulse responseh(t){\displaystyle h(t)}. IfH(f){\displaystyle H(f)}is a lowpass system with zero central frequency and the filter reference gain is referred to this frequency, then: Bn=∫−∞∞|H(f)|2df2|H(0)|2=∫−∞∞|h(t)|2dt2|∫−∞∞h(t)dt|2.{\displaystyle B_{n}={\frac {\int _{-\infty }^{\infty }|H(f)|^{2}df}{2|H(0)|^{2}}}={\frac {\int _{-\infty }^{\infty }|h(t)|^{2}dt}{2\left|\int _{-\infty }^{\infty }h(t)dt\right|^{2}}}\,.} The same expression can be applied to bandpass systems by substituting theequivalent basebandfrequency response forH(f){\displaystyle H(f)}. The noise equivalent bandwidth is widely used to simplify the analysis of telecommunication systems in the presence of noise. Inphotonics, the termbandwidthcarries a variety of meanings: A related concept is thespectral linewidthof the radiation emitted by excited atoms.
https://en.wikipedia.org/wiki/Bandwidth_(signal_processing)
Intelecommunicationsandcomputing,bit rate(bitrateor as a variableR) is the number ofbitsthat are conveyed or processed per unit of time.[1] The bit rate is expressed in the unitbit per second(symbol:bit/s), often in conjunction with anSI prefixsuch askilo(1 kbit/s = 1,000 bit/s),mega(1 Mbit/s = 1,000 kbit/s),giga(1 Gbit/s = 1,000 Mbit/s) ortera(1 Tbit/s = 1,000 Gbit/s).[2]The non-standard abbreviationbpsis often used to replace the standard symbol bit/s, so that, for example, 1 Mbps is used to mean one million bits per second. In most computing and digital communication environments, onebyte per second(symbol:B/s) corresponds to 8 bit/s. When quantifying large or small bit rates,SI prefixes(also known asmetric prefixesor decimal prefixes) are used, thus:[3] Binary prefixesare sometimes used for bit rates.[4][5]The International Standard (IEC 80000-13) specifies different symbols for binary and decimal (SI) prefixes (e.g., 1KiB/s = 1024 B/s = 8192 bit/s, and 1MiB/s = 1024 KiB/s). In digital communication systems, thephysical layergross bitrate,[6]raw bitrate,[7]data signaling rate,[8]gross data transfer rate[9]oruncoded transmission rate[7](sometimes written as a variableRb[6][7]orfb[10]) is the total number of physically transferred bits per second over a communication link, including useful data as well as protocol overhead. In case ofserial communications, the gross bit rate is related to the bit transmission timeTb{\displaystyle T_{\text{b}}}as: The gross bit rate is related to thesymbol rateor modulation rate, which is expressed inbaudsor symbols per second. However, the gross bit rate and the baud value are equalonlywhen there are only two levels per symbol, representing 0 and 1, meaning that each symbol of adata transmissionsystem carries exactly one bit of data; for example, this is not the case for modern modulation systems used inmodemsand LAN equipment.[11] For mostline codesandmodulationmethods: More specifically, a line code (orbasebandtransmission scheme) representing the data usingpulse-amplitude modulationwith2N{\displaystyle 2^{N}}different voltage levels, can transferN{\displaystyle N}bits per pulse. Adigital modulationmethod (orpassband transmissionscheme) using2N{\displaystyle 2^{N}}different symbols, for example2N{\displaystyle 2^{N}}amplitudes, phases or frequencies, can transferN{\displaystyle N}bits per symbol. This results in: An exception from the above is some self-synchronizing line codes, for exampleManchester codingandreturn-to-zero(RTZ) coding, where each bit is represented by two pulses (signal states), resulting in: A theoretical upper bound for the symbol rate in baud, symbols/s or pulses/s for a certainspectral bandwidthin hertz is given by theNyquist law: In practice this upper bound can only be approached forline codingschemes and for so-calledvestigial sidebanddigital modulation. Most other digital carrier-modulated schemes, for exampleASK,PSK,QAMandOFDM, can be characterized asdouble sidebandmodulation, resulting in the following relation: In case ofparallel communication, the gross bit rate is given by wherenis the number of parallel channels,Miis the number of symbols or levels of themodulationin theithchannel, andTiis thesymbol duration time, expressed in seconds, for theith channel. Thephysical layernet bitrate,[12]information rate,[6]useful bit rate,[13]payload rate,[14]net data transfer rate,[9]coded transmission rate,[7]effective data rate[7]orwire speed(informal language) of a digitalcommunication channelis the capacity excluding thephysical layerprotocol overhead, for exampletime division multiplex(TDM)framing bits, redundantforward error correction(FEC) codes, equalizer training symbols and otherchannel coding. Error-correcting codes are common especially in wireless communication systems, broadband modem standards and modern copper-based high-speed LANs. The physical layer net bitrate is the datarate measured at a reference point in the interface between thedata link layerand physical layer, and may consequently include data link and higher layer overhead. In modems and wireless systems,link adaptation(automatic adaptation of the data rate and the modulation and/or error coding scheme to the signal quality) is often applied. In that context, the termpeak bitratedenotes the net bitrate of the fastest and least robust transmission mode, used for example when the distance is very short between sender and transmitter.[15]Some operating systems and network equipment may detect the "connection speed"[16](informal language) of a network access technology or communication device, implying the current net bit rate. The termline ratein some textbooks is defined as gross bit rate,[14]in others as net bit rate. The relationship between the gross bit rate and net bit rate is affected by the FECcode rateaccording to the following. The connection speed of a technology that involves forward error correction typically refers to the physical layernet bit ratein accordance with the above definition. For example, the net bitrate (and thus the "connection speed") of anIEEE 802.11awireless network is the net bit rate of between 6 and 54 Mbit/s, while the gross bit rate is between 12 and 72 Mbit/s inclusive of error-correcting codes. The net bit rate of ISDN2Basic Rate Interface(2 B-channels + 1 D-channel) of 64+64+16 = 144 kbit/s also refers to the payload data rates, while the D channel signalling rate is 16 kbit/s. The net bit rate of the Ethernet 100BASE-TX physical layer standard is 100 Mbit/s, while the gross bitrate is 125 Mbit/s, due to the4B5B(four bit over five bit) encoding. In this case, the gross bit rate is equal to the symbol rate or pulse rate of 125 megabaud, due to theNRZIline code. In communications technologies without forward error correction and other physical layer protocol overhead, there is no distinction between gross bit rate and physical layer net bit rate. For example, the net as well as gross bit rate of Ethernet 10BASE-T is 10 Mbit/s. Due to theManchesterline code, each bit is represented by two pulses, resulting in a pulse rate of 20 megabaud. The "connection speed" of aV.92voicebandmodemtypically refers to the gross bit rate, since there is no additional error-correction code. It can be up to 56,000 bit/sdownstreamand 48,000 bit/supstream. A lower bit rate may be chosen during the connection establishment phase due toadaptive modulation– slower but more robust modulation schemes are chosen in case of poorsignal-to-noise ratio. Due to data compression, the actual data transmission rate or throughput (see below) may be higher. Thechannel capacity, also known as theShannoncapacity, is a theoretical upper bound for the maximum net bitrate, exclusive of forward error correction coding, that is possible without bit errors for a certain physical analog node-to-nodecommunication link. The channel capacity is proportional to theanalog bandwidthin hertz. This proportionality is calledHartley's law. Consequently, the net bit rate is sometimes calleddigital bandwidthcapacity in bit/s. The termthroughput, essentially the same thing asdigital bandwidthconsumption, denotes the achieved average useful bit rate in a computer network over a logical or physical communication link or through a network node, typically measured at a reference point above the data link layer. This implies that the throughput often excludes data link layer protocol overhead. The throughput is affected by the traffic load from the data source in question, as well as from other sources sharing the same network resources. See alsomeasuring network throughput. Goodputordata transfer raterefers to the achieved average net bit rate that is delivered to theapplication layer, exclusive of all protocol overhead, data packets retransmissions, etc. For example, in the case of file transfer, the goodput corresponds to the achievedfile transfer rate. The file transfer rate in bit/s can be calculated as the file size (in bytes) divided by the file transfer time (in seconds) and multiplied by eight. As an example, the goodput or data transfer rate of a V.92 voiceband modem is affected by the modem physical layer and data link layer protocols. It is sometimes higher than the physical layer data rate due toV.44data compression, and sometimes lower due to bit-errors andautomatic repeat requestretransmissions. If no data compression is provided by the network equipment or protocols, we have the following relation: for a certain communication path. These are examples of physical layer net bit rates in proposed communication standard interfaces and devices: In digital multimedia, bit rate represents the amount of information, or detail, that is stored per unit of time of a recording. The bitrate depends on several factors: Generally, choices are made about the above factors in order to achieve the desired trade-off between minimizing the bitrate and maximizing the quality of the material when it is played. Iflossy data compressionis used on audio or visual data, differences from the original signal will be introduced; if the compression is substantial, or lossy data is decompressed and recompressed, this may become noticeable in the form ofcompression artifacts. Whether these affect the perceived quality, and if so how much, depends on the compression scheme, encoder power, the characteristics of the input data, the listener's perceptions, the listener's familiarity with artifacts, and the listening or viewing environment. The encoding bit rate of a multimedia file is its size inbytesdivided by the playback time of the recording (in seconds), multiplied by eight. For real-timestreaming multimedia, the encoding bit rate is thegoodputthat is required to avoid playback interruption. The termaverage bitrateis used in case ofvariable bitratemultimedia source coding schemes. In this context, thepeak bit rateis the maximum number of bits required for any short-term block of compressed data.[17] A theoretical lower bound for the encoding bit rate forlossless data compressionis thesource information rate, also known as theentropy rate. The bitrates in this section are approximately theminimumthat theaveragelistener in a typical listening or viewing environment, when using the best available compression, would perceive as not significantly worse than the reference standard. Compact Disc Digital Audio(CD-DA) uses 44,100 samples per second, each with a bit depth of 16, a format sometimes abbreviated like "16bit / 44.1kHz". CD-DA is alsostereo, using a left and rightchannel, so the amount of audio data per second is double that of mono, where only a single channel is used. The bit rate of PCM audio data can be calculated with the following formula: For example, the bit rate of a CD-DA recording (44.1 kHz sampling rate, 16 bits per sample and two channels) can be calculated as follows: The cumulative size of a length of PCM audio data (excluding a fileheaderor othermetadata) can be calculated using the following formula: The cumulative size in bytes can be found by dividing the file size in bits by the number of bits in a byte, which is eight: Therefore, 80 minutes (4,800 seconds) of CD-DA data requires 846,720,000 bytes of storage: whereMiBis mebibytes withbinary prefixMi, meaning 220= 1,048,576. TheMP3audio format provideslossy data compression. Audio quality improves with increasing bitrate: For technical reasons (hardware/software protocols, overheads, encoding schemes, etc.) theactualbit rates used by some of the compared-to devices may be significantly higher than what is listed above. For example, telephone circuits usingμlaworA-lawcompanding(pulse code modulation) yield 64 kbit/s.
https://en.wikipedia.org/wiki/Bit_rate
Intelecommunicationandinformation theory, thecode rate(orinformation rate[1]) of aforward error correctioncode is the proportion of the data-stream that is useful (non-redundant). That is, if the code rate isk/n{\displaystyle k/n}for everykbits of useful information, the coder generates a total ofnbits of data, of whichn−k{\displaystyle n-k}are redundant. IfRis thegross bit rateordata signalling rate(inclusive of redundant error coding), thenet bit rate(the useful bit rate exclusive oferror correction codes) is≤R⋅k/n{\displaystyle \leq R\cdot k/n}. For example: The code rate of aconvolutional codewill typically be1⁄2,2⁄3,3⁄4,5⁄6,7⁄8, etc., corresponding to one redundant bit inserted after every single, second, third, etc., bit. The code rate of theoctetorientedReed Solomonblock codedenoted RS(204,188) is 188/204, meaning that204 − 188 = 16redundant octets (or bytes) are added to each block of 188 octets of useful information. A few error correction codes do not have a fixed code rate—rateless erasure codes. Note thatbit/sis a more widespreadunit of measurementfor theinformation rate, implying that it is synonymous withnet bit rateoruseful bit rateexclusive of error-correction codes. Thiscomputer sciencearticle is astub. You can help Wikipedia byexpanding it.
https://en.wikipedia.org/wiki/Code_rate
Insignal processing, theNyquist rate, named afterHarry Nyquist, is a value equal to twice the highest frequency (bandwidth) of a given function or signal. It has units ofsamplesper unit time, conventionally expressed as samples per second, orhertz(Hz).[1]When the signal is sampled at a highersample rate(see§ Critical frequency), the resultingdiscrete-timesequence is said to be free of the distortion known asaliasing. Conversely, for a given sample rate the correspondingNyquist frequencyis one-half the sample rate. Note that theNyquist rateis a property of acontinuous-time signal, whereasNyquist frequencyis a property of a discrete-time system. The termNyquist rateis also used in a different context with units of symbols per second, which is actually the field in which Harry Nyquist was working. In that context it is an upper bound for thesymbol rateacross a bandwidth-limitedbasebandchannel such as atelegraph line[2]orpassbandchannel such as a limited radio frequency band or afrequency division multiplexchannel. When a continuous function,x(t),{\displaystyle x(t),}is sampled at a constant rate,fs{\displaystyle f_{s}}samples/second, there is always an unlimited number of other continuous functions that fit the same set of samples. But only one of them isbandlimitedto12fs{\displaystyle {\tfrac {1}{2}}f_{s}}cycles/second(hertz),[A]which means that itsFourier transform,X(f),{\displaystyle X(f),}is0{\displaystyle 0}for all|f|≥12fs.{\displaystyle |f|\geq {\tfrac {1}{2}}f_{s}.}The mathematical algorithms that are typically used to recreate a continuous function from samples create arbitrarily good approximations to this theoretical, but infinitely long, function. It follows that if the original function,x(t),{\displaystyle x(t),}is bandlimited to12fs,{\displaystyle {\tfrac {1}{2}}f_{s},}which is called theNyquist criterion, then it is the one unique function the interpolation algorithms are approximating. In terms of a function's ownbandwidth(B),{\displaystyle (B),}as depicted here, theNyquist criterionis often stated asfs>2B.{\displaystyle f_{s}>2B.}And2B{\displaystyle 2B}is called theNyquist ratefor functions with bandwidthB.{\displaystyle B.}When the Nyquist criterion is not met({\displaystyle (}say,B>12fs),{\displaystyle B>{\tfrac {1}{2}}f_{s}),}a condition calledaliasingoccurs, which results in some inevitable differences betweenx(t){\displaystyle x(t)}and a reconstructed function that has less bandwidth. In most cases, the differences are viewed as distortion. Figure 3 depicts a type of function calledbaseband or lowpass, because its positive-frequency range of significant energy is [0,B). When instead, the frequency range is (A,A+B), for someA>B, it is calledbandpass, and a common desire (for various reasons) is to convert it to baseband. One way to do that is frequency-mixing (heterodyne) the bandpass function down to the frequency range (0,B). One of the possible reasons is to reduce the Nyquist rate for more efficient storage. And it turns out that one can directly achieve the same result by sampling the bandpass function at a sub-Nyquist sample-rate that is the smallest integer-sub-multiple of frequencyAthat meets the baseband Nyquist criterion:  fs> 2B. For a more general discussion, seebandpass sampling. Long beforeHarry Nyquisthad his name associated with sampling, the termNyquist ratewas used differently, with a meaning closer to what Nyquist actually studied. QuotingHarold S. Black's1953 bookModulation Theory,in the sectionNyquist Intervalof the opening chapterHistorical Background: Bin this context, related to theNyquist ISI criterion, referring to the one-sided bandwidth rather than the total as considered in later usage. According to theOED, Black's statement regarding 2Bmay be the origin of the termNyquist rate.[3] Nyquist's famous 1928 paper was a study on how many pulses (code elements) could be transmitted per second, and recovered, through a channel of limited bandwidth.[4]Signaling at the Nyquist ratemeant putting as many code pulses through a telegraph channel as its bandwidth would allow. Shannon used Nyquist's approach when he proved thesampling theoremin 1948, but Nyquist did not work on sampling per se. Black's later chapter on "The Sampling Principle" does give Nyquist some of the credit for some relevant math:
https://en.wikipedia.org/wiki/Nyquist_rate
Ininformation theoryandstatistics,negentropyis used as a measure of distance to normality. The concept and phrase "negative entropy" was introduced byErwin Schrödingerin his 1944 popular-science bookWhat is Life?[1]Later,FrenchphysicistLéon Brillouinshortened the phrase tonéguentropie(negentropy).[2][3]In 1974,Albert Szent-Györgyiproposed replacing the termnegentropywithsyntropy. That term may have originated in the 1940s with the Italian mathematicianLuigi Fantappiè, who tried to construct a unified theory ofbiologyandphysics.Buckminster Fullertried to popularize this usage, butnegentropyremains common. In a note toWhat is Life?Schrödinger explained his use of this phrase. ... if I had been catering for them [physicists] alone I should have let the discussion turn onfree energyinstead. It is the more familiar notion in this context. But this highly technical term seemed linguistically too near toenergyfor making the average reader alive to the contrast between the two things. Ininformation theoryandstatistics, negentropy is used as a measure of distance to normality.[4][5][6]Out of alldistributionswith a given mean and variance, the normal orGaussian distributionis the one with the highestentropy. Negentropy measures the difference in entropy between a given distribution and the Gaussian distribution with the same mean and variance. Thus, negentropy is always nonnegative, is invariant by any linear invertible change of coordinates, and vanishesif and only ifthe signal is Gaussian. Negentropy is defined as whereS(φx){\displaystyle S(\varphi _{x})}is thedifferential entropyof the Gaussian density with the samemeanandvarianceaspx{\displaystyle p_{x}}andS(px){\displaystyle S(p_{x})}is the differential entropy ofpx{\displaystyle p_{x}}: Negentropy is used instatisticsandsignal processing. It is related to networkentropy, which is used inindependent component analysis.[7][8] The negentropy of a distribution is equal to theKullback–Leibler divergencebetweenpx{\displaystyle p_{x}}and a Gaussian distribution with the same mean and variance aspx{\displaystyle p_{x}}(seeDifferential entropy § Maximization in the normal distributionfor a proof). In particular, it is always nonnegative. There is a physical quantity closely linked tofree energy(free enthalpy), with a unit of entropy and isomorphic to negentropy known in statistics and information theory. In 1873,Willard Gibbscreated a diagram illustrating the concept of free energy corresponding tofree enthalpy. On the diagram one can see the quantity calledcapacity for entropy. This quantity is the amount of entropy that may be increased without changing an internal energy or increasing its volume.[9]In other words, it is a difference between maximum possible, under assumed conditions, entropy and its actual entropy. It corresponds exactly to the definition of negentropy adopted in statistics and information theory. A similar physical quantity was introduced in 1869 byMassieufor theisothermal process[10][11][12](both quantities differs just with a figure sign) and by thenPlanckfor theisothermal-isobaricprocess.[13]More recently, the Massieu–Planckthermodynamic potential, known also asfree entropy, has been shown to play a great role in the so-called entropic formulation ofstatistical mechanics,[14]applied among the others in molecular biology[15]and thermodynamic non-equilibrium processes.[16] In particular, mathematically the negentropy (the negative entropy function, in physics interpreted as free entropy) is theconvex conjugateofLogSumExp(in physics interpreted as the free energy). In 1953,Léon Brillouinderived a general equation[17]stating that the changing of an information bit value requires at leastkTln⁡2{\displaystyle kT\ln 2}energy. This is the same energy as the workLeó Szilárd's engine produces in the idealistic case. In his book,[18]he further explored this problem concluding that any cause of this bit value change (measurement, decision about a yes/no question, erasure, display, etc.) will require the same amount of energy.
https://en.wikipedia.org/wiki/Negentropy
Ininformation theory,redundancymeasures the fractional difference between theentropyH(X)of an ensembleX, and its maximum possible valuelog⁡(|AX|){\displaystyle \log(|{\mathcal {A}}_{X}|)}.[1][2]Informally, it is the amount of wasted "space" used to transmit certain data.Data compressionis a way to reduce or eliminate unwanted redundancy, whileforward error correctionis a way of adding desired redundancy for purposes oferror detection and correctionwhen communicating over a noisychannelof limitedcapacity. In describing the redundancy of raw data, therateof a source of information is the averageentropyper symbol. For memoryless sources, this is merely the entropy of each symbol, while, in the most general case of astochastic process, it is in the limit, asngoes to infinity, of thejoint entropyof the firstnsymbols divided byn. It is common in information theory to speak of the "rate" or "entropy" of a language. This is appropriate, for example, when the source of information is English prose. The rate of a memoryless source is simplyH(M){\displaystyle H(M)}, since by definition there is no interdependence of the successive messages of a memoryless source.[citation needed] Theabsolute rateof a language or source is simply thelogarithmof thecardinalityof the message space, or alphabet. (This formula is sometimes called theHartley function.) This is the maximum possible rate of information that can be transmitted with that alphabet. (The logarithm should be taken to a base appropriate for the unit of measurement in use.) The absolute rate is equal to the actual rate if the source is memoryless and has auniform distribution. Theabsolute redundancycan then be defined as the difference between the absolute rate and the rate. The quantityDR{\displaystyle {\frac {D}{R}}}is called therelative redundancyand gives the maximum possibledata compression ratio, when expressed as the percentage by which a file size can be decreased. (When expressed as a ratio of original file size to compressed file size, the quantityR:r{\displaystyle R:r}gives the maximum compression ratio that can be achieved.) Complementary to the concept of relative redundancy isefficiency, defined asrR,{\displaystyle {\frac {r}{R}},}so thatrR+DR=1{\displaystyle {\frac {r}{R}}+{\frac {D}{R}}=1}. A memoryless source with a uniform distribution has zero redundancy (and thus 100% efficiency), and cannot be compressed. A measure ofredundancybetween two variables is themutual informationor a normalized variant. A measure of redundancy among many variables is given by thetotal correlation. Redundancy of compressed data refers to the difference between theexpectedcompressed data length ofn{\displaystyle n}messagesL(Mn){\displaystyle L(M^{n})\,\!}(or expected data rateL(Mn)/n{\displaystyle L(M^{n})/n\,\!}) and the entropynr{\displaystyle nr\,\!}(or entropy rater{\displaystyle r\,\!}). (Here we assume the data isergodicandstationary, e.g., a memoryless source.) Although the rate differenceL(Mn)/n−r{\displaystyle L(M^{n})/n-r\,\!}can be arbitrarily small asn{\displaystyle n\,\!}increased, the actual differenceL(Mn)−nr{\displaystyle L(M^{n})-nr\,\!}, cannot, although it can be theoretically upper-bounded by 1 in the case of finite-entropy memoryless sources. Redundancy in an information-theoretic contexts can also refer to the information that is redundant between two mutual informations. For example, given three variablesX1{\displaystyle X_{1}},X2{\displaystyle X_{2}}, andY{\displaystyle Y}, it is known that the joint mutual information can be less than the sum of the marginal mutual informations:I(X1,X2;Y)<I(X1;Y)+I(X2;Y){\displaystyle I(X_{1},X_{2};Y)<I(X_{1};Y)+I(X_{2};Y)}. In this case, at least some of the information aboutY{\displaystyle Y}disclosed byX1{\displaystyle X_{1}}orX2{\displaystyle X_{2}}is the same. This formulation of redundancy is complementary to the notion of synergy, which occurs when the joint mutual information is greater than the sum of the marginals, indicating the presence of information that is only disclosed by the joint state and not any simpler collection of sources.[3][4] The above pairwise redundancy measure can be generalized to a set ofnvariables. Redundancy=I(X1,X2,...,Xn;Y)−(I(X1;Y)+I(X2;Y)+...I(Xn;Y)){\displaystyle Redundancy=I(X_{1},X_{2},...,X_{n};Y)-\left(I(X_{1};Y)+I(X_{2};Y)+...I(X_{n};Y)\right)}.[5]As the pair-wise measure above, if this value is negative, one says the set of variables is redundant.
https://en.wikipedia.org/wiki/Redundancy_(information_theory)
Asenderis a type of circuit and system module in 20th-century electromechanicaltelephone exchanges. It registered thetelephone numbersdialed by the subscriber, and transmitted that information to another part of the exchange or another exchange for the purpose of completing a telephone call.[1]Some American exchange designs, for example, of theNo. 1 Crossbar switchused originating senders and terminating senders.[2]The corresponding device in the Britishdirector telephone systemwas called a "director" and, in other contexts, "register". The sender concept was developed to meet the needs of large-city telephone switching systems, where the total number of subscriber lines and multiple central offices throughout the city required complex switching arrangements that were not easily handled by the direct control systems, such as thestep by step, orStrowgersystem. These limitations included inefficient trunking in large service areas, and a limited ability for growth and reorganization as additional subscribers were added. The introduction of senders into switching systems allowed the subscriber's dial pulses to be registered, then translated into a physical location on the switching fabric, either in the local office, or in a distant office. Once the sender received the translation, it directed the selectors in the switching fabric to the correct terminal, completing the connection to the called party. Because the dialed digits from the subscriber were stored, and translated, there was no direct correlation required between the dialed number, and the actual location of the trunk(s) or subscribers on the switch itself. This meant that as new telephone exchanges were added, a translation could be updated to include the new exchange without expensive and time-consuming modifications to the telephone switch. One of the first US patents filed for this concept was granted to Western Electric in 1913.[3]This was developed in the US by the Bell System and was first widely used in thePanel Machine Switching System. As machine switching exchanges became commonplace, senders also played a critical role in communication between central offices of different types. For example, in a given city, there may be several central offices with different kinds of telephone switches that all must inter-operate with each other. As technology improved, better signaling methods were devised, but backward compatibility with existing exchanges had to be maintained. Thus, senders were developed to send and receive information in a wide variety of "protocols", including revertive pulse,MF,dial pulse, DC key pulse, andPCI. The sender design was improved throughout the 20th Century and was used extensively in the No. 1 and No. 5 Crossbar switching systems.Common-channel signalingreplaced senders after the development ofstored program control(SPC). A secondary meaning within theUKbroadcast engineering community is as asynonymforbroadcast transmitter.
https://en.wikipedia.org/wiki/Sender_(telephony)
Thereceiverininformation theoryis the receiving end of acommunication channel. It receivesdecodedmessages/informationfrom the sender, who firstencodedthem.[1]Sometimes the receiver is modeled so as to include the decoder. Real-world receivers likeradio receiversortelephonescan not be expected to receive as much information as predicted by thenoisy channel coding theorem.
https://en.wikipedia.org/wiki/Receiver_(Information_Theory)
Spectral efficiency,spectrum efficiencyorbandwidth efficiencyrefers to theinformation ratethat can be transmitted over a givenbandwidthin a specific communication system. It is a measure of how efficiently a limited frequency spectrum is utilized by thephysical layerprotocol, and sometimes by themedium access control(thechannel accessprotocol).[1] Thelink spectral efficiencyof a digital communication system is measured inbit/s/Hz,[2]or, less frequently but unambiguously, in(bit/s)/Hz. It is thenet bit rate(useful information rate excludingerror-correcting codes) ormaximum throughputdivided by thebandwidthin hertz of acommunication channelor adata link. Alternatively, the spectral efficiency may be measured inbit/symbol, which is equivalent tobits perchannel use(bpcu), implying that the net bit rate is divided by thesymbol rate(modulation rate) or line code pulse rate. Link spectral efficiency is typically used to analyze the efficiency of adigital modulationmethod orline code, sometimes in combination with aforward error correction(FEC) code and other physical layer overhead. In the latter case, a "bit" refers to a user data bit; FEC overhead is always excluded. Themodulation efficiencyin bit/s is thegross bit rate(including any error-correcting code) divided by the bandwidth. An upper bound for the attainable modulation efficiency is given by theNyquist rateorHartley's lawas follows: For a signaling alphabet withMalternative symbols, each symbol representsN= log2Mbits.Nis the modulation efficiency measured inbit/symbolorbpcu. In the case ofbasebandtransmission (line codingorpulse-amplitude modulation) with a baseband bandwidth (or upper cut-off frequency)B, thesymbol ratecan not exceed 2Bsymbols/s in view to avoidintersymbol interference. Thus, the spectral efficiency can not exceed 2N(bit/s)/Hz in the baseband transmission case. In thepassbandtransmission case, a signal with passband bandwidthWcan be converted to an equivalent baseband signal (usingundersamplingor asuperheterodyne receiver), with upper cut-off frequencyW/2. If double-sideband modulation schemes such asQAM,ASK,PSKorOFDMare used, this results in a maximum symbol rate ofWsymbols/s, and in that the modulation efficiency can not exceedN(bit/s)/Hz. If digitalsingle-sideband modulationis used, the passband signal with bandwidthWcorresponds to a baseband message signal with baseband bandwidthW, resulting in a maximum symbol rate of 2Wand an attainable modulation efficiency of 2N(bit/s)/Hz. If aforward error correctioncode is used, the spectral efficiency is reduced from the uncoded modulation efficiency figure. An upper bound for the spectral efficiency possible withoutbit errorsin a channel with a certain SNR, if ideal error coding and modulation is assumed, is given by theShannon–Hartley theorem. Note that thegoodput(the amount of application layer useful information) is normally lower than themaximum throughputused in the above calculations, because of packet retransmissions, higher protocol layer overhead, flow control, congestion avoidance, etc. On the other hand, a data compression scheme, such as theV.44orV.42biscompression used in telephone modems, may however give higher goodput if the transferred data is not already efficiently compressed. The link spectral efficiency of a wireless telephony link may also be expressed as the maximum number of simultaneous calls over 1 MHz frequency spectrum in erlangs per megahertz, orE/MHz. This measure is also affected by the source coding (data compression) scheme. It may be applied to analog as well as digital transmission. In wireless networks, thelink spectral efficiencycan be somewhat misleading, as larger values are not necessarily more efficient in their overall use of radio spectrum. In a wireless network, high link spectral efficiency may result in high sensitivity to co-channel interference (crosstalk), which affects the capacity. For example, in acellular telephonenetwork with frequency reuse,spectrum spreadingandforward error correctionreduce the spectral efficiency in (bit/s)/Hz but substantially lower the required signal-to-noise ratio in comparison to non-spread spectrum techniques. This can allow for much denser geographical frequency reuse that compensates for the lower link spectral efficiency, resulting in approximately the same capacity (the same number of simultaneous phone calls) over the same bandwidth, using the same number of base station transmitters. As discussed below, a more relevant measure for wireless networks would besystem spectral efficiencyin bit/s/Hz per unit area. However, in closed communication links such as telephone lines and cable TV networks, and in noise-limited wireless communication system where co-channel interference is not a factor, the largest link spectral efficiency that can be supported by the available SNR is generally used. In digitalwireless networks, thesystem spectral efficiencyor area spectral efficiency is typically measured in(bit/s)/Hz per unit area, in(bit/s)/Hz percell, or in(bit/s)/Hz per site. It is a measure of the quantity of users or services that can be simultaneously supported by a limited radio frequency bandwidth in a defined geographic area.[1]It may for example be defined as the maximum aggregatedthroughputorgoodput, i.e. summed over all users in the system, divided by the channel bandwidth and by the covered area or number of base station sites. This measure is affected not only by the single-user transmission technique, but also bymultiple accessschemes andradio resource managementtechniques utilized. It can be substantially improved by dynamicradio resource management. If it is defined as a measure of the maximum goodput, retransmissions due to co-channel interference and collisions are excluded. Higher-layer protocol overhead (above themedia access controlsublayer) is normally neglected. The system spectral efficiency of acellular networkmay also be expressed as the maximum number of simultaneous phone calls per area unit over 1 MHz frequency spectrum inE/MHz per cell,E/MHz per sector,E/MHz per site, or(E/MHz)/m2. This measure is also affected by the source coding (data compression) scheme. It may be used in analog cellular networks as well. Low link spectral efficiency in (bit/s)/Hz does not necessarily mean that an encoding scheme is inefficient from a system spectral efficiency point of view. As an example, considerCode Division Multiplexed Access (CDMA)spread spectrum, which is not a particularly spectral-efficient encoding scheme when considering a single channel or single user. However, the fact that one can "layer" multiple channels on the same frequency band means that the system spectrum utilization for a multi-channel CDMA system can be very good. The spectral efficiency can be improved byradio resource managementtechniques such as efficient fixed or dynamicchannel allocation,power control,link adaptationanddiversity schemes. A combinedfairness measureand system spectral efficiency measure is thefairly shared spectral efficiency. Examples of predicted numerical spectral efficiency values of some common communication systems can be found in the table below. These results will not be achieved in all systems. Those further from the transmitter will not get this performance. N/A means not applicable.
https://en.wikipedia.org/wiki/Spectral_efficiency
Network throughput(or justthroughput, when in context) refers to the rate of message delivery over acommunication channelin acommunication network, such asEthernetorpacket radio. The data that these messages contain may be delivered over physical or logical links, or throughnetwork nodes. Throughput is usually measured inbits per second(bit/s, sometimes abbreviated bps), and sometimes inpackets per second(p/sor pps) or data packets pertime slot. Thesystem throughputoraggregate throughputis the sum of the data rates that are delivered over all channels in a network.[1]Throughput representsdigital bandwidthconsumption. The throughput of a communication system may be affected by various factors, including the limitations of the underlying physical medium, available processing power of the system components,end-userbehavior, etc. When taking variousprotocol overheadsinto account, the useful rate of the data transfer can be significantly lower than the maximum achievable throughput; the useful part is usually referred to asgoodput. Users of telecommunications devices, systems designers, and researchers into communication theory are often interested in knowing the expected performance of a system. From a user perspective, this is often phrased as either "which device will get my data there most effectively for my needs?", or "which device will deliver the most data per unit cost?". Systems designers often select the most effective architecture or design constraints for a system, which drive its final performance. In most cases, the benchmark of what a system is capable of, or itsmaximum performanceis what the user or designer is interested in. The termmaximum throughputis frequently used when discussing end-user maximum throughput tests. Maximum throughput is essentially synonymous withdigital bandwidth capacity. Four different values are relevant in the context of maximum throughput are used in comparing theupper limitconceptual performance of multiple systems. They aremaximum theoretical throughput,maximum achievable throughput,peak measured throughput, andmaximum sustained throughput. These values represent different qualities, and care must be taken that the same definitions are used when comparing differentmaximum throughputvalues. Each bit must carry the same amount of information if throughput values are to be compared.Data compressioncan significantly alter throughput calculations, including generating values exceeding 100% in some cases. If the communication is mediated by several links in series with different bit rates, the maximum throughput of the overall link is lower than or equal to the lowest bit rate. The lowest value link in the series is referred to as thebottleneck. Maximum theoretical throughput is closely related to thechannel capacityof the system,[2]and is the maximum possible quantity of data that can be transmitted under ideal circumstances. In some cases, this number is reported as equal to the channel capacity, though this can be deceptive, as only non-packetized systems technologies can achieve this. Maximum theoretical throughput is more accurately reported taking into account format and specificationoverheadwith best-case assumptions. Theasymptotic throughput(less formalasymptotic bandwidth) for a packet-modecommunication networkis the value of themaximum throughputfunction, when the incoming network load approachesinfinity, either due to amessage size,[3]or the number of data sources. As with otherbit ratesanddata bandwidths, the asymptotic throughput is measured inbits per second(bit/s)or (rarely)bytesper second(B/s), where1 B/sis8 bit/s.Decimal prefixesare used, meaning that1 Mbit/sis1000000 bit/s. Asymptotic throughput is usually estimated by sending orsimulatinga very large message (sequence of data packets) through the network, using agreedy sourceand noflow controlmechanism (i.e.,UDPrather thanTCP), and measuring the volume of data received at the destination node. Traffic load between other sources may reduce this maximum network path throughput. Alternatively, a large number of sources and sinks may be modeled, with or without flow control, and the aggregate maximum network throughput measured (the sum of traffic reaching its destinations). In a network simulation model with infinitately large packet queues, the asymptotic throughput occurs when thelatency(the packet queuing time) goes to infinity, while if the packet queues are limited, or the network is a multi-drop network with many sources, and collisions may occur, the packet-dropping rate approaches 100%. A well-known application of asymptotic throughput is in modelingpoint-to-point communicationwheremessage latencyT(N){\displaystyle T(N)}is modeled as a function of message lengthN{\displaystyle N}asT(N)=(M+N)/A{\displaystyle T(N)=(M+N)/A}whereA{\displaystyle A}is the asymptotic bandwidth andM{\displaystyle M}is the half-peak length.[4] As well as its use in general network modeling, asymptotic throughput is used in modeling performance onmassively parallelcomputer systems, where system operation is highly dependent on communication overhead, as well as processor performance.[5]In these applications, asymptotic throughput is used modeling which includes the number of processors, so that both the latency and the asymptotic throughput are functions of the number of processors.[6] Where asymptotic throughput is a theoretical or calculated capacity,peak measured throughputis throughput measured on a real implemented system, or on a simulated system. The value is the throughput measured over a short period of time; mathematically, this is the limit taken with respect to throughput as time approaches zero. This term is synonymous withinstantaneous throughput. This number is useful for systems that rely on burst data transmission; however, for systems with a highduty cycle, this is less likely to be a useful measure of system performance. This value is the throughput averaged or integrated over a long time (sometimes considered infinity). For high duty cycle networks, this is likely to be the most accurate indicator of system performance. The maximum throughput is defined as theasymptotic throughputwhen the load (the amount of incoming data) is large. Inpacket switchedsystems where the load and the throughput always are equal (wherepacket lossdoes not occur), the maximum throughput may be defined as the minimum load inbit/sthat causes the delivery time (thelatency) to become unstable and increase towards infinity. This value can also be used deceptively in relation to peak measured throughput to concealpacket shaping. Throughput is sometimes normalized and measured in percentage, but normalization may cause confusion regarding what the percentage is related to.Channel utilization,channel efficiencyandpacket drop ratein percentage are less ambiguous terms. The channel efficiency, also known asbandwidth utilization efficiency, is the percentage of thenet bit rate(inbit/s) of a digitalcommunication channelthat goes to the actually achieved throughput. For example, if the throughput is70 Mbit/sin a100 Mbit/sEthernet connection, the channel efficiency is 70%. In this example, effectively 70 Mbit of data are transmitted every second. Channel utilization is instead a term related to the use of the channel, disregarding the throughput. It counts not only with the data bits, but also with the overhead that makes use of the channel. The transmission overhead consists of preamble sequences, frame headers and acknowledge packets. The definitions assume a noiseless channel. Otherwise, the throughput would not be only associated with the nature (efficiency) of the protocol, but also to retransmissions resultant from the quality of the channel. In a simplistic approach, channel efficiency can be equal to channel utilization assuming that acknowledge packets are zero-length and that the communications provider will not see any bandwidth relative to retransmissions or headers. Therefore, certain texts mark a difference between channel utilization and protocol efficiency. In a point-to-point orpoint-to-multipoint communicationlink, where only one terminal is transmitting, the maximum throughput is often equivalent to or very near the physical data rate (thechannel capacity), since the channel utilization can be almost 100% in such a network, except for a small inter-frame gap. For example, the maximum frame size in Ethernet is 1526 bytes: up to 1500 bytes for the payload, eight bytes for the preamble, 14 bytes for the header, and 4 bytes for the trailer. An additional minimum interframe gap corresponding to 12 bytes is inserted after each frame. This corresponds to a maximum channel utilization of 1526 / (1526 + 12) × 100% = 99.22%, or a maximum channel use of99.22 Mbit/sinclusive of Ethernet datalink layer protocol overhead in a100 Mbit/sEthernet connection. The maximum throughput or channel efficiency is then 1500 / (1526 + 12) = 97.5%, exclusive of the Ethernet protocol overhead. The throughput of a communication system will be limited by a huge number of factors. Some of these are described below: The maximum achievable throughput (the channel capacity) is affected by the bandwidth in hertz andsignal-to-noise ratioof the analog physical medium. Despite the conceptual simplicity of digital information, all electrical signals traveling over wires are analog. The analog limitations of wires or wireless systems inevitably provide an upper bound on the amount of information that can be sent. The dominant equation here is theShannon–Hartley theorem, and analog limitations of this type can be understood as factors that affect either the analog bandwidth of a signal or as factors that affect the signal-to-noise ratio. The bandwidth of wired systems can be in fact surprisingly[according to whom?]narrow, with the bandwidth of Ethernet wire limited to approximately 1 GHz, and PCB traces limited by a similar amount. Digital systems refer to the 'knee frequency',[7]the amount of time for the digital voltage to rise from 10% of a nominal digital '0' to a nominal digital '1' or vice versa. The knee frequency is related to the required bandwidth of a channel, and can be related to the3 db bandwidthof a system by the equation:[8]F3dB≈K/Tr{\displaystyle \ F_{3dB}\approx K/T_{r}}Where Tr is the 10% to 90% rise time, and K is a constant of proportionality related to the pulse shape, equal to 0.35 for an exponential rise, and 0.338 for a Gaussian rise. Computational systems have finite processing power and can drive finite current. Limited current drive capability can limit the effective signal to noise ratio for highcapacitancelinks. Large data loads that require processing impose data processing requirements on hardware (such as routers). For example, a gateway router supporting a populatedclass B subnet, handling 10 ×100 Mbit/sEthernet channels, must examine 16 bits of address to determine the destination port for each packet. This translates into 81913 packets per second (assuming maximum data payload per packet) with a table of 2^16 addresses this requires the router to be able to perform 5.368 billion lookup operations per second. In a worst-case scenario, where the payloads of each Ethernet packet are reduced to 100 bytes, this number of operations per second jumps to 520 billion. This router would require a multi-teraflop processing core to be able to handle such a load. Ensuring that multiple users can harmoniously share a single communications link requires some kind of equitable sharing of the link. If a bottleneck communication link offering data rateRis shared by "N" active users (with at least one data packet in queue), every user typically achieves a throughput of approximatelyR/N, iffair queuingbest-effortcommunication is assumed. The maximum throughput is often an unreliable measurement of perceived bandwidth, for example the file transmission data rate in bits per seconds. As pointed out above, the achieved throughput is often lower than the maximum throughput. Also, the protocol overhead affects the perceived bandwidth. The throughput is not a well-defined metric when it comes to how to deal with protocol overhead. It is typically measured at a reference point below the network layer and above the physical layer. The simplest definition is the number of bits per second that are physically delivered. A typical example where this definition is practiced is an Ethernet network. In this case, the maximum throughput is thegross bit rateor raw bit rate. However, in schemes that includeforward error correction codes(channel coding), the redundant error code is normally excluded from the throughput. An example inmodemcommunication, where the throughput typically is measured in the interface between thePoint-to-Point Protocol(PPP) and the circuit-switched modem connection. In this case, the maximum throughput is often callednet bit rateor useful bit rate. To determine the actual data rate of a network or connection, the "goodput" measurement definition may be used. For example, in file transmission, the "goodput" corresponds to the file size (in bits) divided by the file transmission time. The "goodput" is the amount of useful information that is delivered per second to theapplication layerprotocol. Dropped packets or packet retransmissions, as well as protocol overhead, are excluded. Because of that, the "goodput" is lower than the throughput. Technical factors that affect the difference are presented in the "goodput" article. Often, a block in adata flow diagramhas a single input and a single output, and operate on discrete packets of information. Examples of such blocks arefast Fourier transformmodules orbinary multipliers. Because the units of throughput are the reciprocal of the unit forpropagation delay, which is 'seconds per message' or 'seconds per output', throughput can be used to relate a computational device performing a dedicated function such as anASICorembedded processorto a communications channel, simplifying system analysis. Inwireless networksorcellular systems, thesystem spectral efficiencyin bit/s/Hz/area unit, bit/s/Hz/site or bit/s/Hz/cell, is the maximum system throughput (aggregate throughput) divided by the analog bandwidth and some measure of the system coverage area. Throughput over analog channels is defined entirely by the modulation scheme, the signal-to-noise ratio, and the available bandwidth. Since throughput is normally defined in terms of quantified digital data, the term 'throughput' is not normally used; the term 'bandwidth' is more often used instead.
https://en.wikipedia.org/wiki/Throughput
Ingraph theory, theShannon capacity of a graphis agraph invariantdefined from the number ofindependent setsofstrong graph products. It is named after American mathematicianClaude Shannon. It measures theShannon capacityof acommunications channeldefined from the graph, and is upper bounded by theLovász number, which can be computed inpolynomial time. However, thecomputational complexityof the Shannon capacity itself remains unknown. The Shannon capacity models the amount of information that can be transmitted across anoisycommunication channel in which certain signal values can be confused with each other. In this application, theconfusion graph[1]orconfusability graphdescribes the pairs of values that can be confused. For instance, suppose that a communications channel has five discrete signal values, any one of which can be transmitted in a single time step. These values may be modeled mathematically as the five numbers 0, 1, 2, 3, or 4 inmodular arithmeticmodulo 5. However, suppose that when a valuei{\displaystyle i}is sent across the channel, the value that is received isi+ξ{\displaystyle i+\xi }(mod 5) whereξ{\displaystyle \xi }represents the noise on the channel and may be any real number in the open interval from −1 to 1. Thus, if the recipient receives a value such as 3.6, it is impossible to determine whether it was originally transmitted as a 3 or as a 4; the two values 3 and 4 can be confused with each other. This situation can be modeled by a graph, acycleC5{\displaystyle C_{5}}of length 5, in which the vertices correspond to the five values that can be transmitted and the edges of the graph represent values that can be confused with each other. For this example, it is possible to choose two values that can be transmitted in each time step without ambiguity, for instance, the values 1 and 3. These values are far enough apart that they can't be confused with each other: when the recipient receives a valuex{\displaystyle x}between 0 and 2, it can deduce that the value that was sent must have been 1, and when the recipient receives a valuex{\displaystyle x}in between 2 and 4, it can deduce that the value that was sent must have been 3. In this way, inn{\displaystyle n}steps of communication, the sender can communicate up to2n{\displaystyle 2^{n}}different messages. Two is the maximum number of values that the recipient can distinguish from each other: every subset of three or more of the values 0, 1, 2, 3, 4 includes at least one pair that can be confused with each other. Even though the channel has five values that can be sent per time step, effectively only two of them can be used with this coding scheme. However, more complicated coding schemes allow a greater amount of information to be sent across the same channel, by using codewords of length greater than one. For instance, suppose that in two consecutive steps the sender transmits one of the fivecode words"11", "23", "35", "54", or "42". (Here, the quotation marks indicate that these words should be interpreted asstringsof symbols, not as decimal numbers.) Each pair of these code words includes at least one position where its values differ by two or more modulo 5; for instance, "11" and "23" differ by two in their second position, while "23" and "42" differ by two in their first position. Therefore, a recipient of one of these code words will always be able to determine unambiguously which one was sent: no two of these code words can be confused with each other. By using this method, inn{\displaystyle n}steps of communication, the sender can communicate up to5n/2{\displaystyle 5^{n/2}}messages, significantly more than the2n{\displaystyle 2^{n}}that could be transmitted with the simpler one-digit code. The effective number of values that can be transmitted per unit time step is(5n/2)1/n=5{\textstyle (5^{n/2})^{1/n}={\sqrt {5}}}. In graph-theoretic terms, this means that the Shannon capacity of the 5-cycle is at least5{\displaystyle {\sqrt {5}}}. AsLovász (1979)showed, this bound is tight: it is not possible to find a more complicated system of code words that allows even more different messages to be sent in the same amount of time, so the Shannon capacity of the 5-cycle isexactly5{\displaystyle {\sqrt {5}}}. If a graphG{\displaystyle G}represents a set of symbols and the pairs of symbols that can be confused with each other, then a subsetS{\displaystyle S}of symbols avoids all confusable pairs if and only ifS{\displaystyle S}is anindependent setin the graph, a subset of vertices that does not include both endpoints of any edge. The maximum possible size of a subset of the symbols that can all be distinguished from each other is theindependence numberα(G){\displaystyle \alpha (G)}of the graph, the size of itsmaximum independent set. For instance, 'α(C5)=2{\displaystyle \alpha (C_{5})=2}: the 5-cycle has independent sets of two vertices, but not larger. For codewords of longer lengths, one can use independent sets in larger graphs to describe the sets of codewords that can be transmitted without confusion. For instance, for the same example of five symbols whose confusion graph isC5{\displaystyle C_{5}}, there are 25 strings of length two that can be used in a length-2 coding scheme. These strings may be represented by the vertices of a graph with 25 vertices. In this graph, each vertex has eight neighbors, the eight strings that it can be confused with. A subset of length-two strings forms a code with no possible confusion if and only if it corresponds to an independent set of this graph. The set of code words {"11", "23", "35", "54", "42"} forms one of these independent sets, of maximum size. IfG{\displaystyle G}is a graph representing the signals and confusable pairs of a channel, then the graph representing the length-two codewords and their confusable pairs isG⊠G{\displaystyle G\boxtimes G}, where the symbol⊠{\displaystyle \boxtimes }represents thestrong product of graphs. This is a graph that has a vertex for each pair(u,v){\displaystyle (u,v)}of a vertex in the first argument of the product and a vertex in the second argument of the product. Two distinct pairs(u1,v1){\displaystyle (u_{1},v_{1})}and(u2,v2){\displaystyle (u_{2},v_{2})}are adjacent in the strong product if and only ifu1{\displaystyle u_{1}}andu2{\displaystyle u_{2}}are identical or adjacent, andv1{\displaystyle v_{1}}andv2{\displaystyle v_{2}}are identical or adjacent. More generally, the codewords of lengthk{\displaystyle k}can be represented by the graphGk{\displaystyle G_{k}}, thek{\displaystyle k}-fold strong product ofG{\displaystyle G}with itself, and the maximum number of codewords of this length that can be transmitted without confusion is given by the independence numberα(Gk){\displaystyle \alpha (G_{k})}. The effective number of signals transmitted per unit time step is thek{\displaystyle k}th root of this number,α(Gk)1/k{\displaystyle \alpha (G_{k})^{1/k}}. Using these concepts, the Shannon capacity may be defined as the limit (ask{\displaystyle k}becomes arbitrarily large) of the effective number of signals per time step of arbitrarily long confusion-free codes. Thecomputational complexityof the Shannon capacity is unknown, and even the value of the Shannon capacity for certain small graphs such asC7{\displaystyle C_{7}}(acycle graphof seven vertices) remains unknown.[2][3] A natural approach to this problem would be to compute a finite number of powers of the given graphG{\displaystyle G}, find their independence numbers, and infer from these numbers some information about the limiting behavior of the sequence from which the Shannon capacity is defined. However (even ignoring the computational difficulty of computing the independence numbers of these graphs, anNP-hardproblem) the unpredictable behavior of the sequence of independence numbers of powers ofG{\displaystyle G}implies that this approach cannot be used to accurately approximate the Shannon capacity.[4] In part because the Shannon capacity is difficult to compute, researchers have looked for other graph invariants that are easy to compute and that provide bounds on the Shannon capacity. TheLovász numberϑ(G) is a different graph invariant, that can be computed numerically to high accuracy inpolynomial timeby an algorithm based on theellipsoid method. The Shannon capacity of a graphGis bounded from below by α(G), and from above by ϑ(G).[5]In some cases, ϑ(G) and the Shannon capacity coincide; for instance, for the graph of apentagon, both are equal to√5. However, there exist other graphs for which the Shannon capacity and the Lovász number differ.[6] Haemers provided another upper bound on the Shannon capacity, which is sometimes better than Lovász bound:[7] whereBis ann×nmatrix over somefield, such thatbii≠ 0 andbij= 0 if verticesiandjare not adjacent.
https://en.wikipedia.org/wiki/Shannon_capacity_of_a_graph